I want to copy the same configuration on more riotboards. How can i handle this with the emcc-flash not the sd-card?.
I want to copy the same configuration on more riotboards. How can i handle this with the emcc-flash not the sd-card?.
There are many ways to do it.
Personally I'd probably boot from an 8GB sd card and dd the full content of the eMMC to a file on the card. You can then boot other boards from the same card and dd the file onto their eMMC.
Add combinations of storing the eMMC image on a USB hard drive, an NFS mount, or wherever is convenient.
To save some time / space, boot from SD and use tar with appropriate switches to create an archive of the eMMC filesystem. Then on the board you want to copy it onto you'd have to fdisk the eMMC, create a filesystem, untar the archive, and likely dd a u-boot.imx onto the eMMC in the proper place. If you're familiar with the BBB that's more or less exactly what their flash process does..
I want to copy the same configuration on more riotboards.
If want to pull the available eMMC flash contents, then you need a SDCARD to which you can copy the eMMC image.
Insert SDCARD on J6 connector.
detect your eMMC and SDCARD using command ll /dev/mmcblk*
for eMMC i got below
root@linaro-ubuntu-desktop:~# ll /dev/mmcblk*
brw-rw---- 1 root disk 179, 0 1970-01-01 00:00 /dev/mmcblk0
brw-rw---- 1 root disk 179, 8 1970-01-01 00:00 /dev/mmcblk0boot0
brw-rw---- 1 root disk 179, 16 1970-01-01 00:00 /dev/mmcblk0boot1
brw-rw---- 1 root disk 179, 1 1970-01-01 00:00 /dev/mmcblk0p1
root@linaro-ubuntu-desktop:~#
i got below after inserting SDCARD
root@linaro-ubuntu-desktop:~# ll /dev/mmcblk*
brw-rw---- 1 root disk 179, 0 1970-01-01 00:00 /dev/mmcblk0
brw-rw---- 1 root disk 179, 8 1970-01-01 00:00 /dev/mmcblk0boot0
brw-rw---- 1 root disk 179, 16 1970-01-01 00:00 /dev/mmcblk0boot1
brw-rw---- 1 root disk 179, 1 1970-01-01 00:00 /dev/mmcblk0p1
brw-rw---- 1 root disk 179, 24 1970-01-01 00:03 /dev/mmcblk1
brw-rw---- 1 root disk 179, 25 1970-01-01 00:03 /dev/mmcblk1p1
brw-rw---- 1 root disk 179, 26 1970-01-01 00:03 /dev/mmcblk1p2
root@linaro-ubuntu-desktop:~#
so my SDCARD is mmcblk1.
dd bs=4096 if=/dev/mmcblk0 of=/dev/mmcblk1
use above command to copy the existing Riotboard Image to SDCARD.
I guess you got the complete riot profile backup now.
How can i handle this with the emcc-flash not the sd-card?.
SDCARD will be a good choice to backup when using dd from eMMC flash.
let me know if this answers your question.
Thanks
Tushar
just for records:
block size can be determined using below command
blockdev --getbsz /dev/mmcblk1
In my case:
➜ ~ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p1 28G 18G 8.8G 67% /
none 16G 0 16G 0% /dev
tmpfs 16G 88K 16G 1% /dev/shm
tmpfs 16G 31M 16G 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
tmpfs 3.2G 12K 3.2G 1% /run/user/120
tmpfs 3.2G 116K 3.2G 1% /run/user/1000
/dev/mmcblk1p1 29G 29G 0 100% /media/lvision/AGX-SD
And I got the following No space left on device ERROR
➜ ~ sudo dd bs=1024 if=/dev/mmcblk0 of=/dev/mmcblk1
[sudo] password for lvision:
dd: error writing '/dev/mmcblk1': No space left on device
30318593+0 records in
30318592+0 records out
31046238208 bytes (31 GB, 29 GiB) copied, 4605.66 s, 6.7 MB/s
while I tried to dd mmcblk0 which is ONLY used 18G to mmcblk1 which is of 29G size.