Unable to change BOOT (FAT) partition size when building an sdcard image with Yocto

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

Unable to change BOOT (FAT) partition size when building an sdcard image with Yocto

跳至解决方案
3,139 次查看
gabriele74
Contributor II

When building an image to be copied to sdcard via dd, the default boot partition (fat32) size

is 8Mb, as found in meta-fsl-arm/classes/image_types_fsl.bbclass:

BOOT_SPACE ?= "8192"

I'm trying to override this value to get a much bigger boot partition, like 132Mb

(this is needed because I need to create an one-time sdcard used for testing/factory programming

and I want to store a rootfs image to be programmed in that partition)

In my image recipe I've overridden BOOT_SPACE value but with no effect, i.e. in the resulting

image the fat32 partition is always 8Mb.

I can't understand this behavior because in the same recipe I override also IMAGE_ROOTFS_SIZE and

this value is taken into account and the resulting ROOTFS size is what I set!

This is my image recipe:

DESCRIPTION = "XY factory image"

IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"

IMAGE_LINGUAS = " "

LICENSE = "MIT"

inherit core-image

IMAGE_INSTALL += "mtd-utils"

IMAGE_FEATURES += " ssh-server-dropbear"

# Correctly used!

IMAGE_ROOTFS_SIZE = "16384"

#Not taken into account. Why ?

BOOT_SPACE = "131072"

Any help greatly appreciated :-)

标签 (3)
标记 (4)
1 解答
1,461 次查看
gabriele74
Contributor II

I reply to my own question with the solution :smileyhappy:

For the variable BOOT_SPACE to be taken into account, it must be placed

in the machine configuration file, i.e.:

/sources/meta-XY/conf/machine.conf

and not into an image recipe.

Tested and confirmed with Yocto 1.5

在原帖中查看解决方案

3 回复数
1,462 次查看
gabriele74
Contributor II

I reply to my own question with the solution :smileyhappy:

For the variable BOOT_SPACE to be taken into account, it must be placed

in the machine configuration file, i.e.:

/sources/meta-XY/conf/machine.conf

and not into an image recipe.

Tested and confirmed with Yocto 1.5

1,461 次查看
gusarambula
NXP TechSupport
NXP TechSupport

Thank you for posting the answer to your question! I'm sure it's going to help other community users!

0 项奖励
1,461 次查看
saurabh206
Senior Contributor III

Hi,

You can use the MFG tool for Yocto binary update.

In this you can change the partition size.

Thanks

Saurabh

0 项奖励