mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-11-14 12:03:49 +07:00
First Commit
This commit is contained in:
1
external/config/sources/README.md
vendored
Symbolic link
1
external/config/sources/README.md
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
families/README.md
|
||||
28
external/config/sources/arm64.conf
vendored
Normal file
28
external/config/sources/arm64.conf
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
QEMU_BINARY="qemu-aarch64-static"
|
||||
ARCHITECTURE=arm64
|
||||
ARCH=arm64
|
||||
KERNEL_IMAGE_TYPE=Image
|
||||
CAN_BUILD_STRETCH=yes
|
||||
GIT_SERVER="https://github.com/orangepi-xunlong"
|
||||
#[[ ${DOWNLOAD_MIRROR} == china ]] && GIT_SERVER="https://gitee.com/leeboby"
|
||||
|
||||
[[ -z $INITRD_ARCH ]] && INITRD_ARCH=arm64
|
||||
|
||||
[[ $ATF_COMPILE != "no" && -z $ATF_COMPILER ]] && ATF_COMPILER="aarch64-none-linux-gnu-"
|
||||
[[ $ATF_COMPILE != "no" && -z $ATFSOURCE ]] && ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
|
||||
#[[ $ATF_COMPILE != "no" && ${DOWNLOAD_MIRROR} == china ]] && ATFSOURCE="${GIT_SERVER}/arm-trusted-firmware"
|
||||
[[ $ATF_COMPILE != "no" && -z $ATFDIR ]] && ATFDIR='arm-trusted-firmware-sunxi-mainline'
|
||||
[[ $ATF_COMPILE != "no" && -z $ATFBRANCH ]] && ATFBRANCH='branch:master'
|
||||
[[ $ATF_COMPILE != "no" && -z $ATF_USE_GCC ]] && ATF_USE_GCC='> 8.0'
|
||||
|
||||
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="aarch64-none-linux-gnu-"
|
||||
[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0'
|
||||
[[ -z $BOOTSOURCE ]] && BOOTSOURCE="${GIT_SERVER}/u-boot-orangepi.git"
|
||||
[[ -z $BOOTDIR ]] && BOOTDIR="${SRC}/u-boot"
|
||||
[[ -z $BOOTBRANCH ]] && BOOTBRANCH='branch:v2020.04'
|
||||
|
||||
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-none-linux-gnu-"
|
||||
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 8.0'
|
||||
[[ -z $KERNELDIR ]] && KERNELDIR="${SRC}/kernel"
|
||||
[[ -z $KERNELSOURCE ]] && KERNELSOURCE="${GIT_SERVER}/linux-orangepi.git"
|
||||
[[ -z $KERNELBRANCH ]] && KERNELBRANCH='branch:orange-pi-5.4'
|
||||
20
external/config/sources/armhf.conf
vendored
Normal file
20
external/config/sources/armhf.conf
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
INITRD_ARCH=arm
|
||||
QEMU_BINARY="qemu-arm-static"
|
||||
ARCHITECTURE=arm
|
||||
ARCH=armhf
|
||||
KERNEL_IMAGE_TYPE=Image
|
||||
CAN_BUILD_STRETCH=yes
|
||||
GIT_SERVER="https://github.com/orangepi-xunlong"
|
||||
#[[ ${DOWNLOAD_MIRROR} == china ]] && GIT_SERVER="https://gitee.com/leeboby"
|
||||
|
||||
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-none-linux-gnueabihf-"
|
||||
[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0'
|
||||
[[ -z $BOOTSOURCE ]] && BOOTSOURCE="${GIT_SERVER}/u-boot-orangepi.git"
|
||||
[[ -z $BOOTDIR ]] && BOOTDIR="${SRC}/u-boot"
|
||||
[[ -z $BOOTBRANCH ]] && BOOTBRANCH='branch:v2020.04'
|
||||
|
||||
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-none-linux-gnueabihf-"
|
||||
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 8.0'
|
||||
[[ -z $KERNELDIR ]] && KERNELDIR="${SRC}/kernel"
|
||||
[[ -z $KERNELSOURCE ]] && KERNELSOURCE="${GIT_SERVER}/linux-orangepi.git"
|
||||
[[ -z $KERNELBRANCH ]] && KERNELBRANCH='branch:orange-pi-5.4'
|
||||
15
external/config/sources/families/README.md
vendored
Normal file
15
external/config/sources/families/README.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|armhf| arm64 |
|
||||
|:--|:--|
|
||||
| imx6 : imx6 | meson-gxbb : meson64 |
|
||||
| imx7d : imx7d | meson-gxl : meson64 |
|
||||
| meson8b: meson | mt7623 : mt7623|
|
||||
| mvebu : mvebu | mvebu64 : mvebu64 |
|
||||
| odroidxu4 : odroidxu4 | odroidn2 : odroidn2|
|
||||
| rockchip : rockchip | rk3399 : rk3399 |
|
||||
| Allwinner sun4i : sunxi | rockchip64 : rockchip64|
|
||||
| Allwinner sun5i : sunxi | s5p6818 : s5p6818 |
|
||||
| Allwinner sun6i : sunxi | sun50iw1 : sunxi64 |
|
||||
| Allwinner sun7i : sunxi | sun50iw2 : sunxi64 |
|
||||
| Allwinner sun8i : sunxi | sun50iw6 : sunxi64 |
|
||||
| Allwinner sun9i : sunxi                             |                                 |
|
||||
300
external/config/sources/families/include/rockchip64_common.inc
vendored
Normal file
300
external/config/sources/families/include/rockchip64_common.inc
vendored
Normal file
@@ -0,0 +1,300 @@
|
||||
ARCH=arm64
|
||||
KERNEL_IMAGE_TYPE=Image
|
||||
OFFSET=16
|
||||
BOOTSCRIPT='boot-rockchip64.cmd:boot.cmd'
|
||||
BOOTENV_FILE='rockchip.txt'
|
||||
UBOOT_TARGET_MAP=";;idbloader.bin uboot.img trust.bin"
|
||||
BOOTDELAY=0
|
||||
OVERLAY_PREFIX='rockchip'
|
||||
SERIALCON=${SERIALCON:=$([ $BRANCH == "legacy" ] && echo "ttyFIQ0:1500000" || echo "ttyS2:1500000")}
|
||||
GOVERNOR="ondemand"
|
||||
CPUMAX="2016000"
|
||||
CPUMIN="408000"
|
||||
BOOTBRANCH="tag:v2020.07"
|
||||
|
||||
RKBIN_DIR="$SRC/cache/sources/rkbin-tools"
|
||||
|
||||
if [[ $BOARD == nanopi-r2s || $BOARD == rockpi-e || $BOARD == nanopineo3 ]]; then
|
||||
|
||||
BOOT_USE_BLOBS=yes
|
||||
BOOT_SOC=rk3328
|
||||
DDR_BLOB='rk33/rk3328_ddr_333MHz_v1.16.bin'
|
||||
MINILOADER_BLOB='rk33/rk322xh_miniloader_v2.50.bin'
|
||||
BL31_BLOB='rk33/rk322xh_bl31_v1.42.elf'
|
||||
|
||||
elif [[ $BOOTCONFIG == *3328* ]]; then
|
||||
|
||||
BOOT_RK3328_USE_AYUFAN_ATF=yes
|
||||
CPUMAX="1390000"
|
||||
|
||||
elif [[ $BOARD == rockpi-4* ]]; then
|
||||
|
||||
BOOT_USE_BLOBS=yes
|
||||
BOOT_SOC=rk3399
|
||||
DDR_BLOB='rk33/rk3399_ddr_933MHz_v1.20.bin' # 1GB model does not boot with later versions
|
||||
MINILOADER_BLOB='rk33/rk3399_miniloader_v1.19.bin'
|
||||
BL31_BLOB='rk33/rk3399_bl31_v1.30.elf'
|
||||
|
||||
elif [[ $BOARD == rockpro64 ]] || [[ $BOARD == pinebook-pro ]]; then
|
||||
|
||||
BOOT_RK3399_LEGACY_HYBRID=yes
|
||||
BL31_BLOB='rk33/rk3399_bl31_v1.17.elf'
|
||||
|
||||
elif [[ $BOARD == rockpi-s ]]; then
|
||||
|
||||
BOOT_USE_BLOBS=yes
|
||||
BOOT_SOC=rk3308
|
||||
DDR_BLOB='rk33/rk3308_ddr_589MHz_uart0_m0_v1.26.bin'
|
||||
MINILOADER_BLOB='rk33/rk3308_miniloader_sd_nand_v1.13.bin'
|
||||
BL31_BLOB='rk33/rk3308_bl31_v2.10.elf'
|
||||
CPUMAX="1296000"
|
||||
|
||||
else
|
||||
|
||||
ATFPATCHDIR='atf-rk3399'
|
||||
|
||||
fi
|
||||
|
||||
case $BRANCH in
|
||||
|
||||
current)
|
||||
|
||||
KERNELPATCHDIR='rockchip64-'$BRANCH
|
||||
KERNELBRANCH="branch:linux-5.7.y"
|
||||
LINUXFAMILY=rockchip64
|
||||
LINUXCONFIG='linux-rockchip64-'$BRANCH
|
||||
|
||||
;;
|
||||
|
||||
dev)
|
||||
|
||||
KERNELPATCHDIR='rockchip64-'$BRANCH
|
||||
KERNELBRANCH="branch:linux-5.7.y"
|
||||
LINUXFAMILY=rockchip64
|
||||
LINUXCONFIG='linux-rockchip64-'$BRANCH
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
prepare_boot_configuration()
|
||||
{
|
||||
if [[ $BOOT_USE_MAINLINE_ATF == yes ]]; then
|
||||
|
||||
UBOOT_TARGET_MAP="BL31=bl31.bin idbloader.img u-boot.itb;;idbloader.img u-boot.itb"
|
||||
ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
|
||||
ATF_COMPILER='aarch64-linux-gnu-'
|
||||
ATFDIR='arm-trusted-firmware'
|
||||
ATFBRANCH='tag:v2.2'
|
||||
ATF_USE_GCC='> 6.3'
|
||||
ATF_TARGET_MAP='M0_CROSS_COMPILE=arm-linux-gnueabi- PLAT=rk3399 bl31;;build/rk3399/release/bl31/bl31.elf:bl31.bin'
|
||||
ATF_TOOLCHAIN2="arm-linux-gnueabi-:> 5.0"
|
||||
|
||||
elif [[ $BOOT_USE_TPL_SPL_BLOB == yes ]]; then
|
||||
|
||||
UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB idbloader.img u-boot.itb;;idbloader.img u-boot.itb"
|
||||
ATFSOURCE=''
|
||||
ATF_COMPILE='no'
|
||||
|
||||
elif [[ $BOOT_USE_BLOBS == yes ]]; then
|
||||
|
||||
UBOOT_TARGET_MAP="u-boot-dtb.bin;;idbloader.bin uboot.img trust.bin"
|
||||
ATFSOURCE=''
|
||||
ATF_COMPILE='no'
|
||||
|
||||
elif [[ $BOOT_RK3399_LEGACY_HYBRID == yes ]]; then # to be removed
|
||||
|
||||
UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB u-boot-dtb.bin spl/u-boot-spl.bin u-boot.itb;;spl/u-boot-spl.bin u-boot.itb"
|
||||
ATFSOURCE=''
|
||||
ATF_COMPILE='no'
|
||||
|
||||
legacy_uboot_locations
|
||||
|
||||
elif [[ $BOOT_RK3328_USE_AYUFAN_ATF == yes ]]; then # to be removed
|
||||
|
||||
UBOOT_TARGET_MAP=";;idbloader.bin uboot.img trust.bin"
|
||||
ATFSOURCE='https://github.com/ayufan-rock64/arm-trusted-firmware'
|
||||
ATF_COMPILER='aarch64-linux-gnu-'
|
||||
ATFDIR='arm-trusted-firmware-rockchip64'
|
||||
ATFBRANCH='branch:rockchip'
|
||||
ATF_USE_GCC='> 6.3'
|
||||
ATF_TARGET_MAP='PLAT=rk322xh DEBUG=1 bl31;;trust.bin'
|
||||
ATF_TOOLCHAIN2="arm-linux-gnueabi-:> 5.0"
|
||||
|
||||
legacy_uboot_locations
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
legacy_uboot_locations()
|
||||
{
|
||||
BOOTSOURCE='https://github.com/ayufan-rock64/linux-u-boot'
|
||||
BOOTDIR='u-boot-rockchip64'
|
||||
BOOTBRANCH='branch:rockchip-master'
|
||||
case $BRANCH in
|
||||
legacy)
|
||||
BOOTPATCHDIR="u-boot-rockchip64"
|
||||
;;
|
||||
*)
|
||||
BOOTPATCHDIR="u-boot-rockchip64-dev"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
uboot_custom_postprocess()
|
||||
{
|
||||
if [[ $BOOT_USE_MAINLINE_ATF == yes || $BOOT_USE_TPL_SPL_BLOB == yes ]]; then
|
||||
|
||||
:
|
||||
|
||||
elif [[ $BOOT_USE_BLOBS == yes ]]; then
|
||||
|
||||
local tempfile=$(mktemp)
|
||||
tools/mkimage -n $BOOT_SOC -T rksd -d $RKBIN_DIR/$DDR_BLOB idbloader.bin
|
||||
cat $RKBIN_DIR/$MINILOADER_BLOB >> idbloader.bin
|
||||
loaderimage --pack --uboot ./u-boot-dtb.bin uboot.img 0x200000
|
||||
trust_merger --replace bl31.elf $RKBIN_DIR/$BL31_BLOB trust.ini
|
||||
|
||||
elif [[ $BOOT_RK3399_LEGACY_HYBRID == yes ]]; then
|
||||
|
||||
# 3399
|
||||
tools/mkimage -n rk3399 -T rksd -d $SRC/cache/sources/rkbin-tools/rk33/rk3399_ddr_933MHz_v1.13.bin rksd_loader.img
|
||||
cat spl/u-boot-spl.bin >> rksd_loader.img
|
||||
dd if=u-boot.itb of=rksd_loader.img seek=448 conv=notrunc
|
||||
cp rksd_loader.img $SRC/.tmp/$uboot_name/usr/lib/$uboot_name/$f_dst
|
||||
tools/mkimage -n rk3399 -T rksd -d $SRC/cache/sources/rkbin-tools/rk33/rk3399_ddr_933MHz_v1.13.bin rkspi_loader.img
|
||||
cat spl/u-boot-spl.bin >> rkspi_loader.img
|
||||
for i in `seq 1 128`; do dd count=4 status=none; dd if=/dev/zero count=4 status=none; done < rkspi_loader.img > rkspi_loader.tmp
|
||||
mv rkspi_loader.tmp rkspi_loader.img
|
||||
dd if=u-boot.itb of=rkspi_loader.img seek=1024 conv=notrunc
|
||||
cp rkspi_loader.img $SRC/.tmp/$uboot_name/usr/lib/$uboot_name/$f_dst
|
||||
|
||||
elif [[ $BOOT_RK3328_USE_AYUFAN_ATF == yes ]]; then
|
||||
|
||||
# 3328
|
||||
tools/mkimage -n rk3328 -T rksd -d $SRC/cache/sources/rkbin-tools/rk33/rk3328_ddr_786MHz_v1.13.bin idbloader.bin
|
||||
cat $SRC/cache/sources/rkbin-tools/rk33/rk3328_miniloader_v2.46.bin >> idbloader.bin
|
||||
loaderimage --pack --uboot ./u-boot-dtb.bin uboot.img 0x200000
|
||||
|
||||
else
|
||||
echo "Unsupported u-boot processing configuration!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
write_uboot_platform()
|
||||
{
|
||||
if [[ -f $1/rksd_loader.img ]]; then # legacy rk3399 loader
|
||||
|
||||
dd if=$1/rksd_loader.img of=$2 seek=64 conv=notrunc status=none >/dev/null 2>&1
|
||||
|
||||
elif [[ -f $1/u-boot.itb ]]; then # $BOOT_USE_MAINLINE_ATF == yes || $BOOT_USE_TPL_SPL_BLOB == yes
|
||||
|
||||
dd if=$1/idbloader.img of=$2 seek=64 conv=notrunc status=none >/dev/null 2>&1
|
||||
dd if=$1/u-boot.itb of=$2 seek=16384 conv=notrunc status=none >/dev/null 2>&1
|
||||
|
||||
elif [[ -f $1/uboot.img ]]; then # $BOOT_USE_BLOBS == yes
|
||||
|
||||
dd if=$1/idbloader.bin of=$2 seek=64 conv=notrunc status=none >/dev/null 2>&1
|
||||
dd if=$1/uboot.img of=$2 seek=16384 conv=notrunc status=none >/dev/null 2>&1
|
||||
dd if=$1/trust.bin of=$2 seek=24576 conv=notrunc status=none >/dev/null 2>&1
|
||||
|
||||
else
|
||||
echo "Unsupported u-boot processing configuration!"
|
||||
exit 1
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
setup_write_uboot_platform()
|
||||
{
|
||||
|
||||
if grep -q "ubootpart" /proc/cmdline; then
|
||||
|
||||
local tmp=$(cat /proc/cmdline)
|
||||
tmp="${tmp##*ubootpart=}"
|
||||
tmp="${tmp%% *}"
|
||||
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2>/dev/null)
|
||||
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
|
||||
[[ -n $dev ]] && DEVICE="/dev/$dev"
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
atf_custom_postprocess()
|
||||
{
|
||||
|
||||
# remove bl31.bin which can be 4+GiB in size and thus may fill the tmpfs mount
|
||||
rm -f build/rk322xh/debug/bl31.bin
|
||||
# ATF
|
||||
trust_merger trust.ini
|
||||
|
||||
}
|
||||
|
||||
|
||||
family_tweaks()
|
||||
{
|
||||
|
||||
if [[ $BOARD == z28pro ]]; then
|
||||
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable z28pro-bluetooth.service >/dev/null 2>&1"
|
||||
|
||||
elif [[ $BOARD == nanopi-r2s ]]; then
|
||||
|
||||
# rename USB based network to lan0
|
||||
mkdir -p $SDCARD/etc/udev/rules.d/
|
||||
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8152", KERNEL=="eth1", NAME="lan0"' > $SDCARD/etc/udev/rules.d/70-rename-lan.rules
|
||||
|
||||
# workaround - create old school initial network config since network manager have issues
|
||||
echo "auto eth0" >> $SDCARD/etc/network/interfaces
|
||||
echo " iface eth0 inet dhcp" >> $SDCARD/etc/network/interfaces
|
||||
echo "auto lan0" >> $SDCARD/etc/network/interfaces
|
||||
echo " iface lan0 inet dhcp" >> $SDCARD/etc/network/interfaces
|
||||
|
||||
elif [[ -f $SDCARD/lib/systemd/system/rk3399-bluetooth.service ]]; then
|
||||
|
||||
# install and enable Bluetooth
|
||||
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools"
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable rk3399-bluetooth.service >/dev/null 2>&1"
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
family_tweaks_bsp()
|
||||
{
|
||||
|
||||
if [[ $BOARD == z28pro ]]; then
|
||||
|
||||
mkdir -p $destination/usr/local/bin
|
||||
|
||||
# Bluetooth for Z28 PRO
|
||||
install -m 755 $SRC/packages/bsp/rk3328/z28pro/8822b_hciattach $destination/usr/bin
|
||||
install -m 755 $SRC/packages/bsp/rk3328/z28pro/start_bt.sh $destination/usr/local/bin
|
||||
cp $SRC/packages/bsp/rk3328/z28pro/z28pro-bluetooth.service $destination/lib/systemd/system/
|
||||
|
||||
elif [[ $BOARD == rockpi-4b || $BOARD == nanop* || $BOARD == orangepi* || $BOARD == firefly* || $BOARD == roc-rk3399-pc ]]; then
|
||||
|
||||
# Bluetooth for most of others
|
||||
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
|
||||
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
|
||||
|
||||
fi
|
||||
|
||||
if [[ $BOARD == pinebook-pro ]]; then
|
||||
|
||||
cp $SRC/packages/bsp/pinebook-pro/xorg.conf $destination/etc/X11/
|
||||
fi
|
||||
|
||||
# Graphics and media
|
||||
mkdir -p $destination/etc/udev/rules.d
|
||||
cp $SRC/packages/bsp/rk3399/50-mali.rules $destination/etc/udev/rules.d/
|
||||
cp $SRC/packages/bsp/rk3399/50-rk3399-vpu.rules $destination/etc/udev/rules.d/
|
||||
mkdir -p $destination/etc/sysfs.d
|
||||
cp $SRC/packages/bsp/rk3399/20-gpu-governor.conf $destination/etc/sysfs.d/
|
||||
|
||||
}
|
||||
72
external/config/sources/families/include/sunxi64_common.inc
vendored
Normal file
72
external/config/sources/families/include/sunxi64_common.inc
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
ARCH=arm64
|
||||
ATF_TARGET_MAP="PLAT=$ATF_PLAT DEBUG=1 bl31;;build/$ATF_PLAT/debug/bl31.bin"
|
||||
BOOTDELAY=1
|
||||
BOOTPATCHDIR='u-boot-sunxi'
|
||||
BOOTENV_FILE='sunxi.txt'
|
||||
UBOOT_TARGET_MAP=';;spl/sunxi-spl.bin u-boot.itb'
|
||||
BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
|
||||
LINUXFAMILY=sunxi64
|
||||
PACKAGE_LIST_DESKTOP_FAMILY="fcitx fonts-wqy-zenhei"
|
||||
|
||||
case $BRANCH in
|
||||
legacy)
|
||||
|
||||
KERNELBRANCH="branch:orange-pi-5.4"
|
||||
KERNELPATCHDIR='sunxi-'$BRANCH
|
||||
;;
|
||||
|
||||
current)
|
||||
|
||||
KERNELBRANCH="branch:orange-pi-5.4"
|
||||
KERNELPATCHDIR='sunxi-'$BRANCH
|
||||
|
||||
;;
|
||||
|
||||
dev)
|
||||
|
||||
KERNELSOURCE="https://github.com/megous/linux"
|
||||
KERNELBRANCH="branch:orange-pi-5.7"
|
||||
KERNELPATCHDIR='sunxi-'$BRANCH
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
family_tweaks()
|
||||
{
|
||||
# execute specific tweaks function if present
|
||||
[[ $(type -t family_tweaks_s) == function ]] && family_tweaks_s
|
||||
#cp $SRC/packages/blobs/splash/orangepi-u-boot-24.bmp $SDCARD/boot/boot.bmp
|
||||
}
|
||||
|
||||
write_uboot_platform()
|
||||
{
|
||||
if [[ -f $1/boot0_sdcard.fex ]]; then # legacy h616 loader
|
||||
dd if=$1/boot0_sdcard.fex of=$2 bs=8k seek=1 conv=fsync > /dev/null 2>&1
|
||||
dd if=$1/boot_package.fex of=$2 bs=8k seek=2050 conv=fsync > /dev/null 2>&1 || true
|
||||
else
|
||||
[[ -f $1/sunxi-spl.bin ]] && dd if=$1/sunxi-spl.bin of=$2 bs=8k seek=1 conv=fsync > /dev/null 2>&1
|
||||
[[ -f $1/u-boot.itb ]] && dd if=$1/u-boot.itb of=$2 bs=8k seek=5 conv=fsync > /dev/null 2>&1 || true
|
||||
fi
|
||||
}
|
||||
|
||||
setup_write_uboot_platform()
|
||||
{
|
||||
if grep -q "ubootpart" /proc/cmdline; then
|
||||
# mainline with new boot script
|
||||
local tmp=$(cat /proc/cmdline)
|
||||
tmp="${tmp##*ubootpart=}"
|
||||
tmp="${tmp%% *}"
|
||||
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2>/dev/null)
|
||||
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
|
||||
[[ -n $dev ]] && DEVICE="/dev/$dev"
|
||||
else
|
||||
# legacy or old boot script
|
||||
local tmp=$(cat /proc/cmdline)
|
||||
tmp="${tmp##*root=}"
|
||||
tmp="${tmp%% *}"
|
||||
[[ -n $tmp ]] && local part=$(findfs $tmp 2>/dev/null)
|
||||
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
|
||||
# do not try to write u-boot to USB devices
|
||||
[[ -n $dev && $dev == mmcblk* ]] && DEVICE="/dev/$dev"
|
||||
fi
|
||||
}
|
||||
82
external/config/sources/families/include/sunxi_common.inc
vendored
Normal file
82
external/config/sources/families/include/sunxi_common.inc
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
ARCH=armhf
|
||||
BOOTDELAY=1
|
||||
BOOTPATCHDIR='u-boot-sunxi'
|
||||
UBOOT_TARGET_MAP=';;u-boot-sunxi-with-spl.bin'
|
||||
BOOTSCRIPT="boot-sunxi.cmd:boot.cmd"
|
||||
BOOTENV_FILE='sunxi.txt'
|
||||
LINUXFAMILY=sunxi
|
||||
UBOOT_FW_ENV='0x88000,0x20000' # /etc/fw_env.config offset and env size
|
||||
ASOUND_STATE='asound.state.sunxi-next'
|
||||
GOVERNOR=ondemand
|
||||
PACKAGE_LIST_DESKTOP_FAMILY="fcitx fonts-wqy-zenhei"
|
||||
|
||||
case $BRANCH in
|
||||
legacy)
|
||||
|
||||
KERNELBRANCH="branch:orange-pi-3.4"
|
||||
KERNELPATCHDIR='sunxi-'$BRANCH
|
||||
|
||||
BOOTENV_FILE='sun8i-default.txt'
|
||||
KERNEL_USE_GCC='> 5.0'
|
||||
ASOUND_STATE='asound.state.sun8i-default'
|
||||
|
||||
;;
|
||||
|
||||
current)
|
||||
|
||||
KERNELBRANCH="branch:orange-pi-5.4"
|
||||
KERNELPATCHDIR='sunxi-'$BRANCH
|
||||
|
||||
;;
|
||||
|
||||
dev)
|
||||
|
||||
KERNELSOURCE="https://github.com/megous/linux"
|
||||
KERNELBRANCH="branch:orange-pi-5.7"
|
||||
KERNELPATCHDIR='sunxi-'$BRANCH
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
family_tweaks()
|
||||
{
|
||||
# execute specific tweaks function if present
|
||||
[[ $(type -t family_tweaks_s) == function ]] && family_tweaks_s
|
||||
|
||||
#cp $SRC/packages/blobs/splash/orangepi-u-boot-24.bmp $SDCARD/boot/boot.bmp
|
||||
}
|
||||
|
||||
family_tweaks_bsp()
|
||||
{
|
||||
# execute specific tweaks function if present
|
||||
[[ $(type -t family_tweaks_bsp_s) == function ]] && family_tweaks_bsp_s
|
||||
}
|
||||
|
||||
write_uboot_platform()
|
||||
{
|
||||
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1
|
||||
dd if=$1/u-boot-sunxi-with-spl.bin of=$2 bs=1024 seek=8 status=noxfer > /dev/null 2>&1
|
||||
}
|
||||
|
||||
setup_write_uboot_platform()
|
||||
{
|
||||
if grep -q "ubootpart" /proc/cmdline; then
|
||||
local tmp=$(cat /proc/cmdline)
|
||||
tmp="${tmp##*ubootpart=}"
|
||||
tmp="${tmp%% *}"
|
||||
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2>/dev/null)
|
||||
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
|
||||
[[ -n $dev ]] && DEVICE="/dev/$dev"
|
||||
elif [[ -f /var/lib/orangepi/force_search_uboot ]]; then
|
||||
# This may cause overwriting u-boot for android or other non-Orange Pi OS installed on eMMC
|
||||
# so don't run this function by default
|
||||
for dev in $(lsblk -d -n -p -o NAME); do
|
||||
if grep -q 'eGON.BT0' <(dd if=$dev bs=32 skip=256 count=1 status=none); then
|
||||
# Assuming that only one device with SPL signature is present
|
||||
echo "SPL signature found on $dev" >&2
|
||||
DEVICE=$dev
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
44
external/config/sources/families/rk3399.conf
vendored
Normal file
44
external/config/sources/families/rk3399.conf
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
source "${BASH_SOURCE%/*}/include/rockchip64_common.inc"
|
||||
|
||||
BOOTPATCHDIR="u-boot-rockchip64-mainline"
|
||||
BOOT_SOC="rk3399"
|
||||
|
||||
case $BRANCH in
|
||||
|
||||
legacy)
|
||||
|
||||
KERNELSOURCE='https://github.com/friendlyarm/kernel-rockchip'
|
||||
KERNELBRANCH='branch:nanopi4-linux-v4.4.y'
|
||||
KERNELDIR="${SRC}/kernel"
|
||||
KERNELCONFIG='linux-rockchip64'
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
if [[ $BOARD == roc-rk3399-pc ]]; then
|
||||
|
||||
BOOT_USE_MAINLINE_ATF=yes
|
||||
|
||||
elif [[ $BOARD == nanopim4v2 || $BOARD == orangepi4 ]]; then
|
||||
|
||||
BOOT_USE_BLOBS=yes
|
||||
DDR_BLOB='rk33/rk3399_ddr_933MHz_v1.24.bin'
|
||||
MINILOADER_BLOB='rk33/rk3399_miniloader_v1.19.bin'
|
||||
BL31_BLOB='rk33/rk3399_bl31_v1.30.elf'
|
||||
|
||||
else
|
||||
|
||||
BOOT_USE_BLOBS=yes
|
||||
DDR_BLOB='rk33/rk3399_ddr_800MHz_v1.24.bin'
|
||||
MINILOADER_BLOB='rk33/rk3399_miniloader_v1.19.bin'
|
||||
BL31_BLOB='rk33/rk3399_bl31_v1.30.elf'
|
||||
|
||||
fi
|
||||
|
||||
prepare_boot_configuration
|
||||
|
||||
atf_custom_postprocess()
|
||||
{
|
||||
:
|
||||
}
|
||||
115
external/config/sources/families/rockchip.conf
vendored
Normal file
115
external/config/sources/families/rockchip.conf
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
ARCH=armhf
|
||||
BOOTSCRIPT="boot-rockchip.cmd:boot.cmd"
|
||||
BOOTENV_FILE='rockchip.txt'
|
||||
OVERLAY_PREFIX='rockchip'
|
||||
UBOOT_TARGET_MAP=";;$SRC/packages/blobs/rockchip/rk3288_boot.bin u-boot-rockchip-with-spl.bin"
|
||||
BOOTDELAY=1
|
||||
if [[ $BOARD == miqi ]]; then
|
||||
BOOTBRANCH='tag:v2017.11'
|
||||
elif [[ $BOARD == xt-q8l-v10 ]]; then
|
||||
BOOTBRANCH='tag:v2020.04'
|
||||
else
|
||||
BOOTBRANCH='tag:v2018.11'
|
||||
fi
|
||||
|
||||
SERIALCON=ttyS2
|
||||
|
||||
case $BRANCH in
|
||||
|
||||
legacy)
|
||||
|
||||
KERNELSOURCE='https://github.com/rockchip-linux/kernel.git'
|
||||
KERNELBRANCH='branch:stable-4.4-rk3288-linux'
|
||||
KERNELDIR='linux-rockchip'
|
||||
|
||||
;;
|
||||
|
||||
current)
|
||||
|
||||
KERNELBRANCH='branch:linux-5.7.y'
|
||||
|
||||
;;
|
||||
|
||||
dev)
|
||||
|
||||
KERNELBRANCH='branch:linux-5.7.y'
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
CPUMIN="600000"
|
||||
CPUMAX="1900000"
|
||||
GOVERNOR="ondemand"
|
||||
|
||||
write_uboot_platform()
|
||||
{
|
||||
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1
|
||||
dd if=$1/u-boot-rockchip-with-spl.bin of=$2 seek=64 conv=notrunc > /dev/null 2>&1
|
||||
}
|
||||
|
||||
uboot_custom_postprocess()
|
||||
{
|
||||
|
||||
# xt-q8l-v10 requires the original DDR init blob because u-boot does not support LPDDR2 initialization
|
||||
# for rk3288 SoC (binary is in sources/rkbin-tools/rk32 path). U-boot is configured to produce a TPL
|
||||
# which is thrown away. SPL does some more initial configurations, expecially pinmux for power hold,
|
||||
# so reset works more reliably. U-boot image is set to be at sector 0x200 on the eMMC/SD,
|
||||
# so we burn it 0x200-0x40 because of the rockchip 0x40 sectors offset.
|
||||
if [[ $BOARD == xt-q8l-v10 ]]; then
|
||||
tools/mkimage -n rk3288 -T rksd -d $SRC/cache/sources/rkbin-tools/rk32/rk3288_ddr_400MHz_v1.08.bin u-boot-rockchip-with-spl.bin
|
||||
cat spl/u-boot-spl-dtb.bin >> u-boot-rockchip-with-spl.bin
|
||||
dd if=u-boot-dtb.img of=u-boot-rockchip-with-spl.bin seek=$((0x200 - 0x40)) conv=notrunc
|
||||
else
|
||||
tools/mkimage -n rk3288 -T rksd -d spl/u-boot-spl-dtb.bin u-boot-rockchip-with-spl.bin
|
||||
cat u-boot-dtb.bin >> u-boot-rockchip-with-spl.bin
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
family_tweaks()
|
||||
{
|
||||
if [[ $BOARD == tinkerboard ]]; then
|
||||
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools"
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable tinker-bluetooth.service >/dev/null 2>&1"
|
||||
sed -i -e "/#load-module module-alsa-sink/r $SRC/packages/bsp/rockchip/pulseaudio.txt" $SDCARD/etc/pulse/default.pa >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ $BOARD == xt-q8l-v10 ]]; then
|
||||
mkdir -p $SDCARD/etc/firmware/
|
||||
ln -sf /lib/firmware/brcm/BCM4330B1.hcd $SDCARD/etc/firmware
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6330-bluetooth.service >/dev/null 2>&1"
|
||||
fi
|
||||
}
|
||||
|
||||
family_tweaks_bsp()
|
||||
{
|
||||
#Graphics and media
|
||||
mkdir -p $destination/etc/udev/rules.d
|
||||
mkdir -p $destination/usr/local/bin
|
||||
cp $SRC/packages/bsp/rockchip/hdmi.rules $destination/etc/udev/rules.d
|
||||
cp $SRC/packages/bsp/rockchip/50-hevc.rules $destination/etc/udev/rules.d
|
||||
cp $SRC/packages/bsp/rockchip/50-mali.rules $destination/etc/udev/rules.d
|
||||
cp $SRC/packages/bsp/rockchip/50-vpu.rules $destination/etc/udev/rules.d
|
||||
cp $SRC/packages/bsp/rockchip/60-media.rules $destination/etc/udev/rules.d
|
||||
install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin
|
||||
|
||||
# Peripheral access for specific groups
|
||||
addgroup --system --quiet --gid 997 gpio
|
||||
addgroup --system --quiet --gid 998 i2c
|
||||
cp $SRC/packages/bsp/rockchip/70-gpio.rules $destination/etc/udev/rules.d
|
||||
cp $SRC/packages/bsp/rockchip/71-i2c.rules $destination/etc/udev/rules.d
|
||||
|
||||
# Bluetooth
|
||||
install -m 755 $SRC/packages/bsp/rockchip/rtk_hciattach $destination/usr/bin
|
||||
install -m 755 $SRC/packages/bsp/rockchip/start_bt.sh $destination/usr/local/bin
|
||||
cp $SRC/packages/bsp/rockchip/tinker-bluetooth.service $destination/lib/systemd/system/
|
||||
|
||||
# Sound
|
||||
cp $SRC/packages/bsp/rockchip/asound.conf $destination/etc/
|
||||
cp $SRC/packages/bsp/rockchip/89-pulseaudio-usb.rules $destination/etc/udev/rules.d
|
||||
|
||||
# ap6330 bluetooth (required for xt-q8l-v10)
|
||||
cp $SRC/packages/bsp/rockchip/ap6330-bluetooth.service $destination/lib/systemd/system/
|
||||
|
||||
}
|
||||
17
external/config/sources/families/rockchip64.conf
vendored
Normal file
17
external/config/sources/families/rockchip64.conf
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
source "${BASH_SOURCE%/*}/include/rockchip64_common.inc"
|
||||
|
||||
BOOTPATCHDIR="u-boot-rockchip64-mainline"
|
||||
|
||||
case $BRANCH in
|
||||
|
||||
legacy)
|
||||
|
||||
KERNELSOURCE='https://github.com/ayufan-rock64/linux-kernel'
|
||||
KERNELBRANCH='tag:4.4.202-1237-rockchip-ayufan'
|
||||
KERNELDIR='linux-rockchip64'
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
prepare_boot_configuration
|
||||
17
external/config/sources/families/sun50iw1.conf
vendored
Normal file
17
external/config/sources/families/sun50iw1.conf
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
ATF_PLAT="sun50i_a64"
|
||||
source "${BASH_SOURCE%/*}/include/sunxi64_common.inc"
|
||||
OVERLAY_PREFIX='sun50i-a64'
|
||||
[[ -z $CPUMIN ]] && CPUMIN=480000
|
||||
[[ -z $CPUMAX ]] && CPUMAX=1010000
|
||||
GOVERNOR=performance
|
||||
ASOUND_STATE='asound.state.pinebook-next'
|
||||
|
||||
family_tweaks_s()
|
||||
{
|
||||
# add bluetooth firmware for 8723cs + sysrq fix
|
||||
if [[ $BOARD == pinebook-a64 ]]; then
|
||||
cp -R $SRC/packages/blobs/rtl8723bt_fw/* $SDCARD/lib/firmware/rtl_bt/
|
||||
touch $SDCARD/etc/sysctl.d/sysrq.conf
|
||||
echo "kernel.sysrq = 0" >> $SDCARD/etc/sysctl.d/sysrq.conf
|
||||
fi
|
||||
}
|
||||
41
external/config/sources/families/sun50iw2.conf
vendored
Normal file
41
external/config/sources/families/sun50iw2.conf
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
ATF_PLAT="sun50i_a64"
|
||||
source "${BASH_SOURCE%/*}/include/sunxi64_common.inc"
|
||||
OVERLAY_PREFIX='sun50i-h5'
|
||||
[[ -z $CPUMIN ]] && CPUMIN=480000
|
||||
[[ -z $CPUMAX ]] && CPUMAX=1368000
|
||||
GOVERNOR=ondemand
|
||||
ASOUND_STATE='asound.state.sun50iw2-dev'
|
||||
|
||||
family_tweaks_s()
|
||||
{
|
||||
|
||||
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"
|
||||
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"
|
||||
fi
|
||||
}
|
||||
|
||||
family_tweaks_bsp()
|
||||
{
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
}
|
||||
48
external/config/sources/families/sun50iw6.conf
vendored
Normal file
48
external/config/sources/families/sun50iw6.conf
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
ATF_PLAT="sun50i_h6";
|
||||
source "${BASH_SOURCE%/*}/include/sunxi64_common.inc"
|
||||
OVERLAY_PREFIX='sun50i-h6'
|
||||
[[ -z $CPUMIN ]] && CPUMIN=480000
|
||||
[[ -z $CPUMAX ]] && CPUMAX=1810000
|
||||
GOVERNOR=ondemand
|
||||
ASOUND_STATE='asound.state.sun50iw2-dev'
|
||||
|
||||
case $BRANCH in
|
||||
other)
|
||||
LINUXFAMILY=sun50iw6
|
||||
KERNELBRANCH="branch:orange-pi-4.9-sun50iw6"
|
||||
KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH}
|
||||
#BUILD_UIMAGE="yes"
|
||||
|
||||
#BOOTBRANCH='branch:v2020.04'
|
||||
#UBOOT_TARGET_MAP=';;'
|
||||
BOOTENV_FILE=sun50iw6-default.txt
|
||||
BOOTSCRIPT='boot-sun50iw6.cmd:boot.cmd'
|
||||
#PACK_UBOOT="yes"
|
||||
|
||||
#ATFSOURCE=""
|
||||
#ATF_COMPILE="no"
|
||||
|
||||
#INITRD_ARCH=arm
|
||||
;;
|
||||
|
||||
legacy)
|
||||
LINUXFAMILY=sun50iw6
|
||||
KERNELBRANCH="branch:orange-pi-4.9-sun50iw6"
|
||||
KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH}
|
||||
|
||||
BOOTCONFIG="sun50iw6p1_config"
|
||||
BOOTBRANCH='branch:v2014.07-sun50iw6-linux4.9'
|
||||
UBOOT_TARGET_MAP='u-boot.bin;;
|
||||
spl;;'
|
||||
UBOOT_COMPILER="arm-linux-gnueabi-"
|
||||
UBOOT_USE_GCC='> 4.0'
|
||||
BOOTENV_FILE=sun50iw6-default.txt
|
||||
BOOTSCRIPT='boot-sun50iw6.cmd:boot.cmd'
|
||||
PACK_UBOOT="yes"
|
||||
|
||||
ATFSOURCE=""
|
||||
ATF_COMPILE="no"
|
||||
|
||||
INITRD_ARCH=arm
|
||||
;;
|
||||
esac
|
||||
57
external/config/sources/families/sun50iw9.conf
vendored
Normal file
57
external/config/sources/families/sun50iw9.conf
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
source "${BASH_SOURCE%/*}/include/sunxi64_common.inc"
|
||||
|
||||
LINUXFAMILY=sun50iw9
|
||||
|
||||
[[ -z $CPUMIN ]] && CPUMIN=480000
|
||||
[[ -z $CPUMAX ]] && CPUMAX=1512000
|
||||
GOVERNOR=ondemand
|
||||
|
||||
case $BRANCH in
|
||||
legacy)
|
||||
|
||||
KERNELBRANCH="branch:orange-pi-4.9-sun50iw9"
|
||||
KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH}
|
||||
BOOTBRANCH='branch:v2018.05-sun50iw9'
|
||||
UBOOT_TARGET_MAP='u-boot.bin;;'
|
||||
UBOOT_COMPILER="arm-linux-gnueabi-"
|
||||
UBOOT_USE_GCC='> 6.0'
|
||||
BOOTENV_FILE=sun50iw9-default.txt
|
||||
BOOTSCRIPT='boot-sun50iw9.cmd:boot.cmd'
|
||||
PACK_UBOOT="yes"
|
||||
OFFSET=20
|
||||
ATFSOURCE=""
|
||||
ATF_COMPILE="no"
|
||||
INITRD_ARCH=arm
|
||||
MODULES_LEGACY="uwe5622_bsp_sdio sprdbt_tty sprdwl_ng"
|
||||
ASOUND_STATE='asound.state.sun50iw9-legacy'
|
||||
;;
|
||||
esac
|
||||
|
||||
family_tweaks_s()
|
||||
{
|
||||
if [[ -f $SDCARD/lib/systemd/system/aw859a-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 aw859a-bluetooth.service >/dev/null 2>&1"
|
||||
fi
|
||||
|
||||
if [[ -f $SDCARD/lib/systemd/system/hdmi-audio.service ]]; then
|
||||
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable hdmi-audio.service >/dev/null 2>&1"
|
||||
fi
|
||||
}
|
||||
|
||||
family_tweaks_bsp()
|
||||
{
|
||||
|
||||
if [[ $BOARD == orangepizero2 ]]; then
|
||||
|
||||
install -m 755 $EXTER/packages/blobs/bt/hciattach/hciattach_opi_$ARCH $destination/usr/bin/hciattach_opi
|
||||
cp $EXTER/packages/bsp/sunxi/aw859a-bluetooth.service $destination/lib/systemd/system/
|
||||
|
||||
install -m 755 $EXTER/packages/blobs/sunxi/h616/inithdmiaudio $destination/usr/bin/
|
||||
cp $EXTER/packages/blobs/sunxi/h616/libtinyalsa.so $destination/usr/lib/
|
||||
cp $EXTER/packages/bsp/sunxi/hdmi-audio.service $destination/lib/systemd/system/
|
||||
fi
|
||||
}
|
||||
30
external/config/sources/families/sun8i.conf
vendored
Normal file
30
external/config/sources/families/sun8i.conf
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
source "${BASH_SOURCE%/*}/include/sunxi_common.inc"
|
||||
|
||||
if [[ -z ${OVERLAY_PREFIX} ]]; then
|
||||
OVERLAY_PREFIX='sun8i-h3'
|
||||
fi
|
||||
|
||||
[[ -z $CPUMIN ]] && CPUMIN=480000
|
||||
[[ -z $CPUMAX ]] && CPUMAX=1400000
|
||||
|
||||
family_tweaks_s()
|
||||
{
|
||||
|
||||
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"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
family_tweaks_bsp()
|
||||
{
|
||||
|
||||
if [[ $BOARD == orangepizeroplus2h3 ]]; 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
|
||||
}
|
||||
Reference in New Issue
Block a user