mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Clement Leger <cleger@kalray.eu>
To: Sascha Hauer <s.hauer@pengutronix.de>, barebox@lists.infradead.org
Cc: Clement Leger <cleger@kalray.eu>
Subject: [PATCH 1/4] common: bootm: allow letting IH_ARCH undefined
Date: Tue, 23 Jun 2020 21:35:03 +0200	[thread overview]
Message-ID: <20200623193506.13716-2-cleger@kalray.eu> (raw)
In-Reply-To: <20200623193506.13716-1-cleger@kalray.eu>

Some architecture might not want to support uImage. To do so, allow
IH_ARCH to be let undefined.

Signed-off-by: Clement Leger <cleger@kalray.eu>
---
 common/bootm.c  | 2 +-
 include/image.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/bootm.c b/common/bootm.c
index 4110d8d6e..bea73fac3 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -510,7 +510,7 @@ static int bootm_open_os_uimage(struct image_data *data)
 
 	uimage_print_contents(data->os);
 
-	if (data->os->header.ih_arch != IH_ARCH) {
+	if (IH_ARCH == IH_ARCH_INVALID || data->os->header.ih_arch != IH_ARCH) {
 		printf("Unsupported Architecture 0x%x\n",
 		       data->os->header.ih_arch);
 		return -EINVAL;
diff --git a/include/image.h b/include/image.h
index 88b628bc7..0a7832f13 100644
--- a/include/image.h
+++ b/include/image.h
@@ -101,6 +101,8 @@
 #define IH_ARCH IH_ARCH_AVR32
 #elif defined(CONFIG_LINUX)
 #define IH_ARCH IH_ARCH_LINUX
+#else
+#define IH_ARCH IH_ARCH_INVALID
 #endif
 
 /*
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-06-23 19:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 19:35 [PATCH 0/4] kvx: add elf bootm support Clement Leger
2020-06-23 19:35 ` Clement Leger [this message]
2020-06-23 19:35 ` [PATCH 2/4] common: Kconfig: remove MIPS dependency Clement Leger
2020-06-24  6:06   ` Ahmad Fatoum
2020-06-23 19:35 ` [PATCH 3/4] kvx: add D-cache inval and I-cache sync Clement Leger
2020-06-24  6:12   ` Ahmad Fatoum
2020-06-23 19:35 ` [PATCH 4/4] kvx: add support for elf loading using bootm Clement Leger
2020-06-24  6:17   ` Ahmad Fatoum
2020-06-24  7:15     ` Clément Leger
2020-06-29  8:15       ` Ahmad Fatoum
2020-06-29  8:23         ` Clément Leger
2020-06-29  8:29           ` Ahmad Fatoum

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=20200623193506.13716-2-cleger@kalray.eu \
    --to=cleger@kalray.eu \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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