[Buildroot] stm32mp1 kernel won't boot on custom board

Ra C rcrichlow9000 at gmail.com
Sat Jan 28 22:52:37 UTC 2023


Thomas ,
Thanks for the comments.
Here are the steps I took:
1.  Decompiled the working dtb using :  dtc --sort --symbols -I dtb -O dts
-o working.dts stm32mp157a-fsmp1b.dtb
This gives the source device tree called working.dts (with no includes).

On the 5.4 kernel buildroot:
2.  Copied working.dts into output/build/linux-custom/arch/arm/boot/dts
3.  Ran make menuconfig to add working to
the BR2_LINUX_KERNEL_INTREE_DTS_NAME
4.  Rebuilt.
5.  Copied the output/images/working.dtb onto the sdcard and modified the
extlinux.conf to use this dtb.
6.  Boots OK.

7.  Built working.dtb using the same method as above using the 5.15 kernel
buildroot.
8.  Copied it to the sdcard and tried to boot the 5.15 kernel.
9.  The 5.15 kernel cannot find the root device and loops endlessly in
class_find_device() in drivers/base/class.c

Note that the 2 dtbs built using the 5.4 kernel buildroot and the 5.15
buildroot are identical (diff'ed them).

The rootwait kernel argument is present.  I tried removing it and got a
kernel panic.

Regards, Ramon


On Sat, Jan 28, 2023 at 3:21 PM Thomas Petazzoni <
thomas.petazzoni at bootlin.com> wrote:

> On Sat, 28 Jan 2023 14:52:12 -0600
> Ra C <rcrichlow9000 at gmail.com> wrote:
>
> > I have a custom stm32mp157a board which runs OK with a modified 5.4
> kernel.
> > I want to migrate to the latest stm supported kernel.
> > I built a stm32mp157a_dk1 target using the BR2_EXTERNAL feature described
> > here: https://github.com/bootlin/buildroot-external-st which builds a
> 5.15
> > kernel.
> >
> > Using the same dtb , the 5.15 kernel fails to mount the root device (a
>
> What do you mean by "using the same DTB" ?
>
> Make sure to use the DTB that matches the kernel version you're using.
> Even though DTBs are in theory kernel-version independent, there are
> quite frequently some subtle changes that causes a DTB written for
> kernel version X to not work with kernel version Y.
>
> Also, make sure to pass "rootwait" in your kernel command line, to tell
> the kernel to wait for the root device to appear. As SD/MMC devices are
> detected asynchronously, sometimes they are detected too late compared
> to the point where the kernel attempts to mount the rootfs.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20230128/a76dac54/attachment-0001.html>


More information about the buildroot mailing list