Jump to content

[SOLVED] Correct way of adding files to image


bozden
Go to solution Solved by bozden,

Recommended Posts

I have several files I want to embed into the compiled image, such as logos, desktop backgrounds, some public keys, scripts etc.

I can put them in correct place (e.g. /usr/local/bin) or put it in a directory at root (e.g. /MyAppSetup) and run a script to handle/move them.

In the past I was using a private git repo on my server to clone these, but if I'm compiling, I'd like to get rid of this extra layer.

 

I could not find a way to do that. Could someone please advise?

 

Link to comment
Share on other sites

OK, learning...

 

I just recognized customize-image.sh is run in chroot, so direct access to host OS is not possible, maybe there is a variable for host binding which I couldn't find.

On the other hand lib.config is run on host. Although it seems to be used for setting variables, it is source'd, so I can run anything there. So, this might work:

 

cp "${SRC}""${MY_PRODUCT_DIR}" "${SDCARD}""${MY_SETUP_DIR}"

 

And in customize-image.sh, I can move files around and do whatever I like with them.

 

Can somebody please confirm? It takes too long to test...

 

Link to comment
Share on other sites

  • Solution
2 hours ago, Werner said:

Maybe this help:

 

 

Thank you Werner, that helps.

 

I had a misconception with the namin. "Userpatch" mixed with kernel pathing, "overlay" with overlayfs.

 

After examining the code I found correct keywords for search and found this:

I also recognized from the code that only customize-image.sh is copied to destination and my other files (which I call from it) do not.

 

Now the post you shared comes into play...

 

Thank you again.

 

Link to comment
Share on other sites

  • bozden changed the title to [SOLVED] Correct way of adding files to image
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines