armbian-build/config/sources/meson64.conf
Igor Pečovnik f416c35c16
Adding minimal image (#1504)
* Minimal build setup (#1463)
* Netplan folder check & armbian-tools dependency on expect (and tcl) solved (#1464)
* Prevent netplan configration if it is not installed
* Resolved expect dependecy of armbian-tools
* More packages added for armbian-tools
* Added python3-apt and rsyslog to minimal installation
* Debootstrap variant doesn't play nice. We loose networking and it affects standard builds as well. Removing.
* Python-to-Bash conversion (#1470)
* Remove python3-apt dependency from BSP package, fix netplan error also on Disco and putting back varint=minbase ... tested Disco, Bionic
* Distinguish package list: *-minimal.list and *-desktop.list
* Enable Wireguard back which was removed by mistake. https://github.com/armbian/build/issues/1471
* Having minbase debootstrap variant for all will require further adjustements with current package base - backward compatibility. Minimal image is now Python free but need further testings ...
* Add wireless-regdb and crda to the pakage base, fix Ubuntu keyring warning while debootstrap.
* Add figlet to sort out missing fonts
* Moving few packages here and there. Bugfix when creating a cache package list
* Manually compared base images - they are the same with small insignificant difference. Minimal image has to be futher tuned
* Adjustements for bash powered lsb_release, adding some needed packages
* Fixed (no) network problems on Bionic/Disco
* Add rsync to debootstrap_list and few minor fixes
* Adjust text in lsb_release
* Olimex Micro A20: fix wrong boot config
* Remove duplicate depenedency
* Odroid C1: adjust kernel config
2019-08-16 19:21:12 +02:00

203 lines
4.7 KiB
Plaintext

BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
BOOTDIR=$MAINLINE_UBOOT_DIR
BOOTBRANCH='tag:v2019.07'
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
SERIALCON=ttyAML0
OVERLAY_PREFIX='meson'
if [[ $BOARD == odroidc2 ]]; then
UBOOT_TARGET_MAP=";;$SRC/cache/sources/odroidc2-blobs/bl1.bin.hardkernel u-boot.bin"
BOOTENV_FILE='odroidc2-next.txt'
fi
if [[ $BOARD == lafrite ]]; then
UBOOT_TARGET_MAP="u-boot-dtb.img;;u-boot.bin:u-boot.bin u-boot-dtb.img"
fi
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.19.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
# this helper function includes postprocess for p212 and its variants.
# $1 PATH for uboot blob repo
# $2 dir name in uboot blob repo
uboot_gxl_postprocess()
{
mv u-boot.bin bl33.bin
$1/blx_fix.sh $1/$2/bl30.bin \
$1/$2/zero_tmp \
$1/$2/bl30_zero.bin \
$1/$2/bl301.bin \
$1/$2/bl301_zero.bin \
$1/$2/bl30_new.bin bl30
python $1/acs_tool.pyc $1/$2/bl2.bin \
$1/$2/bl2_acs.bin \
$1/$2/acs.bin 0
$1/blx_fix.sh $1/$2/bl2_acs.bin \
$1/$2/zero_tmp \
$1/$2/bl2_zero.bin \
$1/$2/bl21.bin \
$1/$2/bl21_zero.bin \
$1/$2/bl2_new.bin bl2
$1/$2/aml_encrypt_gxl --bl3enc --input $1/$2/bl30_new.bin
$1/$2/aml_encrypt_gxl --bl3enc --input $1/$2/bl31.img
$1/$2/aml_encrypt_gxl --bl3enc --input bl33.bin
$1/$2/aml_encrypt_gxl --bl2sig --input $1/$2/bl2_new.bin \
--output bl2.n.bin.sig
$1/$2/aml_encrypt_gxl --bootmk \
--output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 $1/$2/bl30_new.bin.enc \
--bl31 $1/$2/bl31.img.enc \
--bl33 bl33.bin.enc
}
uboot_custom_postprocess()
{
if [[ $BOARD == odroidc2 ]]; then
local t=$SRC/cache/sources/odroidc2-blobs/
$t/fip_create --bl30 $t/gxb/bl30.bin \
--bl301 $t/gxb/bl301.bin \
--bl31 $t/gxb/bl31.bin \
--bl33 u-boot.bin \
fip.bin
$t/fip_create --dump fip.bin
cat $t/gxb/bl2.package fip.bin > boot_new.bin
rm -f u-boot.img
$t/gxb/aml_encrypt_gxb --bootsig \
--input boot_new.bin \
--output u-boot.img
rm -f u-boot.bin
dd if=u-boot.img of=u-boot.bin bs=512 skip=96 status=none
fi
if [[ $BOARD == lepotato ]]; then
uboot_gxl_postprocess $SRC/cache/sources/odroidc2-blobs/ gxl
fi
if [[ $BOARD == kvim1 ]]; then
uboot_gxl_postprocess $SRC/cache/sources/odroidc2-blobs/ vim1
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
python $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
}
if [[ $BOARD == odroidc2 ]]; then
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
}
else
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
}
fi
family_tweaks()
{
echo "#Allow ttyAML0 root" >> $SDCARD/etc/securetty
echo "ttyAML0" >> $SDCARD/etc/securetty
if [[ $BOARD == lafrite ]]; then
echo "fdtfile=amlogic/meson-gxl-s805x-libretech-ac.dtb" >> $SDCARD/boot/armbianEnv.txt
fi
}
family_tweaks_bsp()
{
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
}