DeviceTree: Convert 'generated_dts_board.h' into a source file

extract_dts_includes.py has been generating DT output and then
concatenating it with fixup header files to create
'generated_dts_board.h'.

In this patch we instead introduce a source file named
'generated_dts_board.h' and have it \#include the appropriate DT
output and fixup files.

This results in a simpler system because users can now read
'generated_dts_board.h' as C source code to see how fixup files and
generated DT output relate to each other. Whereas before they would
have to either read documentation or python code to gain the same
understanding.

Also, it reduces the scope and complexity of one of our most bloated
python scripts, extract_dts_includes.py.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2018-10-09 16:03:29 +02:00 committed by Kumar Gala
commit c23cc26c73
4 changed files with 93 additions and 70 deletions

View file

@ -0,0 +1,34 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2019 Nordic Semiconductor
*
* Not a generated file. Feel free to modify.
*
* Poorly named for legacy compatibility reasons.
*/
#ifndef GENERATED_DTS_BOARD_H
#define GENERATED_DTS_BOARD_H
#include <generated_dts_board_unfixed.h>
/* The following definitions fixup the generated include */
#ifdef DTS_BOARD_FIXUP_FILE
#include DTS_BOARD_FIXUP_FILE
#endif
#ifdef DTS_SOC_FIXUP_FILE
#include DTS_SOC_FIXUP_FILE
#endif
#ifdef DTS_APP_FIXUP_FILE
#include DTS_APP_FIXUP_FILE
#endif
#ifdef DTS_SHIELDS_FIXUP_FILE
#include DTS_SHIELDS_FIXUP_FILE
#endif
#endif /* GENERATED_DTS_BOARD_H */