Boot Failure on Verdin iMX8MP Using Yocto Image with SquashFS + OverlayFS (Invalid partition 2)

Hi, I’m working on a Verdin iMX8MP board and attempting to build and boot a custom Yocto image that uses SquashFS as the root filesystem with OverlayFS for writable support (i.e., read-only root with a writable overlay on top). I’m using the Toradex BSP based on Yocto and the tdx-reference-multimedia-image as my base image.
I followed the official Toradex blog post here to configure and build my image and I used Toradex Easy Installer (TEZI) to flash the image onto the eMMC, as described in the same article:
https://www.toradex.com/ja-jp/blog/shi-yongsquashfs-heoverlayfs-ti-gao-qian-ru-shilinux-wen-jian-xi-tong-ke-kao-xing

When I try to boot the board, I get the following error in the boot log:
U-Boot 2024.07-7.3.0-devel+git.3f772959501c (Jul 01 2024 - 18:07:18 +0000)

CPU: Freescale i.MX8MP[8] rev1.1 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 35C
Reset cause: POR
DRAM: 8 GiB
Core: 176 devices, 31 uclasses, devicetree: separate
WDT: Started watchdog@30280000 with servicing every 1000ms (60s timeout)
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC… Reading from MMC(2)… OK
In: serial@30880000
Out: serial@30880000
Err: serial@30880000
Model: Toradex 0070 Verdin iMX8M Plus Quad 8GB WB IT V1.1A
Serial#: 15629381
Carrier: Toradex UNKNOWN CARRIER BOARD V1.1C, Serial# 11477516
SEC0: RNG instantiated
Setting variant to wifi
Net: eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME]
Hit any key to stop autoboot: 0
MMC: no card present
switch to partitions #0, OK
mmc2(part 0) is current device
Scanning mmc 2:1…
Found U-Boot script /boot.scr
5974 bytes read in 2 ms (2.8 MiB/s)

Executing script at 50280000

Loading DeviceTree: imx8mp-verdin-wifi-dev.dtb
87820 bytes read in 2 ms (41.9 MiB/s)
118 bytes read in 1 ms (115.2 KiB/s)
Working FDT set to 50200000
Applying Overlay: verdin-imx8mp_hdmi_overlay.dtbo
2219 bytes read in 2 ms (1.1 MiB/s)
Applying Overlay: verdin-imx8mp_dsi-to-hdmi_overlay.dtbo
4099 bytes read in 2 ms (2 MiB/s)
Applying Overlay: verdin-imx8mp_spidev_overlay.dtbo
561 bytes read in 1 ms (547.9 KiB/s)
** Invalid partition 2 **
Booting from mmc failed!
SCRIPT FAILED: continuing…
87820 bytes read in 2 ms (41.9 MiB/s)
MMC: no card present
No EFI system partition
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
Loading Boot0000 ‘mmc 2’ failed
EFI boot manager: Cannot load any image
starting USB…
Bus usb@38200000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@38200000 for devices… No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
6 USB Device(s) found
scanning usb for storage devices… 1 Storage Device(s) found
PCIE-0: Link down
ethernet@30bf0000 Waiting for PHY auto negotiation to complete… TIMEOUT !
phy_startup() failed: -110
FAILED: -110
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17
Abort

So What is the correct way to build and structure the image (partition layout, rootfs type, etc.) to support SquashFS + OverlayFS as per the guide? or Is there any **missing step in the TEZI packaging?

Any guidance or example TEZI image with working SquashFS+OverlayFS setup would be helpful.

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for your detailed question and for referencing the official guide. The error Invalid partition 2 during boot points to an issue with the eMMC partition layout or the boot config in the TEZI image for your Verdin iMX8MP.

Let’s break down the correct structure and help you verify the steps:

1. Yocto Build Configuration

In your build/conf/local.conf, ensure you have:

IMAGE_FSTYPES_append = " squashfs"

This ensures that Yocto generates a root filesystem in SquashFS format.

2. Partition Layout for TEZI

You need three main partitions when building your TEZI package [“image.json”]:

  1. BootFS (FAT32) – Kernel, device tree, and bootloader files.
  2. RootFS (SquashFS, RAW) – Your read-only filesystem.
  3. UserData (EXT4) – For the writable overlay.

See the detailed partitioning guidance here:
https://www.toradex.com/blog/shi-yongsquashfs-heoverlayfs-ti-gao-qian-ru-shilinux-wen-jian-xi-tong-ke-kao-xing
https://www.toradex.com/blog/squashfs-overlayfs-to-improve-embedded-linux-system-reliability

Sample snippet from image.json (showing relevant parts):

"rawfiles": [
  {
    "filename": "rootfs.squashfs",
    "partition": 2
  }
],
"partitions": [
  {
    "name": "boot",
    "size": "128M",
    "filesystem": "fat32"
  },
  {
    "name": "rootfs",
    "size`: "1024M",
    "filesystem": "raw"
  },
  {
    "name": "userdata",
    "size": "512M",
    "filesystem": "ext4"
  }
]
  • Adjust names/sizes based on your requirements.
  • The critical part is that the SquashFS partition is marked as raw, and the user/data/overlay partition is ext4.

3. U-Boot Boot Arguments

Boot script configuration should match the partitions. In boot.cmd (or via U-Boot env), ensure:

env set emmcargs_set 'env set rootfsargs root=/dev/mmcblk0p2 rootfstype=squashfs ro rootwait'
  • Here, /dev/mmcblk0p2 must point to your SquashFS root (partition 2).
  • If your image.json partition index is different, adjust this.

4. OverlayFS Mount in fstab

You’ll want to mount the overlay data partition for user-writable storage. In your rootfs image, /etc/fstab should contain something like:

/dev/mmcblk0p3  /media/data  auto  defaults,sync,noauto 0 0

5. Common Pitfalls

  • If TEZI fails to create the right partitions, double-check your image.json, especially the partition numbering and type for SquashFS.
  • Invalid partition 2 means the U-Boot script tries to mount a non-existent or incorrectly formatted partition.
  • The partition indices used in U-Boot and fstab must correspond to the actual order on the disk.
  • Make sure the SquashFS root partition is indeed written as a raw image.

6. Example Reference

The linked blogs provide a step-by-step with example image.json and boot scripts:

7. Next Debug Steps

  • Inspect the resulting partitions on the eMMC after flashing (e.g., using U-Boot shell or a Linux PC).
  • Confirm that partition 2 has your rootfs.squashfs (and not another file system or missing partition).
  • Check image.json and the file names/paths for any typos or mistakes.

Would you like a more specific example of a complete working image.json or further debugging steps? Let me know which step or area you would like more detail on!

Best regards,
Toradex AI Assistant.

https://www.toradex.com/blog/shi-yongsquashfs-heoverlayfs-ti-gao-qian-ru-shilinux-wen-jian-xi-tong-ke-kao-xing
https://www.toradex.com/blog/squashfs-overlayfs-to-improve-embedded-linux-system-reliability