cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
4,584 Views
Registered: ‎12-12-2013

SYSROOTS folder empty after Petalinux 2018.2 build

Hi all,

 

Migrating from Petalinux 2017.3 to 2018.2.

I've successfully managed to build and package boot images and filesystem.

However the ${TMPDIR}/tmp/sysroots/ folder appears to be empty after the build.

 

Any suggestions?

Many thanks!

 

 

Tags (1)
0 Kudos
14 Replies
Highlighted
Moderator
Moderator
4,566 Views
Registered: ‎09-12-2007

Re: SYSROOTS folder empty after Petalinux 2018.2 build

can you try petalinux-build -x do_populate_sysroot

0 Kudos
Highlighted
Visitor
Visitor
4,560 Views
Registered: ‎12-12-2013

Re: SYSROOTS folder empty after Petalinux 2018.2 build

Thanks for your reply.

I had tried that before with the following error:

 

$ petalinux-build -x do_populate_sysroot
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image -c do_populate_sysroot
Loading cache: 100% |######################################################################################################| Time: 0:00:00
Loaded 3438 entries from dependency cache.
Parsing recipes: 100% |####################################################################################################| Time: 0:00:04
Parsing of 2553 .bb files complete (2515 cached, 38 parsed). 3442 targets, 139 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Task do_populate_sysroot does not exist for target petalinux-user-image (/zcu106_bsp/project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb:do_populate_sysroot). Close matches:
  do_populate_sysroot_setscene
  do_populate_sdk
  do_populate_sdk_ext
ERROR: Command execution failed: 1

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

 

0 Kudos
Highlighted
Observer
Observer
4,447 Views
Registered: ‎06-07-2018

Re: SYSROOTS folder empty after Petalinux 2018.2 build

Hi, I am facing the same issues. Any luck over your side?

0 Kudos
Highlighted
Moderator
Moderator
4,442 Views
Registered: ‎12-04-2016

Re: SYSROOTS folder empty after Petalinux 2018.2 build

Hi

 

This is a yocto build standard wherein starting from Yocto's Rocko branch, files in sysroot are not created in this path.
(Since petalinux 2018.1 and 2 are based on yocto's rocko branch, you are also not seeing this)

 

Could you please try these commands:-

petalinux-build -s

petalinux-package --sysroot

 

please see UG1144 for exactness of commands

Highlighted
Observer
Observer
4,435 Views
Registered: ‎06-07-2018

Re: SYSROOTS folder empty after Petalinux 2018.2 build

Thanks for the clarification.

 

I think the reason why we are looking for sysroot is because the documentation indicates so. I guess the doc may require updates. 

Since there is no sysroot generated, what should we set for the Xilinx SDK->New Application Project->Linux->A53Core->Linux System Root and ToolChain textfields?

 

Is it not necessary? And if not necessarily, how do we link the BSP into the C++ application for development? Pardon me as i am still a newbie.

 

I understand that the BSP (ZCU102) is build into the Petalinux using petalinux-create <BSP>. However where does the 'link-up' between the BSP and Linux C++ application comes in? I always thought that application development have to be based upon a BSP-compiled SDK?

Highlighted
4,339 Views
Registered: ‎02-22-2018

Re: SYSROOTS folder empty after Petalinux 2018.2 build

Hello,

 

When I use "petalinux-build -s" or "petalinux-build --sdk" commands, what I get is an unbelievable 62GB folder size for a single project. For 2017.4 the size was > 5GB which is still big for a single project.

 

Although what we need is only SYSROOT folder (which its path is still not clear to me in this huge folder), I found myself waiting for hours long compilation of some compilers for for the target platform which I have no intension to use.

 

Has anybody an idea about this problem?

Highlighted
Observer
Observer
4,284 Views
Registered: ‎05-14-2018

Re: SYSROOTS folder empty after Petalinux 2018.2 build

#2018.2

#Run the following:

petalinux-build --sdk
petalinux-package --sysroot

#sysroots is located here:
<petalinux_project>/images/linux/sdk/sysroots/<architecture>

0 Kudos
Highlighted
Adventurer
Adventurer
4,014 Views
Registered: ‎08-10-2018

Re: SYSROOTS folder empty after Petalinux 2018.2 build

Hello thebied,

 

When I tried `petalinux-build --sdk` I get the following output:

$ petalinux-build --sdk
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image -c do_populate_sdk
Loading cache: 100% |################################################################################################| Time: 0:00:00
Loaded 3437 entries from dependency cache.
Parsing recipes: 100% |##############################################################################################| Time: 0:00:03
Parsing of 2552 .bb files complete (2514 cached, 38 parsed). 3441 targets, 139 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###########################################################################################| Time: 0:00:13
Checking sstate mirror object availability: 100% |###################################################################| Time: 0:00:37
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: nativesdk-nspr-4.16-r0 do_package: debugsrc symlink fixup failed with exit code 2 (cmd was find /home/cpb/xilinx/xilinx-zcu104-2018.2/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-nspr/4.16-r0/package/usr/src/debug -type l -print0 -delete | sed s#/home/cpb/xilinx/xilinx-zcu104-2018.2/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-nspr/4.16-r0/package/usr/src/debug/##g | (cd '/home/cpb/xilinx/xilinx-zcu104-2018.2/build/tmp/work/x86_64-nativesdk-petalinux-linux' ; cpio -pd0mL --no-preserve-owner '/home/cpb/xilinx/xilinx-zcu104-2018.2/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-nspr/4.16-r0/package/usr/src/debug' 2>/dev/null))
ERROR: nativesdk-nspr-4.16-r0 do_package: Function failed: split_and_strip_files
ERROR: Logfile of failure stored in: /home/cpb/xilinx/xilinx-zcu104-2018.2/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-nspr/4.16-r0/temp/log.do_package.16794
ERROR: Task (virtual:nativesdk:/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/recipes-support/nspr/nspr_4.16.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5267 tasks of which 4599 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  virtual:nativesdk:/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/recipes-support/nspr/nspr_4.16.bb:do_package
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project

I am in the same boat as nenghan above, I need the sysroots folder to be populated because of the Xilinx SDK requiring the files that normally live there when following the procedure in UG1186, page 17.

 

None of the workarounds in this thread have worked.  Can someone at Xilinx please provide a way to build a complete OpenAMP project with linux on the A53 and libmetal on the R5?

 

0 Kudos
Highlighted
Moderator
Moderator
4,001 Views
Registered: ‎05-10-2017

Re: SYSROOTS folder empty after Petalinux 2018.2 build

Your issue looks like the one from this forum thread

https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-2018-2-SDK-generation-error/m-p/882014/thread-id/28009?device-view=desktop

To "fix it" for me was to make sure my working directory was the real path ( cd `readlink -f .`), not the symbolic path, when creating the project.

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Adventurer
Adventurer
3,637 Views
Registered: ‎08-10-2018

Re: SYSROOTS folder empty after Petalinux 2018.2 build

I removed my symlink for my xilinx storage directory.  (and created a `cdx` alias)

I started over from the beginning, creating a new PetaLinux project for the ZCU104.

Following this procedure, I was able to create the sysroots:

petalinux-create -t project -s ~/Documents/xilinx/BSPs/xilinx-zcu104-v2018.2-final.bsp
cd xilinx-zcu104-2018.2/
petalinux-build 
petalinux-config -c rootfs
petalinux-build -c rootfs
petalinux-build -s
petalinux-package --sysroot

Step 5 on page 17 of UG1186 fails to link, but that's an issue for another thread.

 

0 Kudos
Highlighted
Explorer
Explorer
3,625 Views
Registered: ‎10-09-2017

Re: SYSROOTS folder empty after Petalinux 2018.2 build

My petalinux 2018.2 is fine. I boot it from SD, then I boot from qspi.

You should talk about your program for all. esp: petalinux-package

0 Kudos
Highlighted
Adventurer
Adventurer
3,601 Views
Registered: ‎08-10-2018

Re: SYSROOTS folder empty after Petalinux 2018.2 build

I can get PetaLinux to boot on the ZCU104 just fine.

It's the OpenAMP Demo from UG1186 that's giving me grief.

 

This thread is about the sysroots directory.  The workaround given in the thread fixes the sysroots issue.

 

0 Kudos
Highlighted
Adventurer
Adventurer
3,407 Views
Registered: ‎09-15-2008

Re: SYSROOTS folder empty after Petalinux 2018.2 build

Hi Nenghan,
I'm wondering if you solved your problem, that is what to use as sysroot and toolchain for application development.
I've been able to generate the sdk following the instructions in this thread (petalinux-build --sdk ; petalinux-package --sysroot). However when I use the generated sysroot (<petalinux_project>/images/linux/sdk/sysroots/<architecture>) in Xilinx SDK I get the following errors :
/opt/Xilinx/SDK/2018.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/7.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/libc.so.6
Any idea? Have you been able to compile your own application with customized rootfs?
Thanks. Regards,
Mariano
0 Kudos
Highlighted
Adventurer
Adventurer
3,398 Views
Registered: ‎08-10-2018

Re: SYSROOTS folder empty after Petalinux 2018.2 build

Mariano,

I've gotten past all my issues and have completed the entire UG1186.

I did that work long enough ago I don't remember if I had your exact error or not.  One thing I remember as a big stumbling block is that I had to start from scratch with everything that is built by the tools, throwing away any "build" or ".sdk" directory that was built with the wrong settings.

Here's a link to the solution that worked for me, I hope it can give you some insight into your own problem:  https://forums.xilinx.com/t5/OpenAMP/Libmetal-AMP-Demo-fails-to-link/m-p/895232#M606

 

0 Kudos