From 9bf908efbcc7539e4de90186462a36e58973517a Mon Sep 17 00:00:00 2001 From: Hugo Hromic Date: Sat, 6 Jul 2019 12:31:56 +0100 Subject: [PATCH 1/2] Use i386 qemu-user-static package in Dockerfile At the moment, Buster images are broken when building with 64-bits Qemu. --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 706a5fb..1dce0df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,14 @@ FROM debian:buster ENV DEBIAN_FRONTEND noninteractive -RUN apt-get -y update && \ +RUN dpkg --add-architecture i386 && \ + apt-get -y update && \ apt-get -y install \ git vim parted \ - quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \ - bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod\ + quilt coreutils qemu-user-static:i386 debootstrap zerofree zip dosfstools \ + bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod \ && rm -rf /var/lib/apt/lists/* COPY . /pi-gen/ -VOLUME [ "/pi-gen/work", "/pi-gen/deploy"] +VOLUME ["/pi-gen/work", "/pi-gen/deploy"] From 4bf1ac039aa52e7820da36c10f06bc103ffc158e Mon Sep 17 00:00:00 2001 From: Hugo Hromic Date: Sun, 28 Jul 2019 12:12:46 +0100 Subject: [PATCH 2/2] Add warning and instructions in README for i386 qemu-user-static package --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f15f076..fd25feb 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ either Debian Buster or Ubuntu Xenial and is known to have issues building on earlier releases of these systems. On other Linux distributions it may be possible to use the Docker build described below. -To install the required dependencies for pi-gen you should run: +To install the required dependencies for pi-gen you should run (*): ```bash apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ @@ -20,6 +20,22 @@ dosfstools bsdtar libcap2-bin grep rsync xz-utils file git curl The file `depends` contains a list of tools needed. The format of this package is `[:]`. +**(*) Warning:** please note that there is currently an issue when building with the +64-bits version of the `qemu-user-static` package. As a workaround, you can use the +32-bits `qemu-user-static:i386` package instead. + +To do this, first add the `i386` architecture to your Debian-based system: + +```bash +dpkg --add-architecture i386 +apt-get update +``` + +Then replace `qemu-user-static` with `qemu-user-static:i386` in the instructions above. + +Also note that the included Dockerfile in pi-gen already includes this workaround. + +For more info refer to: https://github.com/RPi-Distro/pi-gen/issues/271 ## Config @@ -295,9 +311,6 @@ follows: # Troubleshooting -## `64 Bit Systems` -Please note there is currently an issue when compiling with a 64 Bit OS. See https://github.com/RPi-Distro/pi-gen/issues/271 - ## `binfmt_misc` Linux is able execute binaries from other architectures, meaning that it should be