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/05/10 02:32:18 UTC
[GitHub] [incubator-nuttx-apps] tanushreebaindur opened a new pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
tanushreebaindur opened a new pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709
## Summary
C file changes:
examples/bastest/bastest_main.c
examples/elf/elf_main.c
examples/module/module_main.c
examples/posix_spawn/spawn_main.c
examples/romfs/romfs_main.c
examples/sotest/sotest_main.c
examples/unionfs/unionfs_main.c
## Impact
Depends on defconfig changes in nuttx. PR is https://github.com/apache/incubator-nuttx/pull/3689
## Testing
Tested on local simulator
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-837721899
@tanushreebaindur could you squash your change into one patch? BTW, there is compiler error in sotest:
https://github.com/apache/incubator-nuttx-apps/pull/709/checks?check_run_id=2547117654
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-839419764
Ok, could you squash the change into one patch? You can run the below command:
```
git rebase --interactive HEAD~7
change pick to squash in editor
git push -f origin my-new-branch
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-836142901
@tanushreebaindur please fix the below nxstyle warning:
```
../nuttx/tools/checkpatch.sh -g 842f149c7865a1be45fb1812dc10094b7fa01b33..HEAD
Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:202:25: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:222:25: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:242:25: error: Operator/assignment must be preceded with whitespace
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] tanushreebaindur commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
tanushreebaindur commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-836700639
> @tanushreebaindur please fix the below nxstyle warning too:
>
> ```
> ../nuttx/tools/checkpatch.sh -g 842f149c7865a1be45fb1812dc10094b7fa01b33..HEAD
> Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:202:25: error: Operator/assignment must be preceded with whitespace
> Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:222:25: error: Operator/assignment must be preceded with whitespace
> Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:242:25: error: Operator/assignment must be preceded with whitespace
> ```
This is one of the bugs in the nxstyle program: https://github.com/apache/incubator-nuttx/issues/628
Line 202 in sotest_main.c is referred to in the description. Lines 222 and 242 are similar to line 202.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] tanushreebaindur commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
tanushreebaindur commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-839413516
@xiaoxiang781216 : I have now updated https://github.com/apache/incubator-nuttx/pull/3689 with defconfig files for sotest32 and module32 after testing on the simulator. I will generate the patch after the build is successful
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-839385596
@tanushreebaindur, Could you look at the build break:
https://github.com/apache/incubator-nuttx-apps/pull/709/checks?check_run_id=2558161975
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 edited a comment on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-837721899
@tanushreebaindur could you squash your change into one patch? BTW, there is compiler error in sotest to resolve first:
https://github.com/apache/incubator-nuttx-apps/pull/709/checks?check_run_id=2547117654
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-839703354
Let's merge both PR and watch the potential build break.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#discussion_r629032746
##########
File path: examples/elf/elf_main.c
##########
@@ -364,7 +362,8 @@ int main(int argc, FAR char *argv[])
if (ret < 0)
{
- errmsg("ERROR: exec(%s) failed: %d\n", dirlist[i], errno);
+ errmsg("ERROR: exec(%s) failed: %s\n",
+ dirlist[i], strerror(errno));
Review comment:
```suggestion
dirlist[i], strerror(errno));
```
##########
File path: examples/posix_spawn/spawn_main.c
##########
@@ -231,14 +236,14 @@ int main(int argc, FAR char *argv[])
/* Mount the file system */
message("Mounting ROMFS filesystem at target=%s with source=%s\n",
- MOUNTPT, CONFIG_EXAMPLES_ELF_DEVPATH);
+ MOUNTPT, CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH);
Review comment:
```suggestion
MOUNTPT, CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH);
```
##########
File path: examples/unionfs/unionfs_main.c
##########
@@ -149,18 +156,22 @@ int main(int argc, FAR char *argv[])
MS_RDONLY, NULL);
if (ret < 0)
{
- printf("ERROR: File system 1 mount failed: %d\n", errno);
+ printf("ERROR: File system 1 mount failed: %s\n", strerror(errno));
return EXIT_FAILURE;
}
- /* Create a RAM disk for file system 2 */
+ /* Create a RAM disk for file system 2 */
+
+ desc.minor = CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_B; /* Minor device number of the ROM disk. */
+ desc.nsectors = NSECTORS(btestdir_img_len); /* The number of sectors in the ROM disk */
+ desc.image = (FAR uint8_t *)btestdir_img; /* File system image */
+
+ ret = boardctl(BOARDIOC_ROMDISK, (uintptr_t)&desc);
- ret = romdisk_register(CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_B, btestdir_img,
- NSECTORS(btestdir_img_len),
- CONFIG_EXAMPLES_UNIONFS_SECTORSIZE);
if (ret < 0)
{
- printf("ERROR: Failed to register file system 1: %d\n", ret);
+ printf("ERROR: Failed to create file system 2 RAM disk: %s\n",
+ strerror(errno));
Review comment:
```suggestion
strerror(errno));
```
##########
File path: examples/unionfs/unionfs_main.c
##########
@@ -128,15 +129,21 @@
int main(int argc, FAR char *argv[])
{
int ret;
+ struct boardioc_romdisk_s desc;
/* Create a RAM disk for file system 1 */
- ret = romdisk_register(CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_A, atestdir_img,
- NSECTORS(atestdir_img_len),
- CONFIG_EXAMPLES_UNIONFS_SECTORSIZE);
+ desc.minor = CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_A; /* Minor device number of the ROM disk. */
+ desc.nsectors = NSECTORS(atestdir_img_len); /* The number of sectors in the ROM disk */
+ desc.sectsize = CONFIG_EXAMPLES_UNIONFS_SECTORSIZE; /* The size of one sector in bytes */
+ desc.image = (FAR uint8_t *)atestdir_img; /* File system image */
+
+ ret = boardctl(BOARDIOC_ROMDISK, (uintptr_t)&desc);
+
if (ret < 0)
{
- printf("ERROR: Failed to create file system 1 RAM disk\n");
+ printf("ERROR: Failed to create file system 1 RAM disk: %s\n",
+ strerror(errno));
Review comment:
```suggestion
strerror(errno));
```
##########
File path: examples/elf/elf_main.c
##########
@@ -257,7 +254,8 @@ int main(int argc, FAR char *argv[])
ret = mount(NULL, MOUNTPT, "cromfs", MS_RDONLY, NULL);
if (ret < 0)
{
- errmsg("ERROR: mount(%s, cromfs) failed: %d\n", MOUNTPT, errno);
+ errmsg("ERROR: mount(%s, cromfs) failed: %s\n",
+ MOUNTPT, strerror(errno));
Review comment:
```suggestion
MOUNTPT, strerror(errno));
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#discussion_r629820291
##########
File path: examples/elf/elf_main.c
##########
@@ -364,7 +362,8 @@ int main(int argc, FAR char *argv[])
if (ret < 0)
{
- errmsg("ERROR: exec(%s) failed: %d\n", dirlist[i], errno);
+ errmsg("ERROR: exec(%s) failed: %s\n",
+ dirlist[i], strerror(errno));
Review comment:
```suggestion
dirlist[i], strerror(errno));
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] tanushreebaindur edited a comment on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
tanushreebaindur edited a comment on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-836700639
> @tanushreebaindur please fix the below nxstyle warning too:
>
> ```
> ../nuttx/tools/checkpatch.sh -g 842f149c7865a1be45fb1812dc10094b7fa01b33..HEAD
> Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:202:25: error: Operator/assignment must be preceded with whitespace
> Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:222:25: error: Operator/assignment must be preceded with whitespace
> Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:242:25: error: Operator/assignment must be preceded with whitespace
> ```
This is one of the bugs in the nxstyle program: https://github.com/apache/incubator-nuttx/issues/628
Line 202 in sotest_main.c is referred to in https://github.com/apache/incubator-nuttx/issues/628. Lines 222 and 242 are similar to line 202.
Please let me know how to proceed.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] tanushreebaindur commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
tanushreebaindur commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-839457126
> Ok, could you squash the change into one patch? You can run the below command:
>
> ```
> git rebase --interactive HEAD~7
> change pick to squash in editor
> git push -f origin my-new-branch
> ```
Sorry, I have an elementary question. When I enter 'git log' this is what I see:
tanushreebaindur@pop-os:~/nuttx-code/apps$ git log
commit bb6379d1b0f7ef484ddfda00364c3d5e5b714793 (HEAD -> test/my-new-branch, origin/test/my-new-branch)
Author: Tanushree Baindur <ta...@gmail.com>
Date: Sat May 8 13:33:52 2021 -0500
Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
C file changes:
examples/bastest/bastest_main.c
examples/elf/elf_main.c
examples/module/module_main.c
examples/posix_spawn/spawn_main.c
examples/romfs/romfs_main.c
examples/sotest/sotest_main.c
examples/unionfs/unionfs_main.c
commit 842f149c7865a1be45fb1812dc10094b7fa01b33 (upstream/master, origin/master, master)
Author: Simon Piriou <sp...@gmail.com>
Date: Sat May 8 00:36:30 2021 +0200
netutils: add Wake-on-LAN util
commit b52de67f6eee117ce7b622c669b452ee22cdd3e5
Author: Diego Herranz <di...@diegoherranz.com>
Date: Sat May 8 08:41:55 2021 +0100
examples/hdc1008_demo: fix header path
As recommended by the nxstyle CI check.
So I only see the first commit with commit id bb6379d1b0f7ef484ddfda00364c3d5e5b714793. I don't see the next 6 commits which I did through this page by pressing the "Commit Suggestion" button. How do I see those on my terminal?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 edited a comment on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-836142901
@tanushreebaindur please fix the below nxstyle warning too:
```
../nuttx/tools/checkpatch.sh -g 842f149c7865a1be45fb1812dc10094b7fa01b33..HEAD
Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:202:25: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:222:25: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/sotest/sotest_main.c:242:25: error: Operator/assignment must be preceded with whitespace
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] tanushreebaindur commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
tanushreebaindur commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-839398040
> @tanushreebaindur, Could you look at the build break:
> https://github.com/apache/incubator-nuttx-apps/pull/709/checks?check_run_id=2558161975
Yes, I am taking a look at it now. I had not enabled CONFIG_BOARDCTL_ROMDISK and CONFIG_LIBC_STRERROR in boards/sim/sim/sim/configs/sotest32/defconfig. That is why the build is breaking for Configuration/Tool: sim/sotest32 on lines 201 and 204.
I will also enable CONFIG_BOARDCTL_ROMDISK and CONFIG_LIBC_STRERROR in boards/sim/sim/sim/configs/module32/defconfig, as I have replaced romdisk_register() with boardctl() in examples/module/module_main.c.
I will test both these corrections and update the PR: apache/incubator-nuttx#3689 with the defconfig files for sotest32 and module32.
I had enabled CONFIG_BOARDCTL_ROMDISK and CONFIG_LIBC_STRERROR in boards/sim/sim/sim/configs/sotest/defconfig. I don't understand why it is breaking the build for Configuration/Tool: sim/sotest on lines 180 and 183. I am able to run examples/sotest without any errors on the simulator with the changes I have already submitted.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] tanushreebaindur commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
tanushreebaindur commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-839481579
> > So I only see the first commit with commit id [bb6379d](https://github.com/apache/incubator-nuttx-apps/commit/bb6379d1b0f7ef484ddfda00364c3d5e5b714793). I don't see the next 6 commits which I did through this page by pressing the "Commit Suggestion" button. How do I see those on my terminal?
>
> you can fetch from your github repo like this:
>
> ```
> git fetch origin
> git rebase origin/test/my-new-branch
> ```
@xiaoxiang781216 Thank you.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #709:
URL: https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-839466294
> So I only see the first commit with commit id [bb6379d](https://github.com/apache/incubator-nuttx-apps/commit/bb6379d1b0f7ef484ddfda00364c3d5e5b714793). I don't see the next 6 commits which I did through this page by pressing the "Commit Suggestion" button. How do I see those on my terminal?
you can fetch from your github repo like this:
```
git fetch origin
git rebase origin/test/my-new-branch
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org