cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
5,114 Views
Registered: ‎06-08-2015

PetaLinux CPIO archive generation fails because of spaces in rootfs filenames

Jump to solution

Using the procedures described at http://www.wiki.xilinx.com/Getting+Started+With+Yocto+using+Repo+to+build+RPM+Packages and at http://www.wiki.xilinx.com/Adding+New+RPM+Packages+in+meta-petalinux, I have made a CMake package and selected it in my PetaLinux 2016.3 rootfs configuration. However, when I run petalinux-build, the process fails with these messages:

 

[INFO ] package rootfs.cpio to /projects/PetaLinux2016.3/images/linux
[ERROR] ERROR: Generating CPIO archive failed
[ERROR] make[1]: *** [package-rootfs-cpio] Error 255
ERROR: Failed to build linux

 

From the build.log file:

 

[ALL ] make[1]: Entering directory `/projects/PetaLinux2016.3/build/linux'
[INFO ] package rootfs.cpio to /projects/PetaLinux2016.3/images/linux
[ALL ] if grep -q -e "^CONFIG_ROOTFS_PACKAGES.*SMARTPM=y" "/projects/PetaLinux2016.3/subsystems/linux/configs/rootfs/config" 2>/dev/null; then nosmart=""; else nosmart="--no-smart-rpm"; fi; petalinux-gen-initrd -d /projects/PetaLinux2016.3/build/linux/rootfs/targetroot -o "/projects/PetaLinux2016.3/images/linux/rootfs.cpio" --linux-build "/projects/PetaLinux2016.3/build/linux/kernel" --initcpio "/projects/PetaLinux2016.3/build/linux/rootfs_init_cpio_file" ${nosmart} || exit 255
[ALL ] Generating filesystem description file for gen_init_cpio...
[ALL ] Creating /init symlink if required...Done.
[ALL ] directories...files...stat: cannot stat '/projects/PetaLinux2016.3/build/linux/rootfs/targetroot/usr/share/cmake-3.4/Help/generator/Watcom': No such file or directory
[ALL ] stat: cannot stat 'WMake.rst': No such file or directory
[ALL ] stat: cannot stat '/projects/PetaLinux2016.3/build/linux/rootfs/targetroot/usr/share/cmake-3.4/Help/generator/Visual': No such file or directory
[ALL ] stat: cannot stat 'Studio': No such file or directory
[ALL ] stat: cannot stat '9': No such file or directory
[ALL ] stat: cannot stat '2008.rst': No such file or directory

...

[ERROR] ERROR: Generating CPIO archive failed
[ERROR] make[1]: *** [package-rootfs-cpio] Error 255

 

There are files named "Watcom WMake.rst" and "Visual Studio 9 2008.rst" in the indicated directory, along with a number of other files whose names contain spaces. Pieces of all of their names, broken at the spaces, appear in subsequent messages. No other files are reported missing, and these are the only files in the entire rootfs whose names contain spaces. The same result occurs on both CentOS 7 and Ubuntu 2016.4 .

 

Does anybody know of a trick/workaround/solution to this?

 

TIA for any help.

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
8,174 Views
Registered: ‎06-08-2015

For others who have encounterd this problem, I have received this in response from Xilinx Support:

 

I have got a confirmation from factory that the spaces issue is present in petalinux-gen-initrd.

 

The flow is like this:

smartpm generates staging rootfs and then it creates build/linux/rootfs_init_cpio_file,

it holds the location of all rootfs elements.

we use : build/linux/kernel/usr/gen_init_cpio to generate cpio file, from gz --> fit

 

Unfortunately there is no simple workaround/patch for this issue, as these steps are very interrelated.

 

A possible solutions can be to use prebuilt app methodology i.e. by taring the files which had spaces and init script to untar it and place it properly.

 

In 2016.4, the entire Petalinux flow is integrated with Yocto project which has a different flow for rootfs management.

 

 

I have, in fact, successfully built and installed the CMake package using PetaLinux 2016.4. Now, if I could just get past the plethora of other problems that PetaLinux 2016.4 has brought me ...   :-}

 

View solution in original post

0 Kudos
3 Replies
Highlighted
Adventurer
Adventurer
4,899 Views
Registered: ‎06-08-2015

Shouldn't this inability of petalinux-gen-initrd to handle packages with any files whose names contain spaces be added to the list of "Known Issues" of Petalinux 2016.3 (or 2016.1)? Perhaps that would raise its visibility and thereby raise the priority to correct it.

0 Kudos
Highlighted
Adventurer
Adventurer
4,824 Views
Registered: ‎06-08-2015

I have verified that the files whose names contain spaces are indeed present in the cmake-3.4.3-r0.cortexa9hf_neon.rpm package.

0 Kudos
Highlighted
Adventurer
Adventurer
8,175 Views
Registered: ‎06-08-2015

For others who have encounterd this problem, I have received this in response from Xilinx Support:

 

I have got a confirmation from factory that the spaces issue is present in petalinux-gen-initrd.

 

The flow is like this:

smartpm generates staging rootfs and then it creates build/linux/rootfs_init_cpio_file,

it holds the location of all rootfs elements.

we use : build/linux/kernel/usr/gen_init_cpio to generate cpio file, from gz --> fit

 

Unfortunately there is no simple workaround/patch for this issue, as these steps are very interrelated.

 

A possible solutions can be to use prebuilt app methodology i.e. by taring the files which had spaces and init script to untar it and place it properly.

 

In 2016.4, the entire Petalinux flow is integrated with Yocto project which has a different flow for rootfs management.

 

 

I have, in fact, successfully built and installed the CMake package using PetaLinux 2016.4. Now, if I could just get past the plethora of other problems that PetaLinux 2016.4 has brought me ...   :-}

 

View solution in original post

0 Kudos