0

I am using buidroot for QEMU and generate the bootable image for qemu_arm_ebbr_defconfig

I want to add my custom partition which is to be appear when i give "df -h" command but it's not coming. Without any changes when i give "df-h" command i am getting below output:

# 
# 
# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               181.9M     28.7M    139.2M  17% /
devtmpfs                461.6M         0    461.6M   0% /dev
tmpfs                   494.6M         0    494.6M   0% /dev/shm
tmpfs                   494.6M     28.0K    494.6M   0% /tmp
tmpfs                   494.6M     16.0K    494.6M   0% /run
# 

I come to know that genimage.cfg file is used for this. so i make changes in board/qemu/arm-ebbr/genimage.cfg this file.

  • Below is default board/qemu/arm-ebbr/genimage.cfg file:
image efi-part.vfat {
    vfat {
        file EFI {
            image = "efi-part/EFI"
        }

        file zImage {
            image = "zImage"
        }
    }

    size = 128M
}

image disk.img {
    hdimage {
        partition-table-type = "gpt"
    }

    partition boot {
        image = "efi-part.vfat"
        partition-type-uuid = U
        offset = 32K
        bootable = true
    }

    partition root {
        partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3
        image = "rootfs.ext2"
    }
}

  • Below is board/qemu/arm-ebbr/genimage.cfg my modified file:
image efi-part.vfat {
    vfat {
        file EFI {
            image = "efi-part/EFI"
        }

        file zImage {
            image = "zImage"
        }
    }

    size = 128M
}

image myhome.ext4 {
      name = "myhome"
      ext4{}
      size = 10M
}

image disk.img {
    hdimage {
        partition-table-type = "gpt"
    }

    partition boot {
        image = "efi-part.vfat"
        partition-type-uuid = U
        offset = 32K
        bootable = true
    }

    partition root {
        partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3
        image = "rootfs.ext2"
    }

    partition test_part {                
                image = "myhome.ext4"
        }
}


  • After modifying "board/qemu/arm-ebbr/genimage.cfg" file as above then buid using $make command. I just added test_part partition as above then boot the image using "./output/images/start-qemu.sh" then i check using "df -h" command but my partition isn't coming.

  • Below is the output of df -h command:

# 
# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               181.9M     28.7M    139.2M  17% /
devtmpfs                461.6M         0    461.6M   0% /dev
tmpfs                   494.6M         0    494.6M   0% /dev/shm
tmpfs                   494.6M     28.0K    494.6M   0% /tmp
tmpfs                   494.6M     16.0K    494.6M   0% /run
# 

I am new to this can anyone let me know why i am not getting my partition when i give "df -h" command even though i modified "board/qemu/arm-ebbr/genimage.cfg" file?

0 Answers0