[COMMIT osv master] scripts/build: default to rofs when building aarch64 images

1 view
Skip to first unread message

Commit Bot

unread,
Jun 11, 2021, 3:42:29 PM6/11/21
to osv...@googlegroups.com, Waldemar Kozaczuk
From: Waldemar Kozaczuk <jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <jwkoz...@gmail.com>
Branch: master

scripts/build: default to rofs when building aarch64 images

Please note that ZFS is not supported on OSv until the issue #1131
is fixed therefore we default to ROFS (ramfs is also supported).
This makes it a bit more convenient for users to build aarch64
images as they do not need to explictly append 'fs=rofs --create-disk'.

Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>

---
diff --git a/scripts/build b/scripts/build
--- a/scripts/build
+++ b/scripts/build
@@ -186,9 +186,19 @@ case $OUT in
*) OSV_BUILD_PATH=`pwd`/$OUT;;
esac

+host_arch=$(uname -m)
+
# Default manifest
manifest=bootfs.manifest.skel
-fs_type=${vars[fs]-zfs}
+if [[ "$host_arch" == "aarch64" || "$arch" == "aarch64" ]]; then
+ # We default to ROFS as ZFS is not supported on ARM until the issue #1131 is fixed
+ fs_type=${vars[fs]-rofs}
+ if [[ "$fs_type" == "rofs" ]]; then
+ vars[create_disk]="true"
+ fi
+else
+ fs_type=${vars[fs]-zfs}
+fi
usrskel_arg=
case $fs_type in
zfs)
@@ -271,7 +281,6 @@ kernel_end=$(($loader_size+2097151 & ~2097151))
cd $OUT

CC=gcc
-host_arch=$(uname -m)
if [[ "$host_arch" == "x86_64" && "$arch" == 'aarch64' ]]; then
CC=${CROSS_PREFIX:-aarch64-linux-gnu-}gcc
fi
Reply all
Reply to author
Forward
0 new messages