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

[incubator-nuttx-apps] branch master updated (4e10b69 -> c723283)

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 4e10b69  example/helloxx: Remove EXAMPLES_HELLOXX_NOSTACKCONST
     new aaa6134  make/import: move the binary install to the top Makefile
     new fde8f24  make/import: add post build support
     new a5bae8b  make/import: copy the exported buildin registers
     new c723283  make/import: support import zip use relative path

The 4 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:
 Makefile          | 20 +++++++++++++++++++-
 import/Make.defs  |  1 +
 import/Makefile   | 20 +-------------------
 tools/mkimport.sh | 19 ++++++++++++-------
 4 files changed, 33 insertions(+), 27 deletions(-)


[incubator-nuttx-apps] 02/04: make/import: add post build support

Posted by xi...@apache.org.
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 fde8f24f2ac4f357d9848da7ff64c4ffd574be2f
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Jul 1 11:32:21 2020 +0800

    make/import: add post build support
    
    support post processing after binary install
    
    Change-Id: Ifc587f6a8a29372298261c99a4510b680cbb8ec1
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 Makefile         | 1 +
 import/Make.defs | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 5b495b1..49c6e4b 100644
--- a/Makefile
+++ b/Makefile
@@ -140,6 +140,7 @@ ifeq ($(CONFIG_RAW_BINARY),y)
 	$(Q) echo "CP: nuttx.bin"
 	$(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary nuttx$(EXEEXT) nuttx.bin
 endif
+	$(call POSTBUILD, $(APPDIR))
 
 import: $(IMPORT_TOOLS)
 	$(Q) $(MAKE) context TOPDIR="$(APPDIR)$(DELIM)import"
diff --git a/import/Make.defs b/import/Make.defs
index 5c2c132..aff19c9 100644
--- a/import/Make.defs
+++ b/import/Make.defs
@@ -35,6 +35,7 @@
 
 include $(TOPDIR)/.config
 include $(TOPDIR)/tools/Config.mk
+-include $(TOPDIR)/scripts/Config.mk
 include $(TOPDIR)/scripts/Make.defs
 
 # Tool related definitions


[incubator-nuttx-apps] 04/04: make/import: support import zip use relative path

Posted by xi...@apache.org.
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 c723283340bd371db8375fff64f754d91cf56cfc
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Jul 1 17:04:53 2020 +0800

    make/import: support import zip use relative path
    
    mkimport.sh failure if using relative path:
    
    $ ./tools/mkimport.sh -x ../incubator-nuttx/nuttx-export-9.1.0.zip
    unzip:  cannot find or open ../incubator-nuttx/nuttx-export-9.1.0.zip, ../incubator-nuttx/nuttx-export-9.1.0.zip.zip or ../incubator-nuttx/nuttx-export-9.1.0.zip.ZIP.
    ERROR: unzip ../incubator-nuttx/nuttx-export-9.1.0.zip failed
    
    Change-Id: Ifc93c5e4dac95ec79a4e909b22ef646fbfe4484d
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 tools/mkimport.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/mkimport.sh b/tools/mkimport.sh
index 1c7a7a6..7ce1948 100755
--- a/tools/mkimport.sh
+++ b/tools/mkimport.sh
@@ -114,19 +114,19 @@ rm -rf ${DALLDIRS}
 mkdir ${TMPDIR} || \
 	{ echo "ERROR: Failed to create ${TMPDIR}"; exit 1; }
 
-# Unpack the export package into the temporary directory
-
-cd ${TMPDIR} || \
-	{ echo "ERROR: Failed to cd to ${TMPDIR}"; exit 1; }
-
 if [ "X${TGZ}" == "Xy" ]; then
-	tar zxf ${EXPORT} || \
+	tar zxf ${EXPORT} -C ${TMPDIR} || \
 		{ echo "ERROR: tar zxf ${EXPORT} failed"; exit 1; }
 else
-	unzip ${EXPORT} || \
+	unzip ${EXPORT} -d ${TMPDIR} || \
 		{ echo "ERROR: unzip ${EXPORT} failed"; exit 1; }
 fi
 
+# Unpack the export package into the temporary directory
+
+cd ${TMPDIR} || \
+	{ echo "ERROR: Failed to cd to ${TMPDIR}"; exit 1; }
+
 EXPORTDIR=`ls`
 
 if [ -z "${EXPORTDIR}" ]; then


[incubator-nuttx-apps] 03/04: make/import: copy the exported buildin registers

Posted by xi...@apache.org.
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 a5bae8b8eeae513f882076beeb26e8f48fb90538
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Jul 1 14:00:15 2020 +0800

    make/import: copy the exported buildin registers
    
    copy the exported buildin registers to avoid symbols dropping on import build
    
    Change-Id: Ibf184d5d67906b41a2c813b96f61f047e60bacea
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 tools/mkimport.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/mkimport.sh b/tools/mkimport.sh
index be1972f..1c7a7a6 100755
--- a/tools/mkimport.sh
+++ b/tools/mkimport.sh
@@ -95,6 +95,7 @@ fi
 
 WD=${PWD}
 IMPORTDIR=${WD}/import
+BUILTINDIR=${WD}/builtin
 DARCHDIR=${IMPORTDIR}/arch
 DINCDIR=${IMPORTDIR}/include
 DLIBDIR=${IMPORTDIR}/libs
@@ -144,6 +145,7 @@ SLIBDIR=${EXPORTDIR}/libs
 SSCRIPTSDIR=${EXPORTDIR}/scripts
 SSTARTDIR=${EXPORTDIR}/startup
 STOOLSDIR=${EXPORTDIR}/tools
+REGISTERSDIR=${EXPORTDIR}/registry
 
 unset SALLDIRS
 if [ -d ${SARCHDIR} ]; then
@@ -170,6 +172,9 @@ fi
 mv ${SALLDIRS} ${IMPORTDIR}/. || \
 	{ echo "ERROR: Failed to move ${SALLDIRS} to ${IMPORTDIR}"; exit 1; }
 
+cp -rf ${REGISTERSDIR} ${BUILTINDIR}/. || \
+	{ echo "ERROR: Failed to move ${REGISTERSDIR} to ${BUILTINDIR}"; exit 1; }
+
 # Move the .config file in place in the import directory
 
 SFILES=".config"


[incubator-nuttx-apps] 01/04: make/import: move the binary install to the top Makefile

Posted by xi...@apache.org.
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 aaa61346c932409918b3a5a094dd480d96619071
Author: chao.an <an...@xiaomi.com>
AuthorDate: Tue Jun 30 21:20:29 2020 +0800

    make/import: move the binary install to the top Makefile
    
    move the binary install to the main Makefile to support
    link extra libraries
    
    Change-Id: I6db8a244ec9975163ea0c21fec6468e215c5aedb
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 Makefile        | 19 ++++++++++++++++++-
 import/Makefile | 20 +-------------------
 2 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/Makefile b/Makefile
index 678ee7c..5b495b1 100644
--- a/Makefile
+++ b/Makefile
@@ -121,13 +121,30 @@ endif # !CONFIG_BUILD_LOADABLE
 
 install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
 
+# Link nuttx
+
+HEAD_OBJ += $(wildcard $(APPDIR)$(DELIM)import$(DELIM)startup$(DELIM)*$(OBJEXT))
+HEAD_OBJ += $(wildcard $(APPDIR)$(DELIM)builtin$(DELIM)*$(OBJEXT))
+
 .import: $(BIN) install
+	$(Q) echo "LD: nuttx"
+	$(Q) $(LD) --entry=__start $(LDFLAGS) $(LDLIBPATH) $(EXTRA_LIBPATHS) \
+	  -L$(APPDIR)$(DELIM)import$(DELIM)scripts -T$(LDNAME) \
+	  -o nuttx$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) $(LDSTARTGROUP) \
+	  $(BIN) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
+ifeq ($(CONFIG_INTELHEX_BINARY),y)
+	$(Q) echo "CP: nuttx.hex"
+	$(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex nuttx$(EXEEXT) nuttx.hex
+endif
+ifeq ($(CONFIG_RAW_BINARY),y)
+	$(Q) echo "CP: nuttx.bin"
+	$(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary nuttx$(EXEEXT) nuttx.bin
+endif
 
 import: $(IMPORT_TOOLS)
 	$(Q) $(MAKE) context TOPDIR="$(APPDIR)$(DELIM)import"
 	$(Q) $(MAKE) depend TOPDIR="$(APPDIR)$(DELIM)import"
 	$(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import"
-	$(Q) $(MAKE) -C import install TOPDIR="$(APPDIR)$(DELIM)import"
 
 endif # CONFIG_BUILD_KERNEL
 
diff --git a/import/Makefile b/import/Makefile
index 763c4cc..63eb4be 100644
--- a/import/Makefile
+++ b/import/Makefile
@@ -43,25 +43,7 @@ FILES   = .config System.map User.map
 all:
 .PHONY: context depend clean distclean
 
-APPDIR = $(realpath $(CURDIR)$(DELIM)..)
-HEAD_OBJ += $(wildcard $(TOPDIR)$(DELIM)startup$(DELIM)*$(OBJEXT))
-HEAD_OBJ += $(wildcard $(APPDIR)$(DELIM)builtin$(DELIM)*$(OBJEXT))
-
-$(APPDIR)$(DELIM)nuttx$(EXEEXT): $(wildcard $(APPDIR)$(DELIM)*$(LIBEXT))
-	$(Q) echo "LD: nuttx"
-	$(Q) $(LD) --entry=__start $(LDFLAGS) -T$(LDSCRIPT) $(LIBPATHS) \
-	  $(LDLIBPATH) -L$(CURDIR)$(DELIM)scripts -o $@ $(HEAD_OBJ) \
-	  $(EXTRA_OBJS) $(LDSTARTGROUP) $^ $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
-ifeq ($(CONFIG_INTELHEX_BINARY),y)
-	$(Q) echo "CP: nuttx.hex"
-	$(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex $@ nuttx.hex
-endif
-ifeq ($(CONFIG_RAW_BINARY),y)
-	$(Q) echo "CP: nuttx.bin"
-	$(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary $@ nuttx.bin
-endif
-
-install: $(APPDIR)$(DELIM)nuttx$(EXEEXT)
+install:
 
 context: