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
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:
Compression | Size | Loading time | Uncompressing time | Total time |
gzip | 3355768 | 2.213376 | 0.501500 | 2.714876 |
lzma | 2488144 | 1.647410 | 1.399552 | 3.046962 |
xz | 2366192 | 1.566978 | 1.299516 | 2.866494 |
lzo | 3697840 | 2.471497 | 0.160596 | 2.632093 |
None | 6965644 | 4.626749 | 0 | 4.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.
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
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
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
You can edit the file "/build/core/Makefile", replace the zImage to Image:
KERNEL_ZIMAGE := kernel_imx/arch/arm/boot/zImage
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
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.
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.
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