From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
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 <[email protected]>

---
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

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/00000000000033408305c482b5a3%40google.com.

Reply via email to