1

I'm currently writing a Yocto recipe. On the do_install function I invoke the install command. But things don't work very well.

The folder that I am trying to install contains several subfolders, and in every folder there is a bunch of files.

I don't want to write hundreds of line like:

install -d "path to target folder"
install "path to source file" "path to target folder"
...

I also used loops. But it always fail on the first subfolder.

edit :

Here is the last one i used :

install -d ${D}/root
install -d ${D}/root/server
install -d ${D}/root/video
install -d ${D}/root/images
install -Dm644 ${S}/server/* "${D}/root/server/"
install -Dm644 ${S}/videos/* "${D}/root/videos/"
install -Dm644 ${S}/images/* "${D}/root/images/"
install  ${S}/crash_kernel.sh "${D}/root/""

The error tells me that the command is omitting a directory, then fails. I'm sure this is because of the subfolders, but i can't figure a way to install everything with the install command :/ (btw cp isn't an option in yocto :/)

1
  • Welcome to U&L! Can you provide an example of the recipe, function, and/or the error output? Commented Jul 22, 2015 at 15:41

1 Answer 1

0
  1. Take a look at m4 macro language and its usage in tools like autoconf. It may be a right solution for you.

  2. You can prepare some archive or directory, then unpack it in the install phase and after unpacking add missing things. (I know it's similar to cp)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.