9

I am compiling Linux Kernel to my ARM board. I have seen file called vmlinux generated in kernel root folder. Can someone give good explanation about this file and it's use.

Kumara
  • 301
  • 1
  • 3
  • 10
  • This is kernel itself wrapped in ELF – Alex Hoppus Dec 26 '16 at 14:48
  • 2
    It includes all debug information. Without this file it's really hard to debug. And yes, this is not only purpose of it, just first came to my mind. – 0andriy Dec 26 '16 at 21:42
  • The vmlinux file is not used to boot ARM Linux. You typically use the zImage file. See https://www.kernel.org/doc/Documentation/arm/Booting – sawdust Dec 27 '16 at 02:48
  • @sawdust: [b]zImage are compressed image formats. bzImage contains `piggy.o` which contains the gzip'ed `vmlinux` file in its data section. `vmlinux` is the actual executable ELF image. – Michael Foukarakis Jan 23 '17 at 19:30

2 Answers2

12

vmlinux is a ELF format based file which is nothing but the uncompressed version of kernel image which can be used for debugging. The zImage or bzImage are the compressed version of kernel image which is normally used for booting.

The vmlinux as such directly cannot be used by UBoot. However, by addition of metadata info in the process of creation of uImage for vmlinux, it is possible to boot via UBoot.

Karthik Balaguru
  • 7,424
  • 7
  • 48
  • 65
1

The vmlinux is the boot file in ELF format, and then the initrd file (ram disk) is run in the same directory (/boot).

The vmlinux file is practically the kernel itself.

David Gaspar
  • 407
  • 5
  • 12