From patchwork Sat Jun 6 20:55:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 241854 List-Id: U-Boot discussion From: daniel.schwierzeck at gmail.com (Daniel Schwierzeck) Date: Sat, 6 Jun 2020 22:55:32 +0200 Subject: [PATCH 2/6] Makefile: add rule to generate u-boot-swap.bin In-Reply-To: <20200606205536.21978-1-daniel.schwierzeck@gmail.com> References: <20200606205536.21978-1-daniel.schwierzeck@gmail.com> Message-ID: <20200606205536.21978-3-daniel.schwierzeck@gmail.com> This rule generates an u-boot binary file where the byte endianness is swapped. This will be used by the MIPS Malta Little-Endian variants to be able to boot with Qemu. The Qemu Malta Machine expects the firmware in Big-Endian order. Signed-off-by: Daniel Schwierzeck --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 3851dd9fa0..3ce511fcf0 100644 --- a/Makefile +++ b/Makefile @@ -1740,6 +1740,12 @@ u-boot-mtk.bin: u-boot.bin FORCE $(call if_changed,mkimage) endif +quiet_cmd_endian_swap = SWAP $@ + cmd_endian_swap = $(srctree)/tools/endian-swap.py $< $@ + +u-boot-swap.bin: u-boot.bin FORCE + $(call if_changed,endian_swap) + ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(ARCH)/Makefile.postlink) # Rule to link u-boot