Skip to content

Commit 9cdde85

Browse files
authored
[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.
1 parent 63c7c5b commit 9cdde85

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

build_image.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ generate_onie_installer_image()
7171
output_file=$OUTPUT_ONIE_IMAGE
7272
[ -n "$1" ] && output_file=$1
7373
# Copy platform-specific ONIE installer config files where onie-mk-demo.sh expects them
74-
rm -rf ./installer/x86_64/platforms/
75-
mkdir -p ./installer/x86_64/platforms/
74+
rm -rf ./installer/${TARGET_PLATFORM}/platforms/
75+
mkdir -p ./installer/${TARGET_PLATFORM}/platforms/
7676
for VENDOR in `ls ./device`; do
77-
for PLATFORM in `ls ./device/$VENDOR`; do
77+
for PLATFORM in `ls ./device/$VENDOR | grep ^${TARGET_PLATFORM}`; do
7878
if [ -f ./device/$VENDOR/$PLATFORM/installer.conf ]; then
79-
cp ./device/$VENDOR/$PLATFORM/installer.conf ./installer/x86_64/platforms/$PLATFORM
79+
cp ./device/$VENDOR/$PLATFORM/installer.conf ./installer/${TARGET_PLATFORM}/platforms/$PLATFORM
8080
fi
8181

8282
done

platform/marvell-armhf/platform.conf

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ kernel_addr=0x1100000
99
fdt_addr=0x1000000
1010
fdt_high=0x10fffff
1111
initrd_addr=0x2000000
12-
VAR_LOG=512
1312

1413
kernel_fname="/boot/vmlinuz-5.10.0-12-2-armmp"
1514
initrd_fname="/boot/initrd.img-5.10.0-12-2-armmp"
@@ -147,8 +146,8 @@ prepare_boot_menu() {
147146
BORDER='echo "---------------------------------------------------";echo;'
148147
fw_setenv ${FW_ARG} print_menu $BORDER $BOOT1 $BOOT2 $BOOT3 $BORDER > /dev/null
149148

150-
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
151-
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
149+
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
150+
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
152151

153152
# Set boot configs
154153
fw_setenv ${FW_ARG} kernel_addr $kernel_addr > /dev/null

0 commit comments

Comments
 (0)