diff options
author | Rob Smith <[email protected]> | 2020-12-19 18:34:20 -0800 |
---|---|---|
committer | XECDesign <[email protected]> | 2021-09-20 16:20:09 +0100 |
commit | 029f258cdd5787254f5c48c6c7eb041840786b4d (patch) | |
tree | cecd20ba762fea75d80f6635e0134abec17d6818 /scripts | |
parent | f6048c77456f9be6ae9a94776699969e3a91cd99 (diff) |
Don't check for binfmt_misc on arm platforms
When building on a native ARM platform, binfmt_misc is not
required to be loaded. This change checks the machine type
and if it's a ARM platform, skip the binfmt_misc validation.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/dependencies_check | 25 |
1 files changed, 20 insertions, 5 deletions
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 } |