On Thu, Apr 22, 2021 at 12:42 PM John Allwine <[email protected]> wrote:
>
> Thanks Robert! I issued a pull request with a couple minor changes to add a 
> variable where you explained:
> https://github.com/RobertCNelson/boot-scripts/pull/124
>
> Here's the text of the pull request that describes how it could be used to 
> make a smaller image size than the size of your microSD card:
>
> Setting the conf_rootfs_partition_size variable allows for better control 
> over the size of the microSD card necessary to house the resulting image when 
> running the beaglebone-black-make-microSD-flasher-from-eMMC.sh script. For 
> example, you might be working with a 32GB microSD card image, but want to 
> generate an image that would also fit on a 4GB microSD card, so you could do 
> the following:
> sudo conf_rootfs_partition_size=7462912 
> /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh
>
> Which would specify the size as 7462912 sectors, which is the size of the 
> eMMC rootfs partition (at least on the one I was testing on). After making 
> the flasher you could then use dd to get the image off the microSD card for 
> flashing onto other microSD cards:
>
> sudo dd if=<path to microSD card device> of=<path to image file> bs=512 
> count=7471104
>
> 7471104 can be determined by the output from fdisk -l (one more than the End 
> sector, or 8192 more than the size of the rootfs partition):
> Device Boot Start End Sectors Size Id Type
> /dev/mmcblk0p1 * 8192 7471103 7462912 3.6G 83 Linux
>
> You may be able to speed up the dd command by using a bigger blocksize and 
> adjusting the count accordingly (using a 4MB block size):
> sudo dd if=<path to microSD card device> of=<path to image file> bs=419430 
> count=912

Thanks all merged up!

PS, you can add the variable to /boot/SOC.sh:

https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/functions.sh#L1114

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYguU_aeeN5%2BKE-X0L%2Bfmt4hJ9wCSiqa29zSS%3DTSHLwznA%40mail.gmail.com.

Reply via email to