How to get the operating system on the eMMC

I bought a duo s with 8gb eMMC and are asking myself how i can get the operating system onto the eMMC rather than using an sd card.

1 Like

I have a similar question. Would like to use eMMC since it’s there.

1 Like

Any chance for an answer? How to flash the system to the eMMC of Milk-V Duo S? It builds fine.

1 Like

This is how todo for Duo over USB

1 Like

Thanks, I am sorry but this is a bit too technical, not to mention that the translation from Chinese seems to be not great.
Is there a chance that a tutorial in English would be added to milk-v docs?

1 Like

I have not yet received my Duo S, but i see an EMMC image available for download ?

https://github.com/milkv-duo/duo-buildroot-sdk/releases/download/Duo-V1.0.9/milkv-duos-emmc-v1.0.9-2024-0226.zip

sure, the eMMC image is available for download or for building, but the question is how to load it onto the board.
Also, these seem to be tutorials for how to program the SPI chip, not the eMMC (but i don’t understand this translation very well).

have you tried flashing to sdcard with serial console connected to see if it boots up and writes to emmc ?

How would I do this?

write and boot sdcard

Duo S can’t read the eMMC and the sd card at the same time. There is no way to boot from the SD card and write anything to the eMMC from the booted Linux image.

There must be a way to flash the image onto the eMMC before booting.

@Carbon

Kindly assist with guide to install os on emmc for Duo-S

Here is the actual documentation but cant help further

https://doc.sophgo.com/cvitek-develop-docs/master/docs_latest_release/CV180x_CV181x/en/01.software/BSP/Cvitek_Bare_and_Non-Bare_Chip_Burning_Upgrade_Operation_Guide/build/html/index.html

1 Like

Thanks. OK, I have figured it out and it works!

The procedure is:

  1. build or download the emmc image
  2. format an SD card as FAT32
  3. decompress the upgrade.zip file to the SD card (all the files should be in the root directory)
  4. insert the card, wait a few seconds for it to flash (you can observe it using the serial console), turn off
  5. remove the SD card (important - otherwise it will flash again)
  6. turn the board on - congratulations, you have a system on eMMC

Was this so hard to put in the Docs?

By the way, this is the eMMC info from u-boot:

Device: cv-emmc@4300000
Manufacturer ID: 15
OEM: 100
Name: 8GTF4 
Bus Speed: 200000000
Mode: HS200 (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 512 KiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected

so it runs at HS200 speed which makes it quite a bit faster than the SD card.

If the SD card is inserted when whe system is booted from the eMMC, the board crashes.

There is a windows command line tool for burning the eMMC:

OK, thanks. But why use Windows if I can avoid using Windows?

1 Like

Tools under Linux will be added to the documentation later. In addition, the SD card method you mentioned is also quite good :slight_smile:

1 Like

Hello… I use the Windows steps to burn milkv-duos-emmc-v1.1.0-2024-0410.zip to the Duo S eMMC and it’s working great !

Could you provide steps to expand the eMMC storage ?
lsblk shows
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 7.3G 0 disk

df -h shows the root partition is 189M

fdisk is not detecting the partition so I can’t delete and resize it.

Thanks

I believe there is an xml file in the zip and you can edit the partitions scheme there.

Thank you for info.
I made the edit to the xml file.
<physical_partition type=“emmc”>




</physical_partition>

here is the burn dump

usb_dl.exe -s linux -c cv181x -i …\rom

[INFO] Using libusb v1.0.26.11724
[INFO] Waiting for USB device connection: |
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] USB download start…

[INFO] Waiting for USB device connection: |
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] set MGN1 flag
[INFO] break
[INFO] Connecting to ROM 2nd stage…
[INFO] Waiting for USB device connection: /
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] fip_tx_offset: 4096, fip_tx_size: 33792
[INFO] set MGN1 flag
[INFO] break

[INFO] Waiting for USB device connection: |
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] fip_tx_offset: 37888, fip_tx_size: 4096
[INFO] set MGN1 flag
[INFO] break

[INFO] Waiting for USB device connection: |
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] Waiting for USB device connection: |
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] fip_tx_offset: 41984, fip_tx_size: 8192
[INFO] set MGN1 flag
[INFO] break

[INFO] Waiting for USB device connection: /
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] Waiting for USB device connection: /
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] fip_tx_offset: 50176, fip_tx_size: 13824
[INFO] set MGN1 flag
[INFO] break

[INFO] Waiting for USB device connection: /
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] fip_tx_offset: 64000, fip_tx_size: 110592
[INFO] set MGN1 flag
[INFO] break

[INFO] Waiting for USB device connection: |
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] fip_tx_offset: 174592, fip_tx_size: 512
[INFO] set MGN1 flag
[INFO] break

[INFO] Waiting for USB device connection: |
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] fip_tx_offset: 174592, fip_tx_size: 227840
[INFO] set MGN1 flag
[INFO] break

[INFO] Waiting for USB device connection: /
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] xml file is partition_emmc.xml
[INFO] xml storage type: emmc
[INFO] update total size: 213100824 byte
[INFO] downloading file: …\rom\fip.bin
[INFO] send fip.bin finish
[INFO] break

[INFO] Waiting for USB device connection:
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] Waiting for USB device connection:
[INFO] found usb device vid=0x3346 pid=0x1000
[INFO] downloading file: …\rom\boot.emmc
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 3384664/213100824(1%)
[INFO] downloading file: …\rom\rootfs_ext4.emmc
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 20161944/213100824(9%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 36939224/213100824(17%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 53716504/213100824(25%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 70493784/213100824(33%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 87271064/213100824(40%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 104048344/213100824(48%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 120825624/213100824(56%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 137602904/213100824(64%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 154380184/213100824(72%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 171157464/213100824(80%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 187934744/213100824(88%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 204712024/213100824(96%)
[INFO] CVI_USB_PROGRAM
[INFO] updated size: 213100696/213100824(99%)
[INFO] USB download complete

not seeing any changes to the root partition size

lsblk -b
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 7818182656 0 disk
|-mmcblk0p1 179:1 0 8388608 0 part
|-mmcblk0p2 179:2 0 131072 0 part
`-mmcblk0p3 179:3 0 805306368 0 part /

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 189M 121M 54M 70% /
devtmpfs 162M 0 162M 0% /dev
tmpfs 162M 0 162M 0% /dev/shm
tmpfs 162M 108K 162M 1% /tmp
tmpfs 162M 40K 162M 1% /run