summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Schneider <serge@raspberrypi.com>2021-09-21 16:36:50 +0100
committerSerge Schneider <serge@raspberrypi.com>2021-09-21 16:36:50 +0100
commit59717675900cfe478e176d9d05b5614cc1934670 (patch)
tree1063d71dea96f11c137a056c0ee65114d060bd55
parent535ea6c7f0f07853f3730c11a052486f243a5a42 (diff)
parent2f12cf985a88977957e2743601246d2a07aeb660 (diff)
Merge branch 'master' into arm64
-rwxr-xr-xbuild.sh2
-rwxr-xr-xexport-noobs/00-release/00-run.sh2
-rwxr-xr-xexport-noobs/prerun.sh2
-rw-r--r--scripts/dependencies_check25
4 files changed, 23 insertions, 8 deletions
diff --git a/build.sh b/build.sh
index ff008be..f70c6fb 100755
--- a/build.sh
+++ b/build.sh
@@ -198,7 +198,7 @@ export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}"
export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
export SCRIPT_DIR="${BASE_DIR}/scripts"
-export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}"
+export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_NAME}"}"
export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"}
export DEPLOY_ZIP="${DEPLOY_ZIP:-1}"
export LOG_FILE="${WORK_DIR}/build.log"
diff --git a/export-noobs/00-release/00-run.sh b/export-noobs/00-release/00-run.sh
index 8524730..bfaea9f 100755
--- a/export-noobs/00-release/00-run.sh
+++ b/export-noobs/00-release/00-run.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
-NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}"
+NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_NAME}${IMG_SUFFIX}"
install -v -m 744 files/partition_setup.sh "${NOOBS_DIR}/"
install -v files/partitions.json "${NOOBS_DIR}/"
diff --git a/export-noobs/prerun.sh b/export-noobs/prerun.sh
index bb9450a..d97508a 100755
--- a/export-noobs/prerun.sh
+++ b/export-noobs/prerun.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
-NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}"
+NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_NAME}${IMG_SUFFIX}"
mkdir -p "${STAGE_WORK_DIR}"
if [ "${DEPLOY_ZIP}" == "1" ]; then
diff --git a/scripts/dependencies_check b/scripts/dependencies_check
index 375512b..32c42ef 100644
--- a/scripts/dependencies_check
+++ b/scripts/dependencies_check
@@ -28,11 +28,26 @@ dependencies_check()
false
fi
+ # If we're building on a native arm platform, we don't need to check for
+ # binfmt_misc or require it to be loaded.
- if ! grep -q "/proc/sys/fs/binfmt_misc" /proc/mounts; then
- echo "Module binfmt_misc not loaded in host"
- echo "Please run:"
- echo " sudo modprobe binfmt_misc"
- exit 1
+ binfmt_misc_required=1
+
+ case $(uname -m) in
+ aarch64)
+ binfmt_misc_required=0
+ ;;
+ arm*)
+ binfmt_misc_required=0
+ ;;
+ esac
+
+ if [[ "${binfmt_misc_required}" == "1" ]]; then
+ if ! grep -q "/proc/sys/fs/binfmt_misc" /proc/mounts; then
+ echo "Module binfmt_misc not loaded in host"
+ echo "Please run:"
+ echo " sudo modprobe binfmt_misc"
+ exit 1
+ fi
fi
}