I want to use an uncompressed kernel image and boot the BeagleBoard. Generally I use uImage to boot the kernel which is in compressed format. How do I use an uncompressed kernel image?
-
You are using U-Boot as the bootloader, right? – Gilles 'SO- stop being evil' Feb 06 '12 at 23:43
-
yes! Is it possible using uboot? – Sharanya Feb 07 '12 at 05:56
3 Answers
As far as I know, U-Boot cannot directly boot a “raw” ELF image (vmlinux). You need to turn it into the uImage format, which contains the compressed vmlinux plus a few extra bytes of metadata that describe the kernel load address. U-Boot FAQ 2.19 explains how to generate uImage; it's fairly straightforward, using the mkimage utility in the U-Boot source tree:
mkimage -A arm -O linux -T kernel -C gzip … -d vmlinux uImage
(You may need extra parameters indicating the load address.)
- 807,993
- 194
- 1,674
- 2,175
-
1Uncompressing the uImage while booting takes some time. I need to minimize that. So i thought why dont i try with the uncompressed raw file vmlinux. – Sharanya Feb 07 '12 at 05:55
-
3The effect you want to achieve might be opposite to intended. Decompression time is usually smaller than time of copying data from flash. – Matt Kucia Aug 25 '13 at 20:46
-
If you are using ubifs for the root image, it is already compressed somewhat. – John Klug Jun 08 '21 at 17:28
mkimage -A arm -O linux -T kernel -C gzip … -d vmlinux uImage
Change gzip in the above example to none, and you'll create a u-Boot compatible uncompressed image.
- 41
- 1
If you are using Buildroot, select a uImage kernel output file (BR2_LINUX_KERNEL_UIMAGE=y). Compile normally and Buildroot will also create a vmlinux file in an intermediate step. While the vmlinux file is not copied to the /output/images directory it can be found in ./output/build/linux-custom/(or by running find . -name "vmlinux").