[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #101: Make sure examples/elf testbuild pass in parallel build

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #101: Make sure 
examples/elf testbuild pass in parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/101#discussion_r384322591
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -57,6 +57,8 @@ else
   FSIMG_HDR = $(TESTS_DIR)/cromfs.h
 endif
 
+elf_main.c: tests/symtab.c
 
 Review comment:
   > * symtab.c and $(FSIMG_HDR) are built with the same rule (L62-63)
   
   Yes.
   
   > * elf_main.c (well, strictly speaking elf_main.o) depends on $(FSIMG_HDR) 
and dirlist.h, not symtab.c
   
   Yes, that is why is it better to let elf_main.c depends on $(FSIMG_HDR) and 
dirlist.h.

   > * usually Make.dep will know elf_main.o depends on tests/dirlist.h (it was 
the reason for 
[45bcfa8](https://github.com/apache/incubator-nuttx-apps/commit/45bcfa8b2eb1b0a84214a2bfc23f555ad8cf135e))
   > 
   
   Yes, but $(FSIMG_HDR) and dirlist.h is generated in another Makefile, there 
isn't these files in the first time invoke. If elf_main.c has no relationship 
with symtab.c, elf_main.c may compile first and than can't find these header 
file.
   
   > i don't understand why you prefer to make this depend on symtab.c over 
those headers.
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] yamt commented on a change in pull request #380: arm: Fix "make export" for KERNEL build

2020-02-25 Thread GitBox
yamt commented on a change in pull request #380: arm: Fix "make export" for 
KERNEL build
URL: https://github.com/apache/incubator-nuttx/pull/380#discussion_r384319612
 
 

 ##
 File path: arch/arm/src/Makefile
 ##
 @@ -80,6 +80,10 @@ endif
 # The "head" object
 
 HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
+ifneq ($(STARTUP_OBJS),)
+  # Assume C by default
+  STARTUP_COBJS ?= $(STARTUP_OBJS)
+endif
 STARTUP_OBJS ?= $(HEAD_OBJ)
 
 Review comment:
   isn't it necessary for non KERNEL configs?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #101: Make sure examples/elf testbuild pass in parallel build

2020-02-25 Thread GitBox
yamt commented on a change in pull request #101: Make sure examples/elf 
testbuild pass in parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/101#discussion_r384316989
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -57,6 +57,8 @@ else
   FSIMG_HDR = $(TESTS_DIR)/cromfs.h
 endif
 
+elf_main.c: tests/symtab.c
 
 Review comment:
   * symtab.c and $(FSIMG_HDR) are built with the same rule (L62-63)
   * elf_main.c (well, strictly speaking elf_main.o) depends on $(FSIMG_HDR) 
and dirlist.h, not symtab.c
   * usually Make.dep will know elf_main.o depends on tests/dirlist.h (it was 
the reason for 45bcfa8b2eb1b0a84214a2bfc23f555ad8cf135e)
   
   i don't understand why you prefer to make this depend on symtab.c over those 
headers.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #101: Make sure examples/elf testbuild pass in parallel build

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #101: Make sure 
examples/elf testbuild pass in parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/101#discussion_r384311328
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -57,6 +57,8 @@ else
   FSIMG_HDR = $(TESTS_DIR)/cromfs.h
 endif
 
+elf_main.c: tests/symtab.c
 
 Review comment:
   Yes, if we let elf_main.c depends on tests/symtab.c, then make know that it 
should build symtab.c then test before elf_main.c, but if we change elf_main.c 
depends on $(FSIMG_HDR), but without any action, then how make ensure the 
header generated before it start to compile elf_main.c?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #380: arm: Fix "make export" for KERNEL build

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #380: arm: Fix "make 
export" for KERNEL build
URL: https://github.com/apache/incubator-nuttx/pull/380#discussion_r384311198
 
 

 ##
 File path: arch/arm/src/Makefile
 ##
 @@ -80,6 +80,10 @@ endif
 # The "head" object
 
 HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
+ifneq ($(STARTUP_OBJS),)
+  # Assume C by default
+  STARTUP_COBJS ?= $(STARTUP_OBJS)
+endif
 STARTUP_OBJS ?= $(HEAD_OBJ)
 
 Review comment:
   How about we remove line 83 to 87, and put $(STARTUP_OBJS) to line 175 
directly? it doesn't make sense to assign HEAD_OBJ to STARTUP_OBJS if it is 
empty because HEAD_OBJ is for kernel startup and never suitable for userspace 
startup.
   Also, we need modify other arch to ensure crt0.c get compiled.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on issue #102: Revert "Remove libapps.a from LDLIBS"

2020-02-25 Thread GitBox
yamt commented on issue #102: Revert "Remove libapps.a from LDLIBS"
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/102#issuecomment-591275413
 
 
   @xiaoxiang781216 
   i don't know. i'm still trying to learn how they are.
   all documented steps seem to be the latter.
   
https://github.com/apache/incubator-nuttx/blob/master/boards/arm/sama5/sama5d4-ek/README.txt#L4018


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx-apps] branch master updated: import/Make.defs: Avoid flock errors

2020-02-25 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
 new b2e9b46  import/Make.defs: Avoid flock errors
b2e9b46 is described below

commit b2e9b46fb1b567f5a03f8f53a133e6e0a7a914ad
Author: YAMAMOTO Takashi 
AuthorDate: Wed Feb 26 15:35:49 2020 +0900

import/Make.defs: Avoid flock errors

Sync with tools/Config.mk
---
 import/Make.defs | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/import/Make.defs b/import/Make.defs
index 27095a3..a484a31 100644
--- a/import/Make.defs
+++ b/import/Make.defs
@@ -97,8 +97,7 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
 DELIM = $(strip \)
 
 define ARCHIVE
-   @echo AR: $2
-   $(Q) $(AR) $1 $(2)
+   $(AR) $1 $(2)
 endef
 
 define DELFILE
@@ -125,8 +124,7 @@ else
 DELIM = $(strip /)
 
 define ARCHIVE
-   @echo "AR: $2"
-   $(Q) $(AR) $1 $(2) || { echo "$(AR) $1 FAILED!" ; exit 1 ; }
+   $(AR) $1 $(2)
 endef
 
 define DELFILE



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #105: import/Make.defs: Avoid flock errors

2020-02-25 Thread GitBox
xiaoxiang781216 merged pull request #105: import/Make.defs: Avoid flock errors
URL: https://github.com/apache/incubator-nuttx-apps/pull/105
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on issue #102: Revert "Remove libapps.a from LDLIBS"

2020-02-25 Thread GitBox
xiaoxiang781216 commented on issue #102: Revert "Remove libapps.a from LDLIBS"
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/102#issuecomment-591273266
 
 
   @yamt I have one question: do you plan build nuttx image and elf image in 
one step for kernel build? or build nuttx image, export sdk and then build elf 
image?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #102: Revert "Remove libapps.a from LDLIBS"

2020-02-25 Thread GitBox
xiaoxiang781216 merged pull request #102: Revert "Remove libapps.a from LDLIBS"
URL: https://github.com/apache/incubator-nuttx-apps/pull/102
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx-apps] 01/02: Revert "Remove libapps.a from LDLIBS"

2020-02-25 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 9d59f5e524059a24f48cfbe798cf3de0259cdbc5
Author: YAMAMOTO Takashi 
AuthorDate: Wed Feb 26 14:08:40 2020 +0900

Revert "Remove libapps.a from LDLIBS"

It was necessary for PROTECTED build.

This reverts commit 4ee39e208048f075860179a0a2b60c3a651cf16e.
---
 Make.defs | 8 
 1 file changed, 8 insertions(+)

diff --git a/Make.defs b/Make.defs
index dcc6402..505af7d 100644
--- a/Make.defs
+++ b/Make.defs
@@ -152,3 +152,11 @@ endif
 
 CFLAGS   += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
 CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
+
+ifneq ($(CONFIG_BUILD_KERNEL),y)
+ifeq ($(WINTOOL),y)
+  LDLIBS ?= "${shell cygpath -w $(BIN)}"
+else
+  LDLIBS ?= $(BIN)
+endif
+endif



[incubator-nuttx-apps] 02/02: Put back libapps to the default LDLIBS, even for KERNEL build

2020-02-25 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 38f006464b2c3fed92eaf5ff18ba5b5e6b952781
Author: YAMAMOTO Takashi 
AuthorDate: Wed Feb 26 14:30:56 2020 +0900

Put back libapps to the default LDLIBS, even for KERNEL build

This is a partial revert of b5cfd9344439c9aeb25c539431a034bdca6b5154
("apps/: Modification to build system: Unified application compilation 
rules")
---
 Make.defs | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Make.defs b/Make.defs
index 505af7d..7f30e9e 100644
--- a/Make.defs
+++ b/Make.defs
@@ -153,10 +153,8 @@ endif
 CFLAGS   += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
 CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
 
-ifneq ($(CONFIG_BUILD_KERNEL),y)
 ifeq ($(WINTOOL),y)
   LDLIBS ?= "${shell cygpath -w $(BIN)}"
 else
   LDLIBS ?= $(BIN)
 endif
-endif



[incubator-nuttx-apps] branch master updated (2abf0f5 -> 38f0064)

2020-02-25 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.


from 2abf0f5  examples/elf/tests: Ensure "build" before "install"
 new 9d59f5e  Revert "Remove libapps.a from LDLIBS"
 new 38f0064  Put back libapps to the default LDLIBS, even for KERNEL build

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Make.defs | 6 ++
 1 file changed, 6 insertions(+)



[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #101: Make sure examples/elf testbuild pass in parallel build

2020-02-25 Thread GitBox
yamt commented on a change in pull request #101: Make sure examples/elf 
testbuild pass in parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/101#discussion_r384299827
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -57,6 +57,8 @@ else
   FSIMG_HDR = $(TESTS_DIR)/cromfs.h
 endif
 
+elf_main.c: tests/symtab.c
 
 Review comment:
   i'm not sure what you mean.
   symtab.c is in CSRCS. (L40)
   it triggers the test folder build. (with VPATH)
   tests/symtab.c and $(FSIMG_HDR) are built with the same rule below, L62-63.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt opened a new pull request #105: import/Make.defs: Avoid flock errors

2020-02-25 Thread GitBox
yamt opened a new pull request #105: import/Make.defs: Avoid flock errors
URL: https://github.com/apache/incubator-nuttx-apps/pull/105
 
 
   Sync with tools/Config.mk


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #101: Make sure examples/elf testbuild pass in parallel build

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #101: Make sure 
examples/elf testbuild pass in parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/101#discussion_r384297246
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -57,6 +57,8 @@ else
   FSIMG_HDR = $(TESTS_DIR)/cromfs.h
 endif
 
+elf_main.c: tests/symtab.c
 
 Review comment:
   But, who do trigger thetest folder build? we have to duplicated the 
test/symtab.c action here, but this change will trigger test folder build 
twice. 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] yamt opened a new pull request #380: arm: Fix "make export" for KERNEL build

2020-02-25 Thread GitBox
yamt opened a new pull request #380: arm: Fix "make export" for KERNEL build
URL: https://github.com/apache/incubator-nuttx/pull/380
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] Bhindhiya opened a new pull request #104: IP Header issue for IPv4 fixed

2020-02-25 Thread GitBox
Bhindhiya opened a new pull request #104: IP Header issue for IPv4 fixed
URL: https://github.com/apache/incubator-nuttx-apps/pull/104
 
 
   In IP Forwarding application for IPv4, 
   the function 'net_ipv4addr_hdrcopy(dest,src) - (Path: 
nuttx/include/nuttx/net/ip.h),' 
   expects a pointer for copying source IP to destination IP.
   
   But in the application (Path: apps/examples/ipforward/ipforward.c), the 
value is passed directly instead of the address of the parameters which creates 
the issue.
   
   The issue is rectified by the above fix.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx-apps] branch master updated (16dc851 -> 2abf0f5)

2020-02-25 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.


from 16dc851  Revert "examples: usrsocktest: Fix errors in NoBlockRecv and 
BlockRecv tests"
 add 2abf0f5  examples/elf/tests: Ensure "build" before "install"

No new revisions were added by this update.

Summary of changes:
 examples/elf/tests/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #103: examples/elf/tests: Ensure "build" before "install"

2020-02-25 Thread GitBox
xiaoxiang781216 merged pull request #103: examples/elf/tests: Ensure "build" 
before "install"
URL: https://github.com/apache/incubator-nuttx-apps/pull/103
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] liuguo09 commented on issue #103: examples/elf/tests: Ensure "build" before "install"

2020-02-25 Thread GitBox
liuguo09 commented on issue #103: examples/elf/tests: Ensure "build" before 
"install"
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/103#issuecomment-591256179
 
 
   Please take @yamt patch. It's simple and more general : )


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] liuguo09 commented on a change in pull request #101: Make sure examples/elf testbuild pass in parallel build

2020-02-25 Thread GitBox
liuguo09 commented on a change in pull request #101: Make sure examples/elf 
testbuild pass in parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/101#discussion_r384289211
 
 

 ##
 File path: examples/elf/tests/errno/Makefile
 ##
 @@ -86,6 +86,6 @@ clean:
$(call DELFILE, $(BIN))
$(call CLEAN)
 
-install:
+install: $(BIN)
 
 Review comment:
   You are right. I think your approach is simple and more general.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #102: Revert "Remove libapps.a from LDLIBS"

2020-02-25 Thread GitBox
yamt commented on a change in pull request #102: Revert "Remove libapps.a from 
LDLIBS"
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/102#discussion_r384282534
 
 

 ##
 File path: Make.defs
 ##
 @@ -152,3 +152,11 @@ endif
 
 CFLAGS   += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
 CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
+
+ifneq ($(CONFIG_BUILD_KERNEL),y)
 
 Review comment:
   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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on issue #103: examples/elf/tests: Ensure "build" before "install"

2020-02-25 Thread GitBox
yamt commented on issue #103: examples/elf/tests: Ensure "build" before 
"install"
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/103#issuecomment-591245850
 
 
   no. i commented on the patch.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on issue #103: examples/elf/tests: Ensure "build" before "install"

2020-02-25 Thread GitBox
xiaoxiang781216 commented on issue #103: examples/elf/tests: Ensure "build" 
before "install"
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/103#issuecomment-591245197
 
 
   @yamt @liuguo09 do we need both patch?
   https://github.com/apache/incubator-nuttx-apps/pull/101


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #101: Make sure examples/elf testbuild pass in parallel build

2020-02-25 Thread GitBox
yamt commented on a change in pull request #101: Make sure examples/elf 
testbuild pass in parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/101#discussion_r384280143
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -57,6 +57,8 @@ else
   FSIMG_HDR = $(TESTS_DIR)/cromfs.h
 endif
 
+elf_main.c: tests/symtab.c
 
 Review comment:
   i guess it's more straightforward to require $(FSIMG_HDR) instead.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #101: Make sure examples/elf testbuild pass in parallel build

2020-02-25 Thread GitBox
yamt commented on a change in pull request #101: Make sure examples/elf 
testbuild pass in parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/101#discussion_r384279773
 
 

 ##
 File path: examples/elf/tests/errno/Makefile
 ##
 @@ -86,6 +86,6 @@ clean:
$(call DELFILE, $(BIN))
$(call CLEAN)
 
-install:
+install: $(BIN)
 
 Review comment:
   if we do this at this level, we should remove "build" step from 
examples/elf/tests/Makefile.
   
   an alternative: https://github.com/apache/incubator-nuttx-apps/pull/103


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt opened a new pull request #103: examples/elf/tests: Ensure "build" before "install"

2020-02-25 Thread GitBox
yamt opened a new pull request #103: examples/elf/tests: Ensure "build" before 
"install"
URL: https://github.com/apache/incubator-nuttx-apps/pull/103
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #102: Revert "Remove libapps.a from LDLIBS"

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #102: Revert "Remove 
libapps.a from LDLIBS"
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/102#discussion_r384278838
 
 

 ##
 File path: Make.defs
 ##
 @@ -152,3 +152,11 @@ endif
 
 CFLAGS   += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
 CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
+
+ifneq ($(CONFIG_BUILD_KERNEL),y)
 
 Review comment:
   Need remove ifneq ($(CONFIG_BUILD_KERNEL),y), libapps.a is also needed for 
kernel build. Actually, the original code don't have this guard, which is added 
by my team member:(
   commit b5cfd9344439c9aeb25c539431a034bdca6b5154
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #102: Revert "Remove libapps.a from LDLIBS"

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #102: Revert "Remove 
libapps.a from LDLIBS"
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/102#discussion_r384278838
 
 

 ##
 File path: Make.defs
 ##
 @@ -152,3 +152,11 @@ endif
 
 CFLAGS   += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
 CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
+
+ifneq ($(CONFIG_BUILD_KERNEL),y)
 
 Review comment:
   Need remove ifneq ($(CONFIG_BUILD_KERNEL),y), libapps.a is also needed for 
kernel build.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on issue #102: Revert "Remove libapps.a from LDLIBS"

2020-02-25 Thread GitBox
yamt commented on issue #102: Revert "Remove libapps.a from LDLIBS"
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/102#issuecomment-591242622
 
 
   @xiaoxiang781216 taught me how it works
   https://github.com/apache/incubator-nuttx-apps/pull/95


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt opened a new pull request #102: Revert "Remove libapps.a from LDLIBS"

2020-02-25 Thread GitBox
yamt opened a new pull request #102: Revert "Remove libapps.a from LDLIBS"
URL: https://github.com/apache/incubator-nuttx-apps/pull/102
 
 
   It was necessary for PROTECTED build.
   
   This reverts commit 4ee39e208048f075860179a0a2b60c3a651cf16e.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #95: Avoid calling ARCHIVE in multiple places (again)

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #95: Avoid calling 
ARCHIVE in multiple places (again)
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/95#discussion_r384277498
 
 

 ##
 File path: Application.mk
 ##
 @@ -163,6 +157,9 @@ endif
 
 install:: $(PROGLIST)
 
+show-objs:
 
 Review comment:
   Maybe, but it isn't harm to do the lock like other place, and make the code 
more consistent.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #95: Avoid calling ARCHIVE in multiple places (again)

2020-02-25 Thread GitBox
yamt commented on a change in pull request #95: Avoid calling ARCHIVE in 
multiple places (again)
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/95#discussion_r384276901
 
 

 ##
 File path: Application.mk
 ##
 @@ -163,6 +157,9 @@ endif
 
 install:: $(PROGLIST)
 
+show-objs:
 
 Review comment:
   so, flock in $(APPDIR)/Makefile (step 4) should not be necessary because 
there should not be concurrent ARCHIVE activities (step 1) at that point?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #95: Avoid calling ARCHIVE in multiple places (again)

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #95: Avoid calling 
ARCHIVE in multiple places (again)
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/95#discussion_r384274672
 
 

 ##
 File path: Application.mk
 ##
 @@ -163,6 +157,9 @@ endif
 
 install:: $(PROGLIST)
 
+show-objs:
 
 Review comment:
   The right sequence is:
   1.Compile all source files(except main) and archieve into libapps.a
 Note: this is done step by step, with this patch we do it in one step
   2.Compile main source file and link with libapps.a to get the executable
 Note:
 a.For non kernel build, the executable still contian the unresolved 
symbols outside libapps.a(.e.g. printf, open...).
 b.For kernel build, since LDLIBS contain all userspace library, the 
executable is totally self contained.
 c.NuttX support the explicit dynamic loading, but not implicit dynamic 
loading now, which mean that the executable must be self contained in kernel 
mode, but it can call dlopen to load the shared library manully.
   3.Generate symbols source file from all exectuable unresolved symbols
   Note: For kernel build, symbol table should be empty as note 2.b.
   4.Compile and archieve symbols source file into libapps.a
   Note: this is required for two reason:
   a.binfmt need the symbol table to load the exectutable at runtime
   b.symbol table ensure the linker don't remove these unresolved symbols
   5.libapps.a link with other libarary to get nuttx.bin or userspace.bin
   Note: this just happen for flat and protected build, all exectuable need put 
into the file system and load through binfmt subsytem in kernel build, no big 
image blob(nuttx.bin or userspace.bin) exist at all.
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] anchao commented on a change in pull request #98: netutils: add support to save wapi config to file system

2020-02-25 Thread GitBox
anchao commented on a change in pull request #98: netutils: add support to save 
wapi config to file system
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/98#discussion_r384271298
 
 

 ##
 File path: include/wireless/wapi.h
 ##
 @@ -95,6 +95,12 @@
 # define SOCK_WAPI SOCK_STREAM
 #endif
 
+#ifndef CONFIG_WIRELESS_WAPI_INITCONF
+#define wapi_load_config(ifname, confname, conf) NULL
+#define wapi_unload_config(load)
+#define wapi_save_config(ifname, confname, conf) 0
 
 Review comment:
   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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] anchao commented on a change in pull request #98: netutils: add support to save wapi config to file system

2020-02-25 Thread GitBox
anchao commented on a change in pull request #98: netutils: add support to save 
wapi config to file system
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/98#discussion_r384271257
 
 

 ##
 File path: include/wireless/wapi.h
 ##
 @@ -95,6 +95,12 @@
 # define SOCK_WAPI SOCK_STREAM
 #endif
 
+#ifndef CONFIG_WIRELESS_WAPI_INITCONF
+#define wapi_load_config(ifname, confname, conf) NULL
 
 Review comment:
   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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] anchao commented on a change in pull request #98: netutils: add support to save wapi config to file system

2020-02-25 Thread GitBox
anchao commented on a change in pull request #98: netutils: add support to save 
wapi config to file system
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/98#discussion_r384271277
 
 

 ##
 File path: include/wireless/wapi.h
 ##
 @@ -95,6 +95,12 @@
 # define SOCK_WAPI SOCK_STREAM
 #endif
 
+#ifndef CONFIG_WIRELESS_WAPI_INITCONF
+#define wapi_load_config(ifname, confname, conf) NULL
+#define wapi_unload_config(load)
 
 Review comment:
   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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #95: Avoid calling ARCHIVE in multiple places (again)

2020-02-25 Thread GitBox
yamt commented on a change in pull request #95: Avoid calling ARCHIVE in 
multiple places (again)
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/95#discussion_r384270110
 
 

 ##
 File path: Application.mk
 ##
 @@ -163,6 +157,9 @@ endif
 
 install:: $(PROGLIST)
 
+show-objs:
 
 Review comment:
   are there some sort of circular dependency?
   libapps -> SYMTABSRC -> install -> linking with LDLIBS, including libapps
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #95: Avoid calling ARCHIVE in multiple places (again)

2020-02-25 Thread GitBox
yamt commented on a change in pull request #95: Avoid calling ARCHIVE in 
multiple places (again)
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/95#discussion_r384265516
 
 

 ##
 File path: Application.mk
 ##
 @@ -163,6 +157,9 @@ endif
 
 install:: $(PROGLIST)
 
+show-objs:
 
 Review comment:
   thank you for explanation.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #95: Avoid calling ARCHIVE in multiple places (again)

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #95: Avoid calling 
ARCHIVE in multiple places (again)
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/95#discussion_r384263687
 
 

 ##
 File path: Application.mk
 ##
 @@ -163,6 +157,9 @@ endif
 
 install:: $(PROGLIST)
 
+show-objs:
 
 Review comment:
   for module build, this is two step process:
   1.All source files(except main) compile and archieve into libapps like 
builtin.
   2.Main soruce file compile and link with LDLIBS to form the final image.
   The difference from kernel mode and other mode is LDLIBS content:
   1.Kernel mode: LDLIBS has all userspace library(libc, libproxy, libapps...), 
so the binary is totally self contain.
   2.Other mode: LDLIBS just contain libapps, so the binary will link with the 
base image to resovle the symbol at in runtime.
   But, I see your patch remove libapps from LDLIBS:
   https://github.com/apache/incubator-nuttx-apps/pull/83/files
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] liuguo09 opened a new pull request #101: Make sure examples/elf testbuild pass in parallel build

2020-02-25 Thread GitBox
liuguo09 opened a new pull request #101: Make sure examples/elf testbuild pass 
in parallel build
URL: https://github.com/apache/incubator-nuttx-apps/pull/101
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #95: Avoid calling ARCHIVE in multiple places (again)

2020-02-25 Thread GitBox
yamt commented on a change in pull request #95: Avoid calling ARCHIVE in 
multiple places (again)
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/95#discussion_r384256121
 
 

 ##
 File path: Application.mk
 ##
 @@ -163,6 +157,9 @@ endif
 
 install:: $(PROGLIST)
 
+show-objs:
 
 Review comment:
   maybe i misunderstood how module thing works.
   only MAINOBJ turns into a binary and others (OBJS) go into libapps?
   how can it work with KERNEL build?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx] branch master updated: Fix make target dependencies

2020-02-25 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 5f540d7  Fix make target dependencies
5f540d7 is described below

commit 5f540d79a1c07696672246ba5acab3f24099f205
Author: YAMAMOTO Takashi 
AuthorDate: Tue Feb 25 16:33:30 2020 +0900

Fix make target dependencies

"all" and "depend" targets should not be made concurrently.
I occasionally see APPDIR build failures because of this.
---
 tools/LibTargets.mk | 60 ++---
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/tools/LibTargets.mk b/tools/LibTargets.mk
index efe3042..ee896fe 100644
--- a/tools/LibTargets.mk
+++ b/tools/LibTargets.mk
@@ -40,115 +40,115 @@
 #
 # Possible kernel-mode builds
 
-libs$(DELIM)libc$(DELIM)libkc$(LIBEXT): context
+libs$(DELIM)libc$(DELIM)libkc$(LIBEXT): pass2dep
$(Q) $(MAKE) -C libs$(DELIM)libc TOPDIR="$(TOPDIR)" libkc$(LIBEXT) 
KERNEL=y EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libkc$(LIBEXT): libs$(DELIM)libc$(DELIM)libkc$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-libs$(DELIM)libnx$(DELIM)libknx$(LIBEXT): context
+libs$(DELIM)libnx$(DELIM)libknx$(LIBEXT): pass2dep
$(Q) $(MAKE) -C libs$(DELIM)libnx TOPDIR="$(TOPDIR)" libknx$(LIBEXT) 
KERNEL=y EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libknx$(LIBEXT): libs$(DELIM)libnx$(DELIM)libknx$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-mm$(DELIM)libkmm$(LIBEXT): context
+mm$(DELIM)libkmm$(LIBEXT): pass2dep
$(Q) $(MAKE) -C mm TOPDIR="$(TOPDIR)" libkmm$(LIBEXT) KERNEL=y 
EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libkmm$(LIBEXT): mm$(DELIM)libkmm$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-$(ARCH_SRC)$(DELIM)libkarch$(LIBEXT): context
+$(ARCH_SRC)$(DELIM)libkarch$(LIBEXT): pass2dep
$(Q) $(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libkarch$(LIBEXT) 
KERNEL=y EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libkarch$(LIBEXT): $(ARCH_SRC)$(DELIM)libkarch$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-pass1$(DELIM)libpass1$(LIBEXT): context
+pass1$(DELIM)libpass1$(LIBEXT): pass2dep
$(Q) $(MAKE) -C pass1 TOPDIR="$(TOPDIR)" libpass1$(LIBEXT) KERNEL=y 
EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libpass1$(LIBEXT): pass1$(DELIM)libpass1$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-sched$(DELIM)libsched$(LIBEXT): context
+sched$(DELIM)libsched$(LIBEXT): pass2dep
$(Q) $(MAKE) -C sched TOPDIR="$(TOPDIR)" libsched$(LIBEXT) KERNEL=y 
EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libsched$(LIBEXT): sched$(DELIM)libsched$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-net$(DELIM)libnet$(LIBEXT): context
+net$(DELIM)libnet$(LIBEXT): pass2dep
$(Q) $(MAKE) -C net TOPDIR="$(TOPDIR)" libnet$(LIBEXT) KERNEL=y 
EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libnet$(LIBEXT): net$(DELIM)libnet$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-boards$(DELIM)libboards$(LIBEXT): context
+boards$(DELIM)libboards$(LIBEXT): pass2dep
$(Q) $(MAKE) -C boards TOPDIR="$(TOPDIR)" libboards$(LIBEXT) KERNEL=y 
EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libboards$(LIBEXT): boards$(DELIM)libboards$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-crypto$(DELIM)libcrypto$(LIBEXT): context
+crypto$(DELIM)libcrypto$(LIBEXT): pass2dep
$(Q) $(MAKE) -C crypto TOPDIR="$(TOPDIR)" libcrypto$(LIBEXT) KERNEL=y 
EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libcrypto$(LIBEXT): crypto$(DELIM)libcrypto$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-fs$(DELIM)libfs$(LIBEXT): context
+fs$(DELIM)libfs$(LIBEXT): pass2dep
$(Q) $(MAKE) -C fs TOPDIR="$(TOPDIR)" libfs$(LIBEXT) KERNEL=y 
EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libfs$(LIBEXT): fs$(DELIM)libfs$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-drivers$(DELIM)libdrivers$(LIBEXT): context
+drivers$(DELIM)libdrivers$(LIBEXT): pass2dep
$(Q) $(MAKE) -C drivers TOPDIR="$(TOPDIR)" libdrivers$(LIBEXT) KERNEL=y 
EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libdrivers$(LIBEXT): drivers$(DELIM)libdrivers$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-binfmt$(DELIM)libbinfmt$(LIBEXT): context
+binfmt$(DELIM)libbinfmt$(LIBEXT): pass2dep
$(Q) $(MAKE) -C binfmt TOPDIR="$(TOPDIR)" libbinfmt$(LIBEXT) KERNEL=y 
EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libbinfmt$(LIBEXT): binfmt$(DELIM)libbinfmt$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-graphics$(DELIM)libgraphics$(LIBEXT): context
+graphics$(DELIM)libgraphics$(LIBEXT): pass2dep
$(Q) $(MAKE) -C graphics TOPDIR="$(TOPDIR)" libgraphics$(LIBEXT) 
KERNEL=y EXTRADEFINES=$(KDEFINE)
 
 staging$(DELIM)libgraphics$(LIBEXT): graphics$(DELIM)libgraphics$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
 
-audio$(DELIM)libaudio$(LIBEXT): context
+audio$(DELIM)libaudio$(LIBEXT): pass2dep
$(Q) $(MAKE) -C audio TOPDIR="$(TOPDIR)" libaudio$(LIBEXT) KE

[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #375: Fix make target dependencies

2020-02-25 Thread GitBox
xiaoxiang781216 merged pull request #375: Fix make target dependencies
URL: https://github.com/apache/incubator-nuttx/pull/375
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #375: Fix make target dependencies

2020-02-25 Thread GitBox
xiaoxiang781216 commented on issue #375: Fix make target dependencies
URL: https://github.com/apache/incubator-nuttx/pull/375#issuecomment-591215333
 
 
   > @xiaoxiang781216
   > is your symptom with examples/elf?
   > if it's caused by running "all" and "depend" target simultaneously (from 
your log it seems to be) this patch can fix it.
   
   Ok, let's try it, this is one of block issue to release the nightly build.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] yamt commented on issue #375: Fix make target dependencies

2020-02-25 Thread GitBox
yamt commented on issue #375: Fix make target dependencies
URL: https://github.com/apache/incubator-nuttx/pull/375#issuecomment-591203453
 
 
   @xiaoxiang781216 
   is your symptom with examples/elf?
   if it's caused by running "all" and "depend" target simultaneously (from 
your log it seems to be) this patch can fix it.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #374: Make it clear the timestamp of pass1 directory is not important

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #374: Make it clear the 
timestamp of pass1 directory is not important
URL: https://github.com/apache/incubator-nuttx/pull/374#discussion_r384239850
 
 

 ##
 File path: tools/Makefile.win
 ##
 @@ -178,6 +178,8 @@ BIN   = $(NUTTXNAME)$(EXEEXT)
 
 all: $(BIN)
 .PHONY: dirlinks context clean_context check_context configenv config 
oldconfig menuconfig nconfig export subdir_clean clean subdir_distclean 
distclean apps_clean apps_distclean
+.PHONY: pass1 pass1deps pass1dep
+.PHONY: pass2 pass2deps pass2dep
 
 Review comment:
   let's merge into one line since line 180 is already very long.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #374: Make it clear the timestamp of pass1 directory is not important

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #374: Make it clear the 
timestamp of pass1 directory is not important
URL: https://github.com/apache/incubator-nuttx/pull/374#discussion_r384239850
 
 

 ##
 File path: tools/Makefile.win
 ##
 @@ -178,6 +178,8 @@ BIN   = $(NUTTXNAME)$(EXEEXT)
 
 all: $(BIN)
 .PHONY: dirlinks context clean_context check_context configenv config 
oldconfig menuconfig nconfig export subdir_clean clean subdir_distclean 
distclean apps_clean apps_distclean
+.PHONY: pass1 pass1deps pass1dep
+.PHONY: pass2 pass2deps pass2dep
 
 Review comment:
   let's merge into one line since line 180 is alrady very long.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx] branch master updated: arch/arm/src/sama5/sam_gmac: Prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread aguettouche
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new cdc61a0  arch/arm/src/sama5/sam_gmac: Prevent txtimeout from always 
firing and fix txbuffer leak during high-volume sends
cdc61a0 is described below

commit cdc61a08e0bbd46f91d15765e4d6eb9fb094ae9d
Author: Adam Feuer 
AuthorDate: Tue Feb 25 14:10:04 2020 -0800

arch/arm/src/sama5/sam_gmac: Prevent txtimeout from always firing and fix 
txbuffer leak during high-volume sends
---
 arch/arm/src/sama5/hardware/sam_gmac.h |  42 
 arch/arm/src/sama5/sam_gmac.c  | 177 ++---
 2 files changed, 140 insertions(+), 79 deletions(-)

diff --git a/arch/arm/src/sama5/hardware/sam_gmac.h 
b/arch/arm/src/sama5/hardware/sam_gmac.h
index 010073f..3ba0e7c 100644
--- a/arch/arm/src/sama5/hardware/sam_gmac.h
+++ b/arch/arm/src/sama5/hardware/sam_gmac.h
@@ -1,4 +1,4 @@
-/
+/
  * arch/arm/src/sama5/hardware/sam_gmac.h
  *
  *   Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -31,22 +31,23 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- 
/
+ /
 
 #ifndef __ARCH_ARM_SRC_SAMA5_HARDWARE_SAM_GMAC_H
 #define __ARCH_ARM_SRC_SAMA5_HARDWARE_SAM_GMAC_H
 
-/
+/
  * Included Files
- 
/
+ /
 
 #include 
 #include "hardware/sam_memorymap.h"
 
-/
+/
  * Pre-processor Definitions
- 
/
-/* GMAC Register Offsets 
/
+ /
+
+/* GMAC Register Offsets /
 
 #define SAM_GMAC_NCR_OFFSET0x /* Network Control Register */
 #define SAM_GMAC_NCFGR_OFFSET  0x0004 /* Network Configuration Register */
@@ -243,7 +244,7 @@
 #define SAM_GMAC_IMRPQ5_OFFSET 0x654 /* Interrupt Mask Register Priority 
Queue 5 */
 #define SAM_GMAC_IMRPQ6_OFFSET 0x658 /* Interrupt Mask Register Priority 
Queue 6 */
 
-/* GMAC Register Addresses 
*/
+/* GMAC Register Addresses **/
 
 #define SAM_GMAC_NCR   (SAM_GMAC_VBASE+SAM_GMAC_NCR_OFFSET)
 #define SAM_GMAC_NCFGR (SAM_GMAC_VBASE+SAM_GMAC_NCFGR_OFFSET)
@@ -436,7 +437,7 @@
 #define SAM_GMAC_IMRPQ5(SAM_GMAC_VBASE+SAM_GMAC_IMRPQ5_OFFSET)
 #define SAM_GMAC_IMRPQ6(SAM_GMAC_VBASE+SAM_GMAC_IMRPQ6_OFFSET)
 
-/* GMAC Register Bit Definitions 
***/
+/* GMAC Register Bit Definitions /
 
 /* Network Control Register */
 
@@ -871,13 +872,13 @@
  *
  * Use these definitions:
  *
- *  GMAC_INT_RCOMP   Bit 1:  Receive Complete
- *  GMAC_INT_RXUBR   Bit 2:  Receive Used Bit 
Read
- *  GMAC_INT_RLEXBit 5:  Retry Limit 
Exceeded or Late Collision
- *  GMAC_INT_TFC Bit 6:  Transmit Frame 
Corruption due to AHB error
- *  GMAC_INT_TCOMP   Bit 7:  Transmit Complete
- *  GMAC_INT_ROVRBit 10: Receive Overrun
- *  GMAC_INT_HRESP   Bit 11: HRESP not OK
+ *  GMAC_INT_RCOMPBit 1:  Receive Complete
+ *  GMAC_INT_RXUBRBit 2:  Receive Used Bit Read
+ *  GMAC_INT_RLEX Bit 5:  Retry Limit Exceeded or Late Collision
+ *  GMAC_INT_TFC  Bit 6:  Transmit Frame Corruption due to AHB error
+ *  GMAC_INT_TCOMPBit 7:  Transmit Complete
+ *  GMAC_INT_ROVR Bit 10: Receive Overrun
+ *  GMAC_INT_HRESPBit 11: HRESP not OK
  */
 
 /* Transmit Buffer Queue Base Address Priority Queue 0-6 */
@@ -916,7 +917,7 @@
 #  define GMAC_ST2RPQ0_VLANP(n)   ((uint32_t)(n) << GMAC_ST2RPQ0_VLANP_SHIFT)
 #define GMAC_ST2RPQ0_

[GitHub] [incubator-nuttx] Ouss4 merged pull request #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
Ouss4 merged pull request #372: SAMA5 GMAC driver improvements: prevent 
txtimeout from always firing and fix txbuffer leak during high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] Ouss4 commented on issue #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
Ouss4 commented on issue #372: SAMA5 GMAC driver improvements: prevent 
txtimeout from always firing and fix txbuffer leak during high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#issuecomment-591095352
 
 
   @adamfeuer Thanks for addressing everything.
   I think this PR is ready. I'll merge it.
   
   Fixing all the nxstyle complaints in some header files can be overwhelming.
   If you think you can provide a PR for this file that would be welcomed.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] adamfeuer commented on issue #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
adamfeuer commented on issue #372: SAMA5 GMAC driver improvements: prevent 
txtimeout from always firing and fix txbuffer leak during high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#issuecomment-591071415
 
 
   @Ouss4 I fixed that file path header issue. As for the other nxstyle issues 
with the remaining warnings in the header that were there from before I touched 
this file– fixing them would add a lot of changes to this PR. One idea would be 
to create a second PR that fixes them. 
   
   Let me know what you want me to do.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx-apps] branch master updated (45bcfa8 -> 16dc851)

2020-02-25 Thread acassis
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.


from 45bcfa8  examples/elf: Add a few make rules
 add 16dc851  Revert "examples: usrsocktest: Fix errors in NoBlockRecv and 
BlockRecv tests"

No new revisions were added by this update.

Summary of changes:
 examples/usrsocktest/usrsocktest_block_recv.c   | 6 ++
 examples/usrsocktest/usrsocktest_noblock_recv.c | 3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)



[incubator-nuttx-apps] branch pr100 updated: Revert "examples: usrsocktest: Fix errors in NoBlockRecv and BlockRecv tests"

2020-02-25 Thread acassis
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch pr100
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/pr100 by this push:
 new 16dc851  Revert "examples: usrsocktest: Fix errors in NoBlockRecv and 
BlockRecv tests"
16dc851 is described below

commit 16dc8518894534eaecedf76ca21298489f5f25b4
Author: Xiang Xiao 
AuthorDate: Tue Feb 25 23:49:53 2020 +0800

Revert "examples: usrsocktest: Fix errors in NoBlockRecv and BlockRecv 
tests"

This reverts commit 10c715d9215a7fbc6bc5000f10169c128af11854.
---
 examples/usrsocktest/usrsocktest_block_recv.c   | 6 ++
 examples/usrsocktest/usrsocktest_noblock_recv.c | 3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/examples/usrsocktest/usrsocktest_block_recv.c 
b/examples/usrsocktest/usrsocktest_block_recv.c
index d7a5a00..54827d7 100644
--- a/examples/usrsocktest/usrsocktest_block_recv.c
+++ b/examples/usrsocktest/usrsocktest_block_recv.c
@@ -265,8 +265,7 @@ static void NoBlockConnect(FAR struct 
usrsocktest_daemon_conf_s *dconf)
   TEST_ASSERT_EQUAL(1, ret);
   TEST_ASSERT_EQUAL_UINT8_ARRAY("a", data, 1);
   TEST_ASSERT_EQUAL(sizeof(remoteaddr), addrlen);
-  TEST_ASSERT_EQUAL_UINT8_ARRAY(&remoteaddr, &addr,
-addrlen - sizeof(addr.sin_zero));
+  TEST_ASSERT_EQUAL_UINT8_ARRAY(&remoteaddr, &addr, addrlen);
   TEST_ASSERT_EQUAL(1, usrsocktest_daemon_get_num_connected_sockets());
   TEST_ASSERT_EQUAL(1, usrsocktest_daemon_get_num_active_sockets());
   TEST_ASSERT_EQUAL(6, usrsocktest_daemon_get_recv_bytes());
@@ -283,8 +282,7 @@ static void NoBlockConnect(FAR struct 
usrsocktest_daemon_conf_s *dconf)
   TEST_ASSERT_EQUAL(5, ret);
   TEST_ASSERT_EQUAL_UINT8_ARRAY("abcde", data, 5);
   TEST_ASSERT_EQUAL(sizeof(remoteaddr), addrlen);
-  TEST_ASSERT_EQUAL_UINT8_ARRAY(&remoteaddr, &addr,
-addrlen - sizeof(addr.sin_zero));
+  TEST_ASSERT_EQUAL_UINT8_ARRAY(&remoteaddr, &addr, addrlen);
   TEST_ASSERT_EQUAL(1, usrsocktest_daemon_get_num_connected_sockets());
   TEST_ASSERT_EQUAL(1, usrsocktest_daemon_get_num_active_sockets());
   TEST_ASSERT_EQUAL(11, usrsocktest_daemon_get_recv_bytes());
diff --git a/examples/usrsocktest/usrsocktest_noblock_recv.c 
b/examples/usrsocktest/usrsocktest_noblock_recv.c
index 4afccbb..2e51179 100644
--- a/examples/usrsocktest/usrsocktest_noblock_recv.c
+++ b/examples/usrsocktest/usrsocktest_noblock_recv.c
@@ -197,8 +197,7 @@ static void Receive(struct usrsocktest_daemon_conf_s *dconf)
   TEST_ASSERT_EQUAL(3, ret);
   TEST_ASSERT_EQUAL_UINT8_ARRAY("abc", data, 3);
   TEST_ASSERT_EQUAL(addrlen, sizeof(remoteaddr));
-  TEST_ASSERT_EQUAL_UINT8_ARRAY(&remoteaddr, &addr,
-addrlen - sizeof(addr.sin_zero));
+  TEST_ASSERT_EQUAL_UINT8_ARRAY(&remoteaddr, &addr, addrlen);
   TEST_ASSERT_EQUAL(1, usrsocktest_daemon_get_num_connected_sockets());
   TEST_ASSERT_EQUAL(1, usrsocktest_daemon_get_num_active_sockets());
   TEST_ASSERT_EQUAL(datalen + ret, usrsocktest_daemon_get_recv_bytes());



[GitHub] [incubator-nuttx-apps] acassis merged pull request #100: Revert "examples: usrsocktest: Fix errors in NoBlockRecv and BlockRec…

2020-02-25 Thread GitBox
acassis merged pull request #100: Revert "examples: usrsocktest: Fix errors in 
NoBlockRecv and BlockRec…
URL: https://github.com/apache/incubator-nuttx-apps/pull/100
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx-apps] branch pr100 created (now 45bcfa8)

2020-02-25 Thread acassis
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a change to branch pr100
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.


  at 45bcfa8  examples/elf: Add a few make rules

No new revisions were added by this update.



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
Ouss4 commented on a change in pull request #372: SAMA5 GMAC driver 
improvements: prevent txtimeout from always firing and fix txbuffer leak during 
high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#discussion_r384106049
 
 

 ##
 File path: arch/arm/src/sama5/sam_gmac.c
 ##
 @@ -1,5 +1,5 @@
 /
- * arch/arm/src/sama5/sam_gmac.c
+ * arch/arm/src/chip/sam_gmac.c
 
 Review comment:
   arch/arm/src/chip/ is the simlink of arch/arm/src/sama5
   ```suggestion
* arch/arm/src/sama5/sam_gmac.c
   ```


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] Ouss4 commented on issue #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
Ouss4 commented on issue #372: SAMA5 GMAC driver improvements: prevent 
txtimeout from always firing and fix txbuffer leak during high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#issuecomment-591053230
 
 
   @adamfeuer  Thanks for fixing all those complaints.
   Header files that describe hardware registers tend to raise a lot of nxstyle 
issues.  Most of these issues are Missing blank line after comments or Long 
line warnings.
   That format is used in maybe all header files of the sort, I don't know if 
we can fix all of them or just accept them as exceptions.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
Ouss4 commented on a change in pull request #372: SAMA5 GMAC driver 
improvements: prevent txtimeout from always firing and fix txbuffer leak during 
high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#discussion_r384106049
 
 

 ##
 File path: arch/arm/src/sama5/sam_gmac.c
 ##
 @@ -1,5 +1,5 @@
 /
- * arch/arm/src/sama5/sam_gmac.c
+ * arch/arm/src/chip/sam_gmac.c
 
 Review comment:
   arch/arm/src/chip/ is the simlink of arch/aarm/src/sama5
   ```suggestion
* arch/arm/src/sama5/sam_gmac.c
   ```


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-591044415
 
 
   AFAIK nothing in the NuttX network stack cares about the content of 
sin_zero.  There would be nothing gained for NuttX by clearing that field for 
input sockaddr_in values.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-591034005
 
 
   One thing we could do it if matters enough to you is to make a copy of 
socketadd_in input then clear the sin_zero field in the copy.  I don't 
recommend this for embedded systems but this is most likely what Linux is 
doing.  Linux never accesses any user pointers without going though severl 
security layers so, for Linux, is it simpler to copy input argument (if they 
are not large) rather than go through the security measures on every access.
   
   If there are no security macros in the code you are looking at, you can be 
assured that linux is modifying a copy of the user input, not the actual user 
input itself.  That should never be done for a const input.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] adamfeuer commented on issue #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
adamfeuer commented on issue #372: SAMA5 GMAC driver improvements: prevent 
txtimeout from always firing and fix txbuffer leak during high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#issuecomment-591032917
 
 
   @Ouss4 @patacongo @xiaoxiang781216 Thanks for the improvements and help– I 
ran `tools/checkpatch.sh` against the two files in this PR, and made a bunch of 
cleanups... many of the `nxstyle`-suggested changes were code I didn't touch, 
but I cleaned them up anyway. 
   
   In the `sam_gmac.h` file, there were a bunch of `nxstyle` errors from the 
previous code that I didn't fix... they were multiple instances of:
   
   * error: Missing blank line after comment
   * error: Mixed case identifier found
   
   I didn't fix these because it seemed the suggestions would be out of 
character for the formatting in the file. But I'm willing to make the changes 
to get the file to the point that there are no `nxstyle` errors. What should I 
do?
   
   Will you take a look at these changes and see what you think? Do you have 
further improvements?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx] branch master updated (9a8169a -> 8ee6be0)

2020-02-25 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


from 9a8169a  armv7-m: Fix syscall stack alignment
 add 8ee6be0  net/icmp/icmp_input.c: Fix memset() implicit decl warning

No new revisions were added by this update.

Summary of changes:
 net/icmp/icmp_input.c | 1 +
 1 file changed, 1 insertion(+)



[GitHub] [incubator-nuttx] patacongo merged pull request #379: armv7-m: Fix syscall stack alignment

2020-02-25 Thread GitBox
patacongo merged pull request #379: armv7-m: Fix syscall stack alignment
URL: https://github.com/apache/incubator-nuttx/pull/379
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx] branch master updated: armv7-m: Fix syscall stack alignment

2020-02-25 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 9a8169a  armv7-m: Fix syscall stack alignment
9a8169a is described below

commit 9a8169acdf365ddb7eab92be597f59b9003498d9
Author: YAMAMOTO Takashi 
AuthorDate: Wed Feb 26 02:25:55 2020 +0900

armv7-m: Fix syscall stack alignment

This fixes "df -h" with PROTECTED build.  Tested on qemu.

Reference:
aapcs32 "6.2.1 The Stack/Stack constraints at a public interface"
---
 arch/arm/src/armv7-m/up_svcall.c | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/armv7-m/up_svcall.c b/arch/arm/src/armv7-m/up_svcall.c
index 0c1430b..079e293 100644
--- a/arch/arm/src/armv7-m/up_svcall.c
+++ b/arch/arm/src/armv7-m/up_svcall.c
@@ -97,16 +97,28 @@ static void dispatch_syscall(void)
 {
   __asm__ __volatile__
   (
-" sub sp, sp, #16\n"   /* Create a stack frame to hold 3 parms + 
lr */
+/* Create a stack frame to hold 3 parameters + LR and SP adjustment value.
+ * Also, Ensure 8 bytes alignment. We use IP as a scratch.
+ *
+ * NOTE: new_SP = (orig_SP - 20) & ~7
+ *  = orig_SP - 20 - ((orig_SP - 20) & ~7)
+ */
+" mov ip, sp\n"/* Calculate (orig_SP - new_SP) */
+" sub ip, ip, #20\n"
+" and ip, ip, #7\n"
+" add ip, ip, #20\n"
+" sub sp, sp, ip\n"
 " str r4, [sp, #0]\n"  /* Move parameter 4 (if any) into position 
*/
 " str r5, [sp, #4]\n"  /* Move parameter 5 (if any) into position 
*/
 " str r6, [sp, #8]\n"  /* Move parameter 6 (if any) into position 
*/
 " str lr, [sp, #12]\n" /* Save lr in the stack frame */
+" str ip, [sp, #16]\n" /* Save (orig_SP - new_SP) value */
 " ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
 " ldr ip, [ip, r0, lsl #2]\n"  /* R12=The address of the stub for this 
syscall */
 " blx ip\n"/* Call the stub (modifies lr) */
 " ldr lr, [sp, #12]\n" /* Restore lr */
-" add sp, sp, #16\n"   /* Destroy the stack frame */
+" ldr r2, [sp, #16]\n" /* Restore (orig_SP - new_SP) value */
+" add sp, sp, r2\n"/* Restore SP */
 " mov r2, r0\n"/* R2=Save return value in R2 */
 " mov r0, #3\n"/* R0=SYS_syscall_return */
 " svc 0"   /* Return from the syscall */



[GitHub] [incubator-nuttx] yamt opened a new pull request #379: armv7-m: Fix syscall stack alignment

2020-02-25 Thread GitBox
yamt opened a new pull request #379: armv7-m: Fix syscall stack alignment
URL: https://github.com/apache/incubator-nuttx/pull/379
 
 
   This fixes "df -h" with PROTECTED build.  Tested on qemu.
   
   Reference:
aapcs32 "6.2.1 The Stack/Stack constraints at a public interface"


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590961398
 
 
   > But as long as I checked Linux kernel, it clears in the network stack.
   
   Ignorinig the read-only 'const' would be a violation of C principles.  We 
should not do that.
   
   I think it would be legal to test if sin_zero is all zero and, if not, 
return an error.  That is correct, but would probably annoy a lot of people.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] adamfeuer commented on issue #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
adamfeuer commented on issue #372: SAMA5 GMAC driver improvements: prevent 
txtimeout from always firing and fix txbuffer leak during high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#issuecomment-590946294
 
 
   @xiaoxiang781216 Thanks, I will do 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on issue #100: Revert "examples: usrsocktest: Fix errors in NoBlockRecv and BlockRec…

2020-02-25 Thread GitBox
xiaoxiang781216 commented on issue #100: Revert "examples: usrsocktest: Fix 
errors in NoBlockRecv and BlockRec…
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/100#issuecomment-590936787
 
 
   After these patch in nuttx:
   https://github.com/apache/incubator-nuttx/pull/378
   https://github.com/apache/incubator-nuttx/pull/377
   We don't need the workaround anymore.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 opened a new pull request #100: Revert "examples: usrsocktest: Fix errors in NoBlockRecv and BlockRec…

2020-02-25 Thread GitBox
xiaoxiang781216 opened a new pull request #100: Revert "examples: usrsocktest: 
Fix errors in NoBlockRecv and BlockRec…
URL: https://github.com/apache/incubator-nuttx-apps/pull/100
 
 
   …v tests"
   
   This reverts commit 10c715d9215a7fbc6bc5000f10169c128af11854.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
xiaoxiang781216 commented on issue #372: SAMA5 GMAC driver improvements: 
prevent txtimeout from always firing and fix txbuffer leak during high-volume 
sends
URL: https://github.com/apache/incubator-nuttx/pull/372#issuecomment-590931183
 
 
   > @patacongo @Ouss4 I will run nxstyle and fix the problems and redo the 
code. Is there a guide to compiling and running nxstyle? Would you be willing 
to point me at it?
   
   run tools/checkpatch.sh, which will compile the tools for you. You can pass 
-h to get the usage.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #378: net/icmp/icmp_input.c: Clear sin_zero

2020-02-25 Thread GitBox
xiaoxiang781216 merged pull request #378: net/icmp/icmp_input.c:  Clear sin_zero
URL: https://github.com/apache/incubator-nuttx/pull/378
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx] branch master updated: net/icmp/icmp_input.c: Clear sin_zero

2020-02-25 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 1f1356a  net/icmp/icmp_input.c:  Clear sin_zero
1f1356a is described below

commit 1f1356a2f5ee91ae077038c9e7b7a8fccc4180b8
Author: Gregory Nutt 
AuthorDate: Tue Feb 25 09:13:12 2020 -0600

net/icmp/icmp_input.c:  Clear sin_zero

This should have been part of commit 
861efdf8a3f7960119c2fc84c8333c75fea1434c but was overlooked.
---
 net/icmp/icmp_input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/icmp/icmp_input.c b/net/icmp/icmp_input.c
index 2bb83f3..1c9bf88 100644
--- a/net/icmp/icmp_input.c
+++ b/net/icmp/icmp_input.c
@@ -128,6 +128,7 @@ static uint16_t icmp_datahandler(FAR struct net_driver_s 
*dev,
 
   net_ipv4addr_copy(inaddr.sin_addr.s_addr,
 net_ip4addr_conv32(ipv4->srcipaddr));
+  memset(inaddr.sin_zero, 0, sizeof(inaddr.sin_zero));
 
   /* Copy the src address info into the I/O buffer chain.  We will not wait
* for an I/O buffer to become available in this context.  It there is



[GitHub] [incubator-nuttx] adamfeuer commented on issue #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
adamfeuer commented on issue #372: SAMA5 GMAC driver improvements: prevent 
txtimeout from always firing and fix txbuffer leak during high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#issuecomment-590920663
 
 
   @patacongo @Ouss4 I will run nxstyle and fix the problems and redo the code. 
Is there a guide to compiling and running nxstyle? Would you be willing to 
point me at it?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] adamfeuer commented on a change in pull request #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
adamfeuer commented on a change in pull request #372: SAMA5 GMAC driver 
improvements: prevent txtimeout from always firing and fix txbuffer leak during 
high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#discussion_r383946269
 
 

 ##
 File path: arch/arm/src/sama5/sam_gmac.c
 ##
 @@ -690,6 +689,7 @@ static int sam_transmit(struct sam_gmac_s *priv)
 
   /* Check parameter */
 
+
 
 Review comment:
   @Ouss4 will fix


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] adamfeuer commented on a change in pull request #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
adamfeuer commented on a change in pull request #372: SAMA5 GMAC driver 
improvements: prevent txtimeout from always firing and fix txbuffer leak during 
high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#discussion_r383946466
 
 

 ##
 File path: arch/arm/src/sama5/sam_gmac.c
 ##
 @@ -1,5 +1,4 @@
 /
- * arch/arm/src/sama5/sam_gmac.c
 
 Review comment:
   @Ouss4 that's a mistake, will fix.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] adamfeuer commented on a change in pull request #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
adamfeuer commented on a change in pull request #372: SAMA5 GMAC driver 
improvements: prevent txtimeout from always firing and fix txbuffer leak during 
high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#discussion_r383945971
 
 

 ##
 File path: arch/arm/src/sama5/sam_gmac.c
 ##
 @@ -1337,8 +1347,9 @@ static void sam_txdone(struct sam_gmac_s *priv)
   up_invalidate_dcache((uintptr_t)txdesc,
(uintptr_t)txdesc + sizeof(struct gmac_txdesc_s));
 
-  /* Is this TX descriptor still in use? */
 
+  // Is this TX descriptor done transmitting? (SAMA5D36 datasheet, p. 934)
 
 Review comment:
   @Ouss4 will fix


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] adamfeuer commented on a change in pull request #372: SAMA5 GMAC driver improvements: prevent txtimeout from always firing and fix txbuffer leak during high-volume sends

2020-02-25 Thread GitBox
adamfeuer commented on a change in pull request #372: SAMA5 GMAC driver 
improvements: prevent txtimeout from always firing and fix txbuffer leak during 
high-volume sends
URL: https://github.com/apache/incubator-nuttx/pull/372#discussion_r383946147
 
 

 ##
 File path: arch/arm/src/sama5/sam_gmac.c
 ##
 @@ -1337,8 +1347,9 @@ static void sam_txdone(struct sam_gmac_s *priv)
   up_invalidate_dcache((uintptr_t)txdesc,
(uintptr_t)txdesc + sizeof(struct gmac_txdesc_s));
 
-  /* Is this TX descriptor still in use? */
 
+  // Is this TX descriptor done transmitting? (SAMA5D36 datasheet, p. 934)
+  // First TX descriptor in chain GMACTXD_STA_USED = 1
 
 Review comment:
   @Ouss4 will fix


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] patacongo opened a new pull request #378: net/icmp/icmp_input.c: Clear sin_zero

2020-02-25 Thread GitBox
patacongo opened a new pull request #378: net/icmp/icmp_input.c:  Clear sin_zero
URL: https://github.com/apache/incubator-nuttx/pull/378
 
 
   This should have been part of commit 
861efdf8a3f7960119c2fc84c8333c75fea1434c but was overlooked.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590907342
 
 
   Okay so I did the work and checked out where all IPv4 sockadd_in structures 
are initialed.  There are many, many more than just 
accept/getsockname/getpeername/recvfrom .
   
   I added memset(sin_zero, 0, sizeof(sin_zero)); to each of them and create 
pr377.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx] branch master updated: net/: Whenever the network initializes an IPv4 address, it must clear sin_zero.

2020-02-25 Thread aguettouche
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 861efdf  net/:  Whenever the network initializes an IPv4 address, it 
must clear sin_zero.
861efdf is described below

commit 861efdf8a3f7960119c2fc84c8333c75fea1434c
Author: patacongo 
AuthorDate: Tue Feb 25 08:53:39 2020 -0600

net/:  Whenever the network initializes an IPv4 address, it must clear 
sin_zero.
---
 net/inet/ipv4_getpeername.c   | 1 +
 net/inet/ipv4_getsockname.c   | 3 +++
 net/netdev/netdev_ifconf.c| 1 +
 net/netdev/netdev_ioctl.c | 2 ++
 net/tcp/tcp_accept.c  | 1 +
 net/tcp/tcp_recvfrom.c| 1 +
 net/udp/udp_callback.c| 1 +
 net/udp/udp_recvfrom.c| 1 +
 net/udp/udp_sendto_buffered.c | 1 +
 9 files changed, 12 insertions(+)

diff --git a/net/inet/ipv4_getpeername.c b/net/inet/ipv4_getpeername.c
index c63480e..bf3577b 100644
--- a/net/inet/ipv4_getpeername.c
+++ b/net/inet/ipv4_getpeername.c
@@ -141,6 +141,7 @@ int ipv4_getpeername(FAR struct socket *psock, FAR struct 
sockaddr *addr,
 
   outaddr->sin_family  = psock->s_domain;
   outaddr->sin_addr.s_addr = ripaddr;
+  memset(outaddr->sin_zero, 0, sizeof(outaddr->sin_zero));
   *addrlen = sizeof(struct sockaddr_in);
 
   /* Return success */
diff --git a/net/inet/ipv4_getsockname.c b/net/inet/ipv4_getsockname.c
index 149f6e1..b12240c 100644
--- a/net/inet/ipv4_getsockname.c
+++ b/net/inet/ipv4_getsockname.c
@@ -137,6 +137,7 @@ int ipv4_getsockname(FAR struct socket *psock, FAR struct 
sockaddr *addr,
 {
outaddr->sin_family  = psock->s_domain;
outaddr->sin_addr.s_addr = 0;
+   memset(outaddr->sin_zero, 0, sizeof(outaddr->sin_zero));
*addrlen = sizeof(struct sockaddr_in);
 
return OK;
@@ -166,6 +167,8 @@ int ipv4_getsockname(FAR struct socket *psock, FAR struct 
sockaddr *addr,
 
   outaddr->sin_family  = psock->s_domain;
   outaddr->sin_addr.s_addr = dev->d_ipaddr;
+  memset(outaddr->sin_zero, 0, sizeof(outaddr->sin_zero));
+
   *addrlen = sizeof(struct sockaddr_in);
 
   net_unlock();
diff --git a/net/netdev/netdev_ifconf.c b/net/netdev/netdev_ifconf.c
index cbfbeca..6189ef5 100644
--- a/net/netdev/netdev_ifconf.c
+++ b/net/netdev/netdev_ifconf.c
@@ -142,6 +142,7 @@ static int ifconf_ipv4_callback(FAR struct net_driver_s 
*dev, FAR void *arg)
   inaddr->sin_family = AF_INET;
   inaddr->sin_port   = 0;
   net_ipv4addr_copy(inaddr->sin_addr.s_addr, dev->d_ipaddr);
+  memset(inaddr->sin_zero, 0, sizeof(inaddr->sin_zero));
 }
 
   /* Increment the size of the buffer in any event */
diff --git a/net/netdev/netdev_ioctl.c b/net/netdev/netdev_ioctl.c
index 2f18639..f18980c 100644
--- a/net/netdev/netdev_ioctl.c
+++ b/net/netdev/netdev_ioctl.c
@@ -286,6 +286,7 @@ static void ioctl_get_ipv4addr(FAR struct sockaddr *outaddr,
   dest->sin_family  = AF_INET;
   dest->sin_port= 0;
   dest->sin_addr.s_addr = inaddr;
+  memset(dest->sin_zero, 0, sizeof(dest->sin_zero));
 }
 #endif
 
@@ -310,6 +311,7 @@ static void inline ioctl_get_ipv4broadcast(FAR struct 
sockaddr *outaddr,
   dest->sin_family  = AF_INET;
   dest->sin_port= 0;
   dest->sin_addr.s_addr = net_ipv4addr_broadcast(inaddr, netmask);
+  memset(dest->sin_zero, 0, sizeof(dest->sin_zero));
 }
 #endif
 
diff --git a/net/tcp/tcp_accept.c b/net/tcp/tcp_accept.c
index 94a9b90..e69c89d 100644
--- a/net/tcp/tcp_accept.c
+++ b/net/tcp/tcp_accept.c
@@ -117,6 +117,7 @@ static inline void accept_tcpsender(FAR struct socket 
*psock,
   inaddr->sin_family = AF_INET;
   inaddr->sin_port   = conn->rport;
   net_ipv4addr_copy(inaddr->sin_addr.s_addr, conn->u.ipv4.raddr);
+  memset(inaddr->sin_zero, 0, sizeof(inaddr->sin_zero));
 
   *addrlen = sizeof(struct sockaddr_in);
 }
diff --git a/net/tcp/tcp_recvfrom.c b/net/tcp/tcp_recvfrom.c
index bef1791..d8f2302 100644
--- a/net/tcp/tcp_recvfrom.c
+++ b/net/tcp/tcp_recvfrom.c
@@ -372,6 +372,7 @@ static inline void tcp_sender(FAR struct net_driver_s *dev,
 
   net_ipv4addr_copy(infrom->sin_addr.s_addr,
 net_ip4addr_conv32(ipv4->srcipaddr));
+  memset(infrom->sin_zero, 0, sizeof(infrom->sin_zero));
 }
 }
 #endif /* CONFIG_NET_IPv4 */
diff --git a/net/udp/udp_callback.c b/net/udp/udp_callback.c
index 6d8cb35..6001b05 100644
--- a/net/udp/udp_callback.c
+++ b/net/udp/udp_callback.c
@@ -165,6 +165,7 @@ static uint16_t udp_datahandler(FAR struct net_driver_s 
*dev,
 
   net_ipv4addr_copy(src_addr4.sin_addr.s_addr,
 net_ip4addr_conv32(ipv4->srcipaddr));
+  memset(src_addr4.sin_zero, 0, sizeof(src_addr4.sin_zero));
 
   src_addr_size = sizeof(src_addr4);
 

[GitHub] [incubator-nuttx] Ouss4 merged pull request #377: net/: Initialize sin_zero

2020-02-25 Thread GitBox
Ouss4 merged pull request #377: net/:  Initialize sin_zero
URL: https://github.com/apache/incubator-nuttx/pull/377
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] patacongo opened a new pull request #377: net/: Initialize sin_zero

2020-02-25 Thread GitBox
patacongo opened a new pull request #377: net/:  Initialize sin_zero
URL: https://github.com/apache/incubator-nuttx/pull/377
 
 
   Whenever the network intialized an IPv4 address, it must clear sin_zero.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
xiaoxiang781216 edited a comment on issue #370: net: socket: Introduce 
net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590892853
 
 
   Yes, this is what I want to say:
   1.put to IPv4 case if we just zero sin_zero field or
   2.put to common place but we set the whole structure
   The mix(set sin_zero in common place) isn't a good implementation.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
xiaoxiang781216 commented on issue #370: net: socket: Introduce 
net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590892853
 
 
   Yes, this is what I want to say:
   1.put to IPv4 case if we just zero sin_zero field or
   2.put to common case but we set the whole structure
   The mix(set sin_zero in common place) isn't a good implementation.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590889683
 
 
   But the memset of the whole structure would be wasteful for IPv6 addresses.
   
   > accept/getsockname/getpeername/recvfrom are general functions, shouldn't 
assume addr must be IPv4 and then contain sin_zero.
   
   The distinction between IPv4 and IPv6 is made at a lower level than 
accept/getsockname/getpeername/recvfrom.  At that lower level, the IPv4 
specific code and always assume that sin_zero is present.  If sin_port and 
sin_addr are set then you know that sin_zero can be set too.. always.
   
   For example:
   
   accept->psock_accept->inet_accept->tcp_psock_accept
   
   then the address is initialized like:
   
   106 #ifdef CONFIG_NET_IPv4
   114 {
   115   FAR struct sockaddr_in *inaddr = (FAR struct sockaddr_in 
*)addr;
   116
   117   inaddr->sin_family = AF_INET;
   118   inaddr->sin_port   = conn->rport;
   119   net_ipv4addr_copy(inaddr->sin_addr.s_addr, 
conn->u.ipv4.raddr);
   120
   121   *addrlen = sizeof(struct sockaddr_in);
   122 }
   123 #endif /* CONFIG_NET_IPv4 */
   
   The memset of sin_zero belongs between lines 119 and 120.  Easy and perfect!
   
   sin_zero should be initialized at the very, very lowest level at the same 
time that sin_port and sin_addr are initialize.  That is the simplest and can 
never fail.  I have not looked at every case, but I believe that all reduce to 
this simplest, most straight-forward, monst maintainable, most understanable 
solution.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] jkivilin commented on a change in pull request #354: Fix usrsocktest

2020-02-25 Thread GitBox
jkivilin commented on a change in pull request #354: Fix usrsocktest
URL: https://github.com/apache/incubator-nuttx/pull/354#discussion_r383900253
 
 

 ##
 File path: net/socket/socket.c
 ##
 @@ -113,23 +113,8 @@ int psock_socket(int domain, int type, int protocol, FAR 
struct socket *psock)
*/
 
   ret = g_usrsock_sockif.si_setup(psock, protocol);
-  if (ret == -ENETDOWN)
 
 Review comment:
   I agree, usrsocktest errno checking should be more relaxed and allow 
different error values. Specific error values should only be checked when they 
are really expected.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #354: Fix usrsocktest

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #354: Fix usrsocktest
URL: https://github.com/apache/incubator-nuttx/pull/354#discussion_r383897171
 
 

 ##
 File path: net/socket/socket.c
 ##
 @@ -113,23 +113,8 @@ int psock_socket(int domain, int type, int protocol, FAR 
struct socket *psock)
*/
 
   ret = g_usrsock_sockif.si_setup(psock, protocol);
-  if (ret == -ENETDOWN)
 
 Review comment:
   If so, we need revert this patch, but adjust usrsocktest too. Actually, I 
think many testcase in usrsocktest is too strict to verfiy the errno must equal 
some specific value. A little internal modification like this will break the 
testcase.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] jkivilin commented on a change in pull request #354: Fix usrsocktest

2020-02-25 Thread GitBox
jkivilin commented on a change in pull request #354: Fix usrsocktest
URL: https://github.com/apache/incubator-nuttx/pull/354#discussion_r383893960
 
 

 ##
 File path: net/socket/socket.c
 ##
 @@ -113,23 +113,8 @@ int psock_socket(int domain, int type, int protocol, FAR 
struct socket *psock)
*/
 
   ret = g_usrsock_sockif.si_setup(psock, protocol);
-  if (ret == -ENETDOWN)
 
 Review comment:
   Right, when usrsock daemon not running, try nuttx tcp-stack instead.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #354: Fix usrsocktest

2020-02-25 Thread GitBox
xiaoxiang781216 commented on a change in pull request #354: Fix usrsocktest
URL: https://github.com/apache/incubator-nuttx/pull/354#discussion_r383891995
 
 

 ##
 File path: net/socket/socket.c
 ##
 @@ -113,23 +113,8 @@ int psock_socket(int domain, int type, int protocol, FAR 
struct socket *psock)
*/
 
   ret = g_usrsock_sockif.si_setup(psock, protocol);
-  if (ret == -ENETDOWN)
 
 Review comment:
   You mean runtime switch between usrsock and real tcp/ip stack instead of 
compile decision?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] jkivilin commented on a change in pull request #354: Fix usrsocktest

2020-02-25 Thread GitBox
jkivilin commented on a change in pull request #354: Fix usrsocktest
URL: https://github.com/apache/incubator-nuttx/pull/354#discussion_r383888439
 
 

 ##
 File path: net/socket/socket.c
 ##
 @@ -113,23 +113,8 @@ int psock_socket(int domain, int type, int protocol, FAR 
struct socket *psock)
*/
 
   ret = g_usrsock_sockif.si_setup(psock, protocol);
-  if (ret == -ENETDOWN)
 
 Review comment:
   But does this break the dual usrsock / nuttx tcp-stack use-case? Device 
where connectivity can be configured to use usrsock or nuttx tcp-stack?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx-apps] branch master updated (2f23d2a -> 45bcfa8)

2020-02-25 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.


from 2f23d2a  examples/elf/tests: Correct symtab.c dependency to fix 
parallel build break
 add 45bcfa8  examples/elf: Add a few make rules

No new revisions were added by this update.

Summary of changes:
 examples/elf/Makefile | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
xiaoxiang781216 commented on issue #370: net: socket: Introduce 
net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590873476
 
 
   The problem is that:
   accept/getsockname/getpeername/recvfrom are general functions, shouldn't 
assume addr must be IPv4 and then contain sin_zero. If we want to just zero 
sin_zero, it's better to move the code into inet/.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx-apps] patacongo merged pull request #94: examples/elf: Add a few make rules

2020-02-25 Thread GitBox
patacongo merged pull request #94: examples/elf: Add a few make rules
URL: https://github.com/apache/incubator-nuttx-apps/pull/94
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-nuttx] branch master updated: net/netlink/netlink_route.c: Correct the return value

2020-02-25 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 42d9707  net/netlink/netlink_route.c: Correct the return value
42d9707 is described below

commit 42d97079dedb0aa724aa02bdd75c3f1957260222
Author: chao.an 
AuthorDate: Tue Feb 25 16:32:37 2020 +0800

net/netlink/netlink_route.c: Correct the return value
---
 net/netlink/netlink_route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netlink/netlink_route.c b/net/netlink/netlink_route.c
index b26bfff..68b3ec0 100644
--- a/net/netlink/netlink_route.c
+++ b/net/netlink/netlink_route.c
@@ -423,7 +423,7 @@ static int netlink_device_callback(FAR struct net_driver_s 
*dev,
 #else
   resp->iface.ifi_index  = 0;
 #endif
-  resp->iface.ifi_flags  = devinfo->req->hdr.nlmsg_flags;
+  resp->iface.ifi_flags  = dev->d_flags;
   resp->iface.ifi_change = 0x;
 
   resp->attr.rta_len = RTA_LENGTH(strnlen(dev->d_ifname, IFNAMSIZ));



[GitHub] [incubator-nuttx] patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590870707
 
 
   People on the internet are saying that leaving the sin_zero field is causing 
some kinds of issues.  I don't know how that could be unless the sin_zero 
actually contains values in some cases.  Is there there some use case where 
sin_zero would not be zero (for example, some protocol-specific usage).


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] patacongo edited a comment on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
patacongo edited a comment on issue #370: net: socket: Introduce 
net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590869227
 
 
   > does it make sense that we call memset on the whole addr before call 
si_getpeername/si_getsockename/si_accept/si_recvfrom?
   
   I dislike that solution too.  It is a ugly hack.  We should do it right.  
sin_zerio is not different then any other field in sockadd_in.  The clean, 
easily unstandable way is:
   
   addr->sin_port = AF_INET;
   addr->sin_addr.s_addr = addr;
   memset(addr->sin_zero, 0, sizeof(addr->sin_zero));
   
   Let's not take ugly shortcuts.
   
   But having said that, it is not as ugly as the original proposal.  It is 
just not as straightforward.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()

2020-02-25 Thread GitBox
patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590869227
 
 
   > does it make sense that we call memset on the whole addr before call 
si_getpeername/si_getsockename/si_accept/si_recvfrom?
   
   I dislike that solution too.  It is a ugly hack.  We should do it right.  
sin_zerio is not different then any other field in sockadd_in.  The clean, 
easily unstandable way is:
   
   addr->sin_port = AF_INET;
   addr->sin_addr.s_addr = addr;
   memset(addr->sin_zero, 0, sizeof(addr->sin_zero));
   
   Let's not take ugly shortcuts.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #375: Fix make target dependencies

2020-02-25 Thread GitBox
xiaoxiang781216 commented on issue #375: Fix make target dependencies
URL: https://github.com/apache/incubator-nuttx/pull/375#issuecomment-590867794
 
 
   > i don't know. i haven't seen that symptom.
   > my symptom was often with .xx_builtin_list.h.
   
   Ok, thanks for explanation which case this patch can fix.


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:
us...@infra.apache.org


With regards,
Apache Git Services


  1   2   >