69 lines
1.7 KiB
Plaintext
69 lines
1.7 KiB
Plaintext
BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
|
|
BOOTDIR=$MAINLINE_UBOOT_DIR
|
|
BOOTBRANCH='tag:v2017.09'
|
|
|
|
UBOOT_USE_GCC='> 7.0'
|
|
UBOOT_TARGET_MAP="u-boot-dtb.img;;$SRC/packages/blobs/meson/u-boot-${BOARD}.bin:u-boot.bin u-boot-dtb.img"
|
|
BOOTSCRIPT="boot-meson64-${BOARD}.cmd:boot.cmd"
|
|
|
|
HAS_UUID_SUPPORT=yes
|
|
|
|
ARCH=arm64
|
|
KERNEL_IMAGE_TYPE=Image
|
|
|
|
case $BRANCH in
|
|
default)
|
|
KERNELSOURCE='https://github.com/150balbes/Amlogic_s905-kernel'
|
|
KERNELBRANCH='branch:armbian'
|
|
KERNELDIR='linux-meson64'
|
|
|
|
KERNEL_USE_GCC='> 5.0'
|
|
;;
|
|
|
|
next)
|
|
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
|
KERNELBRANCH='branch:linux-4.14.y'
|
|
KERNELDIR=$MAINLINE_KERNEL_DIR
|
|
KERNEL_USE_GCC='> 7.0'
|
|
;;
|
|
|
|
dev)
|
|
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
|
KERNELBRANCH='branch:master'
|
|
KERNELDIR=$MAINLINE_KERNEL_DIR
|
|
|
|
KERNEL_USE_GCC='> 7.0'
|
|
;;
|
|
esac
|
|
|
|
CPUMIN=500000
|
|
CPUMAX=1536000
|
|
GOVERNOR=ondemand
|
|
|
|
write_uboot_platform()
|
|
{
|
|
dd if=$1/u-boot.bin of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1
|
|
dd if=$1/u-boot.bin of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
|
|
}
|
|
|
|
family_tweaks()
|
|
{
|
|
echo "#Allow ttyAML0 root" >> $SDCARD/etc/securetty
|
|
echo "ttyAML0" >> $SDCARD/etc/securetty
|
|
|
|
# enable service installed from BSP
|
|
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable odroid-c2-hdmi.service >/dev/null 2>&1"
|
|
}
|
|
|
|
family_tweaks_bsp()
|
|
{
|
|
install -m 755 $SRC/packages/bsp/odroid/c2_init.sh $destination/usr/lib/armbian/c2_init.sh
|
|
cp $SRC/packages/bsp/odroid/odroid-c2-hdmi.service $destination/lib/systemd/system/
|
|
if [[ $BRANCH != default ]]; then
|
|
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
|
|
install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin
|
|
fi
|
|
}
|