Building AArch64 and ARM7 for Ubuntu 22.04 on x86_64
Hello, I'm trying to build packages for Ubuntu 22.04 AArch64 and ARMv7 architecture on a x86_64 system. The same approach works fine for openSUSE_15.5: I'm building locally with osc in home:dstoecker:base repository. I'm calling osc: "osc build --local-package -j 4 --vm-type=qemu --no-verify openSUSE_Leap_15.5 aarch64 package.spec". This fires up qemu and builds the package. Similar for ARM7 with "osc build --local-package -j 4 --vm-type=qemu --no-verify openSUSE_Leap_15.5_ARM armv7l package.spec" For Ubuntu I do: "osc build --local-package -j 4 --vm-type=qemu --no-verify Ubuntu_22.04 aarch64 package.dsc" and it fails with --- [ 5s] booting qemu... [ 5s] Using UART console [ 5s] ERROR: No kernel image for the target architecture available! [ 5s] You may want to use vmtype=kvm instead if you do not want to emulate a foreign architecture. --- I tried using --vmtype=kvm instead of --vmtype=qemu, but that doesn't fix the issue. Same issue when called with armv7l. The relevant parts of Project meta configuration: <repository name="openSUSE_Leap_15.5_ARM"> <path project="openSUSE:Leap:15.5:ARM" repository="ports"/> <arch>armv7l</arch> </repository> <repository name="openSUSE_Leap_15.5"> <path project="openSUSE:Leap:15.5:Update" repository="standard"/> <arch>i586</arch> <arch>x86_64</arch> <arch>aarch64</arch> </repository> <repository name="Ubuntu_22.04"> <path project="Ubuntu:22.04" repository="universe"/> <arch>x86_64</arch> <arch>i586</arch> <arch>aarch64</arch> <arch>armv7l</arch> </repository> Does anyone know what's missing or wrong? For Freedom In Peace -- http://www.dstoecker.eu/ (PGP key available)
On 09.02.24 10:41, Dirk Stöcker wrote:
Hello,
I'm trying to build packages for Ubuntu 22.04 AArch64 and ARMv7 architecture on a x86_64 system. The same approach works fine for openSUSE_15.5:
I'm building locally with osc in home:dstoecker:base repository.
I'm calling osc: "osc build --local-package -j 4 --vm-type=qemu --no-verify openSUSE_Leap_15.5 aarch64 package.spec". This fires up qemu and builds the package. Similar for ARM7 with "osc build --local-package -j 4 --vm-type=qemu --no-verify openSUSE_Leap_15.5_ARM armv7l package.spec"
For Ubuntu I do: "osc build --local-package -j 4 --vm-type=qemu --no-verify Ubuntu_22.04 aarch64 package.dsc" and it fails with
--- [ 5s] booting qemu... [ 5s] Using UART console [ 5s] ERROR: No kernel image for the target architecture available! [ 5s] You may want to use vmtype=kvm instead if you do not want to emulate a foreign architecture. ---
I tried using --vmtype=kvm instead of --vmtype=qemu, but that doesn't fix the issue. Same issue when called with armv7l.
Is this the same if you try to build for x86_64 (with kvm/qemu)? In that case you'll probably need to provide a kernel-obs-build for your debian style distribution (and configure prjconf that it is acutally used). https://github.com/seife/kernel-obs-build gives a hint how this can be done (the package build), but I only ever tried this on RHEL/CentOS builds. Good luck. -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman
On Sun, Feb 11, 2024 at 5:23 AM Stefan Seyfried <stefan.seyfried@googlemail.com> wrote:
On 09.02.24 10:41, Dirk Stöcker wrote:
Hello,
I'm trying to build packages for Ubuntu 22.04 AArch64 and ARMv7 architecture on a x86_64 system. The same approach works fine for openSUSE_15.5:
I'm building locally with osc in home:dstoecker:base repository.
I'm calling osc: "osc build --local-package -j 4 --vm-type=qemu --no-verify openSUSE_Leap_15.5 aarch64 package.spec". This fires up qemu and builds the package. Similar for ARM7 with "osc build --local-package -j 4 --vm-type=qemu --no-verify openSUSE_Leap_15.5_ARM armv7l package.spec"
For Ubuntu I do: "osc build --local-package -j 4 --vm-type=qemu --no-verify Ubuntu_22.04 aarch64 package.dsc" and it fails with
--- [ 5s] booting qemu... [ 5s] Using UART console [ 5s] ERROR: No kernel image for the target architecture available! [ 5s] You may want to use vmtype=kvm instead if you do not want to emulate a foreign architecture. ---
I tried using --vmtype=kvm instead of --vmtype=qemu, but that doesn't fix the issue. Same issue when called with armv7l.
Is this the same if you try to build for x86_64 (with kvm/qemu)? In that case you'll probably need to provide a kernel-obs-build for your debian style distribution (and configure prjconf that it is acutally used).
https://github.com/seife/kernel-obs-build gives a hint how this can be done (the package build), but I only ever tried this on RHEL/CentOS builds.
It shouldn't be too hard to adapt it for building for Debian targets using OBS' ability to build Debian packages with RPM spec files using debbuild. :) -- 真実はいつも一つ!/ Always, there's only one truth!
participants (3)
-
Dirk Stöcker
-
Neal Gompa
-
Stefan Seyfried