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

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

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

Jump to solution
3,130 Views
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 :-)

Labels (3)
Tags (4)
1 Solution
1,452 Views
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

View solution in original post

3 Replies
1,453 Views
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,452 Views
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 Kudos
1,452 Views
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 Kudos