2020-07-08 05:57 AM
Hi,
we were facing trouble booting the Ecosystem 2.0 with the new U-Boot (v2020.01-stm32mp-r1).
We are using buildroot as the tool to build our distribution. With the Ecosystem 1.2 we could build everything perfectly and the booting was fine too. We used your Github to get the sources for the trusted boot chain (TF-A, OP-TEE, U-Boot, Kernel).
Recently we migrated to the new Ecosystem 2.0. When using the sources from your github directly we encountered two problems:
We are not signing the images for now, so the checksum embedded in the header is the source for the failure of the image check (see log). The STM32 header of course isn't rewritten by U-Boot when it writes the environment variables (and it shouldn't do it of course).
My question is now, if that is some error on our side (maybe some configuration missed)? Is there some fix to get the environments in the ssbl and using the trusted boot chain?
Cheers
Solved! Go to Solution.
2020-07-09 06:30 AM
For point 2, we can see in the trace the first boot is ok and default u-boot mmc env is stored as default. Then at the next boot the u-boot partition is corrupted (TF-A checksum failed before loading u-boot).
mmc env is stored in the same partition of u-boot so probably the pb comes from a too small partition size for u-boot (enough for u-boot but not enough for u-boot + env variables).
This is what is to check.
2020-07-09 02:50 AM
Hello,
First you can find any reference concerning buildroot with openstlinux : https://bootlin.com/blog/building-a-linux-system-for-the-stm32mp1-basic-system/
For the kernel question:
It is normal not to have the same config in Github kernel compared to developer package.
Github kernel has only fragment 1 and 2 applied whereas on developper package your have additionnal fragment 3 to 6 related to the user land.
This way Github delivery is "userland agnostic" but this is not explaining why buildroot cannot build the kernel.
2020-07-09 03:17 AM
Hi,
thanks for your answer, I was not aware that not all config patches are applied to the Github.
To clarify, buildroot is able to build the kernel, it was just not starting when booting the DK2 Board (hanging after U-Boot 'Starting kernel' message). It was able to start when all the contig patches were applied to the kernel. Then the system boots up fine (the point 1 of my question is solved with it).
The point 2 (U-Boot problems) still remained. Obviously the image of U-Boot gets updated which then triggers the checksum error (the new checksum of the image is not matching the checksum of the .stm32 header).
2020-07-09 06:30 AM
For point 2, we can see in the trace the first boot is ok and default u-boot mmc env is stored as default. Then at the next boot the u-boot partition is corrupted (TF-A checksum failed before loading u-boot).
mmc env is stored in the same partition of u-boot so probably the pb comes from a too small partition size for u-boot (enough for u-boot but not enough for u-boot + env variables).
This is what is to check.
2020-07-09 06:40 AM
What I also see in your trace: TFA and Optee versions are old ones (but probably due to debug trial).
2020-07-09 10:30 PM
Hi @Bernard PUEL ,
thanks for the support! The expansion of the ssbl partition solved the problem!