armbian-build/config/sources/odroidc2.conf

62 lines
2.0 KiB
Plaintext

BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
BOOTBRANCH='branch:odroidc2-v2015.01'
BOOTDIR='u-boot-odroidc2'
BOOTPATCHDIR='u-boot-odroidc2'
UBOOT_NEEDS_GCC='< 5.0'
BOOTSCRIPT="boot-odroid-c2.ini:boot.ini"
UBOOT_TARGET_MAP='ARCH=arm;;sd_fuse/bl1.bin.hardkernel sd_fuse/u-boot.bin'
HAS_UUID_SUPPORT=yes
# 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
KERNELSOURCE='https://github.com/hardkernel/linux'
KERNELBRANCH='branch:odroidc2-3.14.y'
KERNELDIR='linux-odroidc2'
ARCH=arm64
KERNEL_IMAGE_TYPE=Image
CPUMIN=500000
CPUMAX=1536000
GOVERNOR=ondemand
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()
{
sed -i 's/MODULES=.*/MODULES="meson-ir"/' $CACHEDIR/$SDCARD/etc/lirc/hardware.conf
sed -i 's/LOAD_MODULES=.*/LOAD_MODULES="true"/' $CACHEDIR/$SDCARD/etc/lirc/hardware.conf
sed -i 's/DEVICE=.*/DEVICE="\/dev\/lirc0"/' $CACHEDIR/$SDCARD/etc/lirc/hardware.conf
sed -i 's/LIRCD_ARGS=.*/LIRCD_ARGS="--uinput"/' $CACHEDIR/$SDCARD/etc/lirc/hardware.conf
cp $SRC/lib/config/lirc.conf.odroidc2 $CACHEDIR/$SDCARD/etc/lirc/lircd.conf
install -m 755 $SRC/lib/scripts/c2_init.sh $CACHEDIR/$SDCARD/usr/local/bin
# systemd service for c1_init.sh
cat <<-EOF > $CACHEDIR/$SDCARD/etc/systemd/system/odroid-c2-hdmi.service
[Unit]
Description=Odroid C2 HDMI init
DefaultDependencies=no
Wants=rsyslog.service systemd-journald.service
Before=syslog.target sysinit.target
After=local-fs.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/c2_init.sh
RemainAfterExit=no
[Install]
WantedBy=sysinit.target
EOF
chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload enable odroid-c2-hdmi.service >/dev/null 2>&1"
}