G510 Yocto v25 build and boot issue for SD Card boot

We have tested SDBoot on the G510 by following the steps below.
However, when booting from the SD card, it stops at “[drm] Initialized” and the watchdog timer restarts it.
What could be the cause?

We verified this by following the steps below:

[What we did]

[Current problem]
The system hangs up during kernel startup.
Some kind of watchdog timer is activated, causing the system to reboot and hang up repeatedly.

We created and tested the SD card according.
It started up successfully and appears to be working.

We have a question.

  • We think the image we received this time is an EFI boot. Is it possible to do a normal boot as described in the online instructions?
    (The first thing we tested was a normal boot.)
    We have not verified the EFIboot described in the web instructions.
    If EFIboot is the only option available, we will verify EFIBoot according to the web instructions.

  • We want to use Wayland from SD card boot. Please tell us how to do this.

1. For EFI build verification: According to your build error log.
1.a: You could simply set KERNEL_DANGLING_FEATURES_WARN_ONLY = “1” in conf/local.conf to avoid this error.

There is a hint in Yocto build log in file efi_build_log.txt

ERROR: linux-mtk-6.6.37-r0 do_kernel_metadata: Feature ‘cfg/efi.scc’ not found, this will cause configuration failures.

ERROR: linux-mtk-6.6.37-r0 do_kernel_metadata: Check the SRC_URI for meta-data repositories or directories that may be missing

ERROR: linux-mtk-6.6.37-r0 do_kernel_metadata: Set KERNEL_DANGLING_FEATURES_WARN_ONLY to ignore this issue

1.b: You can also cherry-pick the solution from

  1. For fitImage boot, please send us your SD card image (.wic), we could try to flash your image to SD card to check if it could boot on our G510 EVK.

I’ve found some error log in G510-SD-boot-error-v25.txt
[ 2.273385] mmc2: Failed to initialize a non-removable card

It seems some timing issue for MSDC card or controller.
Please help to modify the following steps and see if you can solve booting issue.

According to G510 sd build.txt
■SD card image creation

$ vim conf/local.conf

IMAGE_FSTYPES:append = " wic "

$ MACHINE=genio-510-evk bitbake rity-bringup-image

→Write to the SD card using the DD command

■Uboot seting

>setenv boot_targets mmc1

>setenv storage mmc

>setenv storage_num 1

>saveenv

>reset

Please keep storage_num as 0.
Which means change ‘setenv storage_num 0’.
Set storage_num 0 will let dtbprobe to scan dtb files from MMC0 instead of MMC1 (SD card).

Please check if change this line will let the OS boot from MMC1.

Regarding EFIbuild, we set "KERNEL_DANGLING_FEATURES_WARN_ONLY = “1"” and it built normally.

We were also able to confirm that it boots from SD card.

It seems that EFI WIC images can be booted from SD card.

I’ve used your image and rufus on windows to test the boot from SD card.
It works.

Setting
boot_targets=embedded or
boot_targets=mmc1
Both works with your rootfs image.

Please help to check if you’re connecting and peripheral devices.
For example: HDMI, DP, or USB?

If HDMI has been attached, please help to check if it could boot if HDMI is unplugged.

>If HDMI has been attached, please help to check if it could boot if HDMI is unplugged.
We don’t have any HDMI, DP, or USB connected.

If the WIC image starts, it may be that the image on the eMMC side is the cause.

We also performed additional verification.
We have confirmed that only the following 2.3 can be booted from SD card.
The manual lists setting number 4, but this setting does not work.
Is there anything we can infer from these results?

Please keep storage_num as 0.
Which means change ‘setenv storage_num 0’.

This ‘storage_num’ should be changed to ‘storage_dev’ as you’ve tested before.

This means the u-boot will trying to find dtb (by dtbprobe) from the ‘storage_dev’ number.
If the system need to read dtb from mmc0, then
the ‘storage’ should be mmc, ‘storage_dev’ should be 0.

Thanks for your reply.

We now understand that we need to set storage_dev to 0.

We were able to set it to O and boot the root filesystem from the SD card.