Commit Graph

78 Commits

Author SHA1 Message Date
Xiang Xiao
ac7e5de5ae libxx: Integrate uClibc++ latest official release
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I05377a0a7674f1cbe461ce67960bd3dc62729337
2020-07-17 21:40:34 +01:00
chao.an
9d7856192b make/POSTBUILD: make BIN directory configurable
enhance the post build can support configurable BIN directory

Change-Id: I64f286b6eb5ed77e91b67a27d815d62c345ac589
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-02 12:29:16 +01:00
chao.an
30d2b6c89c make/export: export post build script
post build processing is also necessary for import compilation

Change-Id: Ie27e25b84e2212e9c86358c30ca1a5b7c2adffc5
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-02 12:29:16 +01:00
chao.an
b8e5755568 make/version: correct the version generation
incorrect version generation by commit 3ec12a84c2

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 14:51:18 +02:00
David Sidrane
3ec12a84c2 Makefile.unix:versioning insure it is a .git dir
An out-of-tree build may have a .git file that is from a
  submodule. Once we find a .git file check if this is
  really a working dir.
2020-06-18 10:29:51 +08:00
Gregory Nutt
18e4ab99cb Makefile: Build the tools/incdir binary immediately.
Before any other Make logic can be used, we must immediately build the tools/incdir binary.  It will be used as soon as Make.defs is included and will generate errors otherwise.

Remove the other locations in the tools/incdir binary was being build from tools/Makefile.unix and tools/Makefile.win
2020-05-31 15:05:23 +01:00
Ouss4
e018309e47 tools/Makefile*: Clean tools binaries at the end of distclean. 2020-05-31 15:05:23 +01:00
Gregory Nutt
5555070fc3 tools/: Hook incdir.c into build system.
incdir.c was added in PR 1148.  This PR hooks it into the build system.
2020-05-30 01:05:34 +01:00
liuhaitao
b5dc83748c build: Update make dependency to enable 'configure.sh config' parallel build
Note that 'configure.sh config -jn' with parallel build could reduce configure stage
time.

Change-Id: I3d63f1e316a7bc3437fc6c6c2da13c5313e69694
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-28 20:01:45 +08:00
liuhaitao
954d251dfe build: make sure nuttx bins generated after both pass1 and pass2 built done
Create the final NuttX executables after pass1 user libs and pass2 nuttx
libs built finished.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-27 06:28:05 -06:00
liuhaitao
56e7a906e5 build: exit normaly once catch 'make depend' and 'make context' failure case
To be strict in check build, once any 'make depend' or 'make context' fails, exit normally.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-26 15:39:34 +08:00
Xiang Xiao
e83c1400b6 build: Move BOARD_DIR definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
liuhaitao
adc0c3e459 build: parallel clean and distclean subdir build
Use absolute path for APPDIR which could be used by apps clean
and distclean subdir build. Parallel clean and distclean subdir
could save more build time.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-22 12:35:46 +01:00
Xiang Xiao
1a95cce1a3 build: Move .config check to the top Makefile
remove the workaround to handle the inexistence of .config/Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-20 17:57:34 +01:00
YAMAMOTO Takashi
48da64f9c2 Redo "Fix make target dependencies"
Change-Id: I7180145d90913fd3acc94487b9f7b9753dcdc8da
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-19 19:23:54 +01:00
Xiang Xiao
7faf3c0254 build: replace ${TOPDIR} with $(TOPDIR) in Makefile
make the usage consistence

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao
5e7342bcf4 build: Move V definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao
9ec9431706 build: Move DIRLINK/DIRUNLINK definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao
bd656888f2 build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Xiang Xiao
a2f657e4cb build: Move KDEFINE to a common place(tools/Config.mk)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 15:56:55 -06:00
Xiang Xiao
eca7059785 Refine __KERNEL__ and CONFIG_BUILD_xxx usage in the code base
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 10:43:47 -03:00
Xiang Xiao
ee9daea586 Remove the residual files in the distclean action
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-28 21:28:15 -07:00
Ouss4
2c58b11e50 tools/: Update version generation tools to account for the patch number. 2020-04-18 11:47:37 -07:00
liuhaitao
459ad99373 Use EXTRAFLAGS instead of EXTRADEFINES to be used by make via command line
So call 'make EXTRAFLAGS=-Wno-cpp' could suppress the warnings with pre-processor
directive #warning in GCC.

Change-Id: Iaa618238924c9969bf91db22117b39e6d2fc9bb6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-11 08:31:08 -06:00
Ouss4
765833546c tools/: Fix trivial typos. 2020-04-03 10:42:09 -06:00
Xiang Xiao
024024f468 tools: Sync Makefile.win with Makefile.unix
and fix the typo error and remove if/else nesting

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ife0c80d396417e8eb37e43d0883f272d4b9247a0
2020-03-21 09:48:57 -07:00
Xiang Xiao
c4ea4e976d tools/configure.sh: Add -e option to invoke distclean if already configured
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I19eddc3d4e6650eace2482c3cce8fbb07aadc04b
2020-03-21 09:48:57 -07:00
Gregory Nutt
3ee1af5bcc Build System: Resolve CPU-specific logic in common build files
* tools/Config.mk - Add empty definition POSTBUILD
* tools/Makefile.unix/win - Replace CXD56xx specific logic with $(call POSTBUILD)
* boards/arm/cxd56xx/scripts/Config.mk - Add POSTBUILD definitions with logic removed from Makefile.unix/win
* boards/arm/cxd56xx/spresense/scripts/Make.defs - Include the CXD56xx Config.mk immediately after tools/Config.mk so that the empty POSTBUILD definition will be replaced with the correct one

NOTE: There is a precedent for this approach.  This is the way that other architecture-specific build options are implemented.  See, for example, tools/zds/Config.mk
2020-03-06 11:44:53 -06:00
YAMAMOTO Takashi
aa40e28862 Make it clear the timestamp of pass1 directory is not important 2020-02-26 10:20:10 -06:00
Xiang Xiao
cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao
adbff7de81 tools/Config.mk: add DEFINE macro like INCDIR 2020-02-03 15:06:11 -06:00
chao.an
c709ed2464 tools/Makefile.unix and Makefile.won: In distclean target, unlink the dir after subdir clean
Ensure the linked dir can be clean complete in multi-job case
2020-01-21 08:37:59 -06:00
Gregory Nutt
10b8c01abf tools/Makefile.unix: Fix a logic error in 3e4450e237. 2019-12-13 12:43:44 -06:00
Gregory Nutt
3e4450e237 tools/Makefile.unix and .win: Back out part of 1c91aec6ae (tools/ and fs/procfs: Simplify .version file generation). That change breaks the build if not in a git clone. noted by Nathan Hartman. 2019-12-13 12:34:17 -06:00
anchao
1c91aec6ae tools/ and fs/procfs: Simplify .version file generation
1.merge CONFIG_GIT_REVISION_STR into CONFIG_VERSION_BUILD
2.merge gen_getrev.sh into version.sh
3.generate version number if needed

Here is a sample output:
nsh> uname -a
NuttX  8.2 59fd8e12d3-dirty Dec 12 2019 15:48:00 sim sim
nsh> cat /proc/version
NuttX version 8.2 59fd8e12d3-dirty Dec 12 2019 15:48:01
2019-12-12 11:17:11 -06:00
Gregory Nutt
897378bc29 Remove support for generation of RRLOAD binary files. The RRLOAD binary format was used with Linux BSPs from www.ridgerun.com circa 2000-2001. It is still need by the the c5471 board if that bootloader is used. Removes the CONFIG_RRLOAD_BINARY option and tools/mkimage.sh
This change was motivated by the presence of the mkimage.sh file under tools.  That is the tool that created the RRLOAD binary format.  That bash script has a GPL license and, hence, may not be included in an Apache-licensed project.
2019-12-09 11:29:12 -06:00
Alin Jerpelea
338bc46f5e Merged in alinjerpelea/nuttx (pull request #1088)
add mkspk tool for cxd56 devices

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-03 22:17:31 +00:00
Gregory Nutt
d87295f328 tools/Directories.mk, Makefile.*: Extend the clean_context target so that it will remove the autogenerated files created during the context phase of the initial build. 2019-12-03 06:38:53 -06:00
Guiding Li
8b92305265 This commit brings in the drivers needed to support OpenAMP. These changes were ported from https://github.com/FishsemiCode/nuttx. The current state: Most drivers do now compile but are not yet verfied.
This port was effort of a number of people, I rather arbitrarily gave authorship to Guiding Li because he has the largest number of fundamental quashed commits from the Xiamoi repository.

Squashed commit of the following:

Author: Xiang Xiao <xiaoxiang@pinecone.net>
    include/nuttx/b2c.h and libx/libc/string:  Add non-standard string functions to deal with cases where there are more than 8-bits in a type char.

Author: Gregory Nutt <gnutt@nuttx.org>
    Fix several build issues/missing definitiona needed for OpenAMP build in drivers/.
    Add OpenAMP code has been reviewed and ran through tools/nxstyle (with all reports accounted for).

Author: Xiang Xiao <xiaoxiang@xiaomi.com>
    tools/:  Fix the minor issue in Makefile

Author: Gregory Nutt <gnutt@nuttx.org>
    drivers/rptun/rptun.c:  Review for coding standard.  Run against tools/nxstyle.
    tools/LibTargets.mk:  Fix some TABs that were turned into spaces by a copy-paste.
    fs/hostfs:  Add configure and build support for hostfs RPC.
    drivers/timer:  Add configure and build support for syslog RTC.
    drivers/syslog:  Add configure and build support for syslog RPC.
    drivers/serial:  Add configure and build support for serial RPC.
    Kconfig, tools/*.mk. openamp/:  Add basic OpenAMP build support.
    drivers/rptun:  Add configure and build support for OpenAMP tunnel drivers.
    drivers/net:  Update Make.defs and Kconfig for OpenSDA support.
    Remove drivers/clk/clk-rpmsg.c drivers/power/rpmsg_regulator.c.  These depend on upstreaming support for a new subsystem based on the clk/regulator is model from Linux.  Removed because we want to separate the activities.  We will just try to get the basic OpenAMP support in place for now.
    Remove drivers/misc/misc_rpmsg.c and include/nuttx/misc/misc_rpmsg.h.  These are specific to the Xiaomi application.

Author: zhuyanlin <zhuyanlin@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Jianli Dong <dongjianli@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Guiding Li <liguiding@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.
2019-11-02 11:30:33 -06:00
Xiang Xiao
8ffa77b167 tools/mkexport.sh: Should export full content for flat build even with CONFIG_BUILD_LOADABLE. 2019-10-03 14:08:32 -06:00
Xiang Xiao
61ec1d7a1d Makefiles: change ${shell pwd} to $(CURDIR) since pwd doesn't exist on Windows 2019-10-02 07:09:28 -06:00
Xiang Xiao
0efd3e2e7f tools/Directories.mk: Remove FSDIRS/NOFSDIRS related logic/comments since the file system can no longer be disabled now. 2019-09-30 07:11:26 -06:00
Xiang Xiao
d4ca483edc tools/Makefile.unix: Make COMMON_DIR work with CONFIG_ARCH_BOARD_CUSTOM. 2019-09-30 06:49:20 -06:00
Nathan Hartman
a83a609af9 Direct users to our kconfig-frontends snapshot instead of upstream.
It appears Yann Morin's kconfig-frontends project has gone offline and
the website at http://ymorin.is-a-geek.org/projects/kconfig-frontends
is not responding. Until we can identify a "proper" upstream project,
use the snapshot in NuttX tools repository.

Replace (almost) all links to Yann Morin's kconfig-frontends in the
docs to point to the NuttX tools snapshot instead, with the following
exceptions:

    nuttx/Changelog for version 6.17, 2012-04-14: Leave this historical
    information intact.

    nuttx/README.txt: Document the source of our snapshot.
2019-09-24 09:52:09 -06:00
Xiang Xiao
ba436b9434 tools/Makefile.unix: Fix build error when issue 'make -B'. mkdir: cannot create directory 'staging': File exists: tools/Makefile.unix:269: recipe for target 'staging' failed' 2019-09-16 07:41:25 -06:00
Xiang Xiao
bf84868360 tools/Config.mk and Makefile.unix: Support the incremental build for configuration change. 2019-09-15 10:56:26 -06:00
Gregory Nutt
5707d01cc3 tools/version.h and Makefile.unix: Minor improvement to previous commit: Permit custom version strings that do not derive from the major and minor version number 2019-09-07 09:14:21 -06:00
Gregory Nutt
d07666c85b tools/Makefile.unix: Rethink creation of new .version file with GIT information. Cannot use 'sed -i' in its current form because that does not work on macOS, FreeBSD, or NetBSD. 2019-09-07 08:44:16 -06:00
Gregory Nutt
0b64e79736 tools/Makefile.win: Change of 8883623d07 needs to be applied to Makefile.win too. 2019-09-04 18:58:52 -06:00
jjlange
8883623d07 Merged in jjlange/nuttx/makefile_updates (pull request #1028)
Makefile updates

* Save CONFIG_ARCH_BOARD_CUSTOM when running 'make savedefconfig'

* Only use PCLKSEL0 for ADC on LPC176x family.

* Made grep search expression more specific.

* Added missing '=' to second grep

* Revert "Only use PCLKSEL0 for ADC on LPC176x family."

    This reverts commit 835b5e9d6fcbea02cb0203c063b0e121fa57ba9e.

* Revert "Added missing '=' to second grep"

    This reverts commit 38b51f0c6d9612de755c102a53846ca7488cdf14.

* Added a missing '=' in the second grep statement

* When linking $(ARCH_SRC)/drivers, print what is actually happening

* Save CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH when running "make savedefconfig"

* Revert changes to lines 607-608 related to CONFIG_ARCH_BOARD_CUSTOM

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-05 00:48:51 +00:00