* [U-Boot] [PATCH 0/3] MIPS: refactoring for extended Qemu support
@ 2012-08-23 22:50 daniel.schwierzeck at gmail.com
2012-08-23 22:50 ` [U-Boot] [PATCH 1/3] MIPS: factor out endianess flag handling to arch config.mk daniel.schwierzeck at gmail.com
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: daniel.schwierzeck at gmail.com @ 2012-08-23 22:50 UTC (permalink / raw)
To: u-boot
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Refactor handling of endianess flag and CONFIG_STANDALONE_LOAD_ADDR.
Introduce qemu_mipsel support.
Daniel Schwierzeck (3):
MIPS: factor out endianess flag handling to arch config.mk
MIPS: move CONFIG_STANDALONE_LOAD_ADDR to CPU config makefiles
MIPS: add support for qemu for little endian MIPS32 CPUs
arch/mips/config.mk | 20 +++++++++++++++++---
arch/mips/cpu/mips32/config.mk | 19 ++-----------------
arch/mips/cpu/xburst/config.mk | 5 +++--
boards.cfg | 3 ++-
include/configs/qemu-mips.h | 7 ++++++-
include/configs/qi_lb60.h | 1 +
6 files changed, 31 insertions(+), 24 deletions(-)
--
1.7.11.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 1/3] MIPS: factor out endianess flag handling to arch config.mk
2012-08-23 22:50 [U-Boot] [PATCH 0/3] MIPS: refactoring for extended Qemu support daniel.schwierzeck at gmail.com
@ 2012-08-23 22:50 ` daniel.schwierzeck at gmail.com
2012-08-26 1:25 ` Mike Frysinger
2012-08-23 22:50 ` [U-Boot] [PATCH 2/3] MIPS: move CONFIG_STANDALONE_LOAD_ADDR to CPU config makefiles daniel.schwierzeck at gmail.com
2012-08-23 22:50 ` [U-Boot] [PATCH 3/3] MIPS: add support for qemu for little endian MIPS32 CPUs daniel.schwierzeck at gmail.com
2 siblings, 1 reply; 5+ messages in thread
From: daniel.schwierzeck at gmail.com @ 2012-08-23 22:50 UTC (permalink / raw)
To: u-boot
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
This is CPU independent and should be configured architecture-wide.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
arch/mips/config.mk | 20 ++++++++++++++++++--
arch/mips/cpu/mips32/config.mk | 19 +------------------
arch/mips/cpu/xburst/config.mk | 3 +--
include/configs/qi_lb60.h | 1 +
4 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index 6ab8acd..b680256 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -23,6 +23,22 @@
CROSS_COMPILE ?= mips_4KC-
+# Handle special prefix in ELDK 4.0 toolchain
+ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
+ENDIANNESS := -EL
+endif
+
+ifdef CONFIG_SYS_LITTLE_ENDIAN
+ENDIANNESS := -EL
+endif
+
+ifdef CONFIG_SYS_BIG_ENDIAN
+ENDIANNESS := -EB
+endif
+
+# Default to EB if no endianess is configured
+ENDIANNESS ?= -EB
+
CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds
PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
@@ -47,8 +63,8 @@ PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
# On the other hand, we want PIC in the U-Boot code to relocate it from ROM
# to RAM. $28 is always used as gp.
#
-PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic
+PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic $(ENDIANNESS)
PLATFORM_CPPFLAGS += -msoft-float
-PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib
+PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib $(ENDIANNESS)
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
LDFLAGS_FINAL += --gc-sections
diff --git a/arch/mips/cpu/mips32/config.mk b/arch/mips/cpu/mips32/config.mk
index a1cd590..a0e4de5 100644
--- a/arch/mips/cpu/mips32/config.mk
+++ b/arch/mips/cpu/mips32/config.mk
@@ -29,21 +29,4 @@
#
MIPSFLAGS := -march=mips32r2
-# Handle special prefix in ELDK 4.0 toolchain
-ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
-ENDIANNESS := -EL
-endif
-
-ifdef CONFIG_SYS_LITTLE_ENDIAN
-ENDIANNESS := -EL
-endif
-
-ifdef CONFIG_SYS_BIG_ENDIAN
-ENDIANNESS := -EB
-endif
-
-# Default to EB if no endianess is configured
-ENDIANNESS ?= -EB
-
-PLATFORM_CPPFLAGS += $(MIPSFLAGS) $(ENDIANNESS)
-PLATFORM_LDFLAGS += $(ENDIANNESS)
+PLATFORM_CPPFLAGS += $(MIPSFLAGS)
diff --git a/arch/mips/cpu/xburst/config.mk b/arch/mips/cpu/xburst/config.mk
index bce0c1b..18d49ab 100644
--- a/arch/mips/cpu/xburst/config.mk
+++ b/arch/mips/cpu/xburst/config.mk
@@ -20,5 +20,4 @@
# MA 02111-1307 USA
#
-PLATFORM_CPPFLAGS += -march=mips32 -EL
-PLATFORM_LDFLAGS += -EL
+PLATFORM_CPPFLAGS += -march=mips32
diff --git a/include/configs/qi_lb60.h b/include/configs/qi_lb60.h
index a3fc465..4bb5bbc 100644
--- a/include/configs/qi_lb60.h
+++ b/include/configs/qi_lb60.h
@@ -11,6 +11,7 @@
#define __CONFIG_QI_LB60_H
#define CONFIG_MIPS32 /* MIPS32 CPU core */
+#define CONFIG_SYS_LITTLE_ENDIAN
#define CONFIG_JZSOC /* Jz SoC */
#define CONFIG_JZ4740 /* Jz4740 SoC */
#define CONFIG_NAND_JZ4740
--
1.7.11.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 2/3] MIPS: move CONFIG_STANDALONE_LOAD_ADDR to CPU config makefiles
2012-08-23 22:50 [U-Boot] [PATCH 0/3] MIPS: refactoring for extended Qemu support daniel.schwierzeck at gmail.com
2012-08-23 22:50 ` [U-Boot] [PATCH 1/3] MIPS: factor out endianess flag handling to arch config.mk daniel.schwierzeck at gmail.com
@ 2012-08-23 22:50 ` daniel.schwierzeck at gmail.com
2012-08-23 22:50 ` [U-Boot] [PATCH 3/3] MIPS: add support for qemu for little endian MIPS32 CPUs daniel.schwierzeck at gmail.com
2 siblings, 0 replies; 5+ messages in thread
From: daniel.schwierzeck at gmail.com @ 2012-08-23 22:50 UTC (permalink / raw)
To: u-boot
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Prepare for upcoming MIPS64 CPU support.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
arch/mips/config.mk | 2 --
arch/mips/cpu/mips32/config.mk | 2 ++
arch/mips/cpu/xburst/config.mk | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index b680256..de9140b 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -39,8 +39,6 @@ endif
# Default to EB if no endianess is configured
ENDIANNESS ?= -EB
-CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds
-
PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
#
diff --git a/arch/mips/cpu/mips32/config.mk b/arch/mips/cpu/mips32/config.mk
index a0e4de5..481e984 100644
--- a/arch/mips/cpu/mips32/config.mk
+++ b/arch/mips/cpu/mips32/config.mk
@@ -30,3 +30,5 @@
MIPSFLAGS := -march=mips32r2
PLATFORM_CPPFLAGS += $(MIPSFLAGS)
+
+CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds
diff --git a/arch/mips/cpu/xburst/config.mk b/arch/mips/cpu/xburst/config.mk
index 18d49ab..1536746 100644
--- a/arch/mips/cpu/xburst/config.mk
+++ b/arch/mips/cpu/xburst/config.mk
@@ -21,3 +21,5 @@
#
PLATFORM_CPPFLAGS += -march=mips32
+
+CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds
--
1.7.11.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 3/3] MIPS: add support for qemu for little endian MIPS32 CPUs
2012-08-23 22:50 [U-Boot] [PATCH 0/3] MIPS: refactoring for extended Qemu support daniel.schwierzeck at gmail.com
2012-08-23 22:50 ` [U-Boot] [PATCH 1/3] MIPS: factor out endianess flag handling to arch config.mk daniel.schwierzeck at gmail.com
2012-08-23 22:50 ` [U-Boot] [PATCH 2/3] MIPS: move CONFIG_STANDALONE_LOAD_ADDR to CPU config makefiles daniel.schwierzeck at gmail.com
@ 2012-08-23 22:50 ` daniel.schwierzeck at gmail.com
2 siblings, 0 replies; 5+ messages in thread
From: daniel.schwierzeck at gmail.com @ 2012-08-23 22:50 UTC (permalink / raw)
To: u-boot
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested with 'qemu-system-mipsel -machine mips -bios u-boot.bin -nographic'
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
boards.cfg | 3 ++-
include/configs/qemu-mips.h | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/boards.cfg b/boards.cfg
index fdb84ad..6b54941 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -378,7 +378,8 @@ M5485FFE m68k mcf547x_8x m548xevb freescale -
M5485GFE m68k mcf547x_8x m548xevb freescale - M5485EVB:SYS_BUSCLK=100000000,SYS_BOOTSZ=4,SYS_DRAMSZ=64
M5485HFE m68k mcf547x_8x m548xevb freescale - M5485EVB:SYS_BUSCLK=100000000,SYS_BOOTSZ=2,SYS_DRAMSZ=64,SYS_NOR1SZ=16,SYS_VIDEO
microblaze-generic microblaze microblaze microblaze-generic xilinx
-qemu_mips mips mips32 qemu-mips - - qemu-mips
+qemu_mips mips mips32 qemu-mips - - qemu-mips:SYS_BIG_ENDIAN
+qemu_mipsel mips mips32 qemu-mips - - qemu-mips:SYS_LITTLE_ENDIAN
vct_platinum mips mips32 vct micronas - vct:VCT_PLATINUM
vct_platinumavc mips mips32 vct micronas - vct:VCT_PLATINUMAVC
vct_platinumavc_onenand mips mips32 vct micronas - vct:VCT_PLATINUMAVC,VCT_ONENAND
diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h
index 306c173..b8b9705 100644
--- a/include/configs/qemu-mips.h
+++ b/include/configs/qemu-mips.h
@@ -100,7 +100,12 @@
*/
#define CONFIG_SYS_LONGHELP /* undef to save memory */
-#define CONFIG_SYS_PROMPT "qemu-mips # " /* Monitor Command Prompt */
+/* Monitor Command Prompt */
+#if defined(CONFIG_SYS_LITTLE_ENDIAN)
+#define CONFIG_SYS_PROMPT "qemu-mipsel # "
+#else
+#define CONFIG_SYS_PROMPT "qemu-mips # "
+#endif
#define CONFIG_AUTO_COMPLETE
#define CONFIG_CMDLINE_EDITING
--
1.7.11.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 1/3] MIPS: factor out endianess flag handling to arch config.mk
2012-08-23 22:50 ` [U-Boot] [PATCH 1/3] MIPS: factor out endianess flag handling to arch config.mk daniel.schwierzeck at gmail.com
@ 2012-08-26 1:25 ` Mike Frysinger
0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2012-08-26 1:25 UTC (permalink / raw)
To: u-boot
On Thursday 23 August 2012 18:50:47 daniel.schwierzeck at gmail.com wrote:
> From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
>
> This is CPU independent and should be configured architecture-wide.
nice
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120825/0b97ef50/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-26 1:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23 22:50 [U-Boot] [PATCH 0/3] MIPS: refactoring for extended Qemu support daniel.schwierzeck at gmail.com
2012-08-23 22:50 ` [U-Boot] [PATCH 1/3] MIPS: factor out endianess flag handling to arch config.mk daniel.schwierzeck at gmail.com
2012-08-26 1:25 ` Mike Frysinger
2012-08-23 22:50 ` [U-Boot] [PATCH 2/3] MIPS: move CONFIG_STANDALONE_LOAD_ADDR to CPU config makefiles daniel.schwierzeck at gmail.com
2012-08-23 22:50 ` [U-Boot] [PATCH 3/3] MIPS: add support for qemu for little endian MIPS32 CPUs daniel.schwierzeck at gmail.com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox