cpio: cannot seek on output: Invalid argument [How to Solve]

Error when building with petalinux-build: cpio: cannot seek on output: Invalid argument
The specific output is as follows:

[email protected]:~/git/xilinx/petalinx/base$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |################################################################################################| Time: 0:00:01
Loaded 3255 entries from dependency cache.
Parsing recipes: 100% |##############################################################################################| Time: 0:00:03
Parsing of 2466 .bb files complete (2432 cached, 34 parsed). 3259 targets, 226 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###########################################################################################| Time: 0:00:33
Checking sstate mirror object availability: 100% |###################################################################| Time: 0:00:57
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
linux-xlnx-4.9-xilinx-v2017.4+git999-r0 do_compile: NOTE: linux-xlnx: compiling from external source tree /home/vi/git/xilinx/linux-xlnx.v2017.4
ERROR: petalinux-user-image-1.0-r0 do_image_cpio: Function failed: do_image_cpio (log file is located at /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/log.do_image_cpio.1335)
ERROR: Logfile of failure stored in: /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/log.do_image_cpio.1335
Log data follows:
| DEBUG: Executing python function set_image_size
| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_cpio
| 12945720 blocks
| cpio: cannot seek on output: Invalid argument
| WARNING: /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/run.do_image_cpio.1335:1 exit 1 from 'ln -sf /sbin/init /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/cpio_append/init'
| ERROR: Function failed: do_image_cpio (log file is located at /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/log.do_image_cpio.1335)
ERROR: Task (/home/vi/git/xilinx/petalinx/base/project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb:do_image_cpio) failed with exit code '1'
NOTE: Tasks Summary: Attempted 8259 tasks of which 8095 didn't need to be rerun and 1 failed.Summary: 1 task failed:
/home/vi/git/xilinx/petalinx/base/project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb:do_image_cpio
Summary: There was 1 ERROR message 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 [email protected]:~/git/xilinx/petalinx/base$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |################################################################################################| Time: 0:00:01
Loaded 3255 entries from dependency cache.
Parsing recipes: 100% |##############################################################################################| Time: 0:00:03
Parsing of 2466 .bb files complete (2432 cached, 34 parsed). 3259 targets, 226 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###########################################################################################| Time: 0:00:33
Checking sstate mirror object availability: 100% |###################################################################| Time: 0:00:57
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
linux-xlnx-4.9-xilinx-v2017.4+git999-r0 do_compile: NOTE: linux-xlnx: compiling from external source tree /home/vi/git/xilinx/linux-xlnx.v2017.4
ERROR: petalinux-user-image-1.0-r0 do_image_cpio: Function failed: do_image_cpio (log file is located at /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/log.do_image_cpio.1335)
ERROR: Logfile of failure stored in: /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/log.do_image_cpio.1335
Log data follows:
| DEBUG: Executing python function set_image_size
| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_cpio
| 12945720 blocks
| cpio: cannot seek on output: Invalid argument
| WARNING: /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/run.do_image_cpio.1335:1 exit 1 from 'ln -sf /sbin/init /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/cpio_append/init'
| ERROR: Function failed: do_image_cpio (log file is located at /home/vi/git/xilinx/petalinx/base/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/log.do_image_cpio.1335)
ERROR: Task (/home/vi/git/xilinx/petalinx/base/project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb:do_image_cpio) failed with exit code '1'
NOTE: Tasks Summary: Attempted 8259 tasks of which 8095 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/vi/git/xilinx/petalinx/base/project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb:do_image_cpio
Summary: There was 1 ERROR message 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!

***************************************************************************************************************************
Solution:
Modify the file project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb
Add IMAGE_FSTYPES_remove = “cpio.gz cpio cpio.gz.u-boot cpio.bz2” at the end of this file, save and recompile
This command will eventually cancel the generation of the rootfs.cpio file.
Because cpio is a very old archive and packaging tool, it has been gradually replaced by tar, maybe because it is too old, so when the rootfs package file size is too large, it exceeds
The upper limit of cpio is up.

Similar Posts: