You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/20 13:07:40 UTC

[incubator-nuttx] branch master updated (d535661 -> f706f5e)

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 d535661  Update release notes in preparation for the 9.0.0 release.
     new cf674ed  checkpatch.sh: Simplify the code logic, no functional change
     new 5c1497a  tools: Remove the temp variable in checking program exit code
     new c153c31  tools/refresh.sh: Save defconfig and exit with 1 only when the difference exist
     new 48e6b97  tools/testbuild.sh: Check defconfig in the canonical format
     new 95e5506  tools/testbuild.sh: Verify nuttx/apps folder clean after build
     new 816f624  tools/Makefile.host: Initialize Q by inspecting V
     new 090a4d1  Update .gitignore per testbuild.sh report
     new 2810220  Update defconfig per refresh.sh report
     new f706f5e  boards/imxrt1060-evk: Generate nuttx.map in the root directory

The 9 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:
 .gitignore                                         |  3 +
 arch/sim/src/.gitignore                            |  1 +
 boards/arm/cxd56xx/spresense/configs/smp/defconfig |  2 +-
 boards/arm/imx6/sabre-6quad/configs/smp/defconfig  |  1 -
 boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs   |  7 +-
 .../lc823450-xgevk/configs/audio/defconfig         |  1 -
 .../lc823450-xgevk/configs/rndis/defconfig         |  1 -
 .../lc823450/lc823450-xgevk/configs/usb/defconfig  |  1 -
 .../stm32/stm32ldiscovery/configs/chrono/defconfig |  1 -
 boards/risc-v/k210/maix-bit/configs/smp/defconfig  |  1 -
 .../xtensa/esp32/esp32-core/configs/smp/defconfig  |  1 -
 tools/Makefile.host                                | 13 ++++
 tools/checkpatch.sh                                | 77 +++++++++-------------
 tools/cmpconfig.c                                  | 19 ++++--
 tools/mkconfigvars.sh                              |  2 +-
 tools/refresh.sh                                   | 35 +++++-----
 tools/testbuild.sh                                 | 44 ++++++++-----
 17 files changed, 115 insertions(+), 95 deletions(-)


[incubator-nuttx] 07/09: Update .gitignore per testbuild.sh report

Posted by gn...@apache.org.
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

commit 090a4d1690c11db41974ae0bc07e5942ed094056
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 19:42:07 2020 +0800

    Update .gitignore per testbuild.sh report
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 .gitignore              | 3 +++
 arch/sim/src/.gitignore | 1 +
 2 files changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index ff0b160..8a49c34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,14 +11,17 @@ core
 /.gdbinit
 /cscope.*
 /.config
+/.config-e
 /.config.old
 /.version
 /defconfig
+/defconfig.tmp-e
 /Make.defs
 /staging
 /nuttx
 /nuttx.*
 /nuttx-*
+/uImage
 /_SAVED_APPS_config
 /*.map
 /*.elf
diff --git a/arch/sim/src/.gitignore b/arch/sim/src/.gitignore
index 930fbda..aa0b5b1 100644
--- a/arch/sim/src/.gitignore
+++ b/arch/sim/src/.gitignore
@@ -1,6 +1,7 @@
 /Make.dep
 /.depend
 /Cygwin-names.dat
+/Darwin-names.dat
 /Msys-names.dat
 /Linux-names.dat
 /nuttx.rel


[incubator-nuttx] 04/09: tools/testbuild.sh: Check defconfig in the canonical format

Posted by gn...@apache.org.
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

commit 48e6b97ca7fafd86d9f9c56b52d6ab2d12600b71
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 17:25:27 2020 +0800

    tools/testbuild.sh: Check defconfig in the canonical format
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 tools/testbuild.sh | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/tools/testbuild.sh b/tools/testbuild.sh
index d1f3f34..4bef96e 100755
--- a/tools/testbuild.sh
+++ b/tools/testbuild.sh
@@ -185,7 +185,9 @@ function distclean {
 
 function configure {
   echo "  Configuring..."
-  ./tools/configure.sh ${HOPTION} $config
+  if ! ./tools/configure.sh ${HOPTION} $config; then
+    fail=1
+  fi
 
   if [ "X$toolchain" != "X" ]; then
     setting=`grep _TOOLCHAIN_ $nuttx/.config | grep -v CONFIG_ARCH_TOOLCHAIN_* | grep =y`
@@ -207,9 +209,7 @@ function configure {
       sed -i -e "\$aCONFIG_ARCH_SIZET_LONG=y" $nuttx/.config
     fi
 
-
-    echo "  Refreshing..."
-    makefunc olddefconfig 1>/dev/null
+    makefunc olddefconfig
   fi
 }
 
@@ -217,8 +217,13 @@ function configure {
 
 function build {
   echo "  Building NuttX..."
-  echo "------------------------------------------------------------------------------------"
   makefunc ${JOPTION}
+
+  # Ensure defconfig in the canonical form
+
+  if ! ./tools/refresh.sh --silent $config; then
+    fail=1
+  fi
 }
 
 # Coordinate the steps for the next build test


[incubator-nuttx] 05/09: tools/testbuild.sh: Verify nuttx/apps folder clean after build

Posted by gn...@apache.org.
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

commit 95e5506637a30c26665ad734390d98b0a1c559ac
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 17:51:59 2020 +0800

    tools/testbuild.sh: Verify nuttx/apps folder clean after build
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 tools/testbuild.sh | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/tools/testbuild.sh b/tools/testbuild.sh
index 4bef96e..3f1d949 100755
--- a/tools/testbuild.sh
+++ b/tools/testbuild.sh
@@ -165,16 +165,12 @@ function makefunc {
 
 # Clean up after the last build
 
-function distclean_with_git {
-  git -C $nuttx clean -xfdq
-  git -C $APPSDIR clean -xfdq
-}
-
 function distclean {
+  echo "  Cleaning..."
   if [ -f .config ]; then
-    echo "  Cleaning..."
     if [ ${GITCLEAN} -eq 1 ]; then
-      distclean_with_git
+      git -C $nuttx clean -xfdq
+      git -C $APPSDIR clean -xfdq
     else
       makefunc ${JOPTION} distclean
     fi
@@ -224,6 +220,19 @@ function build {
   if ! ./tools/refresh.sh --silent $config; then
     fail=1
   fi
+
+  # Ensure nuttx and apps directory in clean state
+
+  if [ -d $nuttx/.git ] || [ -d $APPSDIR/.git ]; then
+    if [[ -n $(git -C $nuttx status -s) ]]; then
+      git -C $nuttx status
+      fail=1
+    fi
+    if [[ -n $(git -C $APPSDIR status -s) ]]; then
+      git -C $APPSDIR status
+      fail=1
+    fi
+  fi
 }
 
 # Coordinate the steps for the next build test


[incubator-nuttx] 08/09: Update defconfig per refresh.sh report

Posted by gn...@apache.org.
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

commit 2810220ea9cfa677a5fab30ecc19f5d56d5d9d8c
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 19:46:06 2020 +0800

    Update defconfig per refresh.sh report
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 boards/arm/cxd56xx/spresense/configs/smp/defconfig         | 2 +-
 boards/arm/imx6/sabre-6quad/configs/smp/defconfig          | 1 -
 boards/arm/lc823450/lc823450-xgevk/configs/audio/defconfig | 1 -
 boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig | 1 -
 boards/arm/lc823450/lc823450-xgevk/configs/usb/defconfig   | 1 -
 boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig  | 1 -
 boards/risc-v/k210/maix-bit/configs/smp/defconfig          | 1 -
 boards/xtensa/esp32/esp32-core/configs/smp/defconfig       | 1 -
 8 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/boards/arm/cxd56xx/spresense/configs/smp/defconfig b/boards/arm/cxd56xx/spresense/configs/smp/defconfig
index c912649..96bcff2 100644
--- a/boards/arm/cxd56xx/spresense/configs/smp/defconfig
+++ b/boards/arm/cxd56xx/spresense/configs/smp/defconfig
@@ -50,7 +50,6 @@ CONFIG_RTC=y
 CONFIG_RTC_DRIVER=y
 CONFIG_SCHED_INSTRUMENTATION=y
 CONFIG_SCHED_INSTRUMENTATION_BUFFER=y
-CONFIG_SCHED_WAITPID=y
 CONFIG_SDCLONE_DISABLE=y
 CONFIG_SMP=y
 CONFIG_SMP_NCPUS=2
@@ -62,6 +61,7 @@ CONFIG_START_YEAR=2019
 CONFIG_SYSTEM_CLE=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_CXXINITIALIZE=y
+CONFIG_SYSTEM_SYSTEM=y
 CONFIG_SYSTEM_TASKSET=y
 CONFIG_TESTING_OSTEST=y
 CONFIG_TESTING_OSTEST_FPUSIZE=64
diff --git a/boards/arm/imx6/sabre-6quad/configs/smp/defconfig b/boards/arm/imx6/sabre-6quad/configs/smp/defconfig
index 842a7aa..5d5bdf5 100644
--- a/boards/arm/imx6/sabre-6quad/configs/smp/defconfig
+++ b/boards/arm/imx6/sabre-6quad/configs/smp/defconfig
@@ -52,7 +52,6 @@ CONFIG_SCHED_HPWORK=y
 CONFIG_SCHED_HPWORKPRIORITY=192
 CONFIG_SCHED_INSTRUMENTATION=y
 CONFIG_SCHED_INSTRUMENTATION_BUFFER=y
-CONFIG_SCHED_WAITPID=y
 CONFIG_SMP=y
 CONFIG_SPINLOCK_IRQ=y
 CONFIG_START_MONTH=3
diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/audio/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/audio/defconfig
index d79262b..438ecbb 100644
--- a/boards/arm/lc823450/lc823450-xgevk/configs/audio/defconfig
+++ b/boards/arm/lc823450/lc823450-xgevk/configs/audio/defconfig
@@ -116,7 +116,6 @@ CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_ONEXIT=y
 CONFIG_SCHED_ONEXIT_MAX=32
 CONFIG_SCHED_STARTHOOK=y
-CONFIG_SCHED_WAITPID=y
 CONFIG_SDCLONE_DISABLE=y
 CONFIG_SERIAL_TERMIOS=y
 CONFIG_SMP=y
diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig
index 5ade170..37928fa 100644
--- a/boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig
+++ b/boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig
@@ -165,7 +165,6 @@ CONFIG_SCHED_LPWORKPRIORITY=60
 CONFIG_SCHED_ONEXIT=y
 CONFIG_SCHED_ONEXIT_MAX=32
 CONFIG_SCHED_STARTHOOK=y
-CONFIG_SCHED_WAITPID=y
 CONFIG_SDCLONE_DISABLE=y
 CONFIG_SENSORS=y
 CONFIG_SERIAL_TERMIOS=y
diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/usb/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/usb/defconfig
index 362a463..62eb2e0 100644
--- a/boards/arm/lc823450/lc823450-xgevk/configs/usb/defconfig
+++ b/boards/arm/lc823450/lc823450-xgevk/configs/usb/defconfig
@@ -114,7 +114,6 @@ CONFIG_SCHED_INSTRUMENTATION_BUFFER=y
 CONFIG_SCHED_ONEXIT=y
 CONFIG_SCHED_ONEXIT_MAX=32
 CONFIG_SCHED_STARTHOOK=y
-CONFIG_SCHED_WAITPID=y
 CONFIG_SDCLONE_DISABLE=y
 CONFIG_SENSORS=y
 CONFIG_SERIAL_TERMIOS=y
diff --git a/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig b/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig
index 638d7b8..0338d2c 100644
--- a/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig
+++ b/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig
@@ -45,7 +45,6 @@ CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_DISABLE_CD=y
 CONFIG_NSH_DISABLE_CP=y
-CONFIG_NSH_DISABLE_DATE=y
 CONFIG_NSH_DISABLE_MKDIR=y
 CONFIG_NSH_DISABLE_MOUNT=y
 CONFIG_NSH_DISABLE_RM=y
diff --git a/boards/risc-v/k210/maix-bit/configs/smp/defconfig b/boards/risc-v/k210/maix-bit/configs/smp/defconfig
index a5fc6dc..c77d221 100644
--- a/boards/risc-v/k210/maix-bit/configs/smp/defconfig
+++ b/boards/risc-v/k210/maix-bit/configs/smp/defconfig
@@ -52,7 +52,6 @@ CONFIG_READLINE_CMD_HISTORY=y
 CONFIG_RR_INTERVAL=200
 CONFIG_SCHED_INSTRUMENTATION=y
 CONFIG_SCHED_INSTRUMENTATION_BUFFER=y
-CONFIG_SCHED_WAITPID=y
 CONFIG_SMP=y
 CONFIG_SMP_NCPUS=2
 CONFIG_SPINLOCK_IRQ=y
diff --git a/boards/xtensa/esp32/esp32-core/configs/smp/defconfig b/boards/xtensa/esp32/esp32-core/configs/smp/defconfig
index 1b05f68..b9a1a4a 100644
--- a/boards/xtensa/esp32/esp32-core/configs/smp/defconfig
+++ b/boards/xtensa/esp32/esp32-core/configs/smp/defconfig
@@ -48,7 +48,6 @@ CONFIG_READLINE_CMD_HISTORY=y
 CONFIG_RR_INTERVAL=200
 CONFIG_SCHED_INSTRUMENTATION=y
 CONFIG_SCHED_INSTRUMENTATION_BUFFER=y
-CONFIG_SCHED_WAITPID=y
 CONFIG_SDCLONE_DISABLE=y
 CONFIG_SMP=y
 CONFIG_SMP_IDLETHREAD_STACKSIZE=3072


[incubator-nuttx] 02/09: tools: Remove the temp variable in checking program exit code

Posted by gn...@apache.org.
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

commit 5c1497aeb111f7fc6f7541e7da791012cef38847
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 16:58:55 2020 +0800

    tools: Remove the temp variable in checking program exit code
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 tools/checkpatch.sh | 18 ++++++------------
 tools/testbuild.sh  |  6 ++----
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index 08adb21..6c10fd4 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -42,17 +42,13 @@ usage() {
 }
 
 check_file() {
-  $TOOLDIR/nxstyle $@ 2>&1
-  ret=$?
-  if [ $ret != 0 ]; then
-    fail=$ret
+  if ! $TOOLDIR/nxstyle $@ 2>&1; then
+    fail=1
   fi
 
   if [ $spell != 0 ]; then
-    codespell -q 7 ${@: -1}
-    ret=$?
-    if [ $ret != 0 ]; then
-      fail=$ret
+    if ! codespell -q 7 ${@: -1}; then
+      fail=1
     fi
   fi
 }
@@ -83,10 +79,8 @@ check_ranges() {
 }
 
 check_patch() {
-  git apply --check $1
-  ret=$?
-  if [ $ret != 0 ]; then
-    fail=$ret
+  if ! git apply --check $1; then
+    fail=1
   else
     git apply $1
     diffs=`cat $1`
diff --git a/tools/testbuild.sh b/tools/testbuild.sh
index eca88ee..d1f3f34 100755
--- a/tools/testbuild.sh
+++ b/tools/testbuild.sh
@@ -158,10 +158,8 @@ blacklist=`grep "^-" $testfile || true`
 cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }
 
 function makefunc {
-  ${MAKE} ${MAKE_FLAGS} "${EXTRA_FLAGS}" $@ 1>/dev/null
-  ret=$?
-  if [ $ret != 0 ]; then
-    fail=$ret
+  if ! ${MAKE} ${MAKE_FLAGS} "${EXTRA_FLAGS}" $@ 1>/dev/null; then
+    fail=1
   fi
 }
 


[incubator-nuttx] 09/09: boards/imxrt1060-evk: Generate nuttx.map in the root directory

Posted by gn...@apache.org.
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

commit f706f5e0e8cf24cf173d0bff555c29ddde943d07
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Apr 20 10:04:05 2020 +0800

    boards/imxrt1060-evk: Generate nuttx.map in the root directory
    
    to avoid the follow warning:
      Normalize imxrt1060-evk/nshocram
    HEAD detached at pull/831/merge
    Untracked files:
      (use "git add <file>..." to include in what will be committed)
    
    	arch/arm/src/nuttx.map
    
    nothing added to commit but untracked files present (use "git add" to track)
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs b/boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs
index fed7bb4..450e25e 100644
--- a/boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs
+++ b/boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs
@@ -115,7 +115,12 @@ LIBEXT = .a
 EXEEXT =
 
 ifneq ($(CROSSDEV),arm-nuttx-elf-)
-  LDFLAGS += -nostartfiles -nodefaultlibs -Map nuttx.map
+  LDFLAGS += -nostartfiles -nodefaultlibs
+ifeq ($(WINTOOL),y)
+  LDFLAGS += -Map="${shell cygpath -w $(TOPDIR)/nuttx.map}"
+else
+  LDFLAGS += -Map=$(TOPDIR)/nuttx.map
+endif
 endif
 ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
   LDFLAGS += -g


[incubator-nuttx] 01/09: checkpatch.sh: Simplify the code logic, no functional change

Posted by gn...@apache.org.
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

commit cf674ed51c904e41474be2ffb46319cf795d0553
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Apr 18 20:53:21 2020 +0800

    checkpatch.sh: Simplify the code logic, no functional change
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 tools/checkpatch.sh | 61 ++++++++++++++++++++++-------------------------------
 1 file changed, 25 insertions(+), 36 deletions(-)

diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index 18a9848..08adb21 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -18,6 +18,7 @@
 
 TOOLDIR=$(dirname $0)
 
+check=check_patch
 fail=0
 range=0
 spell=0
@@ -36,10 +37,12 @@ usage() {
   echo "   git diff --cached | ./tools/checkpatch.sh -"
   echo "Where a <commit list> is any syntax supported by git for specifying git revision, see GITREVISIONS(7)"
   echo "Where a <patch file names> is a space separated list of patch file names or wildcard. or *.patch"
+
+  exit $@
 }
 
 check_file() {
-  $TOOLDIR/nxstyle $@
+  $TOOLDIR/nxstyle $@ 2>&1
   ret=$?
   if [ $ret != 0 ]; then
     fail=$ret
@@ -59,9 +62,9 @@ check_ranges() {
     if [[ $REPLY =~ ^(\+\+\+\ (b/)?([^[:blank:]]+).*)$ ]]; then
       if [ "$ranges" != "" ]; then
         if [ $range != 0 ]; then
-          check_file $ranges $path 2>&1
+          check_file $ranges $path
         else
-          check_file $path 2>&1
+          check_file $path
         fi
       fi
       path=${BASH_REMATCH[3]}
@@ -72,9 +75,9 @@ check_ranges() {
   done
   if [ "$ranges" != "" ]; then
     if [ $range != 0 ]; then
-      check_file $ranges $path 2>&1
+      check_file $ranges $path
     else
-      check_file $path 2>&1
+      check_file $path
     fi
   fi
 }
@@ -106,53 +109,39 @@ fi
 
 while [ ! -z "$1" ]; do
   case "$1" in
-  -h )
-    usage
-    exit 0
+  - )
+    check_ranges
     ;;
   -c )
     spell=1
     ;;
-  -r )
-    range=1
-    ;;
-  -p )
-    shift
-    patches=$@
-    break
+  -f )
+    check=check_file
     ;;
   -g )
-    shift
-    commits=$@
-    break
+    check=check_commit
     ;;
-  -f )
-    shift
-    files=$@
-    break
+  -h )
+    usage 0
     ;;
-  - )
-    check_ranges
-    break
+  -p )
+    check=check_patch
+    ;;
+  -r )
+    range=1
+    ;;
+  -* )
+    usage 1
     ;;
   * )
-    patches=$@
     break
     ;;
   esac
   shift
 done
 
-for patch in $patches; do
-  check_patch $patch
-done
-
-for commit in $commits; do
-  check_commit $commit
-done
-
-for file in $files; do
-  check_file $file 2>&1
+for arg in $@; do
+  $check $arg
 done
 
 exit $fail


[incubator-nuttx] 06/09: tools/Makefile.host: Initialize Q by inspecting V

Posted by gn...@apache.org.
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

commit 816f624819f5b6e2b2c77324a1d3a8bc70ec426a
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 19:52:24 2020 +0800

    tools/Makefile.host: Initialize Q by inspecting V
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 tools/Makefile.host   | 13 +++++++++++++
 tools/mkconfigvars.sh |  2 +-
 tools/refresh.sh      |  2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/tools/Makefile.host b/tools/Makefile.host
index f67e182..65ac92e 100644
--- a/tools/Makefile.host
+++ b/tools/Makefile.host
@@ -38,6 +38,19 @@ TOPDIR ?= $(CURDIR)/..
 -include $(TOPDIR)/Make.defs
 include ${TOPDIR}/tools/Config.mk
 
+# Control build verbosity
+#
+#  V=1,2: Enable echo of commands
+#  V=2:   Enable bug/verbose options in tools and scripts
+
+ifeq ($(V),1)
+export Q :=
+else ifeq ($(V),2)
+export Q :=
+else
+export Q := @
+endif
+
 # Check the endian-ness of the target
 
 # Define HOSTCC on the make command line if it differs from these defaults
diff --git a/tools/mkconfigvars.sh b/tools/mkconfigvars.sh
index c22176a..b972198 100755
--- a/tools/mkconfigvars.sh
+++ b/tools/mkconfigvars.sh
@@ -115,7 +115,7 @@ else
   if [ -x ${KCONFIG2HTML2} ]; then
     KCONFIG2HTML=${KCONFIG2HTML2}
   else
-    make -C ${KCONFIG2MAKEDIR} -f ${KCONFIG2MAKEFILE} ${KCONFIG2HTML_TARGET} || \
+    make -C ${KCONFIG2MAKEDIR} -f ${KCONFIG2MAKEFILE} ${KCONFIG2HTML_TARGET} 1>/dev/null || \
       { echo "ERROR: make ${KCONFIG2HTML1} failed" ; exit 1 ; }
   fi
 fi
diff --git a/tools/refresh.sh b/tools/refresh.sh
index 0e7e4ea..cbeecfc 100755
--- a/tools/refresh.sh
+++ b/tools/refresh.sh
@@ -125,7 +125,7 @@ else
   if [ -x ${CMPCONFIG2} ]; then
     CMPCONFIG=${CMPCONFIG2}
   else
-    make -C ${CMPCONFIGMAKEDIR} -f ${CMPCONFIGMAKEFILE} ${CMPCONFIG_TARGET} || \
+    make -C ${CMPCONFIGMAKEDIR} -f ${CMPCONFIGMAKEFILE} ${CMPCONFIG_TARGET} 1>/dev/null || \
       { echo "ERROR: make ${CMPCONFIG1} failed" ; exit 1 ; }
   fi
 fi


[incubator-nuttx] 03/09: tools/refresh.sh: Save defconfig and exit with 1 only when the difference exist

Posted by gn...@apache.org.
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

commit c153c31fbdf930c3c090438d750a4c19fc011146
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 15:44:02 2020 +0800

    tools/refresh.sh: Save defconfig and exit with 1 only when the difference exist
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 tools/cmpconfig.c | 19 ++++++++++++-------
 tools/refresh.sh  | 33 +++++++++++++++++++--------------
 2 files changed, 31 insertions(+), 21 deletions(-)

diff --git a/tools/cmpconfig.c b/tools/cmpconfig.c
index a5a5394..e4e94da 100644
--- a/tools/cmpconfig.c
+++ b/tools/cmpconfig.c
@@ -63,11 +63,12 @@ static void show_usage(const char *progname)
   exit(EXIT_FAILURE);
 }
 
-static void compare_variables(struct variable_s *list1, struct variable_s *list2)
+static int compare_variables(struct variable_s *list1,
+                             struct variable_s *list2)
 {
   char *varval1;
   char *varval2;
-  int result;
+  int ret = 0;
 
   while (list1 || list2)
     {
@@ -94,27 +95,33 @@ static void compare_variables(struct variable_s *list1, struct variable_s *list2
           printf("file1:\n");
           printf("file2: %s=%s\n\n", list2->var, varval2);
           list2 = list2->flink;
+          ret = EXIT_FAILURE;
         }
       else if (!list2)
         {
           printf("file1: %s=%s\n", list1->var, varval1);
           printf("file2:\n\n");
           list1 = list1->flink;
+          ret = EXIT_FAILURE;
         }
       else
         {
+          int result;
+
           result = strcmp(list1->var, list2->var);
           if (result < 0)
             {
               printf("file1: %s=%s\n", list1->var, varval1);
               printf("file2:\n\n");
               list1 = list1->flink;
+              ret = EXIT_FAILURE;
             }
           else if (result > 0)
             {
               printf("file1:\n");
               printf("file2: %s=%s\n\n", list2->var, varval2);
               list2 = list2->flink;
+              ret = EXIT_FAILURE;
             }
           else /* if (result == 0) */
             {
@@ -130,6 +137,8 @@ static void compare_variables(struct variable_s *list1, struct variable_s *list2
             }
         }
     }
+
+  return ret;
 }
 
 /****************************************************************************
@@ -171,9 +180,5 @@ int main(int argc, char **argv, char **envp)
   fclose(stream1);
   fclose(stream2);
 
-  printf("Comparing:\n\n");
-  printf("  file1 = %s\n", argv[1]);
-  printf("  file2 = %s\n\n", argv[2]);
-  compare_variables(list1, list2);
-  return EXIT_SUCCESS;
+  return compare_variables(list1, list2);
 }
diff --git a/tools/refresh.sh b/tools/refresh.sh
index 9dda1dc..0e7e4ea 100755
--- a/tools/refresh.sh
+++ b/tools/refresh.sh
@@ -38,6 +38,7 @@ USAGE="USAGE: $0 [options] <board>:<config>+"
 ADVICE="Try '$0 --help' for more information"
 
 unset CONFIGS
+diff=0
 debug=n
 defaults=n
 prompt=y
@@ -154,7 +155,7 @@ if [ "X${CONFIGS}" == "Xall" ]; then
 fi
 
 for CONFIG in ${CONFIGS}; do
-  echo "Refresh ${CONFIG}"
+  echo "  Normalize ${CONFIG}"
 
   # Set up the environment
 
@@ -256,28 +257,30 @@ for CONFIG in ${CONFIGS}; do
     make savedefconfig 1>/dev/null
   fi
 
-  # Save the refreshed configuration
+  # Show differences
 
-  if [ "X${prompt}" == "Xy" ]; then
+  if ! $CMPCONFIG $DEFCONFIG defconfig; then
 
-    # Show differences
+    # Save the refreshed configuration
 
-    $CMPCONFIG $DEFCONFIG defconfig
+    if [ "X${prompt}" == "Xy" ]; then
 
-    read -p "Save the new configuration (y/n)?" -n 1 -r
-    echo
-    if [[ $REPLY =~ ^[Yy]$ ]]
-    then
+      read -p "Save the new configuration (y/n)?" -n 1 -r
+      echo
+      if [[ $REPLY =~ ^[Yy]$ ]]; then
+        echo "Saving the new configuration file"
+        mv defconfig $DEFCONFIG || \
+            { echo "ERROR: Failed to move defconfig to $DEFCONFIG"; exit 1; }
+        chmod 644 $DEFCONFIG
+      fi
+    else
       echo "Saving the new configuration file"
       mv defconfig $DEFCONFIG || \
           { echo "ERROR: Failed to move defconfig to $DEFCONFIG"; exit 1; }
       chmod 644 $DEFCONFIG
     fi
-  else
-    echo "Saving the new configuration file"
-    mv defconfig $DEFCONFIG || \
-        { echo "ERROR: Failed to move defconfig to $DEFCONFIG"; exit 1; }
-    chmod 644 $DEFCONFIG
+
+    diff=1
   fi
 
   # Restore any previous .config and Make.defs files
@@ -292,3 +295,5 @@ for CONFIG in ${CONFIGS}; do
       { echo "ERROR: Failed to move SAVEMake.defs to Make.defs"; exit 1; }
   fi
 done
+
+exit $diff