[Buildroot] [PATCH v3 2/2] configs/microchip_mpfs_icicle: add support for Microchip's Icicle Kit

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Aug 8 21:59:19 UTC 2023


Hello Jamie,

I've applied your patch to our "next" branch, with some small changes
(see below), and also I have a few questions.

On Wed, 12 Jul 2023 13:51:54 +0100
Jamie Gibbons via buildroot <buildroot at buildroot.org> wrote:

> +Creating a bootable SD card with genimage
> +=========================================
> +
> +By default Buildroot builds a SD card image for you. The first partition
> +of this image contains a U-Boot binary, embedded in a Hart Software
> +Services (HSS) payload. The second partition contains a FAT filesystem

Could you clarify what this "embedded in a Hart Software Services
payload" means? Does it mean that there is additional code running on
the target other than U-Boot, Linux and user-space? I don't see OpenSBI
being compiled in this defconfig.

I'd like to make sure we have properly captured all the code that ends
up running on the target, so that we are complete from a licensing
stand-point.


> diff --git a/board/microchip/mpfs_icicle/post-image.sh b/board/microchip/mpfs_icicle/post-image.sh
> new file mode 100755
> index 0000000000..54cc6d71f8
> --- /dev/null
> +++ b/board/microchip/mpfs_icicle/post-image.sh
> @@ -0,0 +1,13 @@
> +#!/usr/bin/env bash
> +
> +BASE_DIR=$(pwd)
> +HSS_PAYLOAD_GENERATOR=$HOST_DIR/bin/hss-payload-generator
> +MKIMAGE=$HOST_DIR/bin/mkimage
> +GENIMAGE=${BASE_DIR}/support/scripts/genimage.sh
> +GENIMAGE_CFG=${BASE_DIR}/$2
> +
> +cd "${BINARIES_DIR}" || exit
> +${HSS_PAYLOAD_GENERATOR} -c "${BASE_DIR}"/board/microchip/mpfs_icicle/config.yaml payload.bin
> +cp "${BASE_DIR}"/board/microchip/mpfs_icicle/mpfs_icicle.its ./
> +${MKIMAGE} -f mpfs_icicle.its mpfs_icicle.itb
> +${GENIMAGE} -c "${GENIMAGE_CFG}"

Simplified to:

+#!/bin/sh
+HSS_PAYLOAD_GENERATOR=${HOST_DIR}/bin/hss-payload-generator
+MKIMAGE=${HOST_DIR}/bin/mkimage
+
+${HSS_PAYLOAD_GENERATOR} -c board/microchip/mpfs_icicle/config.yaml ${BINARIES_DIR}/payload.bin
+cp board/microchip/mpfs_icicle/mpfs_icicle.its ${BINARIES_DIR}/mpfs_icicle.its
+(cd ${BINARIES_DIR} && ${MKIMAGE} -f mpfs_icicle.its mpfs_icicle.itb)
+support/scripts/genimage.sh -c board/microchip/mpfs_icicle/genimage.cfg


> diff --git a/configs/microchip_mpfs_icicle_defconfig b/configs/microchip_mpfs_icicle_defconfig
> new file mode 100644
> index 0000000000..9ad1bf66d8
> --- /dev/null
> +++ b/configs/microchip_mpfs_icicle_defconfig
> @@ -0,0 +1,34 @@
> +BR2_riscv=y
> +BR2_riscv_custom=y
> +BR2_RISCV_ISA_CUSTOM_RVM=y
> +BR2_RISCV_ISA_CUSTOM_RVF=y
> +BR2_RISCV_ISA_CUSTOM_RVD=y
> +BR2_RISCV_ISA_CUSTOM_RVC=y

So you're not a riscv_g core because you don't have the atomic extension?

> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
> +BR2_TARGET_GENERIC_HOSTNAME="mpfs_icicle"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/microchip/mpfs_icicle/post-image.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="board/microchip/mpfs_icicle/genimage.cfg"

Option dropped, because board/microchip/mpfs_icicle/post-image.sh now
hardcodes the genimage configuration filename.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list