Next branch kernel is currently broken DVFS can be safely enabled on C2 since the max reported frequency is 1.5GHz
105 lines
3.0 KiB
Plaintext
105 lines
3.0 KiB
Plaintext
ARCH=arm64
|
|
KERNEL_IMAGE_TYPE=Image
|
|
HAS_UUID_SUPPORT=yes
|
|
|
|
case $BRANCH in
|
|
default)
|
|
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
|
|
BOOTBRANCH='branch:odroidc2-v2015.01'
|
|
BOOTDIR='u-boot-odroidc2'
|
|
# NOTE: This u-boot version incorrectly parses boot.scr header
|
|
# due to wrong data type for 64 bit compiler, so boot.scr doesn't work
|
|
BOOTSCRIPT='boot-odroid-c2.ini:boot.ini'
|
|
UBOOT_TARGET_MAP='ARCH=arm;;sd_fuse/bl1.bin.hardkernel sd_fuse/u-boot.bin'
|
|
UBOOT_USE_GCC='== 4.9'
|
|
|
|
KERNELSOURCE='https://github.com/hardkernel/linux'
|
|
KERNELBRANCH='branch:odroidc2-3.14.y'
|
|
KERNELDIR='linux-odroidc2'
|
|
|
|
KERNEL_USE_GCC='> 5.0'
|
|
;;
|
|
|
|
next)
|
|
BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
|
|
BOOTDIR=$MAINLINE_UBOOT_DIR
|
|
BOOTBRANCH=$MAINLINE_UBOOT_BRANCH
|
|
BOOTPATCHDIR='u-boot-odroidc2-next'
|
|
UBOOT_TARGET_MAP=";;$SRC/cache/sources/odroidc2-blobs/bl1.bin.hardkernel u-boot.bin"
|
|
BOOTSCRIPT='boot-odroid-c2-next.cmd:boot.cmd'
|
|
BOOTENV_FILE='odroidc2-next.txt'
|
|
UBOOT_USE_GCC='> 7.0'
|
|
|
|
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
|
KERNELBRANCH='branch:linux-4.12.y'
|
|
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
|
KERNELDIR=$MAINLINE_KERNEL_DIR
|
|
|
|
KERNEL_USE_GCC='> 7.0'
|
|
;;
|
|
|
|
dev)
|
|
BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
|
|
BOOTDIR=$MAINLINE_UBOOT_DIR
|
|
BOOTBRANCH=$MAINLINE_UBOOT_BRANCH
|
|
BOOTPATCHDIR='u-boot-odroidc2-next'
|
|
UBOOT_TARGET_MAP=";;$SRC/cache/sources/odroidc2-blobs/bl1.bin.hardkernel u-boot.bin"
|
|
BOOTSCRIPT='boot-odroid-c2-next.cmd:boot.cmd'
|
|
BOOTENV_FILE='odroidc2-next.txt'
|
|
UBOOT_USE_GCC='> 7.0'
|
|
|
|
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
|
KERNELBRANCH='branch:master'
|
|
KERNELDIR=$MAINLINE_KERNEL_DIR
|
|
|
|
KERNEL_USE_GCC='> 7.0'
|
|
;;
|
|
esac
|
|
|
|
CPUMIN=500000
|
|
CPUMAX=1536000
|
|
GOVERNOR=ondemand
|
|
|
|
uboot_custom_postprocess()
|
|
{
|
|
if [[ $BRANCH != default ]]; then
|
|
local t=$SRC/cache/sources/odroidc2-blobs/
|
|
$t/fip_create --bl30 $t/gxb/bl30.bin \
|
|
--bl301 $t/gxb/bl301.bin \
|
|
--bl31 $t/gxb/bl31.bin \
|
|
--bl33 u-boot.bin \
|
|
fip.bin
|
|
$t/fip_create --dump fip.bin
|
|
cat $t/gxb/bl2.package fip.bin > boot_new.bin
|
|
rm -f u-boot.img
|
|
$t/gxb/aml_encrypt_gxb --bootsig \
|
|
--input boot_new.bin \
|
|
--output u-boot.img
|
|
rm -f u-boot.bin
|
|
dd if=u-boot.img of=u-boot.bin bs=512 skip=96 status=none
|
|
fi
|
|
}
|
|
|
|
write_uboot_platform()
|
|
{
|
|
dd if=$1/bl1.bin.hardkernel of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1
|
|
dd if=$1/bl1.bin.hardkernel of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
|
|
dd if=$1/u-boot.bin of=$2 bs=512 seek=97 conv=fsync > /dev/null 2>&1
|
|
#dd if=/dev/zero of=$2 seek=1249 count=799 bs=512 conv=fsync > /dev/null 2>&1
|
|
}
|
|
|
|
family_tweaks()
|
|
{
|
|
echo "#Odroid serial console allow 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/
|
|
}
|