9

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?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Sharanya
  • 91
  • 1
  • 1
  • 3

3 Answers3

8

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.)

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
  • 1
    Uncompressing 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
  • 3
    The 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
4
 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.

Jim Davis
  • 41
  • 1
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").

drs
  • 5,363
  • 9
  • 40
  • 69
spearson
  • 111
  • 3