Gen2 kernel build

I got the gen2 kernel to build and produce the uImage file. But the uImage file created has a size of 4560596 bytes the uImage from the .bin file is 3913436 bytes. I would have thought that the image I compiled would be the same size.

is the other bin file compressed? compiler optimization switches, options, errors? new libraries? old libraries? different library versions… and so on…

It is not the .bin file that is different. It is the uImage file that I extracted from the bin file. I was able to extract
the files from the firmware.bin file. The .bin file contains 4 files uImage ,uRamdisk ,image.cfs and default.tar.gz.
My uImage file that I compiled is larger than the one I extracted.

PS all uImage files on the gen2 are the exact same size. They also have the same creation date except version 165.
Since they are all the same size I would think that they don’t have any changes.

All guesses and nothing helpful. Sorry.

From my own experience, I can only guess that you are including something that you shouldn’t; of course as indicated by the larger size.

Also flags can set off conditions that when building, can include additional files; e.g. such as debugging or even particular versions of clouds?

The make might rely on a parameter or a config file for a particular cloud.

good luck… I’m sure someone will come along and say “you need to add … blah blah” and making my contribution moot.

I’m 100% convinced it has something to do with the .config file.

well yeah…

I found that for what ever reason. The .config file was being over written from the .config file supplied from the GPL source tree. I was trying to build using version 119. No matter what I did it always changed the .config file. So I decided to try a different version. I switched to the 126 version and the uImage version that I build was 24 bytes smaller. As they say close enough for government work.

Did you add any new modules, like the vmalloc needed for zram? That can increase the size of the uimage pretty quickly.

I didn’t add anything. I was just trying to compile. For what ever reason only the 126 version kernel code seems to compile to the correct size. One of the tests that I did was to do a sum -r on the .config file. On 111 and 119 after the build. The .config file had a different sum -r value. The 126 version after build had the same sum -r for .config. The final uImage was only 24 bytes different in size. To build all I did was install the GPL code. Chroot to my build environment. cd to the kernel directory. sh Build2.sh. When done sh xbuild.sh. When the menuconfig popped up I just tabbed to exit to exit the program. I now need to see if the uImage that I built will boot. Then I can start adding modules.

1 Like