From b2685736e0959806e952cd1bb8ecd8856df84e54 Mon Sep 17 00:00:00 2001 From: Jon Goldberg <63672455+jon-nokia@users.noreply.github.com> Date: Tue, 14 Jun 2022 11:56:27 -0400 Subject: [PATCH] [installer]: fix armhf for installer.conf usage (#11121) This fixes the build for armhf to be able to use '/device///installer.conf' files. Specifically, armhf needs support to be able to change the size of /var/log/ directory. It is hardcoded to 512 bytes on all armhf platforms currently. This change will allow any armhf platform to be able to use an installer.conf file to customize the installed image. --- build_image.sh | 8 ++++---- platform/marvell-armhf/platform.conf | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/build_image.sh b/build_image.sh index 0963ff4a48..69ea4ddf56 100755 --- a/build_image.sh +++ b/build_image.sh @@ -71,12 +71,12 @@ generate_onie_installer_image() output_file=$OUTPUT_ONIE_IMAGE [ -n "$1" ] && output_file=$1 # Copy platform-specific ONIE installer config files where onie-mk-demo.sh expects them - rm -rf ./installer/x86_64/platforms/ - mkdir -p ./installer/x86_64/platforms/ + rm -rf ./installer/${TARGET_PLATFORM}/platforms/ + mkdir -p ./installer/${TARGET_PLATFORM}/platforms/ for VENDOR in `ls ./device`; do - for PLATFORM in `ls ./device/$VENDOR`; do + for PLATFORM in `ls ./device/$VENDOR | grep ^${TARGET_PLATFORM}`; do if [ -f ./device/$VENDOR/$PLATFORM/installer.conf ]; then - cp ./device/$VENDOR/$PLATFORM/installer.conf ./installer/x86_64/platforms/$PLATFORM + cp ./device/$VENDOR/$PLATFORM/installer.conf ./installer/${TARGET_PLATFORM}/platforms/$PLATFORM fi done diff --git a/platform/marvell-armhf/platform.conf b/platform/marvell-armhf/platform.conf index df71c5d1b1..2f2a22cd86 100644 --- a/platform/marvell-armhf/platform.conf +++ b/platform/marvell-armhf/platform.conf @@ -9,7 +9,6 @@ kernel_addr=0x1100000 fdt_addr=0x1000000 fdt_high=0x10fffff initrd_addr=0x2000000 -VAR_LOG=512 kernel_fname="/boot/vmlinuz-5.10.0-12-2-armmp" initrd_fname="/boot/initrd.img-5.10.0-12-2-armmp" @@ -147,8 +146,8 @@ prepare_boot_menu() { BORDER='echo "---------------------------------------------------";echo;' fw_setenv ${FW_ARG} print_menu $BORDER $BOOT1 $BOOT2 $BOOT3 $BORDER > /dev/null - fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG loglevel=4 ${extra_cmdline_linux}" > /dev/null - fw_setenv ${FW_ARG} linuxargs_old "net.ifnames=0 loopfstype=squashfs loop=$image_dir_old/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG loglevel=4" > /dev/null + fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG_SIZE loglevel=4 ${extra_cmdline_linux}" > /dev/null + fw_setenv ${FW_ARG} linuxargs_old "net.ifnames=0 loopfstype=squashfs loop=$image_dir_old/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG_SIZE loglevel=4" > /dev/null # Set boot configs fw_setenv ${FW_ARG} kernel_addr $kernel_addr > /dev/null