lupyuen commented on issue #16099: URL: https://github.com/apache/nuttx/issues/16099#issuecomment-2767577601
Hi @Laczen: For my RISC-V and Arm64 Ports of NuttX, I mount the ROM FS like this... https://lupyuen.org/articles/avaota.html#mount-the-romfs ```c struct boardioc_romdisk_s desc; desc.minor = RAMDISK_DEVICE_MINOR; desc.nsectors = NSECTORS((ssize_t)__ramdisk_size); desc.sectsize = SECTORSIZE; desc.image = __ramdisk_start; int ret = boardctl(BOARDIOC_ROMDISK, (uintptr_t)&desc); ``` __ramdisk points to a Memory Region defined in the Linker Map: https://lupyuen.org/articles/avaota.html#linker-script ```c /* Linker Script: We added the RAM Disk (16 MB) */ MEMORY { dram (rwx) : ORIGIN = 0x40800000, LENGTH = 2M pgram (rwx) : ORIGIN = 0x40A00000, LENGTH = 4M /* w/ cache */ ramdisk (rwx) : ORIGIN = 0x40E00000, LENGTH = 16M /* w/ cache */ } /* We'll reference these in our code */ __ramdisk_start = ORIGIN(ramdisk); __ramdisk_size = LENGTH(ramdisk); __ramdisk_end = ORIGIN(ramdisk) + LENGTH(ramdisk); ``` And I copied the ROM FS, from the NuttX Image into the above Memory Region: https://lupyuen.org/articles/avaota.html#copy-the-romfs Would this work for ESP32? -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org