How to mount ARM's FM image

Home Forums Group Forum General Discussion How to mount ARM's FM image

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Christian Wansart Christian Wansart 2 years, 1 month ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #447
    Profile photo of Christian Wansart
    Christian Wansart
    Participant

    Hey there,

    I was trying out the cross compiler and wanted to test it in my virtual machine (Foundation Model). I’ve read the article┬╣ and it says to download/upload the file which is not possible, since my vm does not have an internet connection, so I tryied to mount it.
    I succeeded and wanted to share my experience with you.

    When you run
    $ fdisk -l vexpress64-openembedded_minimal-armv8-gcc-4.9_20150220-713.img
    you’ll get this output:

    Disk vexpress64-openembedded_minimal-armv8-gcc-4.9_20150220-713.img: 3 GiB, 3221225472 bytes, 6291456 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x00000000
    
    Device                                                          Boot  Start     End Sectors Size Id Type
    vexpress64-openembedded_minimal-armv8-gcc-4.9_20150220-713.img1 *        63  139262  139200  68M  e W95 FAT16 (LBA)
    vexpress64-openembedded_minimal-armv8-gcc-4.9_20150220-713.img2      139264 6291455 6152192   3G 83 Linux

    As you can see, the image file has 2 partitions and the second one is the one I’m interested in Above you can see that the sector size is 512 Bytes, so you have to multiply the start address of the second partition by 512 to get the correct offset. In this case it’d be: 139264*512 = 71303168

    Now I can mount it like this:

    # mkdir tmp
    # mount -o loop,offset=71303168 Foundation_Platformpkg/arm/vexpress64-openembedded_minimal-armv8-gcc-4.9_20150220-713.img tmp/

    Afterwards unmount it and remove the folder, if you’re in your users directory, since it was created as root:
    `# umount /path/to/tmp
    # rm -r /path/to/tmp`

    ┬╣ https://wiki.linaro.org/HowTo/HelloAarch64

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.