Comments (8)
thanks @viraniac but looking at my host os I see this:
jens@mars:~$ dpkg -l | grep binfmt
ii binfmt-support 2.1.8-2 amd64 Support for extra binary formats
ii qemu-user-binfmt 1:2.11+dfsg-1ubuntu7.42+esm1 amd64 QEMU user mode binfmt registration for qemu-user
jens@mars:~$ /usr/sbin/update-binfmts --display qemu-arm
qemu-arm (enabled):
package = qemu-user-binfmt
type = magic
offset = 0
magic = \x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00
mask = \xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff
interpreter = /usr/bin/qemu-arm
detector =
(this is after a reboot)
I'll try to remove the armbian build container and reproduce the issue...
from build.
Jira ticket: AR-1989
from build.
I want to dig into the Dockerfile and container build process a bit more, but this appears to be a bit more dynamically built.
I do see the build process here:
https://gist.github.com/zerog2k/e5987095fd0a67d648d402f3f7e7bbf3#file-gistfile1-txt-L9-L198
but there is nothing obvious to me (i.e. failing pkg install, etc) which is standing out.
It appears that the package is already installed in the base container (ghcr.io/armbian/docker-armbian-build:armbian-ubuntu-jammy-latest)?
jens@mars:~/build/armbian$ docker ps --no-trunc
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7727cfee645eab8fdcbe0dc4eadf37d29ea30bf55da3b7f16784b5816f60b3c9 armbian.local.only/armbian-build:initial "/bin/bash /armbian/compile.sh PREFER_DOCKER=no BUILD_MINIMAL=no BUILD_DESKTOP=no ARMBIAN_BUILD_UUID=f10848de-ba80-4825-a9e3-3c68b2f2a277 ARMBIAN_RELAUNCHED=yes BRANCH=edge EXTRAWIFI=no BOARD=onecloud SKIP_LOG_ARCHIVE=yes SET_OWNER_TO_UID=1000 RELEASE=jammy KERNEL_CONFIGURE=no build" 25 minutes ago Up 25 minutes sweet_aryabhata
if there are any docs or pointers on digging into the Dockerfile build process, I may be able to resolve this myself.
from build.
Try installing binfmt-support on your host OS (ubuntu-18.04). That will add a service which will update binary format information. I think the issue is caused as nothing is running /usr/sbin/update-binfmts --enable
on your system and hence even though docker container has binfmt-support and qemu-user-static installed, its not able to run the binary. When you reinstalled qemu-user-static, the post install procedure of the deb file would have called the same, making it look like that the issue is resolved. If my understanding is correct, the issue might re-appear if you restart your system.
Its also possible that you already installed qemu-user-static on your host os after encountering this issue. That would have installed binfmt support thereby fixing the issue.
from build.
I'll try to remove the armbian build container and reproduce the issue...
The container is removed after compile.sh finishes execution. Atleast thats what happens for me on MacOS. Is it being retained on Linux?
from build.
So I had to do a different arm64 build, and I run into the same thing:
https://paste.next.armbian.com/ebediyagof
If i run compile.sh docker-shell
, then I can see with /usr/sbin/update-binfmts --display
that all of them are disabled. Back in the host os, /usr/sbin/update-binfmts --display
shows all are enabled.
so after a bit of reading on qemu & binfmt, i found this extremely helpful article:
https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408
it has two scripts which were helpful, as ubuntu 18.04 seems to suffer from the
ERROR: QEMU not registered in binfmt_misc with fix-binary (F) flag.
issue
jens@mars:~$ bin/check-qemu-binfmt.sh
OK: docker 20.10.21 supports buildx experimental feature.
OK: kernel 4.15.0-219-generic has binfmt_misc fix-binary (F) support.
OK: /proc/sys/fs/binfmt_misc is mounted
OK: update-binfmts 2.1.8 has fix-binary (F) support.
ERROR: QEMU not registered in binfmt_misc with fix-binary (F) flag.
jens@mars:~$ sudo bin/reregister-qemu-binfmt.sh
Reregistering arch aarch64
Reregistering arch alpha
Reregistering arch arm
Reregistering arch armeb
Reregistering arch cris
Reregistering arch m68k
Reregistering arch microblaze
Reregistering arch mips
Reregistering arch mips64
Reregistering arch mips64el
Reregistering arch mipsel
Reregistering arch ppc
Reregistering arch ppc64
Reregistering arch ppc64abi32
Reregistering arch ppc64le
head: cannot open '/var/lib/binfmts/qemu-riscv64' for reading: No such file or directory
jens@mars:~$ bin/check-qemu-binfmt.sh
OK: docker 20.10.21 supports buildx experimental feature.
OK: kernel 4.15.0-219-generic has binfmt_misc fix-binary (F) support.
OK: /proc/sys/fs/binfmt_misc is mounted
OK: update-binfmts 2.1.8 has fix-binary (F) support.
OK: QEMU registered in binfmt_misc with flags OCF (F is required).
Host looks good for docker buildx multi-architecture support.
armbian compile seems to be running now, although I'm getting alot of qemu: Unsupported syscall: 293
types of errors.
will do some more testing
from build.
ubuntu-18.04 is EOL now anyhow, but unfortunately my ancient build box still has to run this (with 4.x kernel) due to ancient nvidia card and driver support which doesnt work with newer kernels/xorg in ubuntu-20+ :(
so I'm going to chalk this up to, an ubuntu-18 issue which, is a wontfix
from build.
just dropping a note of closure here, just in case anyone else is trying to figure this out
looks like I also needed to uncomment the
DOCKER_FLAGS+=(--privileged)
in userpatches/config-docker.conf, and this took care of the qemu unsupported syscalls, and everythign is building fine
from build.
Related Issues (20)
- Installing Armbian on Tigre 2 TV Box with Amlogic S905X (NAND) HOT 2
- Unable to build Armbian for Orange Pi 5 HOT 3
- The image is built with the kernel from previous builds. HOT 9
- NetworkManager in Ubuntu add powersave config for WiFi HOT 3
- /home directory unexpectedly cleared by build script HOT 4
- Discussion on PR decisions? HOT 1
- rock64 compile error HOT 7
- armbian latest offical for radxa zero, the /boot/dtb/amlogic/overlay/meson-g12a-radxa-zero-spi-spidev.dtbo can't work at all !!! HOT 4
- Armbian boot partition unreadable on Windows machines due to weird partition type HOT 3
- Automatically generated kernel-patch fails to apply HOT 8
- Sources configuration not found tried /home/ ... /build/config/sources/families/.conf HOT 2
- khadas-vim2 (s912) wont boot after current kernel updated to 6.1.66, hangs at mounting /boot HOT 6
- ERROR in function prepare_host HOT 15
- Add ASUS Tinker Edge R board. HOT 4
- rk322x-box Compile Error HOT 2
- apt armbian.list.disabled exists after build without SKIP_ARMBIAN_REPO HOT 2
- Linux headers package is missing after compilation - kernel branch 4.19 HOT 9
- Add support for the Orange pi 2w 4gb models HOT 4
- Please set dpkg vendor to Armbian in all images HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from build.