Bug#1029754: please support telling the architecture of a vmlinuz image
On Wed, Jan 25, 2023 at 08:58:47AM +0100, Helmut Grohne wrote: > arch-test already is great, but maybe it can do even more. I would like > to know which architecture corresponds to a given vmlinuz image. > > A vmlinuz image tends to consist of a boot stub followed by a compressed > ELF image. The compression scheme varies and we don't exactly know where > the compressed image starts. A relatively hacky way to do this is runnig > linux.git/scripts/extract-vmlinux and then feeding the output to > elf-arch. Maybe we can pull part of this functionality into arch-test? I looked into it, but it seems that extract-vmlinux will fail at least for uncompressed EFI kernels: it won't skip the PE wrapper to get to ELF. And apparently I'm too much of an idiot to find how the wrapper's length is stored within over multiple hours of searching. While I bet I could solve the problem after some more thinking, I'll prioritize other stuff for now. > There is not much ugrency to this. It just feels like arch-test would be > the right place to own this functionality. Thanks for considering. If > you end up considering this out-of-scope (e.g. due to the need for > various decompressors), don't hesitate to close this as wontfix. It's a valid request, I'm just a bit short on tuits these days. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Let's make a Debian conference in Yalta, Ukraine. ⢿⡄⠘⠷⠚⠋⠀ ⠈⠳⣄
Bug#1029754: please support telling the architecture of a vmlinuz image
Package: arch-test Version: 0.20-1 Severity: wishlist Control: affects -1 + debvm Hi Adam, arch-test already is great, but maybe it can do even more. I would like to know which architecture corresponds to a given vmlinuz image. A vmlinuz image tends to consist of a boot stub followed by a compressed ELF image. The compression scheme varies and we don't exactly know where the compressed image starts. A relatively hacky way to do this is runnig linux.git/scripts/extract-vmlinux and then feeding the output to elf-arch. Maybe we can pull part of this functionality into arch-test? The context of this is usage of arch-test in debvm. Given a root filesystem, I already use elf-arch on the contained /bin/true to guess its architecture. However the kernel image may correspond to a bigger architecture (i386 -> amd64, armel -> armhf, armhf -> arm64, etc.) and I would like to determine such cases automatically. As such, this functionality is only really relevant for architectures with sibling 32bit / 64bit architectures. There is not much ugrency to this. It just feels like arch-test would be the right place to own this functionality. Thanks for considering. If you end up considering this out-of-scope (e.g. due to the need for various decompressors), don't hesitate to close this as wontfix. Helmut