mirror of https://github.com/openwrt/openwrt.git
Many image recipes write header fields with printf or echo piped into
dd bs=N count=1 conv=sync. Bash writes the output of both line
buffered, so a field holding a 0x0a byte reaches the pipe in two writes.
If dd reads between them, it gets a short block, pads it with zeros due
to conv=sync and stops due to count=1, so the rest of the field is
lost. This depends on the scheduling of the builder, and the rebuilder
has caught it in a ZNET header of the Zyxel WSM20:
-00000000: 5a4e 4554 80cd 7900 530a 4132 530a 0000 ZNET..y.S.A2S...
+00000000: 5a4e 4554 80cd 7900 530a 4132 530a 4132 ZNET..y.S.A2S.A2
Fields holding sizes, CRCs or MD5 sums hit this at random, e.g. in
elx-header, iodata-mstc-header2, seil-header or nec-fw. Text fields
only hit it if they contain a newline, but they use the same pattern.
dongwon-header had the same problem and no longer uses dd since
commit
|
||
|---|---|---|
| .. | ||
| patches | ||
| Makefile | ||