We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Registered: ‎01-10-2019

32 bit libs for PetaLinux


I run a PetaLinux on a Zynq ZCU104 Kit. Everything is 64 bit.

I have an embedded program which runs on top of Posix, however it needs to be 32 bit.

And it needs to link against 32 bit libraries. So I need them usable next to their 64 bit siblings.

How can I compile the PetaLinux libs for 32 bit?

Or can I generate an entire image running only 32 bit?


Thanks in advance,


0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
Registered: ‎02-07-2018

Re: 32 bit libs for PetaLinux

Hi @nilsmontenegro

Follow bellow steps to build rootfs in PetaLinux with multilib support to use a 32-bit application on Zynq UltraScale+ MPSoC.


1. Create a PetaLinux project for your HW and enable the boot mode:


 1. Add the following to <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf


DISTRO_FEATURES_remove = "xen"

require conf/multilib.conf



2. Add 32 bit applications and packages(For example we have added cpio, util-linux, file packages) you need as shown below <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf

IMAGE_INSTALL_append = "lib32-cpio lib32-util-linux lib32-file"


3. When you create apps from petalinux using the command. 

$ petalinux-create t apps --name sampleapp


which adds an entry in <plnx-proj-root>/project-spec/meta-user/recipes-core/images/petalinux-user-image.bbappend as mentioned below for 64-bit

IMAGE_INSTALL_append = "sampleapp"


You need to modify this as mentioned below for 32-bit and enable this apps from petalinux-config -c rootfs ---> user packages ---> [*]lib32-sampleapp

IMAGE_INSTALL_append = "lib32-sampleapp"


4. Remove the cache and tmp from your build directory and re-build the project

5. petalinux-build


For your reference :




Thanks & regards


Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.


0 Kudos
Registered: ‎01-10-2019

Re: 32 bit libs for PetaLinux


Thanks for the answer, I tried it during that week. I didn't get to the goal jet.

It increased the compile time from half an hour to 4 hours (why?), so it's hard to try out things.

Also it ends in an error message

checking for "gbm >= 10.2.0"... no
configure: error: Glamor for Xorg requires gbm >= 10.2.0

Which are grafical libraries as far as I know. They are not really needed.in our embedded settings with a serial terminal.

They come after this command:

NOTE: Running ../xorg-server-1.19.3/configure  --build=x86_64-linux


I thought I deactivated xorg-server whith petalinux-config -c rootfs

What to do?




UPDATE: I saw that libdrm was still activated, it might have dragged in X11 stuff. I deactivated it and am recompiling the stuff now. Let's hope it helps. I am confused anyway, because the error did not happen before I tried to compile 32 bit libs.

These are the 32 bit libs I included: lib32-glibc lib32-libgcc lib32-libstdc++


UPDATE 2: Excluding libdrm didn't help. The error message is:


ERROR: xserver-xorg-2_1.19.3-r0 do_configure: configure failed

[lot's of log]

checking for "gbm >= 10.2.0"... no
configure: error: Glamor for Xorg requires gbm >= 10.2.0


0 Kudos