It is an old version I have worked with before. Below is the patch of what got me going.
I have not tried to boot a kernel of any sorts. I will move to U-boot from the ATF and validate hardware. It will be a while before I move to a kernel.
For anyone interested, Iâve ported my patches and imported the USB DFU support in to my v2.4-LS branch which is based on mainline v2.4. It seems to work on my machine.
I ran into the same issue and this discussion has been extremely informative.
I thank all participants of this forum.
Further on this i had few queries which are as follows
So i tried following this link :
to generate a bootable image for stm32mp157c-dk2 board which obviously works fine for the dk2 board but for the SoM board was not working since it has missing DTS changes.
After making those DTS changes i am still struggling to boot the board.
I am pretty sure no TF-A boot is involved here . My confusion is ->> do i need to make use of TF-A boot to make this work or it should work just fine with U-boot? @ekorre@166291
How far have you gotten it to boot? Thereâs two working stacks Iâve used with the Odyssey:
Mainline linux with some extra patches, mainline barebox, patched arm trusted firmware
Seeedâs kernel, Seeedâs u-boot
If youâre using stock Buildroot you might have to choose some forks for the kernel/u-boot, and change the dts. Try using Seeedâs kernel and u-boot.
For me the ddr power init fails , so basically i am at very beginning of it.
Also to my surprise few changes for i2c2 were already present in latest st kernel.
I just had to do minor changes such as changing i2c4 to i2c2 in stm32mp157a-dk1.dts
The reason for me to try all of this is because the RPMSG drivers are missing in the basic image provided by Seeed. Hence i am not able to perform IPC to M4.
I tried to two different ways:
Using latest buildroot : Kernel: 5.10-stm32mp-r1 and Uboot: v2020.10-stm32mp-r1 , with above dts changes.
OpenSTLinux with the dts changes mentioned here.
I will give a try to Seeedâs Kernel and U-boot once havenât tried it yet.
If youâre using ST kernel, you need to use ST ATF, which doesnât officially support this SoM and creates some kind of panic in the boot process. Regarding RPMSG drivers, do you mean kernel, bootloader or ATF?
I havenât hit the DDR power init issue so Iâm not too sure whatâs happening. Iâd recommend trying mainline kernel, ATF and boot with dts patches just to make sure your tools are working.
Okay. So here is the update. RPMSG does not work on the kernel level for Seeed Linux i have verified with the default image which one can download from odyssey wiki page.
Next I tried with Seedâs Kernel : stm32-4.19.y and Seedâs Uboot: v2018.11-stm32mp-r2.2 Got below output.
U-Boot SPL 2018.11-stm32mp-r2.2 (May 04 2021 - 12:50:45 +0530)
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
RAM: DDR3-1066/888 bin G 1x4Gb 533MHz v1.44
stpmic1_read: failed to read register 0x27 : -110ddr power init failed
If used with new U-boot which is not Seeedâs Uboot I get:
U-Boot SPL 2020.10-stm32mp-r1 (May 04 2021 - 10:54:10 +0530)
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
stpmic1_read: failed to read register x : 32stpmic1_read: failed to read register x : 24z
stpmic1_read: failed to read register x : 39ddr power init failed
For experimentation purpose , i just copied the default compiled dtb : stm32mp1-seeed-npi-base.dtb to /boot directory just to see if that solves the issue. Also made sure theentry was set to correct dtb file in extlinux/extlinux.conf .
@Baozhu@166291 I do not expected to be spoon fed. But i am really confused as to what exactly will make this board boot. I would really appreciate the directions now if this means to manually clone repos , cherry pick apply patches to make it work.
One key difference which i was able to make in above image is that given dtb in boot folder is with different name. (might be different in content as well) is stm32mp1-seeed-npi-base.dtb whose source is no where to be found. @166291
Could you please share the combination which you used along with patches on barebone kernel to make odyssey boot. I confirm that there are no dts files compatible to Seeedâs SoM present on their kernel. https://github.com/Seeed-Studio/linux
Also the U-boot does not contain compatible dts file.
I have hit a dead-end and requesting to help what exact patches you used. This is getting pretty frustrating tbh.
and also did you use buildroot or built each module individually?
Hi Nipun, sorry for the late response, I didnât check my email. I donât have a âknown goodâ working image at the moment without building one which would take a bit. I can do that if youâre still out of luck after this post, but Iâve included two images that probably work.
So after trying out what you suggested i was able to boot the board with the specified branch on the Seeedâs Kernel and Seeedâs U-boot only. Thanks a lot for pointing out to the branch.
However there is still a minor issue in U-boot where-in it is not able to pick up the correct supplied dtb , i have manually halt at U-boot terminal and provide it the same after which it works fine.
I tried downloading image supplied by you. But it seems download is failing so unable to complete it.
My only query which remains is:
I have lot of missing modules in the driver folder no where to be found. Basic drivers such as gpio , rpmsg, led etc itself are missing. Any ideas how to enable those?
Meanwhile I will give a shot to ATF stack suggested by you to see if it works.
I think to enable them youâd have to change the kernel config. As for device trees, youâll have to install the dtbs to where u-boot can find them. Try using the full device tree and also enabling the gpio/rpmsg/led kernel modules when building.
Thanks for the inputs.
Now i tried following things ->
Your kernel + Your Custome ATF (v2.2-LS + patch from @ekorre ) + Seeeedâs U-boot
ERROR: stm32_sdmmc2_init: DT Error
PANIC at PC : 0x2ffd91e1
I havenât changed any settings in make menuconfig just kept it stm32mp157c-dk2 all the way.
Except in case of kernel where i have kept it as : stm32mp157c-odyssey.dts
Update : Tried with 2.4-LS branch , getting the same kernel panic. Also few changes in the headers files were missing incorporated that , but still looking at the kernel panic.
Could you try doing a full build of my image using buildroot? Iâm not entirely sure whatâs happening. It could be that you need to use the dk1 dts instead, Iâm not sure which I modified. See the configs in my buildroot repo.