How is a Linux zimage made?

Programming, for all ages and all languages.
Post Reply
clementttttttttt
Member
Member
Posts: 70
Joined: Tue Jul 14, 2020 4:01 am
Libera.chat IRC: clementttttttttt

How is a Linux zimage made?

Post by clementttttttttt »

google is just absolutely useless on this, nothing is explained
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How is a Linux zimage made?

Post by iansjack »

You need to improve your Googling skills. Third hit for "linux image": https://ineclabs.com/image-zimage-uimag ... ux-kernel/
clementttttttttt
Member
Member
Posts: 70
Joined: Tue Jul 14, 2020 4:01 am
Libera.chat IRC: clementttttttttt

Re: How is a Linux zimage made?

Post by clementttttttttt »

I wanted to know the exact process of how is a zimage generated, not a brief explanation of different Linux kernel images.
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How is a Linux zimage made?

Post by iansjack »

As it says in the link, you use the command

make zImage

when compiling the kernel. If you want to know exactly what commands that evokes just look at the Makefile (or use the command line

make -n zImage

). Basically, you just compress vmlinux with gzip.
clementttttttttt
Member
Member
Posts: 70
Joined: Tue Jul 14, 2020 4:01 am
Libera.chat IRC: clementttttttttt

Re: How is a Linux zimage made?

Post by clementttttttttt »

thanks i guess
vvaltchev
Member
Member
Posts: 274
Joined: Fri May 11, 2018 6:51 am

Re: How is a Linux zimage made?

Post by vvaltchev »

clementttttttttt wrote:I wanted to know the exact process of how is a zimage generated, not a brief explanation of different Linux kernel images.
Maybe this is what you have been looking for: https://www.star.bnl.gov/~liuzx/lki/lki-1.html
It might be out of date, but the general ideas are more or less the same.

Also, on the vmlinux wikipedia page: https://en.wikipedia.org/wiki/Vmlinux there is some useful information.
Tilck, a Tiny Linux-Compatible Kernel: https://github.com/vvaltchev/tilck
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: How is a Linux zimage made?

Post by Schol-R-LEA »

It sounds to me that the answer you seek is, read through the Makefile(s) in detail. This, however, is unlikely to be a useful task, as the Linux Makefiles are gargantuan and not really written for human readers - they are reasonably well-documented, to be sure, but only to the extent that it is easy to find a given section so that it can be easily maintained.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Post Reply