diff --git a/bsp/stm32f4xx-HAL/Kconfig b/bsp/stm32f4xx-HAL/Kconfig index ee749b6f44..ca66286f50 100644 --- a/bsp/stm32f4xx-HAL/Kconfig +++ b/bsp/stm32f4xx-HAL/Kconfig @@ -21,7 +21,7 @@ source "$PKGS_DIR/Kconfig" choice prompt "Device type" - default STM32F401RC + default SOC_STM32F401RC config SOC_STM32F405RG bool "STM32F405RG" config SOC_STM32F405VG diff --git a/components/dfs/Kconfig b/components/dfs/Kconfig index 107cee84d3..35c7cf1b02 100644 --- a/components/dfs/Kconfig +++ b/components/dfs/Kconfig @@ -154,7 +154,7 @@ if RT_USING_DFS config RT_USING_DFS_NFS bool "Using NFS v3 client file system" - select RT_USING_LWIP + depends on RT_USING_LWIP default n if RT_USING_DFS_NFS diff --git a/components/net/Kconfig b/components/net/Kconfig index 30f25cda94..091536680c 100644 --- a/components/net/Kconfig +++ b/components/net/Kconfig @@ -27,7 +27,6 @@ config RT_USING_SAL config SAL_USING_POSIX bool "Enable BSD socket operated by file system API" - default y if RT_USING_POSIX default n select RT_USING_DFS select RT_USING_LIBC diff --git a/tools/building.py b/tools/building.py index 527da03103..e334056337 100644 --- a/tools/building.py +++ b/tools/building.py @@ -335,6 +335,16 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ menuconfig(Rtt_Root) exit(0) + AddOption('--pyconfig', + dest = 'pyconfig', + action = 'store_true', + default = False, + help = 'make menuconfig for RT-Thread BSP') + if GetOption('pyconfig'): + from menuconfig import pyconfig + pyconfig(Rtt_Root) + exit(0) + configfn = GetOption('useconfig') if configfn: from menuconfig import mk_rtconfig diff --git a/tools/kconfiglib.py b/tools/kconfiglib.py new file mode 100644 index 0000000000..56b4083524 --- /dev/null +++ b/tools/kconfiglib.py @@ -0,0 +1,6166 @@ +# Copyright (c) 2011-2018, Ulf Magnusson +# SPDX-License-Identifier: ISC + +""" +Overview +======== + +Kconfiglib is a Python 2/3 library for scripting and extracting information +from Kconfig (https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt) +configuration systems. + +See the homepage at https://github.com/ulfalizer/Kconfiglib for a longer +overview. + +Using Kconfiglib on the Linux kernel with the Makefile targets +============================================================== + +For the Linux kernel, a handy interface is provided by the +scripts/kconfig/Makefile patch, which can be applied with either 'git am' or +the 'patch' utility: + + $ wget -qO- https://raw.githubusercontent.com/ulfalizer/Kconfiglib/master/makefile.patch | git am + $ wget -qO- https://raw.githubusercontent.com/ulfalizer/Kconfiglib/master/makefile.patch | patch -p1 + +Warning: Not passing -p1 to patch will cause the wrong file to be patched. + +Please tell me if the patch does not apply. It should be trivial to apply +manually, as it's just a block of text that needs to be inserted near the other +*conf: targets in scripts/kconfig/Makefile. + +Look further down for a motivation for the Makefile patch and for instructions +on how you can use Kconfiglib without it. + +If you do not wish to install Kconfiglib via pip, the Makefile patch is set up +so that you can also just clone Kconfiglib into the kernel root: + + $ git clone git://github.com/ulfalizer/Kconfiglib.git + $ git am Kconfiglib/makefile.patch (or 'patch -p1 < Kconfiglib/makefile.patch') + +Warning: The directory name Kconfiglib/ is significant in this case, because +it's added to PYTHONPATH by the new targets in makefile.patch. + +The targets added by the Makefile patch are described in the following +sections. + + +make [ARCH=] iscriptconfig +-------------------------------- + +This target gives an interactive Python prompt where a Kconfig instance has +been preloaded and is available in 'kconf'. To change the Python interpreter +used, pass PYTHONCMD= to make. The default is "python". + +To get a feel for the API, try evaluating and printing the symbols in +kconf.defined_syms, and explore the MenuNode menu tree starting at +kconf.top_node by following 'next' and 'list' pointers. + +The item contained in a menu node is found in MenuNode.item (note that this can +be one of the constants kconfiglib.MENU and kconfiglib.COMMENT), and all +symbols and choices have a 'nodes' attribute containing their menu nodes +(usually only one). Printing a menu node will print its item, in Kconfig +format. + +If you want to look up a symbol by name, use the kconf.syms dictionary. + + +make scriptconfig SCRIPT=