Skip to content

Commit b6f9006

Browse files
committed
[build] RFS split improvements
* add more files to RFS_DEB_FILES * improved umount in build_debian.sh (taken from #16672) * explicit RFS_SPLIT_LAST_STAGE=n when building the first stage Signed-off-by: Yakiv Huryk <[email protected]>
1 parent 122cd6b commit b6f9006

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Makefile.cache

+3-1
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,10 @@ endef
359359

360360
RFS_DEP_FILES := $(wildcard \
361361
$(addprefix scripts/, build_debian_base_system.sh prepare_debian_image_buildinfo.sh build_mirror_config.sh) \
362-
$(wildcard files/initramfs-tools/*) \
362+
$(shell git ls-files files/initramfs-tools) \
363363
$(shell git ls-files files/image_config) \
364+
$(shell git ls-files files/apparmor) \
365+
$(shell git ls-files files/apt) \
364366
$(wildcard files/sshd/*) \
365367
$(wildcard files/dhcp/*) \
366368
src/sonic-build-hooks/buildinfo/trusted.gpg.d \

build_debian.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,7 @@ if [[ $RFS_SPLIT_FIRST_STAGE == y ]]; then
612612
## Kill the processes
613613
sudo LANG=C chroot $FILESYSTEM_ROOT fuser -km /proc || true
614614
## Wait fuser fully kill the processes
615-
sleep 15
616-
sudo LANG=C chroot $FILESYSTEM_ROOT umount /proc
615+
sudo timeout 15s bash -c 'until LANG=C chroot $0 umount /proc; do sleep 1; done' $FILESYSTEM_ROOT || true
617616

618617
sudo rm -f $TARGET_PATH/$RFS_SQUASHFS_NAME
619618
sudo mksquashfs $FILESYSTEM_ROOT $TARGET_PATH/$RFS_SQUASHFS_NAME -Xcompression-level 1

slave.mk

+1
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_RFS_TARGETS)) : $(TARGET_PATH)/% : \
12641264
export sonicadmin_user="$(USERNAME)"
12651265
export sonic_asic_platform="$(patsubst %-$(CONFIGURED_ARCH),%,$(CONFIGURED_PLATFORM))"
12661266
export RFS_SPLIT_FIRST_STAGE=y
1267+
export RFS_SPLIT_LAST_STAGE=n
12671268

12681269
j2 -f env files/initramfs-tools/union-mount.j2 onie-image.conf > files/initramfs-tools/union-mount
12691270
j2 -f env files/initramfs-tools/arista-convertfs.j2 onie-image.conf > files/initramfs-tools/arista-convertfs

0 commit comments

Comments
 (0)