From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
Branch: master

scripts/build: refine build process for aarch64

Since we do not create usr.img artifact for aarch64, we should
not try to set command line in `scripts/build` if usr.img does not exist.

Also let us export the STRIP environment variable to point to aarch64
version of the strip utility so that scripts/module.py and related
python scripts use the version matching the achitecture.

Signed-off-by: Waldemar Kozaczuk <[email protected]>

---
diff --git a/scripts/build b/scripts/build
--- a/scripts/build
+++ b/scripts/build
@@ -293,6 +293,10 @@ create_rofs_disk() {
        qemu-img convert -f raw -O qcow2 $raw_disk.raw $qcow2_disk.img
 }
 
+if [[ "$arch" == 'aarch64' ]]; then
+       export STRIP=aarch64-linux-gnu-strip
+fi
+
 case $fs_type in
 zfs)
        partition_size=$((fs_size - partition_offset))
@@ -308,7 +312,9 @@ ramfs)
        qemu-img convert -f raw -O qcow2 loader.img usr.img ;;
 esac
 
-"$SRC"/scripts/imgedit.py setargs usr.img `cat cmdline`
+if [[ -f "$OSV_BUILD_PATH/usr.img" ]]; then
+       "$SRC"/scripts/imgedit.py setargs usr.img `cat cmdline`
+fi
 
 # Support "build check"
 for i

-- 
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/000000000000b6721d05aa5a0c44%40google.com.

Reply via email to