• hello,

    I deployed an image on iMX8 (emmc) successfully but there was no free space left on flash. So i wanted to erase the flash completely and deploy new image.

    After erasing it, I have a problem to deploy new image. I get the following error: "No partition table -mmc 0 ".

    Can you please advise me how to solve it.

    Thank you.

  • Hello,

    there always has to be a master boot record available (MBR) at block 0 in the user partition of the eMMC. It is the same for your host PC, where you need to organize your filesystem. For information about it, you can look up the partitioning of MBR and maybe GPT.

    If you just want to increase the size for the rootfilesystem, you can do so by increasing BR2_TARGET_ROOTFS_EXT2_SIZE. Building the standard configuration in Buildroot should generate a binary called "sdcard.img". This image contains the MBR, the FAT partition with kernel and device tree and the EXT2 partition of the rootfilesystem. You can write this image to block 0 of the user partition to deploy every image you build with Buildroot.

    In the following post I explained the basic commands when writing to the eMMC:

    Build Image error

    Your F&S support team

  • Hello,

    Thank you for information but it didn't help me.

    as I said there is no partition table on eMMc and I couldn't find any information in PDF files how to make new partition.

    It is not possible to deploy new image too because of this problem. please check the following commands:

  • Hello,

    please load the sdcard.img to the loadaddr with a command like "tftp sdcard.img".

    Afterwards you can execute the following commands:

    1. => mmc dev 0
    2. switch to partitions #0, OK
    3. mmc0(part 0) is current device
    4. => mmc write $loadaddr 0x0 0x8e120

    This should restore the partition table on block 0.

    Your F&S support team

  • Hello,

    Thank you. It solved the partition problem.

    As you suggested to increase the rootfilesystem size, I increased size of BR2_TARGET_ROOTFS_EXT2_SIZE. Originally it was 250000, I changed it to 350000 for test (exact size=358400000) and saved it to emmc with following command:

    "mmc write $loadaddr 0x14000 0xAAE60"

    I get panic error by booting as follow:

    Can you please tell me how can I solve it.


  • It seems like you have written the image to the wrong sector number. Are you sure that 14000 is the correct number? You can call mc part

    in U-Boot to get the start sector number. Unfortunately the sector number is given in decimal, but you need a hexadecimal value for the mmc write command, so you have to convert the number first. In our example in our documentation LinuxOnFSBoards in chapter 5.11.2 we have a start sector number of 0x14001, not 0x14000. This would explain the failure in your case.

    But you also have to take care that the image size matches the partition size. It is no problem if the partition is bigger than the image that is written there, but the other way round is fatal. So you must not write an image to a partition that is larger than the partition size. Then you have to resize the partition first, either by writing a new MBR, or by using a partitioning tool like fdisk first.

    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,

    thank you for information.

    I think start sector number is correct. please check folloing information:

    Is there any information about resizing the partition in your documents?

    I need to resize the partition on board using fdisk tool first (default image) then deploy the new image. Is that correct?

  • Hello,

    I still couldn't resize the partition.

    In "Linux on F&S Boards" document says there is a script file "create_partitions.sh", but I couldn't find this script file as well.

    Can you please give me an instruction to do it.

    Thank you.

  • Hello,

    the create_partitions.sh script is outdated. If you build the images with the new BR2_TARGET_ROOTFS_EXT2_SIZE, the size of the RootFS as well as the size for the RootFS in the partition table (MBR) is updated correctly. The partition table (MBR) is stored inside the sdcard.img file under output/images. Because the partition table (MBR) is only one block/sector large, you can just write the first block/sector of sdcard.img to the eMMC to update the partition table (MBR). With that, the expected size for the RootFS partition is updated as well and the kernel panic should not occur.

    If it is still confusing that a partition table needs to be updated for a bigger partition, it may be advisable to do some research about the general idea behind the master boot record (MBR), which is used in the legacy boot mode and which is the predecessor to the GUID partition table (GPT), which is used for the UEFI boot mode.

    If you want a one line instruction to your problem:

    Write the whole sdcard.img to block 0x0 instead of trying to just update the rootfilesystem. Then the MBR should be correct.

    Your F&S support team

  • Hello,

    For information: sdcard.img couldn't be created because of wrong name (scfw_tcm.bin should be mx8qx-mek-scfw-tcm.bin) under board/f+s/fsimx8x/imx8-bootloader-prepare.sh.

    with this change we could create sdcard.img and also resize partition and rootfilesystem.

    thanks for your support.

  • Hello,

    glad that you have it working. The scfw_tcm.bin is located in the release directory under binaries/. It is copied when executing setup-buildroot once to output/images, but gets cleaned with a "make clean". In the next release this binary will be stored at board/f+s/fsimx8x/ and will get copied through the "imx8-bootloader-prepare.sh" script to the output/images location, so it will not get removed when cleaning. Sorry that I did not think of the scfw_tcm.bin. It is a bit of a niche software for the i.MX8/8X series.

    Your F&S support team