pengutronix / genimage

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

Override filesystem source path #184

Closed Harvie closed 2 years ago

Harvie commented 2 years ago

Fixes #181

Allows user to override the complexity of rootpath/mountpoint and just simply use existing directory at arbitrary path if needed. Now i can create ext4 filesystem like this:

image root.img {
  ext4 {
    label = "rootlabel"
  }
  size = 1024M
  srcdir = "./root"
}

genimage --inputpath "." --outputpath "."

Harvie commented 2 years ago

it should be invalid to use any mountpoint except the default /

But *mountpath() does not have any way to raise an error, so i am not sure what to do (call) in such case.

Harvie commented 2 years ago

Is calling error("..."); exit(1); correct way to handle such situation?