From: Sergiu Moga Date: Sat, 20 May 2023 18:27:33 +0000 (+0300) Subject: support/scripts/mkgrubimg: Change command-line option to `-c` X-Git-Tag: RELEASE-0.14.0~66 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a8572d2bc6fd26c592e19992ccae068dd58f857a;p=unikraft%2Funikraft.git support/scripts/mkgrubimg: Change command-line option to `-c` Change command-line option to `-c` to make it more intuitive. Furthermore, make it so that the actual received argument is a file containing the command-line. Signed-off-by: Sergiu Moga Reviewed-by: Stefan Jumarea Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #910 --- diff --git a/support/scripts/mkgrubimg b/support/scripts/mkgrubimg index 9ec4aca00..bcf65e9c9 100755 --- a/support/scripts/mkgrubimg +++ b/support/scripts/mkgrubimg @@ -9,7 +9,7 @@ usage() echo " -h Display help and exit" echo " -f Output format (supported: iso)" echo " -k Path to the Unikraft kernel image" - echo " -a Kernel command-line parameters (optional)" + echo " -c Kernel command-line parameters file (optional)" echo " -i Path to initrd cpio file (optional)" exit 1 } @@ -39,12 +39,17 @@ mkgrubiso() fi cp "${OPTKERNELIMG}" "${BUILDDIR}/boot/" || exit 1 + MBCMDL= + if [ -n "${OPTCMDLINE}" ]; then + MBCMDL=$(tr '\n' ' ' < "${OPTCMDLINE}") + fi + cat >"${BUILDDIR}/boot/grub/grub.cfg" <