public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Greg Malysa <malysagreg@gmail.com>
To: u-boot@lists.denx.de
Cc: adsp-linux@analog.com, Utsav Agarwal <utsav.agarwal@analog.com>,
	Greg Malysa <malysagreg@gmail.com>,
	Arturs Artamonovs <arturs.artamonovs@analog.com>,
	Ian Roberts <ian.roberts@timesys.com>,
	Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
	Philip Molloy <philip@philipmolloy.com>,
	Tom Rini <trini@konsulko.com>,
	Vasileios Bimpikas <vasileios.bimpikas@analog.com>
Subject: [PATCH 04/12] mach-sc5xx: Add preliminary support for binman
Date: Thu, 11 Dec 2025 03:03:55 -0500	[thread overview]
Message-ID: <20251211080414.5363-5-malysagreg@gmail.com> (raw)
In-Reply-To: <20251211080414.5363-1-malysagreg@gmail.com>

From: Utsav Agarwal <utsav.agarwal@analog.com>

Binman is optionally supported for Analog Devices sc5xx SoCs if Yocto is
not being used to create and assemble system images. The spl LDR is
generated locally but other artifacts such as kernel FIT image and root
file system are built externally and must be supplied to binman if used.

Binman is enabled by selecting the SC5XX_USE_BINMAN config symbol and
the image structure is included in the shared sc5xx device tree.

Signed-off-by: Greg Malysa <malysagreg@gmail.com>
Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com>
---

(no changes since v1)

 arch/arm/dts/sc5xx.dtsi     | 52 +++++++++++++++++++++++++++++++++++++
 arch/arm/mach-sc5xx/Kconfig | 33 +++++++++++++++++++++++
 2 files changed, 85 insertions(+)

diff --git a/arch/arm/dts/sc5xx.dtsi b/arch/arm/dts/sc5xx.dtsi
index 3f440dac29f..b4de1b51bb9 100644
--- a/arch/arm/dts/sc5xx.dtsi
+++ b/arch/arm/dts/sc5xx.dtsi
@@ -10,6 +10,58 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
+	chosen {
+		stdout-path = "serial0:115200";
+		bootph-pre-ram;
+	};
+
+	aliases {
+		spi2 = "/spi2";
+		serial0 = &uart0;
+		bootph-pre-ram;
+	};
+
+#ifdef CONFIG_SC5XX_USE_BINMAN
+	binman {
+		filename = CONFIG_SC5XX_BINMAN_FILENAME;
+		stage1-boot {
+			offset = <CONFIG_SC5XX_UBOOT_SPL_OFFSET>;
+			type = "blob-ext";
+			filename = "spl/u-boot-spl.ldr";
+		};
+
+		/* since falcon mode can jump from SPL to OS directly
+		 * full u-boot is optional
+		 *
+		 * @todo: review if we can say this given support has
+		 * not yet been upstreamed. Otherwise we might have to
+		 * invoke binman only for full u-boot.
+		 */
+		stage2-boot {
+			offset = <CONFIG_SC5XX_UBOOT_OFFSET>;
+			type = "blob-ext";
+			filename = "u-boot.ldr";
+			optional;
+		};
+
+#ifdef CONFIG_SC5XX_FITIMAGE_NAME
+		fitImage {
+			offset = <CONFIG_SC5XX_FITIMAGE_OFFSET>;
+			type = "blob-ext";
+			filename = CONFIG_SC5XX_FITIMAGE_NAME;
+		};
+#endif
+
+#ifdef CONFIG_SC5XX_ROOTFS_NAME
+		rfs {
+			offset = <CONFIG_SC5XX_ROOTFS_OFFSET>;
+			type = "blob-ext";
+			filename = CONFIG_SC5XX_ROOTFS_NAME;
+		};
+#endif
+	};
+#endif
+
 	clocks {
 		sys_clkin0: sys_clkin0 {
 			compatible = "fixed-clock";
diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig
index b7c298fe279..ec1d5539dc9 100644
--- a/arch/arm/mach-sc5xx/Kconfig
+++ b/arch/arm/mach-sc5xx/Kconfig
@@ -147,6 +147,39 @@ config SC5XX_LOADADDR
 	help
 	  The default load address for u-boot.
 
+menu "Binman configuration"
+config SC5XX_USE_BINMAN
+	bool "Use binman for final image"
+	select BINMAN
+	help
+	  If you wish to use binman to assemble an image, say 'Y' here.
+	  This will enable binman-specific sections in the device tree.
+
+config SC5XX_BINMAN_FILENAME
+	string "Image name"
+	default "sc5xx-image.img"
+	depends on SC5XX_USE_BINMAN
+	help
+	  The name of the image that will be created by binman.
+	  This is used to create the final image.
+
+config SC5XX_FITIMAGE_NAME
+	string "FitImage name"
+	default "fitImage"
+	depends on SC5XX_USE_BINMAN
+	help
+	  The name of the fitImage to be packed by binman.
+	  This is used to create the final image.
+
+config SC5XX_ROOTFS_NAME
+	string "RootFS name"
+	default "rootfs"
+	depends on SC5XX_USE_BINMAN
+	help
+	  The name of the rootfs to be packed by binman.
+	  This is used to create the final image.
+endmenu
+
 config ADI_IMAGE
 	string "ADI fitImage type"
 	help
-- 
2.49.1


  parent reply	other threads:[~2025-12-11  8:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-11  8:03 [PATCH 00/12] sc5xx: Add complete board support for all ADI SC5xx boards Greg Malysa
2025-12-11  8:03 ` [PATCH 01/12] mach-sc5xx: Introduce Kconfig symbols for image addresses Greg Malysa
2025-12-11  8:03 ` [PATCH 02/12] mach-sc5xx: Rename SC_BOOT_MODE Greg Malysa
2025-12-11  8:03 ` [PATCH 03/12] mach-sc5xx: Kconfig: Make EZKIT and EZLITE carriers mutually exclusive Greg Malysa
2025-12-11  8:03 ` Greg Malysa [this message]
2025-12-11  8:03 ` [PATCH 05/12] docker: add Analog Devices tools to docker image Greg Malysa
2025-12-11  8:03 ` [PATCH 06/12] board: adi: Add SOMCRR infrastructure Greg Malysa
2025-12-11  8:03 ` [PATCH 07/12] board: adi: Add support for SC573-ezkit Greg Malysa
2025-12-11  8:03 ` [PATCH 08/12] board: adi: Add support for SC589 boards Greg Malysa
2025-12-11  8:04 ` [PATCH 09/12] board: adi: Add support for SC584-ezkit Greg Malysa
2025-12-11  8:04 ` [PATCH 10/12] board: adi: Add support for SC598 Greg Malysa
2025-12-11  8:04 ` [PATCH 11/12] board: adi: Add support for SC594 Greg Malysa
2025-12-11  8:04 ` [PATCH 12/12] MAINTAINERS: Update ADI entries for new boards Greg Malysa
2026-01-23 22:33 ` [PATCH 00/12] sc5xx: Add complete board support for all ADI SC5xx boards Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2025-11-18  6:39 Greg Malysa
2025-11-18  6:39 ` [PATCH 04/12] mach-sc5xx: Add preliminary support for binman Greg Malysa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251211080414.5363-5-malysagreg@gmail.com \
    --to=malysagreg@gmail.com \
    --cc=adsp-linux@analog.com \
    --cc=arturs.artamonovs@analog.com \
    --cc=ian.roberts@timesys.com \
    --cc=nathan.morrison@timesys.com \
    --cc=philip@philipmolloy.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=utsav.agarwal@analog.com \
    --cc=vasileios.bimpikas@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox