Commit Graph

24 Commits

Author SHA1 Message Date
Alin Jerpelea 7ff60d7c5b tools: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-18 11:26:21 -08:00
Matias N 9ce4de634d support building external code into the OS, similar to how "external" apps work
This works by having the build system look for nuttx/external/Kconfig
to determine whether this directory is present or not. nuttx/external
is gitignored in order to be added by the final user but not to be
commited into the repo. Tipically this will by a symbolic link, just like
apps/external.

Inside external/ a Makefile should be placed with the same structure
than any nuttx/ subdirectory (eg: nuttx/drivers/). The
nuttx/external/Kconfig will be sourced and any options defined there will
appear at the bottom of menuconfig (unless options are conditioned on
menus, in which case they will appear accordingly).

The purpose is to allow arch/board independent code, which for any
reason is not to be upstreamed (propietary, not relevant for mainline,
testing, etc), to be built into the OS during OS building stage. This
way the user does not need to fork the NuttX repo to do so. This feature
complements well with external apps and custom board support.
2020-09-15 21:14:46 -07:00
Matias N 166242c171 use "export" to expose TOPDIR to all child make instead of passing it around every time 2020-09-15 21:11:33 -07:00
Nakamura, Yuuichi 376786288e Create wrapper library for system call instrumentation 2020-07-22 12:01:40 -05: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 e7e81dd74d tools/LibTargets.mk: Remove # from the action of syscall
this typo error make libstub.a is compiled without __KERNEL__

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-08 10:38:05 -06:00
Xiang Xiao 4b1dab84d1 tools/LibTargets.mk: Pass EXTRAFLAGS to all sub make
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 15:56:55 -06:00
Xiang Xiao f2aba8d9b7 build: Remove 'u' prefix from userspace library
so user needn't link the different library because the build type change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 15:56:55 -06:00
Xiang Xiao 7ffccf738c Makefile: Remove KERNEL variable which isn't really used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-28 09:01:58 -06: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
Xiang Xiao 852fc8b9d9 Revert "Fix make target dependencies"
This reverts commit 5f540d79a1.
2020-02-26 07:31:40 -06:00
YAMAMOTO Takashi 5f540d79a1 Fix make target dependencies
"all" and "depend" targets should not be made concurrently.
I occasionally see APPDIR build failures because of this.
2020-02-25 21:09:32 -06:00
Xiang Xiao 443255f348 Unify the c++ standard library name to libxx (#19)
libs/libxx/Makefile, and tools/*.mk:  Use common library name libxx.a, regardless of which libc++ library is selected.
2019-12-31 10:28:48 -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 2a271a5d62 tools/LibTargets.mk: Make libapps.a by the default target. 2019-10-17 11:37:44 -06:00
Xiang Xiao 8e74365b96 ibs/libc, libs/symtab, tools/ build system: Move symbol table generation into libc since the address in symbol table should come from userspace binary for protect build, not kernel binary. 2019-09-28 11:14:48 -06:00
Gregory Nutt 65aabe3048 libs/symtab: move symtab/ to libs/symtab. Let's no clutter up the top level directory. Shorten CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYSTAB to just CONFIG_EXECFUNCS_SYSTEM_SYMTAB. Some items in syscall/syscall.csv are only valid when CONFIG_LIB_SYSCALL is defined. That is always defined when really building the syatem calls, but causes errors in libs/symtab because they are not valid in the normal, FLAT build context. 2019-08-25 19:28:04 -06:00
Pavel Pisa 380198c985 symtab/, tools/: NuttX provides lists of available syscalls and library functions and tools to process them. The lists can be used to build symbol table which allows runtime program loading which can reuse functions already compiled into NuttX system image. List processing, compilation and linking to the final system image has been possible only under manual control until now.
Provided changes add option (CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYMTAB) to build complete list of available functions and syscalls automatically.  The symbolic table is generated in form libsymtab.a which can be reused by application or directly pull in when "g_symtab" and "g_nsymbols" variables are requested by EXECFUNCS configuration.

I have tried to follow mechanisms for library compilation in different kernel protection modes but tested only flat no-MMU build. The basic assumption is that this library and libraries providing syscall stubs and C-library functions are available in user-space context and initial application (usually NSH) registers the symbol table through IOCTL.  The table can be reused then by another applications in their address space as kernel allows. Simple for flat or protected mode, I am not sure if really support in MMU mode. It is highly probable that I have made some mistake, overlooked something, but functionality is optional (should not cause troubles in any mode if disabled) and main purpose is to lower memory overhead when more applications are loaded on memory constrained system which usually use direct kernel calling without protection or address space separation. If the table should be provided by kernel to applications then makefiles has to be adjusted.
2019-08-13 09:09:43 -06:00
Alin Jerpelea a1c991d921 Merged in alinjerpelea/nuttx (pull request #963)
Move boards to boards folder

* boards: rename configs folder to boards

    This is the proposed layout after the change:

    boards: - folder containing board folders
            <board>: - name of each board
                    drivers: - extra drivers specific for platform
                    include: - header files for the boars
                    scripts: - extra scripts specific for platform
                        src: - board specific code
                      tools: - extra tools specific for platform
                    <config>: - board specific configuration(s)

    Note:
    <xxx> names are dependent on platform

    This is a logical change to aim to the arch layout but this is a
    huge change it should be done in several steps to lower the risk.

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

* Kconfig: replace configs with boards

    The change is needed after the path change

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

* Makefile: replace configs with boards

    The change is needed after the path change

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

* Makefile.*: replace configs with boards

    The change is needed after the path change

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

* Make.defs: replace configs with boards

    The change is needed after the path change

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

* .sh: replace configs with boards

    The change is needed after the path change

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

* .mk: replace configs with boards

    The change is needed after the path change

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

* .c & .h: replace configs with boards

    The change is needed after the path change

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

* .bat: replace configs with boards

    The change is needed after the path change

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-05 12:04:14 +00:00
Gregory Nutt dbf286472b Squashed commit of the following:
video/edid:  Add some initial EDID logic ported from FreeBSD.
    video/:  Add basic configure and build support for a video subsystem.
2019-07-07 16:40:24 -06:00
Gregory Nutt 4becaea8e3 This commit extends support for the two-pass build. Its primary purpose is to incorporate source logic generated by applications into the kernel phase of the build.
In the two pass build, the application logic is built during the first phase, pass 1.  In that phase, the application may generate and install source files in the pass1/directory.  The operating system is built during phase 2 of the build.  At that time, those source files in the pass1/ directory will be built and incorporated into the kernel address space.

The primary purpose of the pass1/ directory is to such application-generated kernel symbol tables.  For an example of the use of this feature, look at apps/examples/module/drivers/Makefile.  Kernel symbol tables are needed to support kernel modules.  Of course, addition board-specific logic in, say, configs/<board>/src would have to be included to make use of the application-installed symbol tables.
2018-08-07 08:31:00 -06:00
Mateusz Szafoni b5ec5349b0 Merged in raiden00/nuttx (pull request #648)
libdsp: initial commit

* libdsp: initial commit

* libdsp: cosmetics

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-05-30 12:36:06 +00:00
Gregory Nutt cf99fb40c9 This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now.
Squashed commit of the following:

    libs/libxx:  Fix some confusing in naming.  If the directory is called libxx, then the library must be libxx.a (unless perhaps LIBCXX is selected).
    libs/:  Fix paths in moved library directories.
    libs:  Brute force move of libc, libnx, and libxx to libs.  Cannot yet build it in that configuration.
2018-05-29 13:21:26 -06:00
Gregory Nutt 53a4408428 Build system: Move all build-related files (except the top-level Makefile) into the tools/ sub-directory. This really cleans up the top-level directory. 2018-05-29 12:14:55 -06:00