Kernel and rootfs size reduction

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Kernel and rootfs size reduction

732 次查看
barish_malshika
Contributor I
Hello, 

We are trying to achieve the <image_name>.rootfs.wic + bootloader of the size that able to flash and boot from SPI NOR flash of 32MB.

We have a 32MB SPI NOR flash memory on our custom board based on imx8qxp MEK.
For verification and testing, we are using an imx8qxp board with 64MB of SPI NOR flash.
We are using the Yocto Zeus, L5.4.24-2.1.0.

The x-wayland distro and core-image-minimal is used which gives <image_name>.rootfs.wic.bz2 of size 32.5MB.

We require a very minimal system so we tried to use poky or poky-tiny but as it is not supported by the i.MX 8 or i.MX 8M.
So we remove the distro feature using the DISTRO_FEATURES_remove variable in local.conf.
After removing the unwanted distro feature using the that gives an image size of 31.3MB
(distro features removed: Bluetooth, wifi,ipv4, ipv6, largefile, nfs, etc.)
 
The next step followed was to configure the kernel using Creating a defconfig File(Yocto Project Linux Kernel Development Manual) and removed the network support and unused driver's support but there is no size reduction achieved.
Kindly suggest a way to reduce the image size.
 
Thank you
Barish.
0 项奖励
1 回复

714 次查看
b36401
NXP Employee
NXP Employee

Also you can decrease kernel size by removing "inline" option of many functions. However it may decrease the performance as well. So please do it with an accuracy.

0 项奖励