How to get the operating system on the eMMC

here is the xml ROOTFS edit

partition label=“ROOTFS” size_in_kb=“7626624” file=“rootfs_ext4.emmc” type=“ext4”

3 Likes

Thank you all for this topic, especially those who mentioned that you don’t need to have a Windows computer.

1 Like

I can confirm that the SD method works to flash the eMMC using the milkv-duos-emmc-v1.1.1-2024-0528.zip . As described above, place all files of the zip onto the FAT32 formated SD card. The SD card content then looks like this:

.
├── boot.emmc
├── fip.bin
├── META
│   ├── metadata.txt
│   └── misc_info.txt
├── partition_emmc.xml
├── rootfs_ext4.emmc
└── utils
    ├── cimg2raw
    ├── cvi_mipi_tx.ko
    ├── progress
    ├── update-script.sh
    ├── update-script.sh_
    └── upgrading.jpg

Still, flashing directly from linux remains a must-have feature. Providing more information on how this can be achieved would be highly appreciated.

1 Like

Increasing the size_in_kb to 7626624 and re-installing using the modified xml file did not increase the root partition!

Am I missing any other thing?

2 Likes

Yes, you need to modify it in the initial build definition file. I can’t find it for the love of me because it’s buried deep.

2 Likes

Thanks urostor,
I found the partition_emmc.xml under the following folder:
build/boards/cv181x/cv1813h_milkv_duos_emmc/partition/

After changing the rootfs size to 7626624 and regenerating the emmc image, booting with the new image, now lsblk shows:
[root@milkv-duo]~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 7.3G 0 disk
|-mmcblk0p1 179:1 0 8M 0 part
|-mmcblk0p2 179:2 0 2M 0 part
|-mmcblk0p3 179:3 0 128K 0 part
`-mmcblk0p4 179:4 0 7.3G 0 part /
mmcblk0boot0 179:8 0 4M 1 disk
mmcblk0boot1 179:16 0 4M 1 disk

but df -h , still show small partition:
[root@milkv-duo]~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 740M 155M 531M 23% /
devtmpfs 159M 0 159M 0% /dev
tmpfs 159M 0 159M 0% /dev/shm
tmpfs 159M 112K 159M 1% /tmp
tmpfs 159M 36K 159M 1% /run

I knew that the partition need resizing, but I was not aware that ext4 can be resized while it is mounted.
How ever after consulting with google Gemini AI, it suggested that I do the following:

[root@milkv-duo]~# resize2fs /dev/mmcblk0p4
resize2fs 1.46.2 (28-Feb-2021)
Filesystem at /dev/mmcblk0p4 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/mmcblk0p4 is now 1906144 (4k) blocks long.

And now I have this:
[root@milkv-duo]~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.2G 157M 6.7G 3% /
devtmpfs 159M 0 159M 0% /dev
tmpfs 159M 0 159M 0% /dev/shm
tmpfs 159M 116K 159M 1% /tmp
tmpfs 159M 36K 159M 1% /run

Thanks every one for helping.
I am just baffled how neither spotpear support nor the documentation could not help :frowning:

4 Likes