mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:47:35 +00:00
Meta: Run aarch64 with the disk image in the SD card slot
Co-authored-by: Timon Kruiper <timonkruiper@gmail.com> Co-authored-by: Ollrogge <nils-ollrogge@outlook.de>
This commit is contained in:
parent
c91db6ec97
commit
f3363c1088
2 changed files with 18 additions and 1 deletions
|
@ -71,6 +71,19 @@ else
|
||||||
DISK_SIZE_BYTES="$SERENITY_DISK_SIZE_BYTES"
|
DISK_SIZE_BYTES="$SERENITY_DISK_SIZE_BYTES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
nearest_power_of_2() {
|
||||||
|
local n=$1
|
||||||
|
local p=1
|
||||||
|
while [ $p -lt "$n" ]; do
|
||||||
|
p=$((p*2))
|
||||||
|
done
|
||||||
|
echo $p
|
||||||
|
}
|
||||||
|
if [ "$SERENITY_ARCH" = "aarch64" ]; then
|
||||||
|
# The Aarch64 port loads from an SD card, which must have a size that is a power of 2
|
||||||
|
DISK_SIZE_BYTES=$(nearest_power_of_2 "$DISK_SIZE_BYTES")
|
||||||
|
fi
|
||||||
|
|
||||||
USE_EXISTING=0
|
USE_EXISTING=0
|
||||||
|
|
||||||
if [ -f _disk_image ]; then
|
if [ -f _disk_image ]; then
|
||||||
|
|
|
@ -279,7 +279,11 @@ fi
|
||||||
# add -machine vmport=off below to run the machine with ps/2 mouse
|
# add -machine vmport=off below to run the machine with ps/2 mouse
|
||||||
if [ -z "$SERENITY_MACHINE" ]; then
|
if [ -z "$SERENITY_MACHINE" ]; then
|
||||||
if [ "$SERENITY_ARCH" = "aarch64" ]; then
|
if [ "$SERENITY_ARCH" = "aarch64" ]; then
|
||||||
SERENITY_MACHINE="-M raspi3b -serial stdio"
|
SERENITY_MACHINE="
|
||||||
|
-M raspi3b
|
||||||
|
-serial stdio
|
||||||
|
-drive file=${SERENITY_DISK_IMAGE},if=sd,format=raw
|
||||||
|
"
|
||||||
else
|
else
|
||||||
SERENITY_MACHINE="
|
SERENITY_MACHINE="
|
||||||
-m $SERENITY_RAM_SIZE
|
-m $SERENITY_RAM_SIZE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue