CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/config/sources/families/sun8i.conf
Views: 3960
1
source "${BASH_SOURCE%/*}/include/sunxi_common.inc"
2
3
if [[ -z ${OVERLAY_PREFIX} ]]; then
4
OVERLAY_PREFIX='sun8i-h3'
5
fi
6
7
[[ -z $CPUMIN ]] && CPUMIN=480000
8
[[ -z $CPUMAX ]] && CPUMAX=1400000
9
10
family_tweaks_s()
11
{
12
13
if [[ -f $SDCARD/lib/systemd/system/ap6212-bluetooth.service && $BRANCH == current ]]; then
14
15
# install and enable Bluetooth
16
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1"
17
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6212-bluetooth.service >/dev/null 2>&1"
18
fi
19
20
if [[ $BOARD == orangepizeroplus2h3 && $BRANCH == legacy ]]; then
21
22
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1"
23
24
cat <<-EOF > "${SDCARD}"/etc/rc.local
25
#!/bin/sh -e
26
#
27
# rc.local
28
#
29
# This script is executed at the end of each multiuser runlevel.
30
# Make sure that the script will "exit 0" on success or any other
31
# value on error.
32
#
33
# In order to enable or disable this script just change the execution
34
# bits.
35
#
36
# By default this script does nothing.
37
38
/usr/bin/zeroplus2-bt.sh
39
40
exit 0
41
EOF
42
chmod +x "${SDCARD}"/etc/rc.local
43
fi
44
}
45
46
family_tweaks_bsp_s()
47
{
48
49
if [[ $BOARD == orangepizeroplus2h3 && $BRANCH == current ]]; then
50
51
install -m 755 $EXTER/packages/blobs/bt/brcm_patchram_plus/brcm_patchram_plus_$ARCH $destination/usr/bin/brcm_patchram_plus
52
cp $EXTER/packages/bsp/sunxi/ap6212-bluetooth.service $destination/lib/systemd/system/
53
fi
54
55
if [[ $BOARD == orangepizeroplus2h3 && $BRANCH == legacy ]]; then
56
57
install -m 755 $EXTER/packages/blobs/bt/brcm_patchram_plus/brcm_patchram_plus_$ARCH $destination/usr/bin/brcm_patchram_plus
58
install -m 755 $EXTER/packages/bsp/sunxi/zeroplus2-bt.sh $destination/usr/bin/
59
fi
60
61
if [[ $BRANCH == legacy ]]; then
62
63
arm-linux-gnueabihf-gcc $EXTER/packages/bsp/sunxi-temp/sunxi_tp_temp.c -o $destination/usr/bin/sunxi_tp_temp
64
# convert and add fex files
65
mkdir -p $destination/boot/bin
66
for i in $(ls -w1 $EXTER/config/fex/*.fex | xargs -n1 basename); do
67
fex2bin $EXTER/config/fex/${i%*.fex}.fex $destination/boot/bin/${i%*.fex}.bin
68
done
69
fi
70
71
# h3disp for sun8i/3.4.x
72
if [[ $BRANCH == legacy ]]; then
73
74
install -m 755 $EXTER/packages/bsp/{h3disp,h3consumption,setsystem} $destination/usr/bin
75
fi
76
}
77
78