On Thursday, September 26, 2013 2:26:40 PM UTC-4, Alexander Holler wrote:

> Am 26.09.2013 20:21, schrieb Alexander Holler: 
> > 
> >>> autorun.sh: 
> >>> #!/bin/sh 
> >>> echo timer > /sys/class/leds/beaglebone\:green\:usr0/trigger 
> >>> dd if=/dev/mmcblk1 of=/mnt/BeagleBoneBlack-eMMC-image-$RANDOM.img 
> bs=10M 
> >>> sync 
> >>> echo default-on > /sys/class/leds/beaglebone\:green\:usr0/trigger 
> > 
> > I think using dd and creating an image is a pretty bad way to build a 
> > backup. 
> > 
> > I would suggest to use 
> > 
> > sfdisk -d /dev/foo >sfdisk.emmc.txt 
> > mount emmc 
> > tar cpjf -C emmc . 
> > umount emmc 
>
> Of course, it should be 
>
> tar cpjf emmc.tar.bz2 -C emmc . 
>
> and another tar might be necessary for the second partition. 
>
> And putting such a script together with busybox into an in-kernel 
> initramfs, and people would just have to build a card with one file, the 
> uImage. 
>
>
I still like having autorun.sh such that the script can be easily 
customized without rebuilding.  Of course, MLO and u-boot.img are also 
required.  The discussed Buildroot-based image is using initramfs.

Seems like some work is required here to create the logic to make sure each 
partition is tar'd. Also, the restore script needs to be created. In 
general, this just requires some more testing. Any volunteers to try out 
the sfdisk/tar based solution?

Overall, I agree it is a much better approach and I will get started on it 
as soon as I've submitted the base Buildroot patches upstream. Is there an 
easy way to make subdirectories within the tar to hold the format table and 
each partition such that I don't have to run tar twice and potentially run 
out of card space?

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to