From 312fcbf0ed995738afbf21a507a3cedea65db876 Mon Sep 17 00:00:00 2001 From: Jamie Gibbons Date: Wed, 12 Jul 2023 13:51:53 +0100 Subject: [PATCH] package/microchip-hss-payload-generator: new package The Buildroot icicle kit configuration uses the Hart Software Service's (HSS) payload generator tool. This tool creates a formatted payload image for the HSS zero-stage bootloader on PolarFire SoC, given a configuration file and a set of ELF binaries. The configuration file is used to map the ELF binaries or binary blobs to the individual application harts (U54s). Add the HSS payload generator as a host package to support this. Signed-off-by: Jamie Gibbons Reviewed-by: Valentina Fernandez Reviewed-by: Giulio Benetti Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 3 ++ package/Config.in.host | 1 + .../Config.in.host | 11 ++++++++ .../microchip-hss-payload-generator.hash | 3 ++ .../microchip-hss-payload-generator.mk | 28 +++++++++++++++++++ 5 files changed, 46 insertions(+) create mode 100644 package/microchip-hss-payload-generator/Config.in.host create mode 100644 package/microchip-hss-payload-generator/microchip-hss-payload-generator.hash create mode 100644 package/microchip-hss-payload-generator/microchip-hss-payload-generator.mk diff --git a/DEVELOPERS b/DEVELOPERS index 1357f150ce..6daff7c078 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1475,6 +1475,9 @@ F: package/rpm/ F: package/swaybg/ F: package/yad/ +N: Jamie Gibbons +F: package/microchip-hss-payload-generator/ + N: Jan Heylen F: package/opentracing-cpp/ diff --git a/package/Config.in.host b/package/Config.in.host index aa1f15e3ac..22e0dc64d4 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -60,6 +60,7 @@ menu "Host utilities" source "package/mender-artifact/Config.in.host" source "package/meson-tools/Config.in.host" source "package/mfgtools/Config.in.host" + source "package/microchip-hss-payload-generator/Config.in.host" source "package/mkpasswd/Config.in.host" source "package/moby-buildkit/Config.in.host" source "package/mosquitto/Config.in.host" diff --git a/package/microchip-hss-payload-generator/Config.in.host b/package/microchip-hss-payload-generator/Config.in.host new file mode 100644 index 0000000000..38e11bd0e5 --- /dev/null +++ b/package/microchip-hss-payload-generator/Config.in.host @@ -0,0 +1,11 @@ +config BR2_PACKAGE_HOST_MICROCHIP_HSS_PAYLOAD_GENERATOR + bool "host microchip-hss-payload-generator" + help + Microchip PolarFire SoC Payload Generator. This tool creates + a formatted payload image for the HSS zero-stage bootloader + on PolarFire SoC, given a configuration file and a set of + ELF binaries. The configuration file is used to map the ELF + binaries or binary blobs to the individual application harts + (U54s). + + https://github.com/polarfire-soc/hart-software-services.git diff --git a/package/microchip-hss-payload-generator/microchip-hss-payload-generator.hash b/package/microchip-hss-payload-generator/microchip-hss-payload-generator.hash new file mode 100644 index 0000000000..69e05e18af --- /dev/null +++ b/package/microchip-hss-payload-generator/microchip-hss-payload-generator.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 f6f69412caf886e88abbf26de0dee1db790c790b89571f2f0def1e2f3620f057 microchip-hss-payload-generator-2023.06.tar.gz +sha256 0b67b1d44bcad078580fc5d8e9580a48a9466b769db58aeb1631d4c5ef97e08a tools/hss-payload-generator/LICENSE.md diff --git a/package/microchip-hss-payload-generator/microchip-hss-payload-generator.mk b/package/microchip-hss-payload-generator/microchip-hss-payload-generator.mk new file mode 100644 index 0000000000..63ae22ed60 --- /dev/null +++ b/package/microchip-hss-payload-generator/microchip-hss-payload-generator.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# microchip-hss-payload-generator +# +################################################################################ + +HOST_MICROCHIP_HSS_PAYLOAD_GENERATOR_VERSION = 2023.06 +HOST_MICROCHIP_HSS_PAYLOAD_GENERATOR_SITE = $(call github,polarfire-soc,hart-software-services,v$(HOST_MICROCHIP_HSS_PAYLOAD_GENERATOR_VERSION)) +# Some parts of the repository are under different licenses, but we +# are only building/installing the code in +# tools/hss-payload-generator/. +HOST_MICROCHIP_HSS_PAYLOAD_GENERATOR_LICENSE = MIT or GPL-2.0+ +HOST_MICROCHIP_HSS_PAYLOAD_GENERATOR_LICENSE_FILES = tools/hss-payload-generator/LICENSE.md +HOST_MICROCHIP_HSS_PAYLOAD_GENERATOR_DEPENDENCIES = host-elfutils host-libyaml host-openssl + +define HOST_MICROCHIP_HSS_PAYLOAD_GENERATOR_BUILD_CMDS + $(MAKE) -C $(@D)/tools/hss-payload-generator \ + HOST_INCLUDES="$(HOST_CPPFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" +endef + +define HOST_MICROCHIP_HSS_PAYLOAD_GENERATOR_INSTALL_CMDS + $(INSTALL) -D -m 755 \ + $(@D)/tools/hss-payload-generator/hss-payload-generator \ + $(HOST_DIR)/bin/hss-payload-generator +endef + +$(eval $(host-generic-package))