From: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <
jwkoz...@gmail.com>
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 <
jwkoz...@gmail.com>
---
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