Skip to contentSkip to conversation

MIPS: start.S: add "barebox" label at _start + 0x10

RFC In review Antony Pavlov 3 participants 4 messages May 10, 2012 – May 11, 2012 MIPS

lore
Share & tools
lore
#0 lore raw

RFC v2 1/2 MIPS: start.S: add "barebox" label at _start + 0x10

---
 arch/mips/boot/start.S |   12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/mips/boot/start.S +12 -0
index b756d40..e8868e1 100644
@@ -25,6 +25,8 @@
 #include <asm/mipsregs.h>
 #include <asm/asm.h>
 #include <asm-generic/memory_layout.h>
+#include <generated/compile.h>
+#include <generated/utsrelease.h>
 
 	/*
 	 * ADR macro instruction (inspired by ARM)
@@ -52,6 +54,16 @@ _pc:	addiu	\rd, ra, \label - _pc		# label is assumed to be
 	.align 4
 
 EXPORT(_start)
+
+	b	__start
+	 nop
+
+	.org	0x10
+	.ascii	"barebox " UTS_RELEASE " " UTS_VERSION
+	.byte	0
+
+	.align 4
+__start:
 	/* disable watchpoints */
 	mtc0	zero, CP0_WATCHLO
 	mtc0	zero, CP0_WATCHHI
Signature · 7 lines
1.7.10


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

RFC v2 2/2 MIPS: bootm: add "MIPS barebox" handler

---
 arch/mips/lib/Makefile |    1 +
 arch/mips/lib/bootm.c  |   43 +++++++++++++++++++++++++++++++++++++++++++
 common/filetype.c      |    2 ++
 include/filetype.h     |    1 +
 4 files changed, 47 insertions(+)
 create mode 100644 arch/mips/lib/bootm.c
arch/mips/lib/Makefile +1 -0
index 45fe920..85aa194 100644
@@ -6,3 +6,4 @@ obj-y += ashrdi3.o
 obj-y += memory.o
 
 obj-$(CONFIG_CMD_MIPS_CPUINFO) += cpuinfo.o
+obj-$(CONFIG_CMD_BOOTM)	+= bootm.o
arch/mips/lib/bootm.c new file +43 -0

43 lines not on this page · raw message

common/filetype.c +2 -0
index 15a3732..39c2098 100644
@@ -78,6 +78,8 @@ enum filetype file_detect_type(void *_buf)
 		return filetype_oftree;
 	if (strncmp(buf8, "ANDROID!", 8) == 0)
 		return filetype_aimage;
+	if (strncmp(buf8 + 0x10, "barebox", 7) == 0)
+		return filetype_mips_barebox;
 
 	return filetype_unknown;
 }
include/filetype.h +1 -0
index 9338793..f5de8ed 100644
@@ -17,6 +17,7 @@ enum filetype {
 	filetype_oftree,
 	filetype_aimage,
 	filetype_sh,
+	filetype_mips_barebox,
 };
 
 const char *file_type_to_string(enum filetype f);
Signature · 7 lines
1.7.10


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw
In reply to Antony Pavlov
Quoted 1 line · Antony Pavlov

Applied (both)

Thanks
Sascha

Quoted 43 lines
---
 arch/mips/boot/start.S |   12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/mips/boot/start.S +12 -0
index b756d40..e8868e1 100644
@@ -25,6 +25,8 @@
 #include <asm/mipsregs.h>
 #include <asm/asm.h>
 #include <asm-generic/memory_layout.h>
+#include <generated/compile.h>
+#include <generated/utsrelease.h>
 
 	/*
 	 * ADR macro instruction (inspired by ARM)
@@ -52,6 +54,16 @@ _pc:	addiu	\rd, ra, \label - _pc		# label is assumed to be
 	.align 4
 
 EXPORT(_start)
+
+	b	__start
+	 nop
+
+	.org	0x10
+	.ascii	"barebox " UTS_RELEASE " " UTS_VERSION
+	.byte	0
+
+	.align 4
+__start:
 	/* disable watchpoints */
 	mtc0	zero, CP0_WATCHLO
 	mtc0	zero, CP0_WATCHHI
Signature · 7 lines
1.7.10


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 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