Skip to content

OpenSBI Kconfig Support

Anup Patel opensbi 12 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest17 patches 0 repliesNew
  2. v717 patches 0 repliesSuperseded
  3. v617 patches 0 repliesSuperseded
Earlier versions · 9
VersionPostedPatchesRepliesStatus
v516 patches0 repliesSuperseded
v4 posting 2/20 of 15 patches0 repliesSuperseded
v4 posting 1/215 patches0 repliesSuperseded
v315 patches0 repliesSuperseded
v2 posting 4/40 of 14 patches0 repliesSuperseded
v2 posting 3/40 of 14 patches0 repliesSuperseded
v2 posting 2/40 of 14 patches0 repliesSuperseded
v2 posting 1/414 patches0 repliesSuperseded
v114 patches0 repliesSuperseded

Changes in v8 from the cover letter

- Fixed parallel build issue in PATCH2

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17scripts: Add Kconfiglib v14.1.0 under scripts directoryscripts/Kconfiglib/LICENSE.txt scripts/Kconfiglib/allnoconfig.py scripts/Kconfiglib/allyesconfig.py +8 more+11156 -00 replies
2/17Makefile: Add initial kconfig support for each platformKconfig Makefile firmware/Kconfig +15 more+127 -120 replies
3/17Makefile: Compile lib/utils sources separately for each platformMakefile docs/library_usage.md scripts/create-binary-archive.sh+26 -300 replies
4/17lib: utils/serial: Use kconfig for enabling/disabling driversinclude/sbi_utils/serial/fdt_serial.h lib/utils/Kconfig lib/utils/serial/Kconfig +8 more+121 -220 replies
5/17lib: utils/reset: Use kconfig for enabling/disabling driversinclude/sbi_utils/reset/fdt_reset.h lib/utils/Kconfig lib/utils/reset/Kconfig +2 more+67 -140 replies
6/17lib: utils/sys: Use kconfig for enabling/disabling driverslib/utils/Kconfig lib/utils/reset/Kconfig lib/utils/serial/Kconfig +2 more+20 -20 replies
7/17lib: utils/timer: Use kconfig for enabling/disabling driversinclude/sbi_utils/timer/fdt_timer.h lib/utils/Kconfig lib/utils/timer/Kconfig +7 more+45 -50 replies
8/17lib: utils/ipi: Use kconfig for enabling/disabling driversinclude/sbi_utils/ipi/fdt_ipi.h lib/utils/Kconfig lib/utils/ipi/Kconfig +7 more+45 -50 replies
9/17lib: utils/irqchip: Use kconfig for enabling/disabling driversinclude/sbi_utils/irqchip/fdt_irqchip.h include/sbi_utils/irqchip/imsic.h lib/utils/Kconfig +9 more+83 -110 replies
10/17lib: utils/i2c: Use kconfig for enabling/disabling driverslib/utils/Kconfig lib/utils/i2c/Kconfig lib/utils/i2c/objects.mk +1 more+31 -50 replies
11/17lib: utils/gpio: Use kconfig for enabling/disabling driverslib/utils/Kconfig lib/utils/gpio/Kconfig lib/utils/gpio/objects.mk +2 more+32 -50 replies
12/17lib: utils/fdt: Use kconfig for enabling/disablinginclude/sbi_utils/fdt/fdt_domain.h include/sbi_utils/fdt/fdt_pmu.h lib/utils/Kconfig +18 more+63 -80 replies
13/17platform: generic: Use kconfig for enabling/disabling overridesplatform/generic/Kconfig platform/generic/allwinner/objects.mk platform/generic/configs/defconfig +1 more+27 -60 replies
14/17platform: generic: Use kconfig to set platform version and default nameplatform/generic/Kconfig platform/generic/platform.c+18 -20 replies
15/17platform: Remove redundant config.mk from all platformsMakefile platform/andes/ae350/config.mk platform/andes/ae350/objects.mk +13 more+240 -2770 replies
16/17docs: Update documentation for kconfig supportREADME.md docs/firmware/fw_dynamic.md docs/firmware/fw_jump.md +3 more+36 -140 replies
17/17Makefile: Fix typo related to object.mkMakefile+1 -10 replies

Reviews trailers per patch

All 17 patches have a Reviewed-by or Acked-by.

PatchAndrew JonesAtish Patra
1/17T-b A-b T-b
2/17T-b A-b T-b
3/17T-b A-b T-b
4/17T-b A-b T-b
5/17T-b A-b T-b
6/17T-b A-b T-b
7/17T-b A-b T-b
8/17T-b A-b T-b
9/17T-b A-b T-b
10/17T-b A-b T-b
11/17T-b A-b T-b
12/17T-b A-b T-b
13/17T-b A-b T-b
14/17R-b T-b A-b T-b
15/17T-b A-b T-b
16/17R-b T-b A-b T-b
17/17R-b T-b A-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 00/17] OpenSBI Kconfig Support

In future, we will see more drivers in OpenSBI for system reset, serial port, power management, etc platform specific devices. We need platform specific compile time configuration to allow users control the size of OpenSBI generic firmware binaries by only enabling desired drivers. In other words, users should be allowed to restrict the set of RISC-V platforms on which OpenSBI generic firmwares built by them can run.

To address above, we add Kconfig support for OpenSBI platforms using the Kconfiglib project which is a standalone kconfig parser.

To try OpenSBI Kconfig support with generic platform, here are few example commands:
make PLATFORM=generic <-- builds OpenSBI using "defconfig"
make PLATFORM=generic menuconfig <-- launches graphical interface for changes

These patches can also be found in the kconfig_v8 branch at:
https://github.com/avpatel/opensbi.git

Changes since v7:
- Fixed parallel build issue in PATCH2

Changes since v6:
- Added comments in platform/template/Kconfig for PATCH2
- Addressed Drew's comments in PATCH16

Changes since v5:
- Updated kconfig symbol description in PATCH14
- Included a typo fix for docs/platform/platform.md in PATCH16
- Added separate PATCH17 for typo fix in top-level makefile

Changes since v4:
- Added separate PATCH14 to allow user change generic platform version and default name.
- Fixed libfdt compiler error using LLVM in PATCH12

Changes since v3:
- Strip down the Kconfiglib sources added by PATCH1
- Removed extra "." in the top-level Makefile updated by PATCH2

Changes since v2:
- Use $(FOO) instead of $FOO to access FOO environment variable in Kconfig files.
- Added a new PATCH1 to include Kconfiglib v14.1.0 sources under the scripts directory of OpenSBI.

Changes since v1:
- Fix SPDX license specifier in new Kconfig files

Anup Patel (17):
scripts: Add Kconfiglib v14.1.0 under scripts directory
Makefile: Add initial kconfig support for each platform
Makefile: Compile lib/utils sources separately for each platform
lib: utils/serial: Use kconfig for enabling/disabling drivers
lib: utils/reset: Use kconfig for enabling/disabling drivers
lib: utils/sys: Use kconfig for enabling/disabling drivers
lib: utils/timer: Use kconfig for enabling/disabling drivers
lib: utils/ipi: Use kconfig for enabling/disabling drivers
lib: utils/irqchip: Use kconfig for enabling/disabling drivers
lib: utils/i2c: Use kconfig for enabling/disabling drivers
lib: utils/gpio: Use kconfig for enabling/disabling drivers
lib: utils/fdt: Use kconfig for enabling/disabling
platform: generic: Use kconfig for enabling/disabling overrides
platform: generic: Use kconfig to set platform version and default
name
platform: Remove redundant config.mk from all platforms
docs: Update documentation for kconfig support
Makefile: Fix typo related to object.mk

 Kconfig                                   |   23 +
 Makefile                                  |  120 +-
 README.md                                 |   25 +-
 docs/firmware/fw_dynamic.md               |    2 +-
 docs/firmware/fw_jump.md                  |    4 +-
 docs/firmware/fw_payload.md               |    4 +-
 docs/library_usage.md                     |    6 +-
 docs/platform/platform.md                 |    6 +-
 docs/platform_guide.md                    |    9 +-
 firmware/Kconfig                          |    1 +
 include/sbi_utils/fdt/fdt_domain.h        |    9 +
 include/sbi_utils/fdt/fdt_pmu.h           |   10 +
 include/sbi_utils/ipi/fdt_ipi.h           |    9 +
 include/sbi_utils/irqchip/fdt_irqchip.h   |   10 +
 include/sbi_utils/irqchip/imsic.h         |   10 +
 include/sbi_utils/reset/fdt_reset.h       |   12 +
 include/sbi_utils/serial/fdt_serial.h     |    8 +
 include/sbi_utils/timer/fdt_timer.h       |    9 +
 lib/utils/Kconfig                         |   25 +
 lib/utils/fdt/Kconfig                     |   18 +
 lib/utils/fdt/objects.mk                  |    8 +-
 lib/utils/gpio/Kconfig                    |   23 +
 lib/utils/gpio/objects.mk                 |   10 +-
 lib/utils/i2c/Kconfig                     |   23 +
 lib/utils/i2c/objects.mk                  |   10 +-
 lib/utils/ipi/Kconfig                     |   23 +
 lib/utils/ipi/objects.mk                  |   10 +-
 lib/utils/irqchip/Kconfig                 |   41 +
 lib/utils/irqchip/objects.mk              |   22 +-
 lib/utils/libfdt/Kconfig                  |    5 +
 lib/utils/libfdt/objects.mk               |    2 +-
 lib/utils/reset/Kconfig                   |   37 +
 lib/utils/reset/objects.mk                |   28 +-
 lib/utils/serial/Kconfig                  |   73 +
 lib/utils/serial/objects.mk               |   44 +-
 lib/utils/sys/Kconfig                     |   13 +
 lib/utils/sys/objects.mk                  |    4 +-
 lib/utils/timer/Kconfig                   |   23 +
 lib/utils/timer/objects.mk                |   10 +-
 platform/andes/ae350/Kconfig              |    8 +
 platform/andes/ae350/config.mk            |   36 -
 platform/andes/ae350/configs/defconfig    |    0
 platform/andes/ae350/objects.mk           |   29 +
 platform/fpga/ariane/Kconfig              |   10 +
 platform/fpga/ariane/config.mk            |   36 -
 platform/fpga/ariane/configs/defconfig    |    0
 platform/fpga/ariane/objects.mk           |   35 +
 platform/fpga/openpiton/Kconfig           |   10 +
 platform/fpga/openpiton/config.mk         |   35 -
 platform/fpga/openpiton/configs/defconfig |    0
 platform/fpga/openpiton/objects.mk        |   35 +
 platform/generic/Kconfig                  |   40 +
 platform/generic/allwinner/objects.mk     |    4 +-
 platform/generic/config.mk                |   40 -
 platform/generic/configs/defconfig        |   29 +
 platform/generic/objects.mk               |   33 +
 platform/generic/platform.c               |    6 +-
 platform/generic/sifive/objects.mk        |    8 +-
 platform/kendryte/k210/Kconfig            |   10 +
 platform/kendryte/k210/config.mk          |   19 -
 platform/kendryte/k210/configs/defconfig  |    0
 platform/kendryte/k210/objects.mk         |   12 +
 platform/nuclei/ux600/Kconfig             |   10 +
 platform/nuclei/ux600/config.mk           |   30 -
 platform/nuclei/ux600/configs/defconfig   |    0
 platform/nuclei/ux600/objects.mk          |   22 +
 platform/nuclei/ux600/platform.c          |    1 -
 platform/template/Kconfig                 |   16 +
 platform/template/config.mk               |   77 -
 platform/template/configs/defconfig       |    0
 platform/template/objects.mk              |   72 +
 platform/template/platform.c              |    2 +-
 scripts/Kconfiglib/LICENSE.txt            |    5 +
 scripts/Kconfiglib/allnoconfig.py         |   45 +
 scripts/Kconfiglib/allyesconfig.py        |   56 +
 scripts/Kconfiglib/defconfig.py           |   43 +
 scripts/Kconfiglib/genconfig.py           |  154 +
 scripts/Kconfiglib/kconfiglib.py          | 7160 +++++++++++++++++++++
 scripts/Kconfiglib/menuconfig.py          | 3278 ++++++++++
 scripts/Kconfiglib/oldconfig.py           |  246 +
 scripts/Kconfiglib/olddefconfig.py        |   28 +
 scripts/Kconfiglib/savedefconfig.py       |   49 +
 scripts/Kconfiglib/setconfig.py           |   92 +
 scripts/create-binary-archive.sh          |    2 +-
 84 files changed, 12138 insertions(+), 414 deletions(-)
 create mode 100644 Kconfig
 create mode 100644 firmware/Kconfig
 create mode 100644 lib/utils/Kconfig
 create mode 100644 lib/utils/fdt/Kconfig
 create mode 100644 lib/utils/gpio/Kconfig
 create mode 100644 lib/utils/i2c/Kconfig
 create mode 100644 lib/utils/ipi/Kconfig
 create mode 100644 lib/utils/irqchip/Kconfig
 create mode 100644 lib/utils/libfdt/Kconfig
 create mode 100644 lib/utils/reset/Kconfig
 create mode 100644 lib/utils/serial/Kconfig
 create mode 100644 lib/utils/sys/Kconfig
 create mode 100644 lib/utils/timer/Kconfig
 create mode 100644 platform/andes/ae350/Kconfig
 delete mode 100644 platform/andes/ae350/config.mk
 create mode 100644 platform/andes/ae350/configs/defconfig
 create mode 100644 platform/fpga/ariane/Kconfig
 delete mode 100644 platform/fpga/ariane/config.mk
 create mode 100644 platform/fpga/ariane/configs/defconfig
 create mode 100644 platform/fpga/openpiton/Kconfig
 delete mode 100644 platform/fpga/openpiton/config.mk
 create mode 100644 platform/fpga/openpiton/configs/defconfig
 create mode 100644 platform/generic/Kconfig
 delete mode 100644 platform/generic/config.mk
 create mode 100644 platform/generic/configs/defconfig
 create mode 100644 platform/kendryte/k210/Kconfig
 delete mode 100644 platform/kendryte/k210/config.mk
 create mode 100644 platform/kendryte/k210/configs/defconfig
 create mode 100644 platform/nuclei/ux600/Kconfig
 delete mode 100644 platform/nuclei/ux600/config.mk
 create mode 100644 platform/nuclei/ux600/configs/defconfig
 create mode 100644 platform/template/Kconfig
 delete mode 100644 platform/template/config.mk
 create mode 100644 platform/template/configs/defconfig
 create mode 100644 scripts/Kconfiglib/LICENSE.txt
 create mode 100755 scripts/Kconfiglib/allnoconfig.py
 create mode 100755 scripts/Kconfiglib/allyesconfig.py
 create mode 100755 scripts/Kconfiglib/defconfig.py
 create mode 100755 scripts/Kconfiglib/genconfig.py
 create mode 100644 scripts/Kconfiglib/kconfiglib.py
 create mode 100755 scripts/Kconfiglib/menuconfig.py
 create mode 100755 scripts/Kconfiglib/oldconfig.py
 create mode 100755 scripts/Kconfiglib/olddefconfig.py
 create mode 100755 scripts/Kconfiglib/savedefconfig.py
 create mode 100755 scripts/Kconfiglib/setconfig.py
Signature · 1 line
2.34.1