From 5a4c27b8ae5801d0a28e303c5c8b4e731923ae41 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Sun, 15 Oct 2023 19:28:32 +0200 Subject: [PATCH] Meta: Add an option to boot from a USB drive --- Meta/run.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Meta/run.sh b/Meta/run.sh index a2dd7308be..7d39005445 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -256,6 +256,11 @@ if [ -n "${SERENITY_USE_SDCARD}" ] && [ "${SERENITY_USE_SDCARD}" -eq 1 ]; then SERENITY_BOOT_DRIVE="-device sdhci-pci -device sd-card,drive=sd-boot-drive -drive id=sd-boot-drive,if=none,format=raw,file=${SERENITY_DISK_IMAGE}" SERENITY_KERNEL_CMDLINE="$SERENITY_KERNEL_CMDLINE root=sd2:0:0" fi +if [ -n "${SERENITY_USE_USBDRIVE}" ] && [ "${SERENITY_USE_USBDRIVE}" -eq 1 ]; then + SERENITY_BOOT_DRIVE="-device usb-storage,drive=usbstick -drive if=none,id=usbstick,format=raw,file=${SERENITY_DISK_IMAGE}" + # FIXME: Find a better way to address the usb drive + SERENITY_KERNEL_CMDLINE="$SERENITY_KERNEL_CMDLINE root=block3:0" +fi if [ -z "$SERENITY_HOST_IP" ]; then SERENITY_HOST_IP="127.0.0.1"