89 lines
3.0 KiB
Plaintext
89 lines
3.0 KiB
Plaintext
OFFSET=4
|
|
|
|
case $BRANCH in
|
|
default)
|
|
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
|
|
BOOTBRANCH='branch:odroidxu3-v2012.07'
|
|
BOOTSCRIPT='boot-odroid-xu4-default.ini:boot.ini'
|
|
BOOTDIR='u-boot-odroidxu'
|
|
BOOTPATCHDIR='u-boot-odroidxu4-default'
|
|
UBOOT_TARGET_MAP=';;sd_fuse/hardkernel/bl1.bin.hardkernel sd_fuse/hardkernel/bl2.bin.hardkernel u-boot.bin sd_fuse/hardkernel/tzsw.bin.hardkernel'
|
|
|
|
KERNELSOURCE='https://github.com/hardkernel/linux'
|
|
KERNELBRANCH='branch:odroidxu3-3.10.y'
|
|
KERNELDIR='linux-odroidxu4'
|
|
UBOOT_USE_GCC='< 4.9'
|
|
CAN_BUILD_STRETCH=no
|
|
;;
|
|
|
|
next)
|
|
BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
|
|
BOOTBRANCH=$MAINLINE_UBOOT_BRANCH
|
|
BOOTCONFIG=odroid-xu3_defconfig
|
|
UBOOT_TARGET_MAP=';;xu4_blobs/bl1.bin.hardkernel xu4_blobs/bl2.bin.hardkernel.1mb_uboot u-boot-dtb.bin xu4_blobs/tzsw.bin.hardkernel'
|
|
BOOTSCRIPT='boot-odroid-xu4-next.cmd:boot.cmd'
|
|
BOOTDIR=$MAINLINE_UBOOT_DIR
|
|
BOOTPATCHDIR='u-boot-odroidxu4-next'
|
|
BOOTENV_FILE='odroidxu4-next.txt'
|
|
|
|
UBOOT_USE_GCC='> 6.0'
|
|
KERNEL_USE_GCC='> 6.0'
|
|
|
|
HAS_UUID_SUPPORT=yes
|
|
|
|
KERNELSOURCE='https://github.com/hardkernel/linux'
|
|
KERNELBRANCH='branch:odroidxu4-4.9.y'
|
|
KERNELDIR='odroidxu-mainline-hardkernel'
|
|
;;
|
|
esac
|
|
|
|
|
|
# USE LEGACY UBOOT for both kernels to secure proper eMMC booting, until mainline u-boot get this function
|
|
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
|
|
BOOTBRANCH='branch:odroidxu3-v2012.07'
|
|
BOOTSCRIPT='boot-odroid-xu4-default.ini:boot.ini'
|
|
BOOTDIR='u-boot-odroidxu'
|
|
BOOTPATCHDIR='u-boot-odroidxu4-default'
|
|
UBOOT_TARGET_MAP=';;sd_fuse/hardkernel/bl1.bin.hardkernel sd_fuse/hardkernel/bl2.bin.hardkernel u-boot.bin sd_fuse/hardkernel/tzsw.bin.hardkernel'
|
|
BOOTENV_FILE='odroidxu4-next.txt'
|
|
UBOOT_USE_GCC='< 4.9'
|
|
HAS_UUID_SUPPORT=yes
|
|
BOOTCONFIG=odroid_config
|
|
# USE LEGACY UBOOT for both kernels to secure proper eMMC booting, until mainline u-boot get this function
|
|
|
|
CPUMIN=600000
|
|
CPUMAX=2000000
|
|
GOVERNOR=ondemand
|
|
|
|
SERIALCON=ttySAC2
|
|
|
|
write_uboot_platform()
|
|
{
|
|
if [[ -f $1/u-boot-dtb.bin ]]; then
|
|
# next branch
|
|
# for sdcard (note: assuming emmc offset would be 0/30/62/2110 & device is mmcblk0boot0)
|
|
bl1_position=1
|
|
bl2_position=31
|
|
uboot_position=63
|
|
tzsw_position=2111
|
|
|
|
dd if=$1/bl1.bin.hardkernel of=$2 seek=$bl1_position conv=fsync >/dev/null 2>&1
|
|
dd if=$1/bl2.bin.hardkernel.1mb_uboot of=$2 seek=$bl2_position conv=fsync >/dev/null 2>&1
|
|
dd if=$1/u-boot-dtb.bin of=$2 bs=512 seek=$uboot_position conv=fsync >/dev/null 2>&1
|
|
dd if=$1/tzsw.bin.hardkernel of=$2 seek=$tzsw_position conv=fsync >/dev/null 2>&1
|
|
else
|
|
# default branch
|
|
dd if=$1/bl1.bin.hardkernel of=$2 seek=1 conv=fsync > /dev/null 2>&1
|
|
dd if=$1/bl2.bin.hardkernel of=$2 seek=31 conv=fsync > /dev/null 2>&1
|
|
dd if=$1/u-boot.bin of=$2 bs=512 seek=63 conv=fsync > /dev/null 2>&1
|
|
dd if=$1/tzsw.bin.hardkernel of=$2 seek=719 conv=fsync > /dev/null 2>&1
|
|
dd if=/dev/zero of=$2 seek=1231 count=32 bs=512 conv=fsync > /dev/null 2>&1
|
|
fi
|
|
}
|
|
|
|
family_tweaks()
|
|
{
|
|
echo "blacklist ina231_sensor" > $SDCARD/etc/modprobe.d/blacklist-odroid.conf
|
|
chroot $SDCARD /bin/bash -c "apt-get -y -qq remove --auto-remove lirc >/dev/null 2>&1"
|
|
}
|