Skip to contentSkip to conversation

uimage: add define for RISC-V architecture

PATCH In review Antony Pavlov 2 participants 3 messages Apr 6, 2020 – Apr 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uimage: add define for RISC-V architecture

---
 common/image.c  | 1 +
 include/image.h | 3 +++
 2 files changed, 4 insertions(+)
common/image.c +1 -0
index 04cd86bf9a..15bef96826 100644
@@ -60,6 +60,7 @@ static table_entry_t arch_name[] = {
 	{ IH_ARCH_NDS32,	"nds32",	"NDS32",	},
 	{ IH_ARCH_OPENRISC,	"or1k",		"OpenRISC 1000",},
 	{ IH_ARCH_ARM64,	"arm64",	"AArch64",	},
+	{ IH_ARCH_RISCV,	"riscv",	"RISC-V",	},
 	{ -1,			"",		"",		},
 };
 
include/image.h +3 -0
index 18344dfef9..7da871e8cb 100644
@@ -75,6 +75,7 @@
 #define IH_ARCH_NDS32		20	/* ANDES Technology - NDS32  */
 #define IH_ARCH_OPENRISC	21	/* OpenRISC 1000  */
 #define IH_ARCH_ARM64		22	/* ARM64	*/
+#define IH_ARCH_RISCV		23	/* RISC-V	*/
 
 #if defined(__PPC__)
 #define IH_ARCH IH_ARCH_PPC
@@ -104,6 +105,8 @@
 #define IH_ARCH IH_ARCH_AVR32
 #elif defined(CONFIG_LINUX)
 #define IH_ARCH IH_ARCH_LINUX
+#elif defined(__riscv)
+#define IH_ARCH IH_ARCH_RISCV
 #endif
 
 /*
Signature · 7 lines
2.25.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

On Mon, 6 Apr 2020 15:23:13 +0300
Antony Pavlov <[email protected]> wrote:

Hi Sascha,

It looks like barebox IN_ARCH_* constants in image.h and the same constants from U-Boot's image.h are differ.

include/image.h line 81

Quoted 10 lines
include/image.h +1 -0
@@ -75,6 +75,7 @@
 #define IH_ARCH_NDS32		20	/* ANDES Technology - NDS32  */
 #define IH_ARCH_OPENRISC	21	/* OpenRISC 1000  */
 #define IH_ARCH_ARM64		22	/* ARM64	*/
+#define IH_ARCH_RISCV		23	/* RISC-V	*/
 
 #if defined(__PPC__)
 #define IH_ARCH IH_ARCH_PPC

Does it matters?

Signature · 7 lines
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw
Quoted 16 lines · Antony Pavlov

On Mon, 6 Apr 2020 15:23:13 +0300
Antony Pavlov <[email protected]> wrote:

Hi Sascha,

It looks like barebox IN_ARCH_* constants in image.h and the same constants from U-Boot's image.h are differ.

Quoted 8 lines
include/image.h +1 -0
@@ -75,6 +75,7 @@
 #define IH_ARCH_NDS32		20	/* ANDES Technology - NDS32  */
 #define IH_ARCH_OPENRISC	21	/* OpenRISC 1000  */
 #define IH_ARCH_ARM64		22	/* ARM64	*/
+#define IH_ARCH_RISCV		23	/* RISC-V	*/
 
Quoted 4 lines

include/image.h line 81

Quoted 2 lines
include/image.h +0 -0
 #if defined(__PPC__)
 #define IH_ARCH IH_ARCH_PPC

Does it matters?

Yes, it does. The numbers should be the same.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox