cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,309 Views
Registered: ‎05-29-2018

Adding development packages to petalinux for zcu102

I was able to build a petalinux image and boot.bin for my IP using IP.hdf file.

 

Once this is built, I was able boot using the same.

 

Now, with this I do not see basic linux packages such as gcc, make, sudo.

I tried installing gcc with sudo apt-get install command but it says sh: sudo command not found.

 

Can someone please help how to get these packages which will help us build the applications?

 

Thanks and Regards

-Darshan

Tags (3)
0 Kudos
3 Replies
Highlighted
Explorer
Explorer
1,295 Views
Registered: ‎03-22-2016

Petalinux is different from other Linux distributions. With a normal desktop or server distribution, you'd install some base image, boot it up, then start making changes. Configuration changes, install new packages, etc.

 

With Petalinux, you do all of that configuration and package selection *before* you install. You have a host development machine that you install Vivado and Petalinux on, and you use those to configure and build (cross-compile) a root filesystem image for the target system. The installation is now done, you just have to put that image on the target.

It takes a little getting used to that paradigm change, but there are a lot of advantages to it.

 

To install a new package in Petalinux, on the development machine in the petalinux project, run petalinux-config -c rootfs. From there, you can pick packages to include in your root filesystem image. Rebuild the root filesystem image, drop it on the SD card for the ZCU102 and boot it up. You don't actually need GCC and development packages ON the ZCU102 - you need them on your development machine to build the software that will be run on the ZCU102.

 

As for sudo, it doesn't exist because there's no need for it. By default, there's only a root user.

Highlighted
Explorer
Explorer
1,278 Views
Registered: ‎01-24-2018

When you do get that root login working, run the adduser command.

Add yourself as a user. Then when you are you, simply su to root.

0 Kudos
Highlighted
Observer
Observer
671 Views
Registered: ‎11-23-2018

Hi,

thanks for your explanation.

How can I add packages that are not listed at the filesystem packages?

As an example, I managed to include node.js (by :Add IMAGE_INSTALL_append = " nodejs" project-spec/meta-user/recipes-core/images/petalinux-image-full.bbappend),

but would also need to install auxiliary libraries such as  "discovery-swarm, dat-swarm-defaults and get-port" but it does not work the same way.

On Ubuntu, they are available through "npm":

npm i --save discovery-swarm dat-swarm-defaults get-port

Can you please help?

Best regards!

 

 

0 Kudos