armbian-build/config/sources/meson64.conf

153 lines
3.6 KiB
Plaintext

BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
BOOTDIR=$MAINLINE_UBOOT_DIR
BOOTBRANCH='tag:v2018.05'
UBOOT_USE_GCC='> 7.0'
UBOOT_TARGET_MAP="u-boot-dtb.img;;u-boot.bin.sd.bin:u-boot.bin u-boot-dtb.img"
BOOTSCRIPT="boot-meson64.cmd:boot.cmd"
BOOTENV_FILE='meson64-next.txt'
ARCH=arm64
KERNEL_IMAGE_TYPE=Image
case $BRANCH in
default)
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
KERNELBRANCH='branch:linux-4.14.y'
KERNELDIR=$MAINLINE_KERNEL_DIR
KERNEL_USE_GCC='> 7.0'
SERIALCON='ttyAML0'
;;
next)
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
KERNELBRANCH='branch:linux-4.18.y'
KERNELDIR=$MAINLINE_KERNEL_DIR
KERNEL_USE_GCC='> 7.0'
SERIALCON='ttyAML0'
;;
dev)
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
KERNELBRANCH='branch:master'
KERNELDIR=$MAINLINE_KERNEL_DIR
SERIALCON='ttyAML0'
KERNEL_USE_GCC='> 7.0'
;;
esac
CPUMIN=500000
CPUMAX=1536000
GOVERNOR=conservative
uboot_custom_postprocess()
{
if [[ $BOARD == lepotato ]]; then
local t=$SRC/cache/sources/odroidc2-blobs/
mv u-boot.bin bl33.bin
$t/blx_fix.sh $t/gxl/bl30.bin \
$t/gxl/zero_tmp \
$t/gxl/bl30_zero.bin \
$t/gxl/bl301.bin \
$t/gxl/bl301_zero.bin \
$t/gxl/bl30_new.bin bl30
$t/acs_tool.pyc $t/gxl/bl2.bin \
$t/gxl/bl2_acs.bin \
$t/gxl/acs.bin 0
$t/blx_fix.sh $t/gxl/bl2_acs.bin \
$t/gxl/zero_tmp \
$t/gxl/bl2_zero.bin \
$t/gxl/bl21.bin \
$t/gxl/bl21_zero.bin \
$t/gxl/bl2_new.bin bl2
$t/gxl/aml_encrypt_gxl --bl3enc --input $t/gxl/bl30_new.bin
$t/gxl/aml_encrypt_gxl --bl3enc --input $t/gxl/bl31.img
$t/gxl/aml_encrypt_gxl --bl3enc --input bl33.bin
$t/gxl/aml_encrypt_gxl --bl2sig --input $t/gxl/bl2_new.bin \
--output bl2.n.bin.sig
$t/gxl/aml_encrypt_gxl --bootmk \
--output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 $t/gxl/bl30_new.bin.enc \
--bl31 $t/gxl/bl31.img.enc \
--bl33 bl33.bin.enc
fi
if [[ $BOARD == nanopik2-s905 ]]; then
local t=$SRC/cache/sources/odroidc2-blobs/
mv u-boot.bin bl33.bin
$t/blx_fix.sh $t/k2/bl30.bin \
$t/k2/zero_tmp \
$t/k2/bl30_zero.bin \
$t/k2/bl301.bin \
$t/k2/bl301_zero.bin \
$t/k2/bl30_new.bin bl30
$t/k2/fip_create --bl30 $t/k2/bl30_new.bin \
--bl31 $t/k2/bl31.img \
--bl33 bl33.bin \
$t/k2/fip.bin
$t/k2/fip_create --dump $t/k2/fip.bin
$t/acs_tool.pyc $t/k2/bl2.bin \
$t/k2/bl2_acs.bin \
$t/k2/acs.bin 0
$t/blx_fix.sh $t/k2/bl2_acs.bin \
$t/k2/zero_tmp \
$t/k2/bl2_zero.bin \
$t/k2/bl21.bin \
$t/k2/bl21_zero.bin \
$t/k2/bl2_new.bin bl2
cat $t/k2/bl2_new.bin $t/k2/fip.bin > boot_new.bin
$t/k2/aml_encrypt_gxb --bootsig \
--input boot_new.bin \
--output u-boot.bin
fi
}
write_uboot_platform()
{
dd if=$1/u-boot.bin of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1
dd if=$1/u-boot.bin of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
}
family_tweaks()
{
echo "#Allow ttyAML0 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/
if [[ $BRANCH != default ]]; then
mkdir -p $destination/etc/udev/rules.d
mkdir -p $destination/usr/local/bin
cp $SRC/packages/bsp/rockchip/hdmi.rules $destination/etc/udev/rules.d
install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin
fi
}