dts: make extract script take options
Use argeparse for options and add a fixup option to add on top of generated file. This was previously done in the top Makefile and was generated defines outside of the header main if statement. Jira: ZEP-2147 Change-Id: If65f34a11de27baa770d4ce0ef4fca2abbd30258 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
294f845d6b
commit
6b081415d3
2 changed files with 44 additions and 17 deletions
13
Makefile
13
Makefile
|
@ -950,12 +950,15 @@ zephyr: $(zephyr-deps) $(KERNEL_BIN_NAME)
|
|||
ifeq ($(CONFIG_HAS_DTS),y)
|
||||
define filechk_generated_dts_board.h
|
||||
(echo "/* WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY! */"; \
|
||||
$(ZEPHYR_BASE)/scripts/extract_dts_includes.py dts/$(ARCH)/$(BOARD_NAME).dts_compiled $(ZEPHYR_BASE)/dts/$(ARCH)/yaml; \
|
||||
if test -e $(ZEPHYR_BASE)/dts/$(ARCH)/$(BOARD_NAME).fixup; then \
|
||||
echo; echo; \
|
||||
echo "/* Following definitions fixup the generated include */"; \
|
||||
echo; \
|
||||
cat $(ZEPHYR_BASE)/dts/$(ARCH)/$(BOARD_NAME).fixup; \
|
||||
$(ZEPHYR_BASE)/scripts/extract_dts_includes.py \
|
||||
-d dts/$(ARCH)/$(BOARD_NAME).dts_compiled \
|
||||
-y $(ZEPHYR_BASE)/dts/$(ARCH)/yaml \
|
||||
-f $(ZEPHYR_BASE)/dts/$(ARCH)/$(BOARD_NAME).fixup; \
|
||||
else \
|
||||
$(ZEPHYR_BASE)/scripts/extract_dts_includes.py \
|
||||
-d dts/$(ARCH)/$(BOARD_NAME).dts_compiled \
|
||||
-y $(ZEPHYR_BASE)/dts/$(ARCH)/yaml; \
|
||||
fi; \
|
||||
)
|
||||
endef
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue