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/sun50iw2.conf
Views: 3960
1
ATF_PLAT="sun50i_a64"
2
source "${BASH_SOURCE%/*}/include/sunxi64_common.inc"
3
OVERLAY_PREFIX='sun50i-h5'
4
[[ -z $CPUMIN ]] && CPUMIN=480000
5
[[ -z $CPUMAX ]] && CPUMAX=1368000
6
GOVERNOR=ondemand
7
ASOUND_STATE='asound.state.sun50iw2-current'
8
9
[[ $RELEASE == focal ]] && MODULES_BLACKLIST_CURRENT="lima"
10
11
case $BRANCH in
12
legacy)
13
14
LINUXFAMILY=sun50iw2
15
16
KERNELBRANCH="branch:orange-pi-3.10-sun50iw2"
17
KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH}
18
KERNEL_COMPILER="aarch64-linux-gnu-"
19
KERNEL_USE_GCC='> 3.0'
20
21
BOOTCONFIG="sun50iw2p1_config"
22
BOOTBRANCH='branch:v2014.07-sun50iw2-linux3.10'
23
UBOOT_TARGET_MAP=';;u-boot.bin:u-boot.fex
24
spl;;boot0_sdcard.bin:boot0_sdcard.fex'
25
UBOOT_COMPILER="arm-linux-gnueabi-"
26
UBOOT_USE_GCC='> 4.0'
27
BOOTENV_FILE=sun50iw2-legacy.txt
28
BOOTSCRIPT='boot-sun50iw2-legacy.cmd:boot.cmd'
29
PACK_UBOOT="yes"
30
OFFSET=20
31
ATFSOURCE=""
32
ATF_COMPILE="no"
33
INITRD_ARCH=arm
34
ASOUND_STATE='asound.state.sun50iw2-legacy'
35
BOOT_FDT_FILE=sun50i-h5-orangepi-${BOARD:8}.dtb
36
;;
37
38
current)
39
40
if [[ $BOARD =~ orangepipch5|orangepioneh5 ]]; then
41
42
KERNELBRANCH="branch:orange-pi-5.10"
43
LINUXCONFIG=linux-5.10-sunxi64-current
44
fi
45
;;
46
esac
47
48
family_tweaks_s()
49
{
50
51
if [[ -f $SDCARD/lib/systemd/system/ap6212-bluetooth.service ]]; then
52
53
# install and enable Bluetooth
54
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1"
55
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6212-bluetooth.service >/dev/null 2>&1"
56
fi
57
58
if [[ -f $SDCARD/lib/systemd/system/rtl8723bs-bluetooth.service ]]; then
59
60
# install and enable Bluetooth
61
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1"
62
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable rtl8723bs-bluetooth.service >/dev/null 2>&1"
63
fi
64
65
if [[ $BOARD == orangepizeroplus2h5 && $BRANCH == legacy ]]; then
66
67
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1"
68
69
cat <<-EOF > "${SDCARD}"/etc/rc.local
70
#!/bin/sh -e
71
#
72
# rc.local
73
#
74
# This script is executed at the end of each multiuser runlevel.
75
# Make sure that the script will "exit 0" on success or any other
76
# value on error.
77
#
78
# In order to enable or disable this script just change the execution
79
# bits.
80
#
81
# By default this script does nothing.
82
83
/usr/bin/zeroplus2-bt.sh
84
85
exit 0
86
EOF
87
chmod +x "${SDCARD}"/etc/rc.local
88
fi
89
}
90
91
family_tweaks_bsp()
92
{
93
94
if [[ $BOARD == orangepizeroplus2h5 ]]; then
95
96
install -m 755 $EXTER/packages/blobs/bt/brcm_patchram_plus/brcm_patchram_plus_$ARCH $destination/usr/bin/brcm_patchram_plus
97
98
if [[ $BRANCH == current ]]; then
99
cp $EXTER/packages/bsp/sunxi/ap6212-bluetooth.service $destination/lib/systemd/system/
100
fi
101
102
if [[ $BRANCH == legacy ]]; then
103
cp ${EXTER}/packages/bsp/sunxi/ap6212.conf $destination//etc/modprobe.d/
104
install -m 755 $EXTER/packages/bsp/sunxi/zeroplus2-bt-legacy.sh $destination/usr/bin/zeroplus2-bt.sh
105
fi
106
fi
107
108
if [[ $BOARD == orangepiprime ]]; then
109
110
install -m 755 $EXTER/packages/blobs/bt/hciattach/rtk_hciattach_$ARCH $destination/usr/bin/rtk_hciattach
111
cp $EXTER/packages/bsp/sunxi/rtl8723bs-bluetooth.service $destination/lib/systemd/system/
112
fi
113
}
114
115