Merge branch 'master' into arm64

This commit is contained in:
Serge Schneider 2021-09-21 16:36:50 +01:00
commit 5971767590
4 changed files with 23 additions and 8 deletions

View file

@ -198,7 +198,7 @@ export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}"
export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}" export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
export SCRIPT_DIR="${BASE_DIR}/scripts" 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_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"}
export DEPLOY_ZIP="${DEPLOY_ZIP:-1}" export DEPLOY_ZIP="${DEPLOY_ZIP:-1}"
export LOG_FILE="${WORK_DIR}/build.log" export LOG_FILE="${WORK_DIR}/build.log"

View file

@ -1,6 +1,6 @@
#!/bin/bash -e #!/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 -m 744 files/partition_setup.sh "${NOOBS_DIR}/"
install -v files/partitions.json "${NOOBS_DIR}/" install -v files/partitions.json "${NOOBS_DIR}/"

View file

@ -1,6 +1,6 @@
#!/bin/bash -e #!/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}" mkdir -p "${STAGE_WORK_DIR}"
if [ "${DEPLOY_ZIP}" == "1" ]; then if [ "${DEPLOY_ZIP}" == "1" ]; then

View file

@ -28,11 +28,26 @@ dependencies_check()
false false
fi 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.
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 if ! grep -q "/proc/sys/fs/binfmt_misc" /proc/mounts; then
echo "Module binfmt_misc not loaded in host" echo "Module binfmt_misc not loaded in host"
echo "Please run:" echo "Please run:"
echo " sudo modprobe binfmt_misc" echo " sudo modprobe binfmt_misc"
exit 1 exit 1
fi fi
fi
} }