options to generate tarballs instead of images
Bug #705573 reported by
Paul Larson
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Image Tools |
Won't Fix
|
Low
|
Unassigned |
Bug Description
I was wondering if it would be possible to give linaro-media-create options to create tarballs for the boot and rootfs instead of generate an image. I would find this very useful so that I could get this and manually push it to test partitions for automated testing. Also, it seems that some people want to do similar things for setting up things like nfs boot.
Changed in linaro-image-tools: | |
importance: | Undecided → Low |
Changed in linaro-image-tools: | |
status: | New → Triaged |
To post a comment you must log in.
I think this can be done easily if we do the following:
1. Change both populate_boot() and populate_rootfs() to take an extra argument (a callable) which is called at their very end, but before they call umount on the boot/root partitions. By default this will be None so it won't be called. boot()/ populate_ rootfs( ) that will generate tarballs out of the bootfs/rootfs
2. Add a new argument to l-m-c for it to generate tarballs
3. When the new argument is passed to l-m-c, create an arbitrary file on /tmp and use it as if we were asked to create an image file, but set an atexit handler to remove it upon exit as the file is not what the user wants.
4. Again, when the new argument is given, make l-m-c pass a custom function to populate_
This is a bit of a hack, but I think making both populate_boot() and populate_rootfs() extensible (via the extra callable passed to them) might be useful for other things and this approach is much simpler than refactoring things so that we can skip a few steps and save a few seconds when generating tarballs.