Skip to content

Commit 6538c28

Browse files
committed
d: d
d Signed-off-by: Sebastian Bøe <[email protected]>
1 parent 41481f9 commit 6538c28

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ add_custom_command(
624624
${PYTHON_EXECUTABLE}
625625
${ZEPHYR_BASE}/scripts/gen_kobject_list.py
626626
--validation-output ${DRV_VALIDATION}
627+
--subsystems \"$<TARGET_PROPERTY:zephyr_property_target,SUBSYSTEMS>\"
627628
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
628629
DEPENDS ${ZEPHYR_BASE}/scripts/gen_kobject_list.py
629630
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}

drivers/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,13 @@ add_subdirectory_ifdef(CONFIG_ENTROPY_HAS_DRIVER entropy)
4848
add_subdirectory_ifdef(CONFIG_SYS_CLOCK_EXISTS timer)
4949
add_subdirectory_ifdef(CONFIG_NEURAL_NET_ACCEL neural_net)
5050
add_subdirectory_ifdef(CONFIG_PTP_CLOCK ptp_clock)
51+
52+
set_property(
53+
TARGET zephyr_property_target
54+
APPEND_STRING
55+
PROPERTY SUBSYSTEMS
56+
adc
57+
aio_cmp
58+
counter
59+
# etc.
60+
)

scripts/gen_kobject_list.py

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -93,28 +93,6 @@
9393

9494

9595
subsystems = [
96-
"adc_driver_api",
97-
"aio_cmp_driver_api",
98-
"counter_driver_api",
99-
"crypto_driver_api",
100-
"dma_driver_api",
101-
"flash_driver_api",
102-
"gpio_driver_api",
103-
"i2c_driver_api",
104-
"i2s_driver_api",
105-
"ipm_driver_api",
106-
"led_driver_api",
107-
"pinmux_driver_api",
108-
"pwm_driver_api",
109-
"entropy_driver_api",
110-
"sensor_driver_api",
111-
"spi_driver_api",
112-
"uart_driver_api",
113-
"can_driver_api",
114-
"ptp_clock_driver_api",
115-
"eeprom_driver_api",
116-
"wdt_driver_api",
117-
11896
# Fake 'sample driver' subsystem, used by tests/samples
11997
"sample_driver_api"
12098
]
@@ -340,6 +318,11 @@ def parse_args():
340318

341319
parser.add_argument("-k", "--kernel", required=False,
342320
help="Input zephyr ELF binary")
321+
322+
parser.add_argument("-i", "--subsystems", required=False,
323+
help='''Specifies a list of subsystem names to append to
324+
the driver subsystems list.''')
325+
343326
parser.add_argument(
344327
"-g", "--gperf-output", required=False,
345328
help="Output list of kernel object addresses for gperf use")
@@ -365,6 +348,9 @@ def parse_args():
365348
def main():
366349
parse_args()
367350

351+
if args.subsystems:
352+
subsystems.extend([s + '_driver_api' for s in args.subsystems.split(';')])
353+
368354
if args.gperf_output:
369355
assert args.kernel, "--kernel ELF required for --gperf-output"
370356
eh = ElfHelper(args.kernel, args.verbose, kobjects, subsystems)

0 commit comments

Comments
 (0)