I wanted to put the {applicationName}.config.json generated from Resin.io Dashboard into the custom built generated image resin-image-flasher-beaglebone.resinos-img then release it to other people.
My current approach is write the image to sdcard, copy the config.json in and then read it back to the disk image form but there should be a better way to do this? preferably while build the image so I can make that process automated?
A thought that came up in our internal conversation about this is that you could just mount the .img file, inject the file, unmount the .img and then etch the modified .img; would cut out the stage of having to go via an SD card to modify the .img.
well, yeah, because back then I’ve stuck on a windows machine so that’s the only way I got… after this I’ve mount the image on Linux, put config in and umount it, probably you should put this somewhere so people can see it?
mount -o loop,offset=4194304 -t vfat preload.img tmp/
We recently updated our documentation to reflect the fact that resin config inject can be used with both mounted SD cards and resinOS images in https://docs.resin.io/tools/cli/#config-inject-60-file-62- , and this should work cross-platform.