Skip to content
Advertisement

Reverse engineering a zImage

So I have a custom kernel for an embedded arm device which I had worked on some time ago. I’ve revisited the project but since have reinstalled Ubuntu on my development machine. I can’t compile a new zImage correctly as before. I have found an old SD which card which has the correctly compiled and working zImage.

I suspect I’m missing some build option configuration which the old zImage had. Is there a way to reverse engineer and figure out exactly how my older zImage was created?

Advertisement

Answer

Only works if you have CONFIG_IKCONFIG enabled in the zImage.

You can extract old config using ./scripts/extract-ikconfig from the linux kernel or ./scripts/ikconfig (depending on the version of the source) if your kernel was compiled with CONFIG_IKCONFIG enabled (usually is by default)

Without CONFIG_IKCONFIG

Hope that you also have a config.gz along with your zImage on the SD card 😛

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement