From 5adb612dda450ca337341bc6e12f1ff110be7bb7 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 26 Nov 2022 17:02:34 +0100 Subject: [PATCH] board/aarch64: initial support for EspressoBIN - Drop Cortex A72 in favor of more general A53 images - Enable device trees for all supported EspressoBIN models - Bump kernel to latest 6.0 - Currently only starts from SD card, so add genimage to post-build - Create Ext2/4 disk image for SD card - Add infix-rw partition to sd-card image - The genimage tool needs genext2fs to create rw.ext4 Signed-off-by: Joachim Wiberg --- board/aarch64/espressobin/genimage.cfg | 25 +++++++++++++++++++++++++ configs/aarch64_defconfig | 13 ++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 board/aarch64/espressobin/genimage.cfg diff --git a/board/aarch64/espressobin/genimage.cfg b/board/aarch64/espressobin/genimage.cfg new file mode 100644 index 00000000..ef3490c3 --- /dev/null +++ b/board/aarch64/espressobin/genimage.cfg @@ -0,0 +1,25 @@ +image rw.ext4 { + ext4 { + label = "infix-rw" + } + empty = true + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } + + partition rw { + partition-type = 0x83 + image = "rw.ext4" + } +} + +# Silence genimage warnings +config {} diff --git a/configs/aarch64_defconfig b/configs/aarch64_defconfig index f57997ab..7ac679ea 100644 --- a/configs/aarch64_defconfig +++ b/configs/aarch64_defconfig @@ -1,5 +1,5 @@ BR2_aarch64=y -BR2_cortex_a72=y +BR2_ARM_FPU_VFPV4=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY=y @@ -17,15 +17,17 @@ BR2_GENERATE_LOCALE="en_US en_CA" BR2_TARGET_TZ_INFO=y BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_INFIX_PATH)/board/common/rootfs" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_INFIX_PATH)/board/common/post-build.sh" -BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_INFIX_PATH)/board/common/post-image.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(TOPDIR)/support/scripts/genimage.sh $(BR2_EXTERNAL_INFIX_PATH)/board/common/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/espressobin/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.19.17" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/linux_defconfig" BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/cn9130-crb-A marvell/cn9130-crb-B sparx5_pcb135_emmc_no_psci" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc marvell/armada-3720-espressobin-ultra marvell/cn9130-crb-A marvell/cn9130-crb-B sparx5_pcb135_emmc_no_psci" BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/dts/microchip/sparx5_pcb135_emmc_no_psci.dts" +BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_INFIX_PATH)/board/common/busybox_defconfig" BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y BR2_PACKAGE_CHRONY=y @@ -46,9 +48,14 @@ BR2_PACKAGE_SYSKLOGD=y BR2_PACKAGE_SYSKLOGD_LOGGER=y BR2_PACKAGE_WATCHDOGD=y BR2_PACKAGE_MG=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="384M" BR2_TARGET_ROOTFS_SQUASHFS=y # BR2_TARGET_ROOTFS_TAR is not set BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_GENEXT2FS=y BR2_PACKAGE_FINIT_SULOGIN=y BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y