rootfs size for IMX8mini Yocto Linux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

rootfs size for IMX8mini Yocto Linux

1,139 Views
13614278
Contributor III

Sorry I have to raise this question here.

[My case] :

IMX8mini,8G emmc, running Yocto Linux, Linux 4.14.98 BSP

[Problem]:

By default, the Yocto Linux build rootfs is about 1.3GB, when I flashed it to EVK, the whole system showed just 1.3GB, that's definitely unreasonable as my emmc is 8GB.

[The Solution I got so far]

After googling with Yocto, I knew that I can either use IMAGE_ROOTFS_EXTRA_SPACE=" xxxxxx" or IMAGE_ROOTFS_SIZE= "xxx"  to extend the whole size.

[My Problem]:

But, if I do that, I found my rootfs would also be forcely enlarged to above file size.

e,g, If I set IMAGE_ROOTFS_EXTRA_SPACE=" xxxxxx"  as 8GB, then the build out rootfs image size is also 8GB!!!!!!!!!!!!

That's really bad, as so many useless ZERO-padding for the rootfs, the real rootfs is noly 800MB, why are you padding so many useless data to forcely enlarge to a useless 8GB?????!!!!!!!!!!! That caused me took too much useless time to flash the useless 8GB data to EMMC!!!!!!!!

This is a waste of both flash image time and my hard-disk storage!!!!!!!!!

Why Yocto had such bad design???????

Why not use the Android's smart way????? For Android. the whole system.img is only about 800MB,  after it flashed to EVK, the whole system(/) still show 8GB emmc instead of 800MB.  

Could anyone help me about this frustrating issue? Thanks a lot.

0 Kudos
3 Replies

991 Views
Yuri
NXP Employee
NXP Employee

Hello,

   In any case, using Yocto approach for Linux system generation  requires

significant host computer resources. Customers can build file system once
and - if needed - to recompile U-boot  and or kernel without Yocto environment,
as described in NXP Linux documentation. Also it is possible to build small size 
file system and resize part, using such utility as parted.

Regards,

Yuri.

0 Kudos

991 Views
13614278
Contributor III

Hi Yuri,

Thanks for the help. But for

Also it is possible to build small size 
file system and resize part, using such utility as parted.

How to do this? It's difficult for me to get the point. Does it mean there is a tools whose name is "parted" to do this? or something else?  I can't get any useful info after I google with "Yocto + parted"

Thanks

0 Kudos

991 Views
Yuri
NXP Employee
NXP Employee

13614278@qq.com 

Hello,

  below is document, describing to build and use the parted.

Parted User’s Manual 

  Perhaps it would be easier just to use big size images :-( 

Regards,

Yuri.

0 Kudos