cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
5,286 Views
Registered: ‎02-23-2015

Petalinux: Bug in targetroot-inst.sh?

Hi,

I may have discovered a bug in the targetroot-inst.sh shell script in the components/rootfs subdirectory of the Petalinux 2014.4 installation directory:

 

In the sub function file_copy(), in the line

 

find . -print | grep -E -v '/CVS|/\.svn' | cpio -p${V}dumL ${TARGETDIR}${dst}

 

the "L" option to cpio leads to a dereferencing of all symbolic links in the custom apps that I've included in my Petalinux project. I.e. suppose if I have a binary myapp and a symbolic link myapp2 which points to myapp and a Makefile-entry

 

install:

  $(TARGETINST) -v -d data /usr/bin

 

that copies data/myapp and data/myapp2 to /usr/bin. Now, when I'm booting the linux image, myapp and myapp2 in /usr/bin are two identical files instead of myapp2 being a symbolic link to myapp. That unnecessarily blows up the linux image and leads to image size problems.

 

Removing the "L" option, i.e. replacing above line with

 

find . -print | grep -E -v '/CVS|/\.svn' | cpio -p${V}dum ${TARGETDIR}${dst}

 

seems to be the solution to this problem. So what is the intention for the L option or is it simply a bug?

0 Kudos
1 Reply
Highlighted
4,424 Views
Registered: ‎04-10-2015

Re: Petalinux: Bug in targetroot-inst.sh?

Hi,


Same question here. The L option to cpio is quite annoying, and it's still present in 2015.2.


While I am very tempted to remove it, I would like to make sure I don't miss a critical reason for this option to have been introduced...

 

Thanks in advance.

0 Kudos