How to use uncompressed kernel boot.img

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use uncompressed kernel boot.img

1,867 Views
Contributor I

Hi,

I am trying to optimize the booting time of  android_kk4.4.2 on imx6Q (MCIMX6Q-SDP) demo board. I heard that an uncompressed kernel will give more performance than a compressed kernel. So I want to use an uncompressed kernel image instead of compressed kernel as boot.img. Can anyone please tell me the necessary configuration changes to do the same.

Thanks & Regards,

Roopesh

Labels (4)
0 Kudos
9 Replies

176 Views
NXP Employee
NXP Employee

I heard that an uncompressed kernel will give more performance than a compressed kernel.

Not necessarily. Here's a quick chart of boot times using OMAP4 which has a comparable core: Linux on ARM: xz kernel decompression benchmarks

Copy-pasting the important part:

CompressionSizeLoading timeUncompressing timeTotal time
gzip33557682.2133760.5015002.714876
lzma24881441.6474101.3995523.046962
xz23661921.5669781.2995162.866494
lzo36978402.4714970.1605962.632093
None69656444.62674904.626749

As you can see the uncompressed kernel had a worse boot time than any of the compressed kernels. This is because reading more data from storage is generally slower than uncompression that happens in memory. Even if you were booting from a fast storage device and were using a particularly slow compression algorithm, the time savings might be minimal.

0 Kudos

176 Views
Contributor I

Dear Oney,

Thank you for the reply. I agreed this but I just want to try out the uncompressed kernel version also. Actually I don't know which one is good, but after my experiment I can take a decision depending on the result. My problem is how to use an uncompressed kernel as boot.img and the necessary configuration changes to do the same.

Thanks & Regards,

Roopesh

0 Kudos

176 Views
NXP Employee
NXP Employee

Hi Roopesh,

You can use the Image with the followed commands:

mkbootimg  --kernel Image --ramdisk ramdisk.gz --cmdline "console=ttymxc1,115200 init=/init video=mxcfb0 fb0base=0x27b00000 fbmem=28M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale" --base 0x10800000 --output boot.img

0 Kudos

176 Views
Contributor I

Dear Qiang Li,

Thank you for the reply. Which are the files I need to edit to implement this ?

I checked build/core/Makefile, but can't able to locate exact files.

Thanks & Regards,

Roopesh

0 Kudos

176 Views
NXP Employee
NXP Employee

You can edit the file "/build/core/Makefile", replace the zImage to Image:

KERNEL_ZIMAGE    := kernel_imx/arch/arm/boot/zImage

176 Views
Contributor I

Hi,

I just edited the KERNEL_ZIMAGE    := kernel_imx/arch/arm/boot/Image line in "/build/core/Makefile.Then I can able to build the uncompressed kernel, but I am  not able to flash it to the board. I noticed that my new boot.img  almost doubled in size compared to compressed one ( 5.09 MB -> 10.1 MB). I suspect the memory area assigned to load the boot.img may be not enough. This may be the root cause of this issue. I don't know the exact file and place to edit the memory size.  Please help me.

Thanks & Regards,

Roopesh

0 Kudos

176 Views
NXP Employee
NXP Employee

Hi Roopesh, in BSP user guider "i.MXAndroidKK4.4.2_1.0.0GAUserGuide.html", there is partition table, the default size for boot.img partition is 8MB, so you need increase it for your big image.


0 Kudos

176 Views
Contributor I

Hi Qiang Li,

I just edited the "Mfgtools-Rel-13.01.00_ER_MX6Q_UPDATER\Profiles\MX6Q Linux Update\OS Firmware\mksdcard-android.sh" file as:

Initially:

# partition size in MB

BOOTLOAD_RESERVE=8

BOOT_ROM_SIZE=8

SYSTEM_ROM_SIZE=512

CACHE_SIZE=512

RECOVERY_ROM_SIZE=8

VENDER_SIZE=8

MISC_SIZE=8

modified:

# partition size in MB

BOOTLOAD_RESERVE=8

BOOT_ROM_SIZE=12

SYSTEM_ROM_SIZE=512

CACHE_SIZE=512

RECOVERY_ROM_SIZE=12

VENDER_SIZE=8

MISC_SIZE=8

but it didn't work.

0 Kudos

176 Views
NXP Employee
NXP Employee

Hi Roopesh,

If you are using MFGTool, I think you should increase the two partitions to 12MB. Recovery.img was also burned by it, and its size was increased too. If you still fail to make it work, please attach the board serial log here.

BOOTLOAD_RESERVE=8

BOOT_ROM_SIZE=8

0 Kudos