From f1764a1c6d7187c191011327e1631fd056bbfae0 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 25 Jul 2022 22:02:03 -0700 Subject: [PATCH] boot-qemu: Introduce --append Introduce optional "--append" argument to add an additional string to the kernel command line. Signed-off-by: Kees Cook --- README.txt | 3 +++ boot-qemu.sh | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 9752dbd..e27129d 100644 --- a/README.txt +++ b/README.txt @@ -30,6 +30,9 @@ Required parameters: is being run. Optional parameters: + --append: + Adds additional kernel boot params to the kernel command line. + -d | --debug: Invokes 'set -x' for debugging the script. diff --git a/boot-qemu.sh b/boot-qemu.sh index 85ff10f..f3bd73e 100755 --- a/boot-qemu.sh +++ b/boot-qemu.sh @@ -2,6 +2,7 @@ # Root of the repo BASE=$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd) +APPEND_STRING="" source "${BASE}"/utils.sh @@ -22,6 +23,10 @@ function parse_parameters() { esac ;; + --append) + shift && APPEND_STRING="${1} " + ;; + -d | --debug) set -x ;; @@ -167,7 +172,6 @@ function setup_qemu_args() { ROOTFS=${IMAGES_DIR}/rootfs.cpio fi - APPEND_STRING="" if ${INTERACTIVE}; then if ${DEBIAN}; then APPEND_STRING+="root=/dev/vda "