I’m working in a machine that in his heart has beaglebone.
Now I have my python script for GPIO and mi linux up to date with some tweaks.
What it’s the clever-fast way to cloning this for other machines?? (maybe 40 machine…maybe more in future).
Robert uses rsync I think for his cloning image( emmc flasher images ).
But I think the best, easiest, and most consistent way to clone an image would be to use dd. This has the benefit of creating a bit for bit exact copy of the image in question. However, one downside to using dd is that if you’re cloning media with large partitions, it can take a while to make these copies.
You can also use tar to make a copy of the rootfs partition This has the added benefit of making “images” exactly the size needed for the file system. Which can save time in both imaging a working file system, and then making multiple copies, However, this method will not copy the medias MBR where the first, and second stage bootloaders live. So dd, would still have to be used at minimum to copy the first 1M of the media. Which is actually much easier said, than done. But if I were to put this method into a usable category of some sort. I would say in situations where you only need to update the rootfs, or only part of the rootfs( like a rootfs “update” ).
rsync for both of the above situations is probably the best option. It can even be really fast But rsync does also have it’s own downsides. For one it can be really picky about what it wants to do. Under some circumstances. So at times it can be less consistent. e.g. an image clone may fail for some reason or another.
There was also another method for cloning image that Robert was experimenting with, that I can not think of off hand.
With all the above said. I think Robert built in a method to make an emmc flasher image out of any sdcard image. But I’m not sure if that will flash the entire “live” sdcard image over to the emmc or not. Robert would have to answer that.
You could also write, and run your own script at boot up to do any of the above mentioned method. This is what I’d consider the best method. Because If you had additional setup to do after the copy. You can build in that functionality too. But it also requires you to first know how to write said script, and then know exactl what has to be done in order to create a properly working system form the ground up.
Also, knowing whether you want an system that boots from the emmc, or sdcard is required in order to moreproperly answer your question,
Additionally, what I mentioned above in every case is a one off only copy. Meaning you’d have to re-image each board one at a time. In order to do multiple boards at once, a more elaborate system would be needed, and would most likely cost additional monies to implement.
TFTP / NFS boot/root comes to mind, but I’m having a hard time imaging off the top of my head how that would work out best. BUt for starters, you’d still have to have atleast an sdcard or multiples, in order to pull that off.
So having an emmc flasher image of some sort is probably the quickest and least expensive way to go. Then you just put the sdcard into a board, and boot → flash to emmc. Then move on to the next system.
I’m what to use an eMMC so this method work nice, about 6 min per beaglebone