cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,187 Views
Registered: ‎06-20-2016

Petalinux 2018.2: How to disable unwanted binaries in rootfs for minimum image size?

Jump to solution

Hello,

we would like to create a minimal image with Petalinux 2018.2. We noticed that quite a few binaries and libraries are installed into the rootfs even though we never opted to install them. Example for this are:

* /usr/bin/python3.5
* /usr/bin/perl5.24.1
* /usr/lib/libX11.so.6.3.0
* ... and many more

Of course, we have deselected these components via

petalinux-config -c rootfs

Generated files look ok (e.g. project-spec/configs/rootfs_config has python3 as "not set"; project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb has no mentioning of python; etc.)

Any ideas of how to remove these unwanted binaries from the rootfs?

Also, is there a way to see the dependencies between recipes? Any way to configure Petalinux to use the petalinux-image-minimal instead of the petalinux-image-full?

Thank you very much in advance!

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
1,104 Views
Registered: ‎06-20-2016

I kind of found a partial answer to my original question. So it is possible to modify the

./project-spec/meta-user/conf/petalinuxbsp.conf

and add something like:

PACKAGE_EXCLUDE = " perl"

However, in my case, this results in build failures such as:

Last metadata expiration check: 0:00:00 ago on Wed Jan 30 09:55:27 2019.
Error:
 Problem: conflicting requests
  - nothing provides perl needed by i2c-tools-misc-3.1.2-r0.aarch64

ERROR: petalinux-user-image-1.0-r0 do_rootfs: Function failed: do_rootfs

So I now know that perl is installed because of i2c-tools-misc. python3 is installed because of gdb.

Still one question remains: is there a better way to display package dependencies than removing a package and checking why the build fails?

Thanks in advance!

View solution in original post

0 Kudos
3 Replies
Highlighted
Observer
Observer
1,139 Views
Registered: ‎06-20-2016

Hello again,

anyone has experience with this? Is there any further information required to comment on this topic?

Should it in theory be possible to completely disable python3, perl, etc. in Petalinux? Or is this use case only possible with a custom Yocto build?

Thank you very much in advance!

0 Kudos
Highlighted
Observer
Observer
1,105 Views
Registered: ‎06-20-2016

I kind of found a partial answer to my original question. So it is possible to modify the

./project-spec/meta-user/conf/petalinuxbsp.conf

and add something like:

PACKAGE_EXCLUDE = " perl"

However, in my case, this results in build failures such as:

Last metadata expiration check: 0:00:00 ago on Wed Jan 30 09:55:27 2019.
Error:
 Problem: conflicting requests
  - nothing provides perl needed by i2c-tools-misc-3.1.2-r0.aarch64

ERROR: petalinux-user-image-1.0-r0 do_rootfs: Function failed: do_rootfs

So I now know that perl is installed because of i2c-tools-misc. python3 is installed because of gdb.

Still one question remains: is there a better way to display package dependencies than removing a package and checking why the build fails?

Thanks in advance!

View solution in original post

0 Kudos
Highlighted
Contributor
Contributor
72 Views
Registered: ‎12-21-2018

Would be interested too !! Some packages are obviously built according to distro features enabled (see my post https://forums.xilinx.com/t5/Embedded-Linux/How-to-prevent-GTK-X11-Wayland-packages-to-be-built-for-image/td-p/1175974)

0 Kudos