diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-06-04 10:46:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-09 12:20:05 +0200 |
commit | 152bbdb7cfefab89132549ea83fb0b859c290e8a (patch) | |
tree | 8f6f7d3aa7b0b8cd24462fb44d15429b1bd22265 /images | |
parent | 550cfbc917c9d48110e6e4e7c348e928fa69a4c6 (diff) | |
download | barebox-152bbdb7cfefab89132549ea83fb0b859c290e8a.tar.gz barebox-152bbdb7cfefab89132549ea83fb0b859c290e8a.tar.xz |
MIPS: qemu-malta: generate swapped image as part of multi-image build
Having to manually swap the words in the MIPS Malta image for QEMU
little endian emulation is annoying.
Have the multi-image build for Malta generate a second .swapped
image that can be readily used if needed.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210604084704.17410-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'images')
-rw-r--r-- | images/.gitignore | 1 | ||||
-rw-r--r-- | images/Makefile | 2 | ||||
-rw-r--r-- | images/Makefile.malta | 10 |
3 files changed, 11 insertions, 2 deletions
diff --git a/images/.gitignore b/images/.gitignore index eafdb44b5b..3a9a77dad1 100644 --- a/images/.gitignore +++ b/images/.gitignore @@ -32,3 +32,4 @@ barebox.sum *.mvebu1img *.stm32 *.nmon +*.swapped diff --git a/images/Makefile b/images/Makefile index c185982c17..cc330d9575 100644 --- a/images/Makefile +++ b/images/Makefile @@ -218,5 +218,5 @@ $(flash-list): $(image-y-path) clean-files := *.pbl *.pblb *.map start_*.imximg *.img barebox.z start_*.kwbimg \ start_*.kwbuartimg *.socfpgaimg *.mlo *.t20img *.t20img.cfg *.t30img \ *.t30img.cfg *.t124img *.t124img.cfg *.mlospi *.mlo *.mxsbs *.mxssd \ - start_*.simximg start_*.usimximg *.zynqimg *.image + start_*.simximg start_*.usimximg *.zynqimg *.image *.swapped clean-files += pbl.lds diff --git a/images/Makefile.malta b/images/Makefile.malta index 5739ec4640..96d7b86b11 100644 --- a/images/Makefile.malta +++ b/images/Makefile.malta @@ -1,3 +1,11 @@ +quiet_cmd_bswap32_image = BSWAP4 $@ + cmd_bswap32_image = cp $< $@ && \ + truncate -s %4 $@ && \ + objcopy -I binary --reverse-byte=4 $@ + +$(obj)/%.img.swapped: $(obj)/%.img FORCE + $(call if_changed,bswap32_image) + pblb-$(CONFIG_BOARD_QEMU_MALTA) += start_qemu_malta FILE_barebox-qemu-malta.img = start_qemu_malta.pblb -image-$(CONFIG_BOARD_QEMU_MALTA) += barebox-qemu-malta.img +image-$(CONFIG_BOARD_QEMU_MALTA) += barebox-qemu-malta.img barebox-qemu-malta.img.swapped |