[opensuse-arm] Build armv7l rpm on x86_64 host
Hi, I'm rookie in ARM world. I bought recently odroid-c1 board, but it doesn't work with openSUSE yet. I'll try to make it happens (or fail trying). I read so far, I need vendor u-boot and kernel. All sources for those things are on gihub, so it should be quite simple. But... I started with packaging u-boot. I tried to build it locally (openSUSE 13.2 x86_64 host) but I need some help here. How to setup osc to build arm packages? This is what I've done so far: Installed qemu-linux-user, kvm, qemu-kvm packages. In ~/.oscrc build-type = qemu According to wiki page[1] I should run osc with --alternative-project switch, so I run: osc build --alternative-project=openSUSE:Factory:ARM qemu armv7l u-boot-odroid-c1.spec But build with vm kernel crash: WARNING: source service from package or project will not be executed. This may not be the same build as on server! Building u-boot-odroid-c1.spec for qemu/armv7l Getting buildinfo from server and store to /home/fisiu/Devel/obs/home:Fisiu:odroid-c1/u-boot-odroid-c1/.osc/_buildinfo-qemu-armv7l.xml Getting buildconfig from server and store to /home/fisiu/Devel/obs/home:Fisiu:odroid-c1/u-boot-odroid-c1/.osc/_buildconfig-qemu-armv7l Updating cache of required packages 0.0% cache miss. 97/97 dependencies cached. Verifying integrity of cached packages using keys from openSUSE:Factory Writing build configuration Running build VM_IMAGE: /var/tmp/build-root/img, VM_SWAP: /var/tmp/build-root/swap mkswap /var/tmp/build-root/swap mkswap: /var/tmp/build-root/swap: warning: wiping old swap signature. Setting up swapspace version 1, size = 1048572 KiB no label, UUID=108923a7-e64b-4487-8fb7-df36e147b003 logging output to /var/tmp/build-root/.build.log... [ 0s] Using BUILD_ROOT=/var/tmp/build-root/.mount [ 0s] Using BUILD_ARCH=armv7l:armv6l:armv5tel [ 0s] Doing qemu build in /var/tmp/build-root/img [ 0s] [ 0s] [ 0s] pendrak started "build u-boot-odroid-c1.spec" at Tue Jan 13 00:03:01 UTC 2015. [ 0s] [ 0s] [ 0s] processing recipe /home/fisiu/Devel/obs/home:Fisiu:odroid-c1/u-boot-odroid-c1/u-boot-odroid-c1.spec ... [ 0s] running changelog2spec --target rpm --file /home/fisiu/Devel/obs/home:Fisiu:odroid-c1/u-boot-odroid-c1/u-boot-odroid-c1.spec [ 0s] init_buildsystem --configdir /usr/lib/build/configs --cachedir /var/cache/build --prepare --rpmlist /tmp/rpmlist.FsoZyp /home/fisiu/Devel/obs/home:Fisiu:odroid-c1/u-boot-odroid-c1/u-boot-odroid-c1.spec ... [ 0s] copying packages... [ 1s] reordering...cycle: libcrack2 -> cracklib [ 1s] breaking dependency libcrack2 -> cracklib [ 1s] done [ 1s] /usr/lib/build/build-vm-qemu: line 22: vm_setup_kvm: command not found [ 1s] booting qemu... [ 1s] /usr/bin/qemu-kvm -no-reboot -nographic -vga none -net none -kernel /boot/vmlinuz -initrd /boot/initrd -append root=/dev/sda panic=1 quiet no-kvmclock nmi_watchdog=0 rw rd.driver.pre=binfmt_misc elevator=noop console=ttyS0 init=/.build/initvm.x86_64 -drive file=/var/tmp/build-root/img,if=none,id=disk,serial=0,cache=unsafe -device ide-hd,drive=disk -drive file=/var/tmp/build-root/swap,if=none,id=swap,serial=1,cache=unsafe -device ide-hd,drive=swap -smp 2 [ 4s] [ 0.122139] Failed to access perfctr msr (MSR c1 is 0) [ 6s] [ OK ] Started Show Plymouth Boot Screen. [ 6s] [ OK ] Reached target Paths. [ 6s] [ OK ] Reached target Basic System. [ 6s] [ OK ] Found device QEMU_HARDDISK. [ 6s] [ OK ] Started dracut initqueue hook. [ 6s] [ OK ] Reached target Remote File Systems (Pre). [ 6s] [ OK ] Reached target Remote File Systems. [ 6s] Starting File System Check on /dev/sda... [ 6s] [ OK ] Started File System Check on /dev/sda. [ 6s] Mounting /sysroot... [ 6s] [ OK ] Mounted /sysroot. [ 6s] [ OK ] Reached target Initrd Root File System. [ 6s] Starting Reload Configuration from the Real Root... [ 7s] [ OK ] Started Reload Configuration from the Real Root. [ 7s] [ OK ] Reached target Initrd File Systems. [ 7s] [ OK ] Reached target Initrd Default Target. [ 7s] [ 2.596209] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 [ 7s] [ 2.596209] [ 7s] [ 2.597593] CPU: 1 PID: 1 Comm: initvm.x86_64 Tainted: G W 3.16.7-7-desktop #1 [ 7s] [ 2.597593] Hardwarname: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20141015_183547-build31 04/01/2014 [ 7s] [ 2.597593] ffff88000694bed8 ffffffff8161bd03 ffffffff81a1d340 ffffffff81616032 [ 7s] [ 2.597593] 0000000000000010 ffff88000694bee8 ffff88000694be88 ffffffff8113afe2 [ 7s] [ 2.597593] 0000000000000100 ffff880006944510 0000000000000015 0000000000000001 [ 7s] [ 2.597593] Call Trace: [ 7s] [ 2.597593] [<ffffffff810051ee>] dump_trace+0x8e/0x350 [ 7s] [ 2.597593] [<ffffffff81005556>] show_stack_log_lvl+0xa6/0x190 [ 7s] [ 2.597593] [<ffffffff81006c51>] show_stack+0x21/0x50 [ 7s] [ 2.597593] [<ffffffff8161bd03>] dump_stack+0x49/0x6a [ 7s] [ 2.597593] [<ffffffff81616032>] panic+0xc8/0x1fc [ 7s] [ 2.597593] [<ffffffff8105f76e>] do_exit+0xa8e/0xa90 [ 7s] [ 2.597593] [<ffffffff8105f7e9>] do_group_exit+0x39/0xa0 [ 7s] [ 2.597593] [<ffffffff8105f860>] SyS_exit_group+0x10/0x10 [ 7s] [ 2.597593] [<ffffffff81622a2d>] system_call_fastpath+0x1a/0x1f [ 7s] [ 2.597593] [<0000000000432699>] 0x432698 [ 7s] [ 2.597593] Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff) [ 8s] [ 2.597593] Rebooting in 1 seconds..No buildstatus set, either the base system is broken (glibc/bash/perl) [ 8s] or the build host has a kernel or hardware problem... The buildroot was: /var/tmp/build-root/.mount Could You help me with cross compilation using osc? [1] - https://en.opensuse.org/openSUSE:ARM_distribution_howto -- Pozdrawiam / Best regards, Mariusz Fik, openSUSE Community Member -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On 13.01.2015 03:09, Mariusz Fik wrote:
In ~/.oscrc build-type = qemu
Try to set kvm here. I'll reach my working config only at evening. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On 13.01.2015 03:09, Mariusz Fik wrote:
In ~/.oscrc build-type = qemu
I will reach my working configuration at evening. I remember that I use kvm build-type here.
osc build --alternative-project=openSUSE:Factory:ARM qemu armv7l u-boot-odroid-c1.spec
I usually add --clean to avoid conflicts with previous content. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hi Mariusz, Am 13.01.2015 um 01:09 schrieb Mariusz Fik:
How to setup osc to build arm packages? This is what I've done so far: Installed qemu-linux-user, kvm, qemu-kvm packages. In ~/.oscrc build-type = qemu
That should not be necessary. By default we locally build in a chroot, not in QEMU.
According to wiki page[1] I should run osc with --alternative-project switch, so I run: osc build --alternative-project=openSUSE:Factory:ARM qemu armv7l u-boot-odroid-c1.spec
Take a look at https://build.opensuse.org/project/show/openSUSE:Factory:ARM - "qemu" repo only has no succeeded packages for armv7l, so the correct repo to use is "standard".
[ 7s] [ 2.597593] Hardwarname: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20141015_183547-build31 04/01/2014
This screams qemu-system-x86_64. qemu is not a build type that's widely tested for armv7l on x86_64. Instead we use qemu-arm[-binfmt], which in addition to installing the package needs to be setup for binfmt usage via the provided script. Cheers, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Andreas Färber <afaerber@suse.de> writes:
Take a look at https://build.opensuse.org/project/show/openSUSE:Factory:ARM - "qemu" repo only has no succeeded packages for armv7l, so the correct repo to use is "standard".
The standard repo is set up for native builds on armv7l, so that won't work. The qemu repo is the correct one to use for qemu user space builds. It inherits from the standard repo, so all packages are available.
[ 7s] [ 2.597593] Hardwarname: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20141015_183547-build31 04/01/2014
This screams qemu-system-x86_64.
That's just because of build-type = qemu.
Instead we use qemu-arm[-binfmt], which in addition to installing the package needs to be setup for binfmt usage via the provided script.
That is independent of the use of kvm or qemu as the build-type. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 13.01.2015 um 15:38 schrieb Andreas Schwab:
Andreas Färber <afaerber@suse.de> writes:
Take a look at https://build.opensuse.org/project/show/openSUSE:Factory:ARM - "qemu" repo only has no succeeded packages for armv7l, so the correct repo to use is "standard".
The standard repo is set up for native builds on armv7l, so that won't work. The qemu repo is the correct one to use for qemu user space builds. It inherits from the standard repo, so all packages are available.
Hm, according to my old scripts, standard used to work at some point? Been a while that I did a non-native local build though...
Instead we use qemu-arm[-binfmt], which in addition to installing the package needs to be setup for binfmt usage via the provided script.
That is independent of the use of kvm or qemu as the build-type.
It's needed for build-type chroot (empty) whereas on native KVM builds it won't be needed. And I would be surprised if it's needed on the host for qemu/kvm cross-builds. Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hi, Your build is ended with rpmlint error: [ 618s] I: Program returns random data in a function [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function aml_dt.c:129 [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function aml_gpio.c:36 [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function odroidc-mmc.c:152 [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function odroidc.c:126 [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function s3c_udc_otg.c:173 [ 622s] [ 611.107381] SysRq : Power Off [ 622s] [ 611.108872] reboot: Power down I used osc build --clean --alternative-project=openSUSE:Factory:ARM qemu armv7l u-boot-odroid-c1.spec build-20140424-2.1.3.noarch osc-0.148.2-1.1.noarch build-type = kvm -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hi, 2015-01-13 17:09 GMT+01:00 Matwey V. Kornilov <matwey.kornilov@gmail.com>:
Hi,
Your build is ended with rpmlint error:
[ 618s] I: Program returns random data in a function [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function aml_dt.c:129 [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function aml_gpio.c:36 [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function odroidc-mmc.c:152 [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function odroidc.c:126 [ 618s] E: u-boot-odroid-c1 no-return-in-nonvoid-function s3c_udc_otg.c:173 [ 622s] [ 611.107381] SysRq : Power Off [ 622s] [ 611.108872] reboot: Power down
I used
osc build --clean --alternative-project=openSUSE:Factory:ARM qemu armv7l u-boot-odroid-c1.spec
build-20140424-2.1.3.noarch osc-0.148.2-1.1.noarch
build-type = kvm
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Thanks for tips. I commented out 'build-type' in '~/.oscrc' and run `osc build --clean --alternative-project= openSUSE:Factory:ARM qemu armv7l`. It seems to be working now. But cross-compiling takes a lot of time... Maybe another hint how to speed-up building? :-) -- Pozdrawiam / Best regards, Mariusz Fik, openSUSE Community Member -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (4)
-
Andreas Färber
-
Andreas Schwab
-
Mariusz Fik
-
Matwey V. Kornilov