cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,164 Views
Registered: ‎06-22-2018

How to build a minimal PetaLinux image?

Jump to solution

I have built an PetaLinux image with Xen package following the reference guide, but I find it takes too much time to boot. It may contains many components I am not interested in.

So, how to build a minimal PetaLinux image? Should I manually select components that I need?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
1,182 Views
Registered: ‎04-24-2017

Re: How to build a minimal PetaLinux image?

Jump to solution

Hi @hduhxc,

 

When you create a petalinux project by default it comes with minimal packages as listed below.

 

IMAGE_INSTALL = "\
		kernel-modules \
		mtd-utils \
		canutils \
		openssh-sftp-server \
		pciutils \
		run-postinsts \
		udev-extraconf \
		packagegroup-core-boot \
		packagegroup-core-ssh-dropbear \
		tcf-agent \
		bridge-utils \
		hellopm \
		"

If you need additional packages to be included then run below command and select the required packages.

 

$ petalinux-config -c rootfs
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
Highlighted
Moderator
Moderator
1,183 Views
Registered: ‎04-24-2017

Re: How to build a minimal PetaLinux image?

Jump to solution

Hi @hduhxc,

 

When you create a petalinux project by default it comes with minimal packages as listed below.

 

IMAGE_INSTALL = "\
		kernel-modules \
		mtd-utils \
		canutils \
		openssh-sftp-server \
		pciutils \
		run-postinsts \
		udev-extraconf \
		packagegroup-core-boot \
		packagegroup-core-ssh-dropbear \
		tcf-agent \
		bridge-utils \
		hellopm \
		"

If you need additional packages to be included then run below command and select the required packages.

 

$ petalinux-config -c rootfs
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

0 Kudos
Highlighted
Scholar
Scholar
1,066 Views
Registered: ‎06-10-2008

Re: How to build a minimal PetaLinux image?

Jump to solution

That is the minimum you will get, but it is more than the minimum required to boot linux, which is what I would call minimal.

 

What would a system that does not natively have a PCI bus want with pciutils?

 

And I suspect most systems will have the CAN controllers turned off as well.

 

What if you even turn off both ethernet controllers?

 

So the real question is what to do if you want less packages?

0 Kudos
Highlighted
Moderator
Moderator
1,049 Views
Registered: ‎04-24-2017

Re: How to build a minimal PetaLinux image?

Jump to solution

Hi @vanmierlo,

 

 

If you don't have PCI configured then when you run pciutils it scans and doesn't list any bus.

 

If you turn off both ethernet controller you can't use network especially if you are using tftpboot then you need to enable ethernet controller.

 

If you want to remove the packages just disable it as show below.

 

 

$ petalinux-config - c rootfs 

Filesystem Packages  → console  → utils  → pciutils
Filesystem Packages  → console  → network  → canutils 
Filesystem Packages  → misc  → tcf-agent

In <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf add this variable to remove dropbear as it is part of core-image.bbclass

 

PACKAGE_EXCLUDE += "packagegroup-core-ssh-dropbear"

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------