armbian-build/config/sources/odroidxu4.conf
2017-08-11 18:31:06 +03:00

69 lines
1.9 KiB
Plaintext

OFFSET=4
# currently using the legacy u-boot for both branches
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'
UBOOT_USE_GCC='< 4.9'
case $BRANCH in
default)
KERNELSOURCE='https://github.com/hardkernel/linux'
KERNELBRANCH='branch:odroidxu3-3.10.y'
KERNELDIR='linux-odroidxu4'
CAN_BUILD_STRETCH=no
;;
next)
KERNELSOURCE='https://github.com/hardkernel/linux'
KERNELBRANCH='branch:odroidxu4-4.9.y'
KERNELDIR='odroidxu-mainline-hardkernel'
KERNEL_USE_GCC='> 6.0'
;;
esac
CPUMIN=600000
CPUMAX=2000000
GOVERNOR=ondemand
SERIALCON=ttySAC2
write_uboot_platform()
{
# handle writing to eMMC on package upgrades
# assuming $2 points to a correct device
if [[ $2 == /dev/mmcblk* && -b ${2}boot0 ]]; then
local device=${2}boot0
echo 0 > /sys/block/$(basename $device)/force_ro
signed_bl1_position=0
bl2_position=30
uboot_position=62
tzsw_position=718
env_position=1230
else
signed_bl1_position=1
bl2_position=31
uboot_position=63
tzsw_position=719
env_position=1231
fi
# default branch logic only for now
dd if=$1/bl1.bin.hardkernel of=$2 seek=$signed_bl1_position conv=fsync > /dev/null 2>&1
dd if=$1/bl2.bin.hardkernel of=$2 seek=$bl2_position conv=fsync > /dev/null 2>&1
dd if=$1/u-boot.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
dd if=/dev/zero of=$2 seek=$env_position count=32 bs=512 conv=fsync > /dev/null 2>&1
}
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"
}