UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor zary
Visitor
488 Views
Registered: ‎11-15-2018

PetaLinux accidentally removes the actual custom files

I wanted to add some files to rootfs and followed the instructions on github for this purpose:

https://github.com/pulp-platform/hero-support/tree/master/linux/petalinux/custom-files

When tried to build noticed that all custom files that I had added to dir:

bsp/project-spec/meta-user/recipes-apps/custom-files/files/custom-files

were deleted! Had to copy them back to the directory and during the second build they didn't get deleted anymore. It sounds like this is a known issue per following statement I found in the following link:

https://pulp-platform.org/hero/doc/software/host/petalinux/

NOTE: Sometimes, PetaLinux accidentally removes the actual custom files located inside files when generating the root filesystem image. It then complains about not finding them anymore. Therefore, it is worth to create a backup of the files including the SSH keys to copy them back if needed.

I'm using PetaLinux version 2017.1, is this issue fixed in latest versions of PetaLinux? If so, how can I port it to 2017.1 version?

Thanks!

0 Kudos
4 Replies
Moderator
Moderator
414 Views
Registered: ‎04-24-2017

Re: PetaLinux accidentally removes the actual custom files

Hi @zary,

Can you share the build log showing the files are deleted. AFAIK it doesn't delete any files from meta-user whether you use it for build or not.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor zary
Visitor
399 Views
Registered: ‎11-15-2018

Re: PetaLinux accidentally removes the actual custom files

Hi Sandeep, I was trying to re-produce the problem for you today and send the log file but I encountered another error. I did not make any changes to the github repo since (https://github.com/zarym/test.git)!  I'm not sure if its related to the original issue described by I will attach the log file anyway. Below are errors and attached is the error log file.

NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: libgcrypt-1.7.3-r0 do_package: debugsrc symlink fixup failed with exit code 2 (cmd was find /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/libgcrypt/1.7.3-r0/package/usr/src/debug -type l -print0 -delete | sed s#/home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/libgcrypt/1.7.3-r0/package/usr/src/debug/##g | (cd '/home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux' ; cpio -pd0mL --no-preserve-owner '/home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/libgcrypt/1.7.3-r0/package/usr/src/debug' 2>/dev/null))
ERROR: libgcrypt-1.7.3-r0 do_package: Function failed: split_and_strip_files
ERROR: Logfile of failure stored in: /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/libgcrypt/1.7.3-r0/temp/log.do_package.18375
ERROR: Task (/home/zary/PetaLinux/components/yocto/source/aarch64/layers/core/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2046 tasks of which 1549 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/zary/PetaLinux/components/yocto/source/aarch64/layers/core/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb:do_package
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
webtalk failed:PetaLinux statistics:extra lines detected:notsent_nofile!
webtalk failed:Failed to get PetaLinux usage statistics!
[zary@localhost test]$

0 Kudos
Visitor zary
Visitor
382 Views
Registered: ‎11-15-2018

Re: PetaLinux accidentally removes the actual custom files

Hello again!

After seeing the split_and_strip_files error, I tried to just build the rootfs. This time I was able to capture the original error described in this thread (files getting deleted during build). Below is the build trace after build exits with error. I will also attach the related error log file as well. I will populate the custom-files in the project directory and try to rebuild again. In the past petalinux build did not delete the files on the second run and build completed successfully. I will report if I see any of the two errors again.

[zary@localhost bsp]$ petalinux-build -c rootfs
[INFO] building rootfs
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image -c do_image_complete
WARNING: Host distribution "CentOS-7.5.1804" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100% |####################################################################################################| Time: 0:01:07
Parsing of 2449 .bb files complete (0 cached, 2449 parsed). 3239 targets, 224 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#################################################################################################| Time: 0:00:06
Checking sstate mirror object availability: 100% |#########################################################################| Time: 0:00:04
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: custom-files-1.0-r0 do_install: Function failed: do_install (log file is located at /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/temp/log.do_install.11592)
ERROR: Logfile of failure stored in: /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/temp/log.do_install.11592
Log data follows:
| DEBUG: Executing shell function do_install
| install: cannot stat ‘/home/zary/test-error1/bsp/build/../project-spec/meta-user/recipes-apps/custom-files/files/custom-files/etc/fw_env.config’: No such file or directory
| WARNING: /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/temp/run.do_install.11592:1 exit 1 from 'install -m 0644 /home/zary/test-error1/bsp/build/../project-spec/meta-user/recipes-apps/custom-files/files/custom-files/etc/fw_env.config /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/image/etc'
| ERROR: Function failed: do_install (log file is located at /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/temp/log.do_install.11592)
ERROR: Task (/home/zary/test-error1/bsp/project-spec/meta-user/recipes-apps/custom-files/custom-files.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1983 tasks of which 1945 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/zary/test-error1/bsp/project-spec/meta-user/recipes-apps/custom-files/custom-files.bb:do_install
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ERROR: Failed to build rootfs
webtalk failed:PetaLinux statistics:extra lines detected:notsent_nofile!
webtalk failed:Failed to get PetaLinux usage statistics!
[zary@localhost bsp]$

0 Kudos
Visitor zary
Visitor
362 Views
Registered: ‎11-15-2018

Re: PetaLinux accidentally removes the actual custom files

Hello Sandeep,

This morning I tried to build the project again:

  • First got the missing file error, repopulated and started the build again. (no more split_and_ strip_files error!!)
  • I ran the petalinux-build command again and got a new error: Fetcher failure for URL: 'git://github.com/Xilinx/linux-xlnx.git;protocol=https;nobranch=1'
  • Ran the petalinux-build command again and this time it was successful! This build includes custom files.

 Except for the first error that is consistent when issuing the first petalinux-build command, the rest seem to be random error reports. Could the rest of the errors that happen randomly (split_and_ strip_files error and Fetcher failure) be related to access issues during build? If so any suggestions on how they can be avoided?

However regarding the deleted files (which is persistent on the first petalinux-build command and after re-populating the files it will go away) I am attaching again the output and the error log file:

INFO: bitbake petalinux-user-image
WARNING: Host distribution "CentOS-7.5.1804" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |#################################################################################| Time: 0:00:00
Loaded 3237 entries from dependency cache.
Parsing recipes: 100% |###############################################################################| Time: 0:00:02
Parsing of 2449 .bb files complete (2410 cached, 39 parsed). 3239 targets, 224 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |############################################################################| Time: 0:00:35
Checking sstate mirror object availability: 100% |####################################################| Time: 0:01:08
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: custom-files-1.0-r0 do_install: Function failed: do_install (log file is located at /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/temp/log.do_install.5862)
ERROR: Logfile of failure stored in: /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/temp/log.do_install.5862
Log data follows:
| DEBUG: Executing shell function do_install
| install: cannot stat ‘/home/zary/test/bsp/build/../project-spec/meta-user/recipes-apps/custom-files/files/custom-files/etc/fw_env.config’: No such file or directory
| WARNING: /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/temp/run.do_install.5862:1 exit 1 from 'install -m 0644 /home/zary/test/bsp/build/../project-spec/meta-user/recipes-apps/custom-files/files/custom-files/etc/fw_env.config /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/image/etc'
| ERROR: Function failed: do_install (log file is located at /home/zary/test/bsp/build/tmp//work/aarch64-xilinx-linux/custom-files/1.0-r0/temp/log.do_install.5862)
ERROR: Task (/home/zary/test/bsp/project-spec/meta-user/recipes-apps/custom-files/custom-files.bb:do_install) failed with exit code '1'
Waiting for 3 running tasks to finish:
0: linux-xlnx-4.9-xilinx-v2017.1+gitAUTOINC+68e6869cfb-r0 do_fetch - 107s (pid 25360)
1: curl-native-7.50.1-r0 do_configure - 60s (pid 29212)
2: busybox-1.24.1-r0 do_compile - 24s (pid 2483)
Traceback (most recent call last):
File "/home/zary/PetaLinux/components/yocto/source/aarch64/layers/core/bitbake/bin/bitbake-worker", line 465, in <module>
worker.serve() ERROR: Worker process (13617) exited unexpectedly (0), shutting down...
ERROR: Worker process (13617) exited unexpectedly (0), shutting down...
WARNING: /home/zary/PetaLinux/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/runqueue.py:1071: ResourceWarning: unclosed file <_io.BufferedWriter name=35>
self.worker = {}

NOTE: Tasks Summary: Attempted 2427 tasks of which 1956 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/zary/test/bsp/project-spec/meta-user/recipes-apps/custom-files/custom-files.bb:do_install

0 Kudos