Skip to content

Commit 183a8df

Browse files
committed
Unify partition layout: 2GB (EFI) + 4GB (rootfs)
In order to keep backward compatibility, the partition layout of non eve-k variants has been kept the same since version 10.2.0, where EFI and rootfs partitions (IMGA/IMGB) are partitioned as the following: * EFI - 36MB * IMGA - 512MB * IMGB - 512MB Commit 5db29bd fixed partition layout for eve-k as the following: * EFI - 2GB * IMGA - 4GB * IMGB - 4GB This new layout allows not only the growing of rootfs but also the growing of EFI space for new features, if required. This commit unifies partition layout across all EVE variants, so all images should have the same scheme: EFI (2GB), IMGA/IMGB (4GB). The 300MB limitation is not changed, so generic rootfs images can still be upgraded from the remote controller. However, for NVIDIA variants the maximum size is set to 4GB. This is a requirement for the Jetpack 7.1, which has exceeded the current size limit. Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
1 parent 2a5ed86 commit 183a8df

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,9 @@ endif
460460
# The rootfs partition size is set to 512MB after 10.2.0 release (see commit 719b4d516)
461461
# Before 10.2.0 it was 300MB. We must maintain compatibility with older versions so rootfs size cannot exceed 300MB.
462462
# 'k' and nvidia are not affected by this limitation because there no installation of kubevirt/k3s prior to 10.2.0
463-
# Nevertheless lets check for ROOTFS_MAXSIZE_MB not exceeding 4GB for 'k', 450MB for NVIDIA based platforms (arm64) and 285MB for x86_64 and other arm64 platforms
464-
# That helps in catching image size increases earlier than at later stage.
463+
# Even though the partition layout is now unifed, let's still check for ROOTFS_MAXSIZE_MB not exceeding 4GB for 'k'
464+
# and NVIDIA based platforms, and 290MB for x86_64 and other arm64 platforms. That helps in catching image size
465+
# increases earlier than at later stage.
465466
# We are currently filtering out a few packages from bulk builds since they are not getting published in Docker HUB
466467
ifeq ($(HV),k)
467468
PKGS_$(ZARCH)=$(shell find pkg -maxdepth 1 -type d | grep -Ev "eve|alpine|sources$$")
@@ -476,7 +477,7 @@ else
476477
else ifeq (, $(findstring nvidia,$(PLATFORM)))
477478
ROOTFS_MAXSIZE_MB=290
478479
else
479-
ROOTFS_MAXSIZE_MB=450
480+
ROOTFS_MAXSIZE_MB=4096
480481
endif
481482
endif
482483

pkg/mkimage-raw-efi/make-raw

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,13 @@ IMX8_BLOB=/parts/imx8-flash.bin
9393
IMX8_CONF=/parts/imx8-flash.conf
9494

9595
# EFI partition size in bytes
96-
EFI_PART_SIZE=$((36 * 1024 * 1024))
96+
EFI_PART_SIZE=$((2 * 1024 * 1024 * 1024))
9797
# Min rootfs partition size in bytes
9898
# Warning: don't change the rootfs partition size, before
9999
# Warning: fixing the EVE upgrade logic, which should find
100100
# Warning: free space and rellocate all tables if image has
101101
# Warning: been bloated.
102-
ROOTFS_PART_SIZE_MIN=$((512 * 1024 * 1024))
103-
# For eve-k lets set partition size to 4GB and EFI partition size to 2GB
104-
# Check if file /root/etc/eve-hv-type exists.
105-
# make-raw will be called twice during compilation and during installation.
106-
# The eve-hv-type file will be present only during installation.
107-
if [ -f /root/etc/eve-hv-type ]; then
108-
eve_flavor=$(cat /root/etc/eve-hv-type)
109-
if [ "$eve_flavor" = "k" ]; then
110-
EFI_PART_SIZE=$((2 * 1024 * 1024 * 1024))
111-
ROOTFS_PART_SIZE_MIN=$((4 * 1024 * 1024 * 1024))
112-
fi
113-
fi
102+
ROOTFS_PART_SIZE_MIN=$((4 * 1024 * 1024 * 1024))
114103

115104
# PLATFORM can be set in environment, it means we are executed using
116105
# docker during build time, otherwise we are executed from EVE e.g.

0 commit comments

Comments
 (0)