forked from barebox/barebox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Link: https://lore.barebox.org/[email protected] Signed-off-by: Sascha Hauer <[email protected]>
- Loading branch information
1 parent
550cfbc
commit 152bbdb
Showing
4 changed files
with
15 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,4 @@ barebox.sum | |
*.mvebu1img | ||
*.stm32 | ||
*.nmon | ||
*.swapped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |