[Bug][Build] Fix the variable patterns not replaced issue (#11572)

#### Why I did it

The %%EXTRA_CMDLINE_LINUX%% is not replaced to the real value, it has impact on the kernel parameter settings.
See the log sonic-vs.img.gz.log in the latest master build. In the grub.cfg, the %%EXTRA_CMDLINE_LINUX%% is set in the linux command line.
```
Installing for i386-pc platform.
Installation finished. No error reported.
Switch CPU vendor is: GenuineIntel
Switch CPU cstates are: disabled
EXTRA_CMDLINE_LINUX=%%EXTRA_CMDLINE_LINUX%%
Installed SONiC base image SONiC-OS successfully
ONIE: NOS install successful: file://dev/vdb/onie-installer.bin
```
This commit is contained in:
xumia 2022-08-02 09:52:23 +08:00 committed by GitHub
parent e3892c6b15
commit 7f78006224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -64,7 +64,6 @@ create_partition()
# determine ONIE partition type
onie_partition_type=$(${onie_bin} onie-sysinfo -t)
# demo partition size in MB
demo_part_size="%%ONIE_IMAGE_PART_SIZE%%"
if [ "$firmware" = "uefi" ] ; then
create_demo_uefi_partition $blk_dev
elif [ "$onie_partition_type" = "gpt" ] ; then
@ -471,7 +470,6 @@ EOF
fi
# Add extra linux command line
extra_cmdline_linux=%%EXTRA_CMDLINE_LINUX%%
echo "EXTRA_CMDLINE_LINUX=$extra_cmdline_linux"
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX $extra_cmdline_linux"

View File

@ -236,6 +236,9 @@ if [ "$install_env" = "onie" ]; then
fi
fi
demo_part_size="%%ONIE_IMAGE_PART_SIZE%%"
echo "ONIE_IMAGE_PART_SIZE=$demo_part_size"
extra_cmdline_linux=%%EXTRA_CMDLINE_LINUX%%
echo "EXTRA_CMDLINE_LINUX=$extra_cmdline_linux"