armbian-build/config/sources/odroidxu4.conf
2016-10-25 18:07:02 +03:00

68 lines
2.2 KiB
Plaintext

BOOTDIR='u-boot-odroidxu'
OFFSET=4
case $BRANCH in
default)
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
BOOTBRANCH='branch:odroidxu3-v2012.07'
UBOOT_FILES="sd_fuse/hardkernel/bl1.bin.hardkernel sd_fuse/hardkernel/bl2.bin.hardkernel u-boot.bin sd_fuse/hardkernel/tzsw.bin.hardkernel"
BOOTSCRIPT="boot-odroid-xu4-default.ini:boot.ini"
KERNELSOURCE='https://github.com/hardkernel/linux'
KERNELBRANCH='branch:odroidxu3-3.10.y'
KERNELDIR='linux-odroidxu4'
UBOOT_NEEDS_GCC='< 4.9'
;;
next)
BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
BOOTBRANCH='tag:v2016.09'
BOOTCONFIG=odroid-xu3_defconfig
UBOOT_FILES="sd_fusing.sh 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"
BOOTENV_FILE='odroidxu4-next.txt'
HAS_UUID_SUPPORT=yes
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
KERNELDIR=$MAINLINE_KERNEL_DIR
;;
esac
CPUMIN=600000
CPUMAX=1800000
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" > $CACHEDIR/sdcard/etc/modprobe.d/blacklist-odroid.conf
chroot $CACHEDIR/sdcard /bin/bash -c "apt-get -y -qq remove --auto-remove lirc >/dev/null 2>&1"
}