How to crop rootfs

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

How to crop rootfs

2,217 次查看
peking428
Contributor I

How to crop fsl-image-qt5-imx6qpsabresd-20200403103347.rootfs.tar.bz2 ?

file path : /opt/yocto/fsl-release-bsp/fsl_build_x11/tmp/deploy/images/imx6qpsabresd/

my rootfs is too big (450257904(450M)  fsl-image-qt5-imx6qpsabresd-20200403103347.rootfs.tar.bz2), and i want to crop this rootfs . how to do it ?

2 回复数

2,109 次查看
gusarambula
NXP TechSupport
NXP TechSupport

Hello Zhao Beiping,

The ROOTFS size depends on the number of packages installed. You may remove unused packages to make ROOTFS smaller. One way to remove unwanted packages is using the adding the following command on the local.conf file.

IMAGE_INSTALL_remove += “ package package1 package2”

As for knowing which packages are included on each image, you may find out by running the following bitbake command:

$ bitbake -g <IMAGE> && cat pn-buildlist | grep -ve "native" | sort | uniq

This lists all the packages in IMAGE and filters the duplicated packages. Once you see which packages you are not using and wish to remove it would be good to look at all related packages by running the command again without the uniq command.

For further information on Yocto and how to customize an image I would recommend the Yocto Project documentation (links below for the Poky 2.4 version)

https://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html

https://www.yoctoproject.org/docs/2.4/bitbake-user-manual/bitbake-user-manual.html

Please do keep in mind that you need to be careful of dependencies if you were to remove packages, as unmet dependencies will cause errors when baking.

Another resource if you need a very slight reduction, but which requires also care, is changing the IMAGE_OVERHEAD_FACTOR variable. You can find more information on how this affects the ROOTFS size on the link below:

https://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html#var-IMAGE_ROOTFS_SIZE

I hope this helps!

Regards,

2,109 次查看
peking428
Contributor I

Thank you very much!!!

0 项奖励
回复