01-23-2015 07:56 AM
Hello,
I'm having troubles when building my PetaLinux 2014.4 System on Ubuntu 14.04 LTS when I start adding to "much" to my rootfs.
Details:
- Zynq on ZC706 board
- changed UBoot config (#define CONFIG_SYS_BOOTM_LEN 0xF000000) and netstart offsets etc to make the book process work
- "new" PetaLinux Project based on the ZC706 BSP for PetaLinux 2014.4
- Boot from SDCard, BOOT.BIN and image.ub (kernel + dtb)
- several user-generated apps and libs that only contain pre-compiled software & data
- everything else is "pretty standard", in the kernel config I added some of the usb device drivers etc.
Problem:
When my compressed rootfs starts to become about 30 MB, I start getting problems during the build-process during the "vmlinux linux/kernel" step. A "petalinux-build -x mrproper" doesn't help.
[ --- snipped --- ] [INFO ] modules_install linux/kernel [INFO ] post-install linux/rootfs/gdbm [INFO ] post-install linux/rootfs/sqlite3 [INFO ] post-install linux/rootfs/fwupgrade [INFO ] post-install linux/rootfs/joe37 [INFO ] post-install linux/rootfs/python34 [INFO ] post-install linux/rootfs/roothomedata [INFO ] package rootfs.cpio to /home/maik/LAWAL_SVHW/Petalinux/images/linux [INFO ] Update and install vmlinux image [INFO ] vmlinux linux/kernel [ERROR] make[4]: *** [vmlinux] Error 1 [ERROR] make[3]: *** [sub-make] Error 2 [ERROR] make[2]: *** [vmlinux_only] Error 2 [ERROR] make[1]: *** [update-kernel-package] Error 255 ERROR: Failed to build linux
An exemplary snippet from a build.log looks like this:
[INFO ] package rootfs.cpio to /home/maik/LAWAL_SVHW/Petalinux/images/linux [ALL ] petalinux-gen-initrd -d /home/maik/LAWAL_SVHW/Petalinux/build/linux/rootfs/targetroot -o "/home/maik/LAWAL_SVHW/Petalinux/images/linux/rootfs.cpio" --l inux-build "/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel" --initcpio "/home/maik/LAWAL_SVHW/Petalinux/build/linux/rootfs_init_cpio_file" || exit 255 [ALL ] Generating filesystem description file for gen_init_cpio... [ALL ] Creating /init symlink if required...Done. [ALL ] directories...files...symlinks...device nodes...done. [ALL ] Generating CPIO archive /home/maik/LAWAL_SVHW/Petalinux/images/linux/rootfs.cpio ...done. [ALL ] gzip -c "/home/maik/LAWAL_SVHW/Petalinux/images/linux/rootfs.cpio" > "/home/maik/LAWAL_SVHW/Petalinux/images/linux/rootfs.cpio.gz" || exit 255 [ALL ] mkimage -A arm -T ramdisk -O linux -C gzip -d "/home/maik/LAWAL_SVHW/Petalinux/images/linux/rootfs.cpio.gz" "/home/maik/LAWAL_SVHW/Petalinux/images/lin ux/urootfs.cpio.gz" || exit 255 [ALL ] Image Name: [ALL ] Created: Fri Jan 23 15:07:18 2015 [ALL ] Image Type: ARM Linux RAMDisk Image (gzip compressed) [INFO ] Update and install vmlinux image [ALL ] Data Size: 27386518 Bytes = 26744.65 kB = 26.12 MB [ALL ] Load Address: 00000000 [ALL ] Entry Point: 00000000 [ALL ] make INSTANCE=linux/kernel -C /home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel vmlinux_only install || exit 255 [ALL ] make[2]: Entering directory `/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel' [ALL ] rsync /home/maik/LAWAL_SVHW/Petalinux/subsystems/linux/configs/kernel/config /home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/xlnx-3.17/.config [ALL ] rm -rf /home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/boot /home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/usr [ALL ] ln -s "/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/xlnx-3.17/arch/arm/boot" "/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/boot" [ALL ] ln -s "/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/xlnx-3.17/usr" "/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/usr" [INFO ] vmlinux linux/kernel [ALL ] make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- O=/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/xlnx-3.17 KCONFIG_CONFIG="/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/xlnx-3.17"/.config -j2 -C /opt/pkg/petalinux-v2014.4-final/components/linux-kernel/xlnx-3.17 vmlinux [ALL ] make[3]: Entering directory `/opt/pkg/petalinux-v2014.4-final/components/linux-kernel/xlnx-3.17' [ALL ] make[1]: Entering directory `/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel/xlnx-3.17' [ALL ] GEN ./Makefile [ALL ] scripts/kconfig/conf --silentoldconfig Kconfig [ALL ] CHK include/config/kernel.release [ALL ] GEN ./Makefile [ALL ] CHK include/generated/uapi/linux/version.h [ALL ] CHK include/generated/utsrelease.h [ALL ] Using /opt/pkg/petalinux-v2014.4-final/components/linux-kernel/xlnx-3.17 as source for kernel [ALL ] make[5]: `include/generated/mach-types.h' is up to date. [ALL ] CALL /opt/pkg/petalinux-v2014.4-final/components/linux-kernel/xlnx-3.17/scripts/checksyscalls.sh [ALL ] GEN usr/initramfs_data.cpio.gz [ALL ] CHK include/generated/compile.h [ALL ] GZIP kernel/config_data.gz [ALL ] CHK kernel/config_data.h [ALL ] AS usr/initramfs_data.o [ALL ] LD usr/built-in.o [ALL ] LINK vmlinux [ALL ] LD vmlinux.o [ALL ] MODPOST vmlinux.o [ALL ] GEN .version [ALL ] CHK include/generated/compile.h [ALL ] UPD include/generated/compile.h [ALL ] CC init/version.o [ALL ] LD init/built-in.o [ALL ] KSYM .tmp_kallsyms1.o [ALL ] arch/arm/kernel/built-in.o: In function `cpu_resume': [ALL ] arch/arm/kernel/hyp-stub.o:(.data+0x2e8): relocation truncated to fit: R_ARM_CALL against symbol `__hyp_stub_install_secondary' defined in .text section in arch/arm/kernel/built-in.o [ERROR] make[4]: *** [vmlinux] Error 1 [ERROR] make[3]: *** [sub-make] Error 2 [ALL ] make[3]: Leaving directory `/opt/pkg/petalinux-v2014.4-final/components/linux-kernel/xlnx-3.17' [ERROR] make[2]: *** [vmlinux_only] Error 2 [ALL ] make[2]: Leaving directory `/home/maik/LAWAL_SVHW/Petalinux/build/linux/kernel' [ERROR] make[1]: *** [update-kernel-package] Error 255 [ALL ] make[1]: Leaving directory `/home/maik/LAWAL_SVHW/Petalinux/build/linux' [ALL ] make: *** [package] Error 2 [ALL ] make: Leaving directory `/home/maik/LAWAL_SVHW/Petalinux/build/linux' [INFO ] config linux/rootfs [INFO ] oldconfig linux [INFO ] oldconfig linux/kernel [INFO ] oldconfig linux/rootfs
It looks like the error (relocation truncated with an ARM_CALL) points to some size limit (rel/abs jump??) while packaging vmlinux. I have not figured out where this size limit comes from or where it is defined/set/computed/...
If I start taking out my own software packages piece by piece, I end up with a working build (several hundred kB won't change anything, but taking out a MegaByte or two usually helps).
Switching off the "compressed kernel image" in petalinux-config doesn't change the behaviour.
I am lost, I need more pointers on how to solve this issue... Does anyone have a hint for me?
Any special version of some library needed?
05-19-2015 11:41 AM
Hi maikfox,
Have you been able to solve this problem? I'm having a similar issue with another build (not for petalinux), but the error is exactly the same. Has anyone else had success solving this? I'd appreciate some pointers.
Thanks!
05-20-2015 01:45 AM
@bstein wrote:
Have you been able to solve this problem?
No. I avoid it by keeping my rootfs small, causing some inconvenience at other points, but I had no time for further investigation. I'm still lost and thinking about looking for other ways of using Linux on Zynq.
05-21-2015 07:53 AM
08-27-2015 11:29 AM
What is an estimated size limit for the rootfs image to be considered "too-big?" Running PetaLinux 2015.2 on Zynq.
09-25-2015 12:17 PM - edited 09-25-2015 12:17 PM
I'd also be interested in seeing some numbers for a "too large" rootfs. Can anyone at Xilinx comment?
10-05-2015 10:44 AM - edited 10-05-2015 10:45 AM
> What is an estimated size limit for the rootfs image to be considered "too-big?" Running PetaLinux 2015.2 on
Zynq.
About 40M.
10-12-2015 11:54 AM
All, sorry for the delay in responding. The forums didn't send me a notice of a reply.
"Too big" is dictated by how U-Boot is configured. There is an Answer Record on the topic here:
http://www.xilinx.com/support/answers/61332.html
01-18-2016 08:06 AM
Hello all,
If you hit the limit,
and then you have taken out whatever you added (assuming you use initramfs [via FIT]),
and if you rebuild and see:
[ALL ] arch/arm/kernel/built-in.o: In function `cpu_resume': [ALL ] arch/arm/kernel/hyp-stub.o:(.data+0x2e8): relocation truncated to fit: R_ARM_CALL against symbol `__hyp_stub_install_secondary' defined in .text section in arch/arm/kernel/built-in.o [ERROR] make[4]: *** [vmlinux] Error 1 [ERROR] make[3]: *** [sub-make] Error 2
delete 'build' AND 'images' folders in your project
I kept on hitting this compilation error even though I have taken out almost everything from rootfs.
It of course does NOT help to overcome the U-boot (zlib) uncompression failure @ boot time.
Im using
Ubuntu 12.04, petalinux 2014.4
04-20-2016 10:22 AM
I am having the same issue.
I want to have Qt libraries available for my built of PetaLinux.
Are there any way of addressing this issue?
05-27-2016 01:17 AM
Hello Everyone,
I am also facing same error while using rootfs of larger size in petalinux.
[ALL ] arch/arm/kernel/built-in.o: In function `cpu_resume': [ALL ] arch/arm/kernel/hyp-stub.o:(.data+0x2e8): relocation truncated to fit: R_ARM_CALL against symbol `__hyp_stub_install_secondary' defined in .text section in arch/arm/kernel/built-in.o [ERROR] make[4]: *** [vmlinux] Error 1 [ERROR] make[3]: *** [sub-make] Error 2 [
Please share how you have resolved this issue.
Thanks & Regards,
Krishna Dwivedi
05-27-2016 07:15 AM
You are trying to build a kernel that contains the rootfs. You need to build a standalone ramdisk if it exceeds a certain size. I don't know how you do this in petalinux but you should try search the forums since the reason for this problem has been discussed in some other threads.
jeff
06-05-2016 11:20 AM
it is extremely frustrating that with such a well known issue no one from Xilinx provided a well explained step by step solution for the petalinux-build size too big issue. when trying to evaluate the zynq for work to make a decision if it is the right platform for our product. it just make no sense !!
10-13-2017 02:33 PM
Still a problem in 2017.1
Okay, I will go ahead and save us all some time...
Still a problem in 2017.2, .3, .4, .5, .6, .7, ...
Eh... you get it.
Still a problem in 2018.1, .2, .3...
My $4000.00 ZCU102 won't do it, but my $50.00 Beagle Bone Black will.