File tree 4 files changed +13
-3
lines changed
4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ RUN apt-get -y update && \
7
7
apt-get -y install --no-install-recommends \
8
8
git vim parted \
9
9
quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \
10
- libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc\
11
- binfmt-support ca-certificates fdisk gpg pigz\
10
+ libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc \
11
+ binfmt-support ca-certificates fdisk gpg pigz arch-test \
12
12
&& rm -rf /var/lib/apt/lists/*
13
13
14
14
COPY . /pi-gen/
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ To install the required dependencies for `pi-gen` you should run:
19
19
``` bash
20
20
apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \
21
21
dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \
22
- gpg pigz xxd
22
+ gpg pigz xxd arch-test
23
23
```
24
24
25
25
The file ` depends ` contains a list of tools needed. The format of this
Original file line number Diff line number Diff line change 244
244
245
245
dependencies_check " ${BASE_DIR} /depends"
246
246
247
+ echo " Checking native $ARCH executable support..."
248
+ if ! arch-test -n " $ARCH " ; then
249
+ echo " WARNING: Only a native build environment is supported. Checking emulated support..."
250
+ if ! arch-test " $ARCH " ; then
251
+ echo " No fallback mechanism found. Ensure your OS has binfmt_misc support enabled and configured."
252
+ exit 1
253
+ fi
254
+ fi
255
+
247
256
# check username is valid
248
257
if [[ ! " $FIRST_USER_NAME " =~ ^[a-z][-a-z0-9_]* $ ]]; then
249
258
echo " Invalid FIRST_USER_NAME: $FIRST_USER_NAME "
Original file line number Diff line number Diff line change @@ -19,3 +19,4 @@ lsmod:kmod
19
19
bc
20
20
gpg
21
21
pigz
22
+ arch-test
You can’t perform that action at this time.
0 commit comments