mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
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.
This commit is contained in:
@@ -1826,3 +1826,15 @@ endmenu
|
||||
menu "Application Configuration"
|
||||
source "$APPSDIR/Kconfig"
|
||||
endmenu
|
||||
|
||||
# Support optionally including external code
|
||||
# into the OS build. EXTERNALDIR will be used
|
||||
# to either point to 'nuttx/external' or
|
||||
# 'nuttx/.external-dummy', if 'nuttx/external'
|
||||
# does not contain a Kconfig file
|
||||
|
||||
config EXTERNALDIR
|
||||
string
|
||||
option env="EXTERNALDIR"
|
||||
|
||||
source "$EXTERNALDIR/Kconfig"
|
||||
|
||||
Reference in New Issue
Block a user