diff --git a/external/config/sources/families/sun50iw2.conf b/external/config/sources/families/sun50iw2.conf index 137210e..e786344 100644 --- a/external/config/sources/families/sun50iw2.conf +++ b/external/config/sources/families/sun50iw2.conf @@ -6,36 +6,97 @@ OVERLAY_PREFIX='sun50i-h5' GOVERNOR=ondemand ASOUND_STATE='asound.state.sun50iw2-dev' +case $BRANCH in + legacy) + + LINUXFAMILY=sun50iw2 + + KERNELBRANCH="branch:orange-pi-3.10-sun50iw2" + KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH} + KERNEL_COMPILER="aarch64-linux-gnu-" + KERNEL_USE_GCC='> 3.0' + + BOOTCONFIG="sun50iw2p1_config" + BOOTBRANCH='branch:v2014.07-sun50iw2-linux3.10' + UBOOT_TARGET_MAP=';;u-boot.bin:u-boot.fex + spl;;boot0_sdcard.bin:boot0_sdcard.fex' + UBOOT_COMPILER="arm-linux-gnueabi-" + UBOOT_USE_GCC='> 4.0' + BOOTENV_FILE=sun50iw2-legacy.txt + BOOTSCRIPT='boot-sun50iw2-legacy.cmd:boot.cmd' + PACK_UBOOT="yes" + OFFSET=20 + ATFSOURCE="" + ATF_COMPILE="no" + INITRD_ARCH=arm + ASOUND_STATE='asound.state.sun50iw2-legacy' + BOOT_FDT_FILE=sun50i-h5-orangepi-${BOARD:8}.dtb + ;; +esac + family_tweaks_s() { - if [[ -f $SDCARD/lib/systemd/system/ap6212-bluetooth.service ]]; then + if [[ -f $SDCARD/lib/systemd/system/ap6212-bluetooth.service ]]; then - # install and enable Bluetooth - chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1" - chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6212-bluetooth.service >/dev/null 2>&1" + # install and enable Bluetooth + chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1" + chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6212-bluetooth.service >/dev/null 2>&1" fi if [[ -f $SDCARD/lib/systemd/system/rtl8723bs-bluetooth.service ]]; then - # install and enable Bluetooth - chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1" - chroot $SDCARD /bin/bash -c "systemctl --no-reload enable rtl8723bs-bluetooth.service >/dev/null 2>&1" + # install and enable Bluetooth + chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1" + chroot $SDCARD /bin/bash -c "systemctl --no-reload enable rtl8723bs-bluetooth.service >/dev/null 2>&1" + fi + + if [[ $BOARD == orangepizeroplus2h5 && $BRANCH == legacy ]]; then + + chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1" + + cat <<-EOF > "${SDCARD}"/etc/rc.local + #!/bin/sh -e + # + # rc.local + # + # This script is executed at the end of each multiuser runlevel. + # Make sure that the script will "exit 0" on success or any other + # value on error. + # + # In order to enable or disable this script just change the execution + # bits. + # + # By default this script does nothing. + + /usr/bin/zeroplus2-bt.sh + + exit 0 + EOF + chmod +x "${SDCARD}"/etc/rc.local fi } family_tweaks_bsp() { - if [[ $BOARD == orangepizeroplus2h5 ]]; then + if [[ $BOARD == orangepizeroplus2h5 ]]; then - install -m 755 $EXTER/packages/blobs/bt/brcm_patchram_plus/brcm_patchram_plus_$ARCH $destination/usr/bin/brcm_patchram_plus - cp $EXTER/packages/bsp/sunxi/ap6212-bluetooth.service $destination/lib/systemd/system/ - fi + install -m 755 $EXTER/packages/blobs/bt/brcm_patchram_plus/brcm_patchram_plus_$ARCH $destination/usr/bin/brcm_patchram_plus - if [[ $BOARD == orangepiprime ]]; then + if [[ $BRANCH == current ]]; then + cp $EXTER/packages/bsp/sunxi/ap6212-bluetooth.service $destination/lib/systemd/system/ + fi - install -m 755 $EXTER/packages/blobs/bt/hciattach/rtk_hciattach_$ARCH $destination/usr/bin/rtk_hciattach - cp $EXTER/packages/bsp/sunxi/rtl8723bs-bluetooth.service $destination/lib/systemd/system/ - fi + if [[ $BRANCH == legacy ]]; then + cp ${EXTER}/packages/bsp/sunxi/ap6212.conf $destination//etc/modprobe.d/ + install -m 755 $EXTER/packages/bsp/sunxi/zeroplus2-bt-legacy.sh $destination/usr/bin/zeroplus2-bt.sh + fi + fi + + if [[ $BOARD == orangepiprime ]]; then + + install -m 755 $EXTER/packages/blobs/bt/hciattach/rtk_hciattach_$ARCH $destination/usr/bin/rtk_hciattach + cp $EXTER/packages/bsp/sunxi/rtl8723bs-bluetooth.service $destination/lib/systemd/system/ + fi }