sdcard_image-rpi.bbclass: Allocate more space for boot partition

The boot partition currently has a size of 20 MiB but just the start elf
binaries account almost 12 MiB, which means that only 8 MiB is left for
the kernel image. A recent kernel with many of its options built-in can
easily be more than 4 MiB so let's double the boot partition size to 40
MiB to make sure that it has enough room for the kernel image, the DTBs
and possible even a backup kernel.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
[javier: Extended the commit message]
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
This commit is contained in:
Derek Foreman 2015-07-30 10:34:09 +02:00 committed by Andrei Gherzan
parent d676d54f04
commit bfe2307cc4

View File

@ -14,14 +14,14 @@ inherit linux-raspberrypi-base
# Default Free space = 1.3x # Default Free space = 1.3x
# Use IMAGE_OVERHEAD_FACTOR to add more space # Use IMAGE_OVERHEAD_FACTOR to add more space
# <---------> # <--------->
# 4MiB 20MiB SDIMG_ROOTFS # 4MiB 40MiB SDIMG_ROOTFS
# <-----------------------> <----------> <----------------------> # <-----------------------> <----------> <---------------------->
# ------------------------ ------------ ------------------------ # ------------------------ ------------ ------------------------
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | # | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE |
# ------------------------ ------------ ------------------------ # ------------------------ ------------ ------------------------
# ^ ^ ^ ^ # ^ ^ ^ ^
# | | | | # | | | |
# 0 4MiB 4MiB + 20MiB 4MiB + 20Mib + SDIMG_ROOTFS # 0 4MiB 4MiB + 40MiB 4MiB + 40Mib + SDIMG_ROOTFS
# This image depends on the rootfs image # This image depends on the rootfs image
IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}"
@ -40,7 +40,7 @@ SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img"
BOOTDD_VOLUME_ID ?= "${MACHINE}" BOOTDD_VOLUME_ID ?= "${MACHINE}"
# Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT) # Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT)
BOOT_SPACE ?= "20480" BOOT_SPACE ?= "40960"
# Set alignment to 4MB [in KiB] # Set alignment to 4MB [in KiB]
IMAGE_ROOTFS_ALIGNMENT = "4096" IMAGE_ROOTFS_ALIGNMENT = "4096"