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>, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v3 1/4] common: bootm: allow building with an undefined IH_ARCH
Date: Tue, 30 Jun 2020 22:43:59 +0200	[thread overview]
Message-ID: <20200630204402.26566-2-cleger@kalray.eu> (raw)
In-Reply-To: <20200630204402.26566-1-cleger@kalray.eu>

Some architectures might not want to support uImage. To do so, allow
IH_ARCH to be let undefined which will make it possible to compile boot
support.

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-30 20:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 20:43 [PATCH v3 0/4] kvx: add elf bootm support Clement Leger
2020-06-30 20:43 ` Clement Leger [this message]
2020-06-30 20:44 ` [PATCH v3 2/4] common: Kconfig: remove MIPS dependency for ELF Clement Leger
2020-06-30 20:44 ` [PATCH v3 3/4] kvx: add I-cache and D-cache synchronisation Clement Leger
2020-06-30 20:44 ` [PATCH v3 4/4] kvx: add support for elf loading using bootm Clement Leger
2020-07-01  5:23 ` [PATCH v3 0/4] kvx: add elf bootm support Sascha Hauer

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=20200630204402.26566-2-cleger@kalray.eu \
    --to=cleger@kalray.eu \
    --cc=a.fatoum@pengutronix.de \
    --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