From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 17 Mar 2023 11:55:45 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pd7kO-003piK-He for lore@lore.pengutronix.de; Fri, 17 Mar 2023 11:55:45 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pd7kO-0000It-MJ; Fri, 17 Mar 2023 11:55:44 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pd7js-0000He-UF; Fri, 17 Mar 2023 11:55:12 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pd7js-004kjv-9R; Fri, 17 Mar 2023 11:55:12 +0100 Received: from rhi by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pd7jr-005MXA-Mg; Fri, 17 Mar 2023 11:55:11 +0100 From: Roland Hieber To: ptxdist@pengutronix.de Date: Fri, 17 Mar 2023 11:55:03 +0100 Message-Id: <20230317105503.1278217-1-rhi@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Mail-Followup-To: Roland Hieber , ptxdist@pengutronix.de Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH] image-hdimage: make barebox image configurable X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Roland Hieber Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false The default name, 'barebox-image', is a symlink to the last installed file by the barebox recipe, which is not always the barebox that we want when multi-image support is enabled in the barebox config. Signed-off-by: Roland Hieber --- config/images/barebox_partitions.config | 2 +- platforms/image-hdimg.in | 14 ++++++++++++++ rules/image-hdimg.make | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/config/images/barebox_partitions.config b/config/images/barebox_partitions.config index 114b461d9099..450e055f213a 100644 --- a/config/images/barebox_partitions.config +++ b/config/images/barebox_partitions.config @@ -1,6 +1,6 @@ partition barebox { in-partition-table = false - image = "barebox-image" + image = "@BAREBOX_IMAGE@" holes = {"(440; 1024)"} size = 2M } diff --git a/platforms/image-hdimg.in b/platforms/image-hdimg.in index be37ba60feb2..b0b164230f60 100644 --- a/platforms/image-hdimg.in +++ b/platforms/image-hdimg.in @@ -46,4 +46,18 @@ config IMAGE_HDIMG_VFAT endchoice +if IMAGE_HDIMG_BAREBOX + +config IMAGE_HDIMG_BAREBOX_IMAGE + string + prompt "barebox image name" + default "barebox-image" + help + If barebox creates multiple images, configure the file name of the + image (relative to $IMAGEDIR) which should be written into hd.img. + + The default is 'barebox-image', which is a symlink to the last image + installed by the barebox recipe. +endif + endif diff --git a/rules/image-hdimg.make b/rules/image-hdimg.make index 02f7f84bfcad..2aa8aeddaf78 100644 --- a/rules/image-hdimg.make +++ b/rules/image-hdimg.make @@ -38,6 +38,7 @@ endif ifdef PTXCONF_IMAGE_HDIMG_BAREBOX IMAGE_HDIMG_BOOTLOADER_ENV := \ GPT_LOCATION='2M' \ + BAREBOX_IMAGE=$(PTXCONF_IMAGE_HDIMG_BAREBOX_IMAGE) \ BOOTLOADER_IMAGES='' \ BOOTLOADER_PARTITIONS='include("barebox_partitions.config")' endif -- 2.30.2