07-25-2018 11:46 AM
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
07-25-2018 12:32 PM - edited 07-25-2018 12:33 PM
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.
09-21-2019 03:32 AM - edited 09-21-2019 09:00 AM
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?