almir-okato commented on issue #19994: URL: https://github.com/apache/nuttx/issues/19994#issuecomment-5603262079
> There is not need for a bootloader to call fetch_rom segments_lma, it is the image that needs it so it needs to be set in the NuttX source. I can incorporate the proposed change, but this will be a constant for the image in the end. There are indeed some extra changes required: there is no need for the image to call bootloader_init(), and it needs to zero the .bss. Hi @Laczen, correct me if I'm wrong, I assumed you are implementing the custom second stage bootloader as an application itself on `nuttx-apps`, like: - Custom bootloader = implementation out of the main NuttX tree, built as a Simple Boot image, so yes, `CONFIG_BOOTLOADER_OFFSET_IN_FLASH` is still a constant for all Simple Boot images, including this one; - Your custom compatible image = implementation out of the main NuttX tree, built as `CONFIG_ESPRESSIF_CUSTOM_IMAGE`, which probably this config would need to be added to the main tree, so the code can be branched as when to call the mentioned `bootloader_init()`, `fetch_rom_segments_lma()`, etc.. Since there's no "custom image" yet, those "calls, where and when" need to be discussed. I think it's important we avoid mixing the "Simple Boot" concept with a custom image, although they may be using the same image format header. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
