Closed mstaack closed 7 months ago
Thanks!
I would say yes. If you decide to give this a try I will try to support you. There is an mmc layer availabe so targeting a system with an eMMC would be quicker compared to raw NAND.
Roughly what would be needed:
Punchboot as of day boots in MON (Highest exception level) on 32-bit arm and in EL3 on 64-bit. The supported boot flow is PB -> ATF -> ...
The justification for doing it like this is that then the ATF component can be a part of an A/B boot setup and could be rolled back. Since ATF provides a run time interface to other parts of a system it seemed like the prudent thing to do.
I think it would be a good idea to add support for all exception levels. This would require some additional code in arch/* and some additional logic / kconfig setup for setting up the MMU.
Since the stm32mp uses parts of ATF as a first stage boot loader it make make sense to start there, i.e., keep that ATF as a first stage and add support for the USR and/or HYP levels in punchboot.
I'll keep this issue open for a while and if you decide to continue with this we can track updates here.
Jonas
Really great work with this!
Currently i am tinkering with the STM32MP1 MPU's from ST:
https://www.st.com/en/microcontrollers-microprocessors/stm32mp1-series.html
Boot Sequence:
https://www.st.com/content/ccc/resource/training/technical/product_training/group1/ac/45/53/56/1f/0b/47/68/STM32MP1-Software-Platform_boot_BOOT/files/STM32MP1-Software-Platform_boot_BOOT.pdf/_jcr_content/translations/en.STM32MP1-Software-Platform_boot_BOOT.pdf
https://wiki.st.com/stm32mpu/wiki/Boot_chain_overview
There is already a Bare-Metal Booting Repository with included C Drivers at: https://github.com/4ms/mp1-boot/tree/main/src/drivers
Would it be doable to port this in acceptable time into punchboot?
Cheers