cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
paul_yinka
Visitor
Visitor
1,766 Views
Registered: ‎02-27-2019

How to boot petalinux image with >1.5 GB root file system on both petalinux-qemu and sd card on zcu104 board

Hi,

I am having a problem with successfully booting large petalinux image with > 1.5 GB of root file system both on the petalinux- qemu and on ZCu104 board. Most of the solutions provided in petalinux tools documentation reference guide (v2019.1) on this forum (solutions for previous petalinux versions) have not worked for my case. Here is a breakdown of the petalinux configurations, and the corresponding boot results.

My rootfile system is very large due to adding provided packages from the petalinux-packagegroup set (opencv, qt5), couple of recipes (valgrind, boost, lapack, etc), building 2 new layers (meta-ros, meta-qt4), adding custom libraries (prebuilt, and built by petalinux), and image files to be added as well  

I am using the v2019.1 petalinux tool to build my linux image. the v2019.1 BSP file for creating my project was downloaded from the xilinx download page. 

petalinux-configuration

---------------------------------------------------------------------------------------------------------------

Image packaging confiuration ----> root file system type [selected INITRAMFS]

subsystem AUTO Hardware settings ---> Advancd Bootable Image Storage Settings

 >boot image settings [selected primary flash]

> u-boot env partition settings  [selected primary flash]

> kernel image settings  [selected primary flash]

---------------------------------------------------------------------------------------------------------------

saved and built image successfully.

using the petalinux-boot command I get the following error

************************************************************************************

cmd: petalinux-boot --qemu --kernel 

terminal output (snap shot): qemu-boot.png file 

error: ---[ end Kernel panic - not syncing: write error ]---

****************************************************************

 

 booting built image on the zcu104 board

*************************************************************

- packaged petalinux image and copied BOOT.BIN and image.ub to FAT32 partition of sd card

- set the mode pins on the zcu104 to sdboot mode 

- switched on the board

error:  ---[ end Kernel panic - not syncing: write error ]---

***********************************************************************

the folowing fixes have been tried out

#######################################################

1. modified CONFIG_SYS_BOOTM_LEN in platform-top.h file as directed in the petalinux documentation to value larger than kernel image (> 1.5 GB) and undefined CONFIG_SYS_BOOTMAPSZ 

2. modified netboot offset to thesame CONFIG_SYS_BOOTM_LEN value in the platform-top.h file under u-boot configuration settings option in petalinux-config

#############################################################

 

Modified petalinux configuration to the following settings

---------------------------------------------------------------------------------------------------------------

Image packaging confiuration ----> root file system type [selected SD]

subsystem AUTO Hardware settings ---> Advancd Bootable Image Storage Settings

 >boot image settings [selected primary sd]

> u-boot env partition settings  [selected primary sd]

> kernel image settings  [selected primary sd]

---------------------------------------------------------------------------------------------------------------

 saved and built image.

booting on petalinux-qemu

************************************************************************************

cmd: petalinux-boot --qemu --kernel 

terminal output (snap shot): qemu-boot-sd.png file 

error:  Waiting for root device /dev/mmcblk0p2...

****************************************************************

 

 booting built image on the zcu104 board

*************************************************************

- partitioned 16GB sd card into 4GB (FAT) partition, and remaining volume (ext4).

- sd card is a 16GB sdhc type  

- placed BOOT.BIN and image.ub in FAT32 partition and extracted rootfs.tar.gz to ext4 partition of the sd card

hangs at :

19.879976] ff010000.serial: ttyPS1 at MMIO 0xff010000 (irq = 42, base_baud = 2480158) is a xuartps
[ 19.925366] of-fpga-region fpga-full: FPGA Region probed
[ 19.992112] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[ 20.030069] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[ 20.034571] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[ 20.043211] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[ 20.057971] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[ 20.066210] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[ 20.073775] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[ 20.095154] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[ 20.097658] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[ 20.108849] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[ 20.131834] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[ 20.149868] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[ 20.164140] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[ 20.172843] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[ 20.192158] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[ 20.195176] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[ 20.208925] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success

***********************************************************************

    

tried the following fixes 

##############################################################

1. disabled INITRAMFS support option under the general setup in kernel confiuration settings [petalinx-config -c kernel]

2. enabled support for boot on SD in u-boot configuration settings [petalinux-config -c u-boot]

3.   modified system-user.dtsl file under <project-root>/../meta-user/recipe-bsp/device-tree/files. added the following lines 

&sdhci1{

             no-1-8-v;  

};

4. added bootargs to support rootfstype=ext4 in the system-user.dtsl file to reflect the kernel bootargs in petalinux-config 

###############################################################################

 

What am I not doing correctly or missing out. I have been trying to get this built image booted on both qemu and hardwrae platforms for weeks now. Pls soltion to tis problme will be greatly appreciated.

Thank you, 

Paul. 

qemu-boot-sd.PNG
qemu-boot.PNG
0 Kudos
15 Replies
simoneeic
Observer
Observer
1,621 Views
Registered: ‎02-11-2020

Hi,

Can you please tell me how did you built the meta-ros layer? What i did was:
1) downloaded the zeus branch of meta-ros from the github repo to <petalinux-directory>/project-spec/meta-ros
2) renamed the following directories to match the layer.conf dependencies:
    - meta-ros-common -> ros-common-layer
    - meta-ros1 -> ros1-layer
    - meta-ros1-melodic -> ros1-melodic-layer
3) Run petalinux-config → Yocto Settings → User Layers.
4) Enter the following:
    - ${proot}/project-spec/meta-ros/ros-common-layer
    - ${proot}/project-spec/meta-ros/ros1-layer
    - ${proot}/project-spec/meta-ros/ros1-melodic-layer
5) Save and exit.
6) Add the following line in <plnx-proj-root>/project-spec/meta-user/conf/user-rootfsconfig.
    - CONFIG_ros_1.14.8-1
7) Run petalinux-config -c rootfs.
 Select user packages → ros. Enable it, save and exit.
9) Run petalinux-build.
10) Move the generated image to a SD card and boot.

With the previous procedure, i included the ros_1.14.8-1.bb recipe which only has some of ros functionalities (it doesn't have roscore for example - see attachment for the contents of /opt/ros/melocic).
So, my question is which is the correct recipe to include? Is any of the steps mentioned wrong? 

Note: i tried other recipes like: packagegroup-ros-world, packagegroup-ros1-comm, packagegroup-ros-turtlebot3-core, packagegroup-ros1-industrial-core, packagegroup-ros-turtlebot3-extended, packagegroup-ros-world-melodic. But this recipes returned errors like:

ERROR: Nothing PROVIDES 'mesa' (but /home/simon/Workspace/Dev/MarsEB1XU3/Linux/Images/SD_BSP_RD_grayTDC_UIO_ROS/project-spec/meta-ros/ros1-melodic-layer/generated-recipes/moveit/moveit-ros-perception_1.0.2-1.bb DEPENDS on or otherwise requires it)
mesa was skipped: PREFERRED_PROVIDER_virtual/libgl set to mesa-gl, not mesa
NOTE: Runtime target 'industrial-trajectory-filters' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['industrial-trajectory-filters', 'moveit-ros-planning', 'moveit-ros-perception', 'mesa']
NOTE: Runtime target 'packagegroup-ros1-industrial-core' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-ros1-industrial-core', 'industrial-trajectory-filters', 'moveit-ros-planning', 'moveit-ros-perception', 'mesa']
ERROR: Required build target 'petalinux-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['petalinux-image-minimal', 'packagegroup-ros1-industrial-core', 'industrial-trajectory-filters', 'moveit-ros-planning', 'moveit-ros-perception', 'mesa']

Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project
ERROR: Nothing RPROVIDES 'python-pycryptodomex' (but /home/simon/Workspace/Dev/MarsEB1XU3/Linux/Images/SD_BSP_RD_grayTDC_UIO_ROS/project-spec/meta-ros/ros1-melodic-layer/generated-recipes/ros-comm/rosbag_1.14.5-1.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'python-pycryptodomex' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['python-pycryptodomex']
NOTE: Runtime target 'rosnode' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['rosnode', 'rostopic', 'rosbag', 'python-pycryptodomex']
NOTE: Runtime target 'packagegroup-ros1-comm' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-ros1-comm', 'rosnode', 'rostopic', 'rosbag', 'python-pycryptodomex']
ERROR: Required build target 'petalinux-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['petalinux-image-minimal', 'packagegroup-ros1-comm', 'rosnode', 'rostopic', 'rosbag', 'python-pycryptodomex']

Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project



LINUX BOOT:

root@EB1_MA-XU3-3EG-2I-D11:~# source /opt/ros/melodic/setup.bash
root@EB1_MA-XU3-3EG-2I-D11:~# which roscore
root@EB1_MA-XU3-3EG-2I-D11:~# which ros
root@EB1_MA-XU3-3EG-2I-D11:~# rospack
[rospack] Error: no command given.  Try 'rospack help'
root@EB1_MA-XU3-3EG-2I-D11:~# rospack help
USAGE: rospack <command> [options] [package]
  Allowed commands:
    help
    cflags-only-I     [--deps-only] [package]
    cflags-only-other [--deps-only] [package]
    depends           [package] (alias: deps)
    depends-indent    [package] (alias: deps-indent)
    depends-manifests [package] (alias: deps-manifests)
    depends-msgsrv    [package] (alias: deps-msgsrv)
    depends-on        [package]
    depends-on1       [package]
    depends-why --target=<target> [package] (alias: deps-why)
    depends1          [package] (alias: deps1)
    export [--deps-only] --lang=<lang> --attrib=<attrib> [package]
    find [package]
    langs
    libs-only-L     [--deps-only] [package]
    libs-only-l     [--deps-only] [package]
    libs-only-other [--deps-only] [package]
    list
    list-duplicates
    list-names
    plugins --attrib=<attrib> [--top=<toppkg>] [package]
    profile [--length=<length>] [--zombie-only]
    rosdep  [package] (alias: rosdeps)
    rosdep0 [package] (alias: rosdeps0)
    vcs  [package]
    vcs0 [package]
  Extra options:
    -q     Quiets error reports.

 If [package] is omitted, the current working directory
 is used (if it contains a package.xml or manifest.xml).

root@EB1_MA-XU3-3EG-2I-D11:~# ls /opt/ros/melodic/lib
gencpp                      libroslib.so
genmsg                      librospack.so
gennodejs                   librostime.so
genpy                       python2.7
libcpp_common.so            roslib
libroscpp_serialization.so
root@EB1_MA-XU3-3EG-2I-D11:~# ls /opt/ros/melodic/bin
catkin_find               catkin_topological_order  rospack
catkin_init_workspace     rosboost-cfg              rosrun
catkin_make               rosclean                  rosstack
catkin_make_isolated      roscreate-pkg             rosunit
catkin_test_results       rosmake
root@EB1_MA-XU3-3EG-2I-D11:~# ls /opt/ros/melodic/share
catkin                mk                    roscpp_traits
cpp_common            ros                   roscreate
gencpp                ros_environment       roslang
genmsg                rosbash               roslib
gennodejs             rosboost_cfg          rosmake
genpy                 rosbuild              rospack
message_generation    rosclean              rostime
message_runtime       roscpp_serialization  rosunit
root@EB1_MA-XU3-3EG-2I-D11:~# ls /opt/ros/melodic/
_setup_util.py    etc               local_setup.sh    setup.sh
bin               lib               local_setup.zsh   setup.zsh
env.sh            local_setup.bash  setup.bash        share
root@EB1_MA-XU3-3EG-2I-D11:~# ls /opt/ros/melodic/etc
catkin  ros
root@EB1_MA-XU3-3EG-2I-D11:~# ls /opt/ros/melodic/bin
catkin_find               catkin_topological_order  rospack
catkin_init_workspace     rosboost-cfg              rosrun
catkin_make               rosclean                  rosstack
catkin_make_isolated      roscreate-pkg             rosunit
catkin_test_results       rosmake
root@EB1_MA-XU3-3EG-2I-D11:~# ls /opt/ros/melodic/lib
gencpp                      libroslib.so
genmsg                      librospack.so
gennodejs                   librostime.so
genpy                       python2.7
libcpp_common.so            roslib
libroscpp_serialization.so
root@EB1_MA-XU3-3EG-2I-D11:~# ls /opt/ros/melodic/share
catkin                mk                    roscpp_traits
cpp_common            ros                   roscreate
gencpp                ros_environment       roslang
genmsg                rosbash               roslib
gennodejs             rosboost_cfg          rosmake
genpy                 rosbuild              rospack
message_generation    rosclean              rostime
message_runtime       roscpp_serialization  rosunit
root@EB1_MA-XU3-3EG-2I-D11:~# ros
-sh: ros: command not found
root@EB1_MA-XU3-3EG-2I-D11:~# rostime
-sh: rostime: command not found
root@EB1_MA-XU3-3EG-2I-D11:~# rosunit
Usage: rosunit [options] <file> [test args...]

rosunit: error: You must supply a test file.
root@EB1_MA-XU3-3EG-2I-D11:~# rosclean
usage: rosclean [-h] {check,purge} ...
rosclean: error: too few arguments
root@EB1_MA-XU3-3EG-2I-D11:~# rosrun
Usage: rosrun [--prefix cmd] [--debug] PACKAGE EXECUTABLE [ARGS]
  rosrun will locate PACKAGE and try to find
  an executable named EXECUTABLE in the PACKAGE tree.
  If it finds it, it will run it with ARGS.
root@EB1_MA-XU3-3EG-2I-D11:~# 



Best regards,
Simão Araújo

0 Kudos
paul_yinka
Visitor
Visitor
1,528 Views
Registered: ‎02-27-2019

Hi Simao, 

First I would guess your petalinux image is built from the 'ZEUS' yocto branch. Your meta-ros layer must be compactible with the yocto layer your image is built on.

 

STEPS to build your meta-ros layer. 

** steps 1 to 5 in your description are consistent with  what I did to get mine working, so I will take it from there. Although you might not neccesarily need to rename the layer ros layers before adding them to your 'USER LAYERS' in petalinx-config menu.

6.  each of meta-ros-common, meta-ros1, and meta-ros1-melodic have a  layer.conf file in  ../meta-ros*/conf path . open this file and look fo this line 

" LAYERSERIES_COMPAT_ros*-layer = "${ROS_OE_RELEASE_SERIES}"   "                       {* means either  -common / 1 / 1-melodic}

before this line above ensure you have this line : " ROS_OE_RELEASE_SERIES := "branch" "       { here branch is either zeus or thud or ....}

7. save file(s).

8.  open layer.conf in this path  '../project-spec/meta-user/conf'  and ensure you have this line: "LAYERSERIES_COMPAT_meta-user = "branch"  " 

9. save file

10. Most of the ros recipes (packages) are in this path  '../project-spec/meta-ros.meta-ros1-melodic/generated-recipes '. To build these ros packages you will need to add each to "petalinux-image-full.bbappend" file located in this path   '../project-spec/meta-user/recipe-core/images/ ' . Add each package to be built like this below:

- adding all ros packages built and added to my linux rootfs.

************************************************************* (Note the space between the left quote and the  recipe name)

IMAGE_INSTALL_append = " catkin"
IMAGE_INSTALL_append = " cmake-modules"
IMAGE_INSTALL_append = " gencpp"
IMAGE_INSTALL_append = " ros"
IMAGE_INSTALL_append = " rosparam"
IMAGE_INSTALL_append = " rosbuild"
IMAGE_INSTALL_append = " rospack"
IMAGE_INSTALL_append = " rosgraph"
IMAGE_INSTALL_append = " rosgraph-msgs"
IMAGE_INSTALL_append = " ros-environment"
IMAGE_INSTALL_append = " rosbash"
IMAGE_INSTALL_append = " rosmake"
IMAGE_INSTALL_append = " rosboost-cfg"
IMAGE_INSTALL_append = " roslib"
IMAGE_INSTALL_append = " roscreate"
IMAGE_INSTALL_append = " rosclean"
IMAGE_INSTALL_append = " rosunit"
IMAGE_INSTALL_append = " roslang"
IMAGE_INSTALL_append = " roscpp"
IMAGE_INSTALL_append = " rosout"

IMAGE_INSTALL_append = " roscpp-serialization"
IMAGE_INSTALL_append = " roscpp-traits"
IMAGE_INSTALL_append = " rostest"
IMAGE_INSTALL_append = " rosservice"
IMAGE_INSTALL_append = " rostopic"
IMAGE_INSTALL_append = " rospy"
IMAGE_INSTALL_append = " ros-comm"
IMAGE_INSTALL_append = " rosconsole"
IMAGE_INSTALL_append = " rosconsole-bridge"
IMAGE_INSTALL_append = " rosgraph-msgs"
IMAGE_INSTALL_append = " rosnode"
IMAGE_INSTALL_append = " roslaunch"
IMAGE_INSTALL_append = " rosmaster"
IMAGE_INSTALL_append = " roswtf"
IMAGE_INSTALL_append = " rosbag-storage"
IMAGE_INSTALL_append = " rosbag"
IMAGE_INSTALL_append = " rosmsg"
IMAGE_INSTALL_append = " rostime"
IMAGE_INSTALL_append = " roslz4"
IMAGE_INSTALL_append = " genmsg"
IMAGE_INSTALL_append = " message-runtime"
IMAGE_INSTALL_append = " std-msgs"
IMAGE_INSTALL_append = " xmlrpcpp"
IMAGE_INSTALL_append = " std-srvs"
IMAGE_INSTALL_append = " message-filters"
IMAGE_INSTALL_append = " gennodejs"
IMAGE_INSTALL_append = " cpp-common"
IMAGE_INSTALL_append = " message-generation"
IMAGE_INSTALL_append = " topic-tools"
IMAGE_INSTALL_append = " mk"
IMAGE_INSTALL_append = " genpy"
IMAGE_INSTALL_append = " roscpp-core"
IMAGE_INSTALL_append = " sensor-msgs"
IMAGE_INSTALL_append = " geometry-msgs"
IMAGE_INSTALL_append = " common-msgs"
IMAGE_INSTALL_append = " dynamic-reconfigure"
IMAGE_INSTALL_append = " cv-bridge"

*******************************************************************************************

11. save file 

12. open  ' petalinux-config -c rootfs' , select ' user packages ' , and check the boxes of the newly added recipes to built with your linux image. 

13. save and exit

14. build your project - ' petalinux-build '

That should build your image. 

*** Note: to add your built ros packages path to your environment, use either setup.sh or setup.csh script depending on your usage, and since you are using a bash shell. 

 you can read further i=on this  " https://unix.stackexchange.com/questions/360520/difference-between-sh-and-csh "

 

****** In case have any errors like the one you have posted above during build stage. This is dependency based error, for instance you error is saying that ' python-pycryptodumex '  is missing and needs to be buil first. You can do the following:

a.  check this link for any  petalinux recipes (openembedded-based) to see if it is available. " http://layers.openembedded.org/layerindex/branch/master/recipes/ "   

type the recipe name in the search box. The path to the recipe in the yocto layers location can be used o navigate to the location of the recipe in your local yocto layers path.

 

b. If it's available, follow steps 10 to 14  as described above. If not then you can either build from source following the steps listed in the petalinx user-guide documentation, or build the package after booting your image (hopefully the pakages is not an important dependency in your layer-recipes build).

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I hope these information helps in resolving your problem. Let me know if it works. 

 

You take care.

Paul.

 

simoneeic
Observer
Observer
1,447 Views
Registered: ‎02-11-2020

Hi @paul_yinka, thanks a lot for your help! I was able to build a ros image successfully. So here are some notes (please read all notes before trying this method as you will most likely face the same error noted below):

  • Yes as my petalinux is built from the zeus branch i had also downloaded the meta-ros package from the zeus branch with: $git clone -b zeus https://github.com/ros/meta-ros.git
  • Steps 1 to 5 worked for me and, as you said, i didn't need to rename the ros layers as i had suggested in step 2.
  • From your steps, i didn't need steps 6 to 9. I did not try these steps because surely the 'zeus' value has to be imported from another file to the local.conf files.
  • From step 10 i used the same ros packages as you did but, in version 2020.1 of petalinux the method to append root file system packages is a little different. So instead, i had to look for this file: <plnx-proj-root>/project-spec/meta-user/conf/user_rootfsconfig and, append packages like this: CONFIG_catkin (catkin being the package to add). Repeat the same for all packages you referred.
  • Your error resolution method was really helpful because following these steps i had the same 'python-pycryptodumex' error as before. So i followed your error guidelines and i was able to fix the issue by adding: CONFIG_python-pycryptodomex to the <plnx-proj-root>/project-spec/meta-user/conf/user_rootfsconfig file in the line above CONFIG_catkin. I didn't need to download any missing recipes because ros already contains the python-pycryptodumex recipe. Then just follow your steps from 11 to 14.

With these notes anyone should be able to build the meta-ros package.
I hope this was helpful.

Take care. Best regards,
Simão Araújo

0 Kudos
ivanadu
Visitor
Visitor
1,073 Views
Registered: ‎01-26-2020

Hi,

Thanks for you inputs. I have also been using 2020.1 but when I execute petalinux-build I get this error message:

WARNING: No recipes available for:
/home/xxx/workspace/rosproject/project-spec/meta-ros/meta-ros-common/recipes-support/spdlog/spdlog_1.5.0.bbappend
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'catkin' (but /home/xxx/workspace/rosproject/components/yocto/layers/meta-petalinux/recipes-core/images/petalinux-image-minimal.bb RDEPENDS on or otherwise requires it)

Is there any other package that has to added/installed?

Thanks!

0 Kudos
deepg799
Explorer
Explorer
955 Views
Registered: ‎01-20-2019

Hi @paul_yinka 

Can you please tell which petalinux version you used to validate the ROS as you mentioned in the above procedure?

0 Kudos
paul_yinka
Visitor
Visitor
936 Views
Registered: ‎02-27-2019

Hello, 

The warning message is notifying that spdlog_1.5.0 package could not be found. You can check this link http://layers.openembedded.org/layerindex/branch/master/recipes/?q=spdlog to confirm the package exists, I am using  v2019.1 petalinux dev. tool, so not sure if the method of appending packages to petalinux-image-full.bbappend is still consistent. If waning persists, then you can install the package from source following the steps in the petalinux user guide for your version.

 

For the Error, check the "generated-recipes" sub-directory under "meta-ros1-melodic" directory to see if catkin package (.bb file) is there, then append it to petalinux-image-full.bbappend file. (be sure to have compatible meta-ros branch downloaded)

 

I hope this is helpful. 

0 Kudos
paul_yinka
Visitor
Visitor
935 Views
Registered: ‎02-27-2019

Hi @deepg799

I basically booted the complete image (with the root file system) on a zcu104 board, and verified that he needed binaries and lib files are present. I tested with a simple program that publishes on and subcribes  to a ros-topic. Starting "roscore" will indicate you have a working ros package.

deepg799
Explorer
Explorer
902 Views
Registered: ‎01-20-2019

Hi @paul_yinka 

Thanks for the update.

Here my question is which petalinux version toolkit you used to compiled the ros layers?

Because when we are following your steps mentioned above, we are getting the issue 'failed to create workspcae' after adding the user layers in petalinx-config menu.

We have tried 2019.2 and 2020.2 and getting the same issue. petalinux is failing to add the user layers. the and we also tried both the branches 'thud' and 'zeus' but getting same issue.

0 Kudos
simoneeic
Observer
Observer
878 Views
Registered: ‎02-11-2020

Hi @deepg799,

In my case i used PetaLinux Tools 2020.1 and the branch is 'zeus'. You have to pay attention to the order in which you insert each layer. Some layers depend on others, so they need to be added after their dependencies. This is the order in which I have inserted the ROS layers for the melodic version:

${proot}/project-spec/meta-ros/meta-ros-common
${proot}/project-spec/meta-ros/meta-ros-backports-dunfell
${proot}/project-spec/meta-ros/meta-ros1
${proot}/project-spec/meta-ros/meta-ros1-melodic

 You can check each layer's dependencies here. For instance, meta-ros1-melodic has its dependencies here.

You can check the following file to see the default dependencies that are added by PetaLinux and you can also check the user layers inserted after petalinux-config. You can even insert them manually in this file instead of using the petalinux-config command.

simoneeic_0-1615459137652.png


Best regards,
Simão Araújo

paul_yinka
Visitor
Visitor
833 Views
Registered: ‎02-27-2019

@deepg799 

v2019.1. It's possible there might be some variations with adding layers in your petalinux version.  

deepg799
Explorer
Explorer
651 Views
Registered: ‎01-20-2019

Hi @simoneeic and @paul_yinka 

Thanks for your support.

I added the meta-ros layers to the petalinux project by considering there dependency as you mentioned above.

I am struggling with the following error which comes after executing the petalinux-build command.

root@root:~/Projects_2020_2/7EV/7EV_zynqmp-iwg30m$ petalinux-build
INFO: Sourcing build tools
[INFO] Building project
[INFO] Sourcing build environment
[INFO] Generating workspace directory
INFO: bitbake petalinux-image-minimal
Parsing recipes: 100% |######################################################################################################################################################################| Time: 0:01:28
Parsing of 4928 .bb files complete (0 cached, 4928 parsed). 6257 targets, 726 skipped, 1 masked, 0 errors.
WARNING: No recipes available for:
//project-spec/meta-user/recipes-core/packagegroups/petalinux-imagefull.bbappend
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'gstreamer1.0-plugins-bad' (but //7EV/7EV_zynqmp-iwg30m/components/yocto/layers/core/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.1.bb DEPENDS on or otherwise requires it)
gstreamer1.0-plugins-bad was skipped: Recipe is blacklisted: depends on faad2 which has a restricted license not whitelisted in LICENSE_FLAGS_WHITELIST
NOTE: Runtime target 'gstreamer1.0-omx' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['gstreamer1.0-omx', 'gstreamer1.0-plugins-bad']
ERROR: Required build target 'petalinux-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['petalinux-image-minimal', 'gstreamer1.0-omx', 'gstreamer1.0-plugins-bad']

Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project

Temporary fix for the above issue:

  • The issue can be solve if I command the following line in the project-spec/meta-ros/meta-ros-common/conf/ros-distro/include/ros-world-recipe-blacklist.inc

#PNBLACKLIST[gstreamer1.0-plugins-bad] ?= "${@bb.utils.contains('ROS_WORLD_SKIP_GROUPS', 'world-license', 'depends on faad2 which has a restricted license not whitelisted in LICENSE_FLAGS_WHITELIST', '', d)}"
#PNBLACKLIST[gstd] ?= "${@bb.utils.contains('ROS_WORLD_SKIP_GROUPS', 'world-license', 'depends on gstreamer1.0-plugins-bad which depends on faad2 which has a restricted license not whitelisted in LICENSE_FLAGS_WHITELIST', '', d)}"
#PNBLACKLIST[gst-shark] ?= "${@bb.utils.contains('ROS_WORLD_SKIP_GROUPS', 'world-license', 'depends on gstreamer1.0-plugins-bad which depends on faad2 which has a restricted license not whitelisted in LICENSE_FLAGS_WHITELIST', '', d)}"

After commenting the above lines, I am able to build the project successfully and run the ros commands for validation.

Do you have any input on the same why the above lines are creating the issue?

Thank you in advance.

0 Kudos
ivanadu
Visitor
Visitor
610 Views
Registered: ‎01-26-2020

Hello Simao,

I have just noticed that you resolved it the same way by adding dunfell layer.

Thank you all for your support.

Regards,

Ivana

0 Kudos
ivanadu
Visitor
Visitor
609 Views
Registered: ‎01-26-2020

Hi,

I had the same issue in 2020_2. Since I do not need gstreamer for now, I disabled it in petalinux packages in petalinux -c rootfs. and also in user packages.

I hope this helps.

Regards,

Ivana

paul_yinka
Visitor
Visitor
594 Views
Registered: ‎02-27-2019

Hi @deepg799 

gstreamer plugins can be added by adding packagegroup-petalinux-gstreamer (under petalinux pckage groups, when you run "petalinux-config -c rootfs" ) to your image build. 

Tha should solve the dependency problem. 

AdriMenc
Newbie
Newbie
229 Views
Registered: ‎04-20-2021

Hi, 

I am facing the same issue and am struggling to find a solution:

After petalinux-build (2020.1 peta) and addition of the meta-ros layer and packagegroup-petalinux-gstreamer to the project, I obtain the 2 same errors as @deepg799 (Missing or unbuildable dependency chain was: ['petalinux-image-minimal', 'packagegroup-petalinux-gstreamer', 'gstd'])

When disabling Gstreamer as @ivanadu suggested, the build process is completed correctly but I do need the package for the project. 

Adding the in the lines proposed by @deepg799 in project-spec/meta-ros/meta-ros-common/conf/ros-distro/include/ros-world-recipe-blacklist.inc does not do the trick. 

Any help would be appreciated. 

Thank you in advance. 

Regards, 

Adrien 

0 Kudos