broken kernel builds due to hexdump broken in busybox 1.37.0

Natanael Copa ncopa at alpinelinux.org
Wed Oct 23 12:39:25 UTC 2024


Hi!

The linux (efi) kernel in alpine edge is currently broken. We have traced it to busybox hexdump.

# util-linux:
ncopa-desktop:~/tmp$ echo "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" > test
ncopa-desktop:~/tmp$ echo $(hexdump -s16 -n4 -e '"%u"' test)
1094795585
ncopa-desktop:~/tmp$ echo $(busybox hexdump -s16 -n4 -e '"%u"' test)
65


Different result.

This breaks the kernel build here:

> quiet_cmd_copy_and_pad = PAD     $@
>      cmd_copy_and_pad = cp $< $@ && \
>			 truncate -s $(shell hexdump -s16 -n4 -e '"%u"' $<) $@

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/efi/libstub/Makefile.zboot?h=v6.6#n9

And end up truncate the vmlinux.bin to 0

ncopa-edge-aarch64:~/aports/main/linux-lts/src/build-virt.aarch64 (master)$ ls -l arch/arm64/boot/
total 23400
...
-rw-r--r--    1 ncopa    ncopa            0 Oct 23 12:05 vmlinux.bin
...

I will try create a testcase for the test suite next week unless someone beats me to it.

Thanks!

-nc


More information about the busybox mailing list