pengutronix / genimage

tool to generate multiple filesystem and flash images from a tree
GNU General Public License v2.0
308 stars 110 forks source link

Add all subfolder's files to the root of the image #31

Closed substring closed 5 years ago

substring commented 6 years ago

Hello,

I've been trying to add everything from a folder to the root of a vfat image without success. How can I achieve this ? I'm thinking about something as simple as files { "folder/" } or files { "folder/*" } The first syntaxe creates folder in the image, the second one gives an error. This does work for subfolders (files { "folder/subfolder" } is added as subfolder).

Please note that syntax files { "folder/subfolder" } produces output adding file 'folder/subfolder' as 'folder/subfolder' ... whereas it means adding file 'folder/subfolder' as 'subfolder' ...

Using v9 genimage from Buildroot.

michaelolbrich commented 6 years ago

If you don't use file / files then the usual rootpath / mountpoint. I've created #32 to clarify this in the README (among other things).

substring commented 6 years ago

I'm not sure I undserstand. Let's take a practical example with this .cfg from Buildroot. What would the syntax be to include everything from the rpi-firmware folder to the root of the image file instead of specifying files and folders one by one ? Knowing that the files from the rpi-firmware folder are added to the root of the image

michaelolbrich commented 5 years ago

Don't add the files to the vfat image and set rootpath to the rpi-firmware folder.