]> git.ipfire.org Git - thirdparty/u-boot.git/commit
Makefile: remove block from conv=block, sync in SPL alignment dd
authorBrad Klingerman <bdklingerman@gmail.com>
Fri, 1 May 2026 14:38:50 +0000 (09:38 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 8 May 2026 21:49:27 +0000 (15:49 -0600)
commit26b17dbdb0f19efa67365b30d939d3572871e8ca
tree65e0447f5befb6216feb9b0ed332af00cdb9bd7b
parent3cdd19089f1b1b7cd08530f33ff4708abcfd426c
Makefile: remove block from conv=block, sync in SPL alignment dd

The line that produces $(SPL_BIN)-align.bin invokes dd with
conv=block,sync but no cbs= operand. The result of dd conv=block
without cbs= is unspecified. GNU coreutils outputs anyway, but
uutils (default in Ubuntu 26.04 LTS) errors out for files with
newlines, including SPL binaries, producing:

    dd: conv=block or conv=ubnblock specified without cbs=N

Either the block operand must be removed, or cbs=N must be added.
conv=block is for converting newline-terminated variable-length
records to fixed-length space-padded ones, which is meaningless
for a binary SPL image. The intent of the rule is 4-byte
alignment, which conv=sync alone provides by padding the final
block to bs= bytes with NULs.

During build, u-boot-spl-align.bin errors silently due to '@'.

Reproduced with uutils dd 0.8.0:

    $ dd if=/dev/urandom of=/tmp/in bs=1 count=10000
    $ dd if=/tmp/in of=/tmp/out conv=block,sync bs=4
    dd: conv=block or conv=unblock specified without cbs=N
    $ dd if=/tmp/in of=/tmp/out conv=sync bs=4
    [succeeds]

Output is byte-identical to GNU dd's output for binary input.

Signed-off-by: Brad Klingerman <bdklingerman@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
scripts/Makefile.xpl