2020-04-16 02:58 AM
I have followed this guide, https://wiki.st.com/stm32mpu/wiki/How_to_create_your_own_machine but that doesn't work well and requires a lot of manual changing to get the image booting. (it breaks extlinux stuff)
My custom board is too different as one that are supported by DK or EV devkits.
What is the best way of adding my board to yocto? I don't seem to find a tutorial or guide about this.
2020-04-20 05:02 AM
Hi @robin_elecgator
Indeed there's no complete tutorial probably because it was a bit complex to cover each and every possible use case.
I'm afraid you can not avoid manual change to fit with your hardware.
In order I can try to help you to progress, can you please futher details steps you have followed :
Did you generate Device Tree with CubeMX ?
Did you already success to boot your custom board with modified boot chain ( TF-A, U-boot ) ?
Can you please further details issue you have with extlinux ?
Olivier
2024-10-17 05:54 PM - edited 2024-10-17 07:33 PM
I did this long and painful process for STM32MP15 to migrate to kernel 6.0 from an older board, a product where the (an ST partner) SOM supplier had given up providing files for the ST ECO after 1.0 . There is no obligation from ST to 3rd party suppliers to provide their build trees for latest ECO's. That is not ST specific though. ST has 10 year rolling support but what values does that bring when 3rd party SOM/module suppliers often just support few first 1st ECO systems and then don't spend anytime to support newer ECO's or even the latest kernel as Yocto and the provided kernels are years behind mainstream. Then your SOM/module/ is EOL and your project /product is dead. You end up figuring it all out by yourself probably designing your own SOM/board/hardware w/o much support or guidance spending thousands of dollars and a huge amount of time.
Without the (hard to find) workshop slides (appendixes) detailing out the CubeMX steps (and how to work around some bugs in the ST sources) I would probably never achieved it. As with any workshop so far, ST rejected my application for the MP2 workshop. ( Hope ST will provides the slides & material not far away in some hidden location) around the time the DK arrives). The build files in the SDK are mainly targeted for ST board in ST provided build files. I bumped into too many problems using the ST build files for a custom board. Right now I am in process to do the same for the MP2 but build in tree instead of out of tree:
P.S : Take 1 to 3 months off to get this working. depending on your expertise and time + grow some hairs to pull out.
This is not using the Yocto chain.
1. Install the SDK
2, Build with ST make files for a ST board with success
3. Generate your own build scripts for TF-A, OPTEE, UBOOT and Kernel for an ST DK/EV board.
4. Generate Project with CubeMX for you board. check DDR, if you use PMIC (I2C) or not.. etc..
5. Add you own dts, defconfig files and update the .mk file. Start with TF-A and then OPTEE, then UBOOT , then KERNEL to make sure the scripts still builds without errors.
6. Create you custom scripts to generate the FIP.BIN image for TF-A, OPTEE, U-BOOT files
7. Copy/Flash an SD card with your custom .stm32 boot file nad FIP.BIN. Leave kernel as it is.
8. Use Yocto chain / Distribution package to generate your own distro.
You probably will bump into many panics to fix one by one, be persistent and don't give up.