You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/16 05:28:34 UTC

[GitHub] [incubator-nuttx-apps] Donny9 opened a new pull request, #1142: nsh/script: support rc.sysinit script

Donny9 opened a new pull request, #1142:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1142

   
   ## Summary
   Follow: http://glennastory.net/boot/sysinit.html
   
   This is first script that init runs is rc.sysinit. This
   script does serval initialization tasks about basic service.
   
   The boot sequence currently provided to the board level is:
   ```
   board_earlyinitialize->
       board_lateinitialize(Peripherals driver, core driver, ...)->
   		run rcS script(mount fs, run service) ->
   	board_appinitialize->
   ```
   
   After this patch:
   The boot sequence currently provided to the board level is:
   ```
   board_earlyinitialize->
       board_lateinitialize(core driver,...)->
   		run rc.sysinit script(mount fs, run core service) ->
   	board_appinitialize->(Peripherals driver)
   		run rcS script(run other service)
   ```
   So, Peripheral drivers can do more with the file system and core services.
   
   Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
   
   ## Impact
   Support peripheral drivers can do more with the file system and core services.
   ## Testing
   Ci
   


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] pkarashchenko commented on pull request #1142: nsh/script: support rc.sysinit script

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #1142:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1142#issuecomment-1100677586

   Also
   ```
   config NSH_ROMFSETC
   	bool "Support ROMFS start-up script"
   	default n
   	depends on FS_ROMFS
   	---help---
   		Mount a ROMFS filesystem at /etc and provide a startup script
   		at /etc/init.d/rcS.  The default startup script will mount
   		a FAT FS RAMDISK at /tmp but the logic is easily extensible.
   ```
   So according to new flow mounting should be done in `rc.sysinit`, so we need to update description for `rcS`


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] pkarashchenko commented on pull request #1142: nsh/script: support rc.sysinit script

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #1142:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1142#issuecomment-1100677167

   This PR changes the init order, so I support that couple of existing configurations have to be updated:
   ```
   nuttx$ find . -name rcS
   ./boards/sim/sim/sim/src/etc/init.d/rcS
   ./boards/risc-v/qemu-rv/rv-virt/src/etc/init.d/rcS
   ./boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rcS
   ```
   I mean that we need to rework configs that use rcS as behavior will change. For example description states that after this change `run rc.sysinit script(mount fs, run core service)` and `boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rcS` contains:
   ```
   /* Create a RAMDISK and mount it at /tmp */
   
   mkrd -m CONFIG_NSH_FATDEVNO -s CONFIG_NSH_FATSECTSIZE CONFIG_NSH_FATNSECTORS
   mkfatfs CONCAT(/dev/ram, CONFIG_NSH_FATDEVNO)
   mount -t vfat CONCAT(/dev/ram, CONFIG_NSH_FATDEVNO) CONFIG_NSH_FATMOUNTPT
   ```
   So according to new description the mount part of `boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rcS` should be moved to `boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rc.sysinit`. The same for other.


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] Donny9 commented on pull request #1142: nsh/script: support rc.sysinit script

Posted by GitBox <gi...@apache.org>.
Donny9 commented on PR #1142:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1142#issuecomment-1101465045

   > We need to update `Default Start-Up Behavior` in `README.md` to reflect a new flow
   
   Done!


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] pkarashchenko merged pull request #1142: nsh/script: support rc.sysinit script

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #1142:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1142


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] pkarashchenko commented on pull request #1142: nsh/script: support rc.sysinit script

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #1142:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1142#issuecomment-1100677877

   We need to update `Default Start-Up Behavior` in `README.md` to reflect a new flow


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] Donny9 commented on pull request #1142: nsh/script: support rc.sysinit script

Posted by GitBox <gi...@apache.org>.
Donny9 commented on PR #1142:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1142#issuecomment-1101464914

   > This PR changes the init order, so I support that couple of existing configurations have to be updated:
   > 
   > ```
   > nuttx$ find . -name rcS
   > ./boards/sim/sim/sim/src/etc/init.d/rcS
   > ./boards/risc-v/qemu-rv/rv-virt/src/etc/init.d/rcS
   > ./boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rcS
   > ```
   > 
   > I mean that we need to rework configs that use rcS as behavior will change. For example description states that after this change `run rc.sysinit script(mount fs, run core service)` and `boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rcS` contains:
   > 
   > ```
   > /* Create a RAMDISK and mount it at /tmp */
   > 
   > mkrd -m CONFIG_NSH_FATDEVNO -s CONFIG_NSH_FATSECTSIZE CONFIG_NSH_FATNSECTORS
   > mkfatfs CONCAT(/dev/ram, CONFIG_NSH_FATDEVNO)
   > mount -t vfat CONCAT(/dev/ram, CONFIG_NSH_FATDEVNO) CONFIG_NSH_FATMOUNTPT
   > ```
   > 
   > So according to new description the mount part of `boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rcS` should be moved to `boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rc.sysinit`. The same for other.
   
   Done. 


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org