mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-07-27 21:33:44 +09:00
arm: mx5: Fix NAND image generation
The echo -ne "\xNN" does not work in certain bourne-compatible shells, like dash. The recommended way of hex->char conversion is using printf(1), but there is a pitfall here. The GNU printf does support "\xNN" format, but according to the opengroup documentation, this is not part of POSIX. The POSIX printf only defines "\NNN" where N is octal. Thus, for the sake of compatibility, we use that. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
7d0b8cfeaa
commit
0297bd1106
@ -86,7 +86,7 @@ u-boot-with-nand-spl.imx: spl/u-boot-nand-spl.imx u-boot.uim FORCE
|
|||||||
$(call if_changed,pad_cat)
|
$(call if_changed,pad_cat)
|
||||||
|
|
||||||
quiet_cmd_u-boot-nand-spl_imx = GEN $@
|
quiet_cmd_u-boot-nand-spl_imx = GEN $@
|
||||||
cmd_u-boot-nand-spl_imx = (echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' && \
|
cmd_u-boot-nand-spl_imx = (printf '\000\000\000\000\106\103\102\040\001' && \
|
||||||
dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | cat - $< > $@
|
dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | cat - $< > $@
|
||||||
|
|
||||||
spl/u-boot-nand-spl.imx: SPL FORCE
|
spl/u-boot-nand-spl.imx: SPL FORCE
|
||||||
|
Loading…
Reference in New Issue
Block a user