Browse Source

Check binfmt_misc module is loaded

Give a friendly error message early.
pull/255/head
Sam Tygier 2 years ago
committed by XECDesign
parent
commit
a8eb03a5e4
3 changed files with 11 additions and 1 deletions
  1. +1
    -1
      Dockerfile
  2. +1
    -0
      depends
  3. +9
    -0
      scripts/dependencies_check

+ 1
- 1
Dockerfile View File

@ -6,7 +6,7 @@ RUN apt-get -y update && \
apt-get -y install \
git vim parted \
quilt realpath qemu-user-static debootstrap zerofree pxz zip dosfstools \
bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file \
bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod\
&& rm -rf /var/lib/apt/lists/*
COPY . /pi-gen/

+ 1
- 0
depends View File

@ -15,3 +15,4 @@ curl
xxd
file
git
lsmod:kmod

+ 9
- 0
scripts/dependencies_check View File

@ -27,4 +27,13 @@ dependencies_check()
echo "$missing"
false
fi
if ! lsmod | grep binfmt_misc >/dev/null
then
echo "Module binfmt_misc not loaded in host"
echo "Please run:"
echo " sudo modprobe binfmt_misc"
exit 1
fi
}

Loading…
Cancel
Save