summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2021-06-10 09:56:32 +0200
committerPhilippe Schenker <philippe.schenker@toradex.com>2021-06-10 10:20:32 +0200
commit3de1820105e5886d6106ef0de4d5ffdab3041ffe (patch)
tree3decfd58e9eac171be82ada3a725c02124bdc71d
parent6ea33f52bd8889ec69d2247a0deac9c63d81236b (diff)
mach-imx: Makefile: append 10k 0x00 at the end of u-boot-nand.imx
Since NXPs 5.4. release zeros are needed at the end of the bootloader. Assume that never more than 10k of padding is needed and skip the shell magic to get a correct size. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
-rw-r--r--arch/arm/mach-imx/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 30a1ad2196..e2ec08c526 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -123,7 +123,9 @@ u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE
ifeq ($(CONFIG_IMX_NAND),y)
cmd_u-boot-nand_imx = (dd bs=1024 count=1 if=/dev/zero 2>/dev/null) | \
- cat - $< > $@
+ cat - $< > u-boot.imx.padded && \
+ (dd bs=10k count=1 if=/dev/zero 2>/dev/null) | \
+ cat u-boot.imx.padded - > $@ && rm u-boot.imx.padded
u-boot-nand.imx: u-boot.imx FORCE
$(call if_changed,u-boot-nand_imx)