From: Sergiu Moga Date: Sat, 20 May 2023 19:42:54 +0000 (+0300) Subject: support/scripts/mkukimg: Add `Devicetree Blob` option X-Git-Tag: RELEASE-0.14.0~64 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d232a089d4fb775daf694c88d37ef8c536648530;p=unikraft%2Funikraft.git support/scripts/mkukimg: Add `Devicetree Blob` option Support adding a `Devicetree Blob` trough the `-d` option. 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/mkukimg b/support/scripts/mkukimg index 6e14d722f..583c9223a 100755 --- a/support/scripts/mkukimg +++ b/support/scripts/mkukimg @@ -13,6 +13,7 @@ usage() echo " -i Path to initrd cpio file (optional)" echo " -b Bootloader: grub (GRUB), ukefi (Unikraft EFI stub)" echo " -a Architecture: X64 (x86_64), AA64 (Aarch64)" + echo " -d Path to Devicetree Blob (optional, for ukefi only!)" exit 1 } @@ -21,6 +22,7 @@ OPTFORMAT="iso" OPTCMDLINE="" OPTOUTPUT=${1} OPTARCH= +OPTDTB= # cleanup BUILDDIR= @@ -87,6 +89,10 @@ mkukefiiso() sudo cp ${OPTCMDLINE} ${BUILDDIR}/mnt/EFI/BOOT/ fi + if [ ! -z ${OPTDTB} ]; then + sudo cp ${OPTDTB} ${BUILDDIR}/mnt/EFI/BOOT/ + fi + sudo cp ${OPTKERNELIMG} ${BUILDDIR}/mnt/EFI/BOOT/BOOT${OPTARCH}.EFI sudo umount ${BUILDDIR}/mnt @@ -94,11 +100,12 @@ mkukefiiso() mkdir ${BUILDDIR}/iso_dir cp ${BUILDDIR}/fs.img ${BUILDDIR}/iso_dir + echo ${OPTOUTPUT} xorriso -as mkisofs -R -f -e fs.img -no-emul-boot -o ${OPTOUTPUT} ${BUILDDIR}/iso_dir } # process options -while getopts "hk:c:i:f:a:b:" OPT; do +while getopts "hk:c:i:f:a:b:d" OPT; do case "${OPT}" in h) usage @@ -121,6 +128,9 @@ while getopts "hk:c:i:f:a:b:" OPT; do a) OPTARCH="${OPTARG}" ;; + d) + OPTDTB="${OPTARG}" + ;; *) usage ;;