mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
Meta: Add SERENITY_USE_SDCARD to boot from an SD card
This commit is contained in:
parent
425acb513e
commit
f7608ba269
2 changed files with 7 additions and 2 deletions
|
@ -79,8 +79,8 @@ nearest_power_of_2() {
|
||||||
done
|
done
|
||||||
echo $p
|
echo $p
|
||||||
}
|
}
|
||||||
if [ "$SERENITY_ARCH" = "aarch64" ]; then
|
if [ "$SERENITY_ARCH" = "aarch64" ] || { [ -n "$SERENITY_USE_SDCARD" ] && [ "$SERENITY_USE_SDCARD" -eq 1 ]; }; then
|
||||||
# The Aarch64 port loads from an SD card, which must have a size that is a power of 2
|
# SD cards must have a size that is a power of 2. The Aarch64 port loads from an SD card.
|
||||||
DISK_SIZE_BYTES=$(nearest_power_of_2 "$DISK_SIZE_BYTES")
|
DISK_SIZE_BYTES=$(nearest_power_of_2 "$DISK_SIZE_BYTES")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -254,6 +254,11 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$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 [ -z "$SERENITY_HOST_IP" ]; then
|
if [ -z "$SERENITY_HOST_IP" ]; then
|
||||||
SERENITY_HOST_IP="127.0.0.1"
|
SERENITY_HOST_IP="127.0.0.1"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue