This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] TDA4VM: How to create Multiple rootfs partition of emmc ?

Part Number: TDA4VM

How to create multiple rootfs like partition of emmc in uboot ?

  • Please follow the below steps to create two rootfs partition.

    # STEP 1 On host genrate the uid
    uuidgen
    # STEP 2 On device set the uid
    setenv uuid_gpt_rootfs_2 <genrated_uid_key>
    # STEP 3 Set partition topology
    setenv partitions uuid_disk=\${uuid_gpt_disk}\;name=rootfs,start=6150MiB,size=30MiB,uuid=\${uuid_gpt_rootfs}\;name=rootfs_2,start=0,size=6144MiB,uuid=\${uuid_gpt_rootfs_2}
    # STEP 4 save env
    saveenv
    # STEP 5 create partion table
    gpt write mmc 0 ${partitions}
    # STEP 6 Reboot the device
    reboot
    # STEP 7 Now you will be able to see two partion use command "lsblk" to confirm
    # Now we will make fs type as ext4
    mkfs.ext4 /dev/mmcblk0p1 //rootfs_1
    mkfs.ext4 /dev/mmcblk0p2 //rootfs_2

    # STEP 8 create a mount handle
    mkdir /mnt/rootfs_1
    mkdir /mnt/rootfs_2

    # STEP 9 mount
    mount dev/mmcblk0p1 /mnt/rootfs_1
    mount dev/mmcblk0p2 /mnt/rootfs_2

    Now You can copy the file between two partition