[U-Boot-Users] [PATCH, 4th resend] Support uImage files for the AVR32 architecture

Haavard Skinnemoen
2006-09-22T12:09:52Z

Define IH_CPU_AVR32, make it possible to generate AVR32 uImage files
with mkimage and make cmd_bootm recognize them.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
---

I've already sent this patch three times to the list, and I have still
not gotten any response. It is really important for us to know if you
intend to merge this or not; until then, there is no point for us to
change the architecture ID as there will still be a possibility that
someone else comes along and takes it.

Keeping the current AVR32 architecture ID will mean that our version of
busybox will be incompatible with the upstream version because it
clashes with the Blackfin ID. And the longer it takes before we get an
"official" ID, the harder it will be for us to change it.

So if we don't get this issue resolved soon, I see no point in trying
to contribute our changes back to you at all. This would be very
unfortunate and effectively create an incompatible fork of u-boot with
small chances of ever merging in the future.

It's up to you.

Haavard

common/cmd_bootm.c | 3 +++
include/image.h | 1 +
tools/mkimage.c | 1 +
3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index fdf7180..2168e67 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -260,6 +260,8 @@ #elif defined(__nios2__)
if (hdr->ih_arch != IH_CPU_NIOS2)
#elif defined(__blackfin__)
if (hdr->ih_arch != IH_CPU_BLACKFIN)
+#elif defined(__avr32__)
+ if (hdr->ih_arch != IH_CPU_AVR32)
#else
# error Unknown CPU type
#endif
@@ -1236,6 +1238,7 @@ #endif
case IH_CPU_INVALID: arch = "Invalid CPU"; break;
case IH_CPU_ALPHA: arch = "Alpha"; break;
case IH_CPU_ARM: arch = "ARM"; break;
+ case IH_CPU_AVR32: arch = "AVR32"; break;
case IH_CPU_I386: arch = "Intel x86"; break;
case IH_CPU_IA64: arch = "IA64"; break;
case IH_CPU_MIPS: arch = "MIPS"; break;
diff --git a/include/image.h b/include/image.h
index 139df0b..d9f2d46 100644
--- a/include/image.h
+++ b/include/image.h
@@ -76,6 +76,7 @@ #define IH_CPU_NIOS 13 /* Nios-32 */
#define IH_CPU_MICROBLAZE 14 /* MicroBlaze */
#define IH_CPU_NIOS2 15 /* Nios-II */
#define IH_CPU_BLACKFIN 16 /* Blackfin */
+#define IH_CPU_AVR32 17 /* AVR32 */

/*
* Image Types
diff --git a/tools/mkimage.c b/tools/mkimage.c
index fea3e5b..2cb2524 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -94,6 +94,7 @@ table_entry_t arch_name[] = {
{ IH_CPU_SPARC, "sparc", "SPARC", },
{ IH_CPU_SPARC64, "sparc64", "SPARC 64 Bit", },
{ IH_CPU_BLACKFIN, "blackfin", "Blackfin", },
+ { IH_CPU_AVR32, "avr32", "AVR32", },
{ -1, "", "", },
};

--
1.4.1.1