Commit Graph

22 Commits

Author SHA1 Message Date
Alin Jerpelea c9eef2d697 tools: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-10 23:11:11 +08:00
Xiang Xiao 8b4ecac6c2 libc: Move math library from libs/libc/math to libs/libm/libm
to prepare the support of other implementation e.g.:
https://github.com/JuliaMath/openlibm
https://gitlab.com/gtd-gmbh/libmcs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-23 10:40:07 +02:00
SPRESENSE 10a5c660f2 tools: Fix an issue that libboard.a is not exported
If CONFIG_ARCH_BOARD_COMMON is enabled, libboard.a should be generated.
Fix an issue it is not built with make export.
2022-10-19 16:59:21 +02:00
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
Nakamura, Yuuichi 376786288e Create wrapper library for system call instrumentation 2020-07-22 12:01:40 -05: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 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 5f37226b6d tools/ Make fragments: Fix the various minor issue for NUTTXLIBS/USERLIBS
1. Remove libcxx duplication in FlatLibs.mk and from kernel space
2. Remove libpass1 from KernelLibs.mk since kernel build doesn't support the two pass mode
3. Remove FSDIR related comment since file system cannot be disabled now
2019-09-30 07:03:55 -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 a64869aa67 CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense.
Squashed commit of the following:

    configs/:  The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
    fs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    tools/:  Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
    syscall/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    drivers/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
    binfmt/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    arch/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/Kconfig:  CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
    configs/:  Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
2019-02-11 12:09:26 -06:00
Gregory Nutt ab5ebc5498 Revert "tools/KernelLibs.mk: Force libproxies to be built and installed before applications are build. Otherwise, the applications will not be able to find libproxies. I don't know why this was never seen before. Must be due to recent changes in the apps/ directory. The change is correct in any event."
This reverts commit f7eee58aee.
2018-09-03 16:27:54 -06:00
Gregory Nutt f7eee58aee tools/KernelLibs.mk: Force libproxies to be built and installed before applications are build. Otherwise, the applications will not be able to find libproxies. I don't know why this was never seen before. Must be due to recent changes in the apps/ directory. The change is correct in any event. 2018-09-03 13:34:41 -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 a0c663edc9 tools: Missed a couple of changes of libcxx to libxx. 2018-05-29 18:16:43 -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