armbian-build/config/sources/mvebu64.conf

100 lines
3.3 KiB
Plaintext

ARCH=arm64
KERNEL_IMAGE_TYPE=Image
BOOTSCRIPT="boot-espressobin.cmd:boot.cmd"
UBOOT_TARGET_MAP="DEVICE_TREE=armada-3720-espressobin ;;flash-image-*.bin"
BOOTSOURCE='https://github.com/MarvellEmbeddedProcessors/u-boot-marvell.git'
BOOTDIR=$MAINLINE_UBOOT_DIR
BOOTBRANCH='branch:u-boot-2018.03-armada-18.12'
UBOOT_USE_GCC='> 7.2'
BOOTENV_FILE='clearfog-default.txt'
ATFSOURCE='https://github.com/MarvellEmbeddedProcessors/atf-marvell'
ATFDIR='arm-trusted-firmware-espressobin'
ATFBRANCH='branch:atf-v1.5-armada-18.12'
ATF_USE_GCC='> 7.2'
ATF_COMPILER='aarch64-linux-gnu-'
ATF_TARGET_MAP='DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=CPU_800_DDR_800 DDR_TOPOLOGY=2 BOOTDEV=SPINOR PARTNUM=0 PLAT=a3700;;build/a3700/debug/bl31.bin'
case $BRANCH in
default)
KERNELSOURCE='https://github.com/MarvellEmbeddedProcessors/linux-marvell.git'
KERNELBRANCH='branch:linux-4.14.22-armada-18.06'
KERNELDIR='linux-marvell'
KERNEL_USE_GCC='> 6.3'
;;
next)
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
KERNELBRANCH='branch:linux-4.19.y'
KERNELDIR=$MAINLINE_KERNEL_DIR
KERNEL_USE_GCC='> 7.0'
;;
esac
CPUMIN=200000
CPUMAX=1300000
GOVERNOR=ondemand
SERIALCON='ttyMV0'
NM_IGNORE_DEVICES="interface-name:eth*,interface-name:wan*,interface-name:lan*,interface-name:br*"
write_uboot_platform()
{
# flashing process via u-boot only for now https://www.armbian.com/espressobin/
/bin/true
}
family_tweaks()
{
chroot $SDCARD /bin/bash -c "apt-get -y -qq remove --auto-remove linux-sound-base alsa-base alsa-utils bluez>/dev/null 2>&1"
[[ -f $SDCARD/etc/netplan/armbian-default.yaml ]] && sed -i "s/^ renderer.*/ renderer: networkd/" $SDCARD/etc/netplan/armbian-default.yaml
cp $SRC/packages/bsp/mvebu64/10* $SDCARD/etc/systemd/network/
echo "#Marvell Espressobin Console" >> $SDCARD/etc/securetty
echo "ttyMV0" >> $SDCARD/etc/securetty
}
atf_custom_postprocess()
{
# prepare compilers for postprocess
ubootdir="$SRC/cache/sources/$BOOTDIR/${BOOTBRANCH##*:}"
export ATF1=$toolchain/$ATF_COMPILER
export ATF2=$(find_toolchain "arm-linux-gnueabi-" "> 7.0")/arm-linux-gnueabi-
export BL33=$ubootdir"/u-boot.bin"
# copy extra DDR topology
cp $SRC/packages/blobs/espressobin/DDR* $SRC/cache/sources/marvell-tools/tim/ddr/
}
uboot_custom_postprocess()
{
# clean previous
rm $ubootdir/flash-image*
local atfdir="$SRC/cache/sources/$ATFDIR/${ATFBRANCH##*:}"
local ubootdir="$SRC/cache/sources/$BOOTDIR/${BOOTBRANCH##*:}"
cd $atfdir
clocks=( 600_600 800_800 1000_800 1200_750 )
topology=( 512m_1cs_0 512m_2cs_0 1g_2cs_2 1g_1cs_4 2g_2cs_2 1g_1cs_5 2g_2cs_6 )
for i in "${clocks[@]}"
do
for j in "${topology[@]}"
do
if [[ $j = *cs_5 || $j = *cs_6 ]]; then local ddrname="DDR4"; else ddrname="DDR3"; fi
FILENAME="flash-image-$ddrname-$j-$i.bin"
DDR_TOPOLOGY="${j##*_}"
CLOCKSPRESET="CPU_${i%_*}_DDR_${i##*_}"
display_alert "Building $FILENAME" "" "info"
make distclean >> $DEST/debug/compilation.log 2>&1
make MV_DDR_PATH=$SRC/cache/sources/marvell-ddr CROSS_COMPILE=$ATF1 DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=$CLOCKSPRESET DDR_TOPOLOGY=$DDR_TOPOLOGY BOOTDEV=SPINOR PARTNUM=0 PLAT=a3700 all fip BL33=$BL33 WTP=$SRC/cache/sources/marvell-tools $CTHREADS CROSS_CM3=$ATF2 >> $DEST/debug/compilation.log 2>&1
cp build/a3700/debug/flash-image.bin $ubootdir/$FILENAME
done
done
cd $ubootdir
}