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 2021/07/06 07:15:15 UTC

[GitHub] [incubator-nuttx] cwespressif opened a new pull request #4077: boards/esp32c3: Add romfs configuration

cwespressif opened a new pull request #4077:
URL: https://github.com/apache/incubator-nuttx/pull/4077


   ## Summary
   
   Add romfs configuration.
   
   ## Impact
   
   ## Testing
   
   - Tested with ESP32C3-Devkit
   
   `./tools/configure esp32c3-devkit:romfs`


-- 
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] saramonteiro commented on a change in pull request #4077: boards/esp32c3: Add romfs configuration

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #4077:
URL: https://github.com/apache/incubator-nuttx/pull/4077#discussion_r664436947



##########
File path: boards/risc-v/esp32c3/esp32c3-devkit/src/README.txt
##########
@@ -0,0 +1,120 @@
+README
+======
+
+  Overview
+  --------
+  This directory contains logic to support a custom ROMFS start-up script.
+  This startup script is used by by the NSH when it starts provided that

Review comment:
       ```suggestion
     This startup script is used by the NSH when it starts provided that
   ```




-- 
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] saramonteiro commented on a change in pull request #4077: boards/esp32c3: Add romfs configuration

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #4077:
URL: https://github.com/apache/incubator-nuttx/pull/4077#discussion_r664444764



##########
File path: boards/risc-v/esp32c3/esp32c3-devkit/src/README.txt
##########
@@ -0,0 +1,120 @@
+README
+======
+
+  Overview
+  --------
+  This directory contains logic to support a custom ROMFS start-up script.
+  This startup script is used by by the NSH when it starts provided that
+  CONFIG_NSH_ARCHROMFS=y.  The script provides a ROMFS volume that will be
+  mounted at /etc and will look like this at run-time:
+
+    NuttShell (NSH) NuttX-10.1.0-RC1
+    MOTD: username=admin password=Administrator
+    nsh> ls -Rl /etc
+    /etc:
+     dr-xr-xr-x       0 .
+     -r--r--r--      20 group
+     dr-xr-xr-x       0 init.d/
+     -r--r--r--      35 passwd
+    /etc/init.d:
+     dr-xr-xr-x       0 ..
+     -r--r--r--     110 rcS
+    nsh>
+
+  /etc/init.d/rcS is the start-up script; /etc/passwd is a the password
+  file.  It supports a single user:
+
+    USERNAME:  admin
+    PASSWORD:  Administrator
+
+    nsh> cat /etc/passwd
+    admin:8Tv+Hbmr3pLddSjtzL0kwC:0:0:/
+
+  The encrypted passwords in the provided passwd file are only valid if the
+  TEA key is set to:  012345678 9abcdef0 012345678 9abcdef0.  Changes to either
+  the key or the password word will require regeneration of the nsh_romfimg.h
+  header file.
+
+  The format of the password file is:
+
+    user:x:uid:gid:home
+
+  Where:
+    user:  User name
+    x:     Encrypted password
+    uid:   User ID (0 for now)
+    gid:   Group ID (0 for now)
+    home:  Login directory (/ for now)
+
+  /etc/group is a group file.  It is not currently used.
+
+    nsh> cat /etc/group
+    root:*:0:root,admin
+
+  The format of the group file is:
+
+    group:x:gid:users
+
+  Where:
+    group:  The group name
+    x:      Group password
+    gid:    Group ID
+    users:  A comma separated list of members of the group
+
+  Updating the ROMFS File System
+  ------------------------------
+  The content on the nsh_romfsimg.h header file is generated from a sample
+  directory structure. You can directly modify files under etc/ folder,
+  The build system will regenerate nsh_romfsimg.h automatically.
+
+  See the esp32c3-devkit/nsh configuration for an example of the use of this file
+  system.
+
+  Replacing the Password File
+  ---------------------------
+  The esp32c3-devkit/nsh configuration can also be used to create a new password file.
+  First, make these configuration changes:
+
+    1. Disable logins
+
+       - CONFIG_NSH_CONSOLE_LOGIN=y
+       + # CONFIG_NSH_CONSOLE_LOGIN is not set
+         # CONFIG_NSH_TELNET_LOGIN is not set
+
+    2. Move the password file to a write-able file system:
+
+       - CONFIG_FSUTILS_PASSWD_PATH="/etc/passwd"
+       + CONFIG_FSUTILS_PASSWD_PATH="/tmp/passwd"
+
+    3. make the password file modifiable
+
+       - CONFIG_FSUTILS_PASSWD_READONLY=y
+       # CONFIG_FSUTILS_PASSWD_READONLY is not set
+
+  Now rebuild the simulation.  No login should be required to enter the
+  shell and you should find the 'useradd', 'userdel', and 'passwd' commands
+  available in the help summary, provided that they are enabled.  Make
+  certain that the 'useradd' command is not disabled:
+
+      # CONFIG_NSH_DISABLE_USERADD is not set
+
+  Use the NSH 'useradd' command to add new uses with new user passwords like:

Review comment:
       ```suggestion
     Use the NSH 'useradd' command to add new user with new user passwords like:
   ```




-- 
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] saramonteiro commented on a change in pull request #4077: boards/esp32c3: Add romfs configuration

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #4077:
URL: https://github.com/apache/incubator-nuttx/pull/4077#discussion_r664436947



##########
File path: boards/risc-v/esp32c3/esp32c3-devkit/src/README.txt
##########
@@ -0,0 +1,120 @@
+README
+======
+
+  Overview
+  --------
+  This directory contains logic to support a custom ROMFS start-up script.
+  This startup script is used by by the NSH when it starts provided that

Review comment:
       ```suggestion
     This startup script is used by the NSH when it starts provided that
   ```

##########
File path: boards/risc-v/esp32c3/esp32c3-devkit/src/README.txt
##########
@@ -0,0 +1,120 @@
+README
+======
+
+  Overview
+  --------
+  This directory contains logic to support a custom ROMFS start-up script.
+  This startup script is used by by the NSH when it starts provided that
+  CONFIG_NSH_ARCHROMFS=y.  The script provides a ROMFS volume that will be
+  mounted at /etc and will look like this at run-time:
+
+    NuttShell (NSH) NuttX-10.1.0-RC1
+    MOTD: username=admin password=Administrator
+    nsh> ls -Rl /etc
+    /etc:
+     dr-xr-xr-x       0 .
+     -r--r--r--      20 group
+     dr-xr-xr-x       0 init.d/
+     -r--r--r--      35 passwd
+    /etc/init.d:
+     dr-xr-xr-x       0 ..
+     -r--r--r--     110 rcS
+    nsh>
+
+  /etc/init.d/rcS is the start-up script; /etc/passwd is a the password

Review comment:
       ```suggestion
     /etc/init.d/rcS is the start-up script; /etc/passwd is the password
   ```

##########
File path: boards/risc-v/esp32c3/esp32c3-devkit/src/README.txt
##########
@@ -0,0 +1,120 @@
+README
+======
+
+  Overview
+  --------
+  This directory contains logic to support a custom ROMFS start-up script.
+  This startup script is used by by the NSH when it starts provided that
+  CONFIG_NSH_ARCHROMFS=y.  The script provides a ROMFS volume that will be
+  mounted at /etc and will look like this at run-time:
+
+    NuttShell (NSH) NuttX-10.1.0-RC1
+    MOTD: username=admin password=Administrator
+    nsh> ls -Rl /etc
+    /etc:
+     dr-xr-xr-x       0 .
+     -r--r--r--      20 group
+     dr-xr-xr-x       0 init.d/
+     -r--r--r--      35 passwd
+    /etc/init.d:
+     dr-xr-xr-x       0 ..
+     -r--r--r--     110 rcS
+    nsh>
+
+  /etc/init.d/rcS is the start-up script; /etc/passwd is a the password
+  file.  It supports a single user:
+
+    USERNAME:  admin
+    PASSWORD:  Administrator
+
+    nsh> cat /etc/passwd
+    admin:8Tv+Hbmr3pLddSjtzL0kwC:0:0:/
+
+  The encrypted passwords in the provided passwd file are only valid if the
+  TEA key is set to:  012345678 9abcdef0 012345678 9abcdef0.  Changes to either
+  the key or the password word will require regeneration of the nsh_romfimg.h

Review comment:
       ```suggestion
     the key or the password word will require regeneration of the nsh_romfsimg.h
   ```

##########
File path: boards/risc-v/esp32c3/esp32c3-devkit/src/README.txt
##########
@@ -0,0 +1,120 @@
+README
+======
+
+  Overview
+  --------
+  This directory contains logic to support a custom ROMFS start-up script.
+  This startup script is used by by the NSH when it starts provided that
+  CONFIG_NSH_ARCHROMFS=y.  The script provides a ROMFS volume that will be
+  mounted at /etc and will look like this at run-time:
+
+    NuttShell (NSH) NuttX-10.1.0-RC1
+    MOTD: username=admin password=Administrator
+    nsh> ls -Rl /etc
+    /etc:
+     dr-xr-xr-x       0 .
+     -r--r--r--      20 group
+     dr-xr-xr-x       0 init.d/
+     -r--r--r--      35 passwd
+    /etc/init.d:
+     dr-xr-xr-x       0 ..
+     -r--r--r--     110 rcS
+    nsh>
+
+  /etc/init.d/rcS is the start-up script; /etc/passwd is a the password
+  file.  It supports a single user:
+
+    USERNAME:  admin
+    PASSWORD:  Administrator
+
+    nsh> cat /etc/passwd
+    admin:8Tv+Hbmr3pLddSjtzL0kwC:0:0:/
+
+  The encrypted passwords in the provided passwd file are only valid if the
+  TEA key is set to:  012345678 9abcdef0 012345678 9abcdef0.  Changes to either
+  the key or the password word will require regeneration of the nsh_romfimg.h
+  header file.
+
+  The format of the password file is:
+
+    user:x:uid:gid:home
+
+  Where:
+    user:  User name
+    x:     Encrypted password
+    uid:   User ID (0 for now)
+    gid:   Group ID (0 for now)
+    home:  Login directory (/ for now)
+
+  /etc/group is a group file.  It is not currently used.
+
+    nsh> cat /etc/group
+    root:*:0:root,admin
+
+  The format of the group file is:
+
+    group:x:gid:users
+
+  Where:
+    group:  The group name
+    x:      Group password
+    gid:    Group ID
+    users:  A comma separated list of members of the group
+
+  Updating the ROMFS File System
+  ------------------------------
+  The content on the nsh_romfsimg.h header file is generated from a sample
+  directory structure. You can directly modify files under etc/ folder,
+  The build system will regenerate nsh_romfsimg.h automatically.
+
+  See the esp32c3-devkit/nsh configuration for an example of the use of this file
+  system.
+
+  Replacing the Password File
+  ---------------------------
+  The esp32c3-devkit/nsh configuration can also be used to create a new password file.
+  First, make these configuration changes:
+
+    1. Disable logins
+
+       - CONFIG_NSH_CONSOLE_LOGIN=y
+       + # CONFIG_NSH_CONSOLE_LOGIN is not set
+         # CONFIG_NSH_TELNET_LOGIN is not set
+
+    2. Move the password file to a write-able file system:
+
+       - CONFIG_FSUTILS_PASSWD_PATH="/etc/passwd"
+       + CONFIG_FSUTILS_PASSWD_PATH="/tmp/passwd"
+
+    3. make the password file modifiable
+
+       - CONFIG_FSUTILS_PASSWD_READONLY=y
+       # CONFIG_FSUTILS_PASSWD_READONLY is not set
+
+  Now rebuild the simulation.  No login should be required to enter the
+  shell and you should find the 'useradd', 'userdel', and 'passwd' commands
+  available in the help summary, provided that they are enabled.  Make
+  certain that the 'useradd' command is not disabled:
+
+      # CONFIG_NSH_DISABLE_USERADD is not set
+
+  Use the NSH 'useradd' command to add new uses with new user passwords like:

Review comment:
       ```suggestion
     Use the NSH 'useradd' command to add new user with new user passwords like:
   ```




-- 
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] saramonteiro commented on a change in pull request #4077: boards/esp32c3: Add romfs configuration

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #4077:
URL: https://github.com/apache/incubator-nuttx/pull/4077#discussion_r664438584



##########
File path: boards/risc-v/esp32c3/esp32c3-devkit/src/README.txt
##########
@@ -0,0 +1,120 @@
+README
+======
+
+  Overview
+  --------
+  This directory contains logic to support a custom ROMFS start-up script.
+  This startup script is used by by the NSH when it starts provided that
+  CONFIG_NSH_ARCHROMFS=y.  The script provides a ROMFS volume that will be
+  mounted at /etc and will look like this at run-time:
+
+    NuttShell (NSH) NuttX-10.1.0-RC1
+    MOTD: username=admin password=Administrator
+    nsh> ls -Rl /etc
+    /etc:
+     dr-xr-xr-x       0 .
+     -r--r--r--      20 group
+     dr-xr-xr-x       0 init.d/
+     -r--r--r--      35 passwd
+    /etc/init.d:
+     dr-xr-xr-x       0 ..
+     -r--r--r--     110 rcS
+    nsh>
+
+  /etc/init.d/rcS is the start-up script; /etc/passwd is a the password
+  file.  It supports a single user:
+
+    USERNAME:  admin
+    PASSWORD:  Administrator
+
+    nsh> cat /etc/passwd
+    admin:8Tv+Hbmr3pLddSjtzL0kwC:0:0:/
+
+  The encrypted passwords in the provided passwd file are only valid if the
+  TEA key is set to:  012345678 9abcdef0 012345678 9abcdef0.  Changes to either
+  the key or the password word will require regeneration of the nsh_romfimg.h

Review comment:
       ```suggestion
     the key or the password word will require regeneration of the nsh_romfsimg.h
   ```




-- 
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] xiaoxiang781216 merged pull request #4077: boards/esp32c3: Add romfs configuration

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #4077:
URL: https://github.com/apache/incubator-nuttx/pull/4077


   


-- 
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] xiaoxiang781216 merged pull request #4077: boards/esp32c3: Add romfs configuration

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #4077:
URL: https://github.com/apache/incubator-nuttx/pull/4077


   


-- 
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] saramonteiro commented on a change in pull request #4077: boards/esp32c3: Add romfs configuration

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #4077:
URL: https://github.com/apache/incubator-nuttx/pull/4077#discussion_r664437831



##########
File path: boards/risc-v/esp32c3/esp32c3-devkit/src/README.txt
##########
@@ -0,0 +1,120 @@
+README
+======
+
+  Overview
+  --------
+  This directory contains logic to support a custom ROMFS start-up script.
+  This startup script is used by by the NSH when it starts provided that
+  CONFIG_NSH_ARCHROMFS=y.  The script provides a ROMFS volume that will be
+  mounted at /etc and will look like this at run-time:
+
+    NuttShell (NSH) NuttX-10.1.0-RC1
+    MOTD: username=admin password=Administrator
+    nsh> ls -Rl /etc
+    /etc:
+     dr-xr-xr-x       0 .
+     -r--r--r--      20 group
+     dr-xr-xr-x       0 init.d/
+     -r--r--r--      35 passwd
+    /etc/init.d:
+     dr-xr-xr-x       0 ..
+     -r--r--r--     110 rcS
+    nsh>
+
+  /etc/init.d/rcS is the start-up script; /etc/passwd is a the password

Review comment:
       ```suggestion
     /etc/init.d/rcS is the start-up script; /etc/passwd is the password
   ```




-- 
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