File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,24 @@ source ${DIST_PATH}/config
1515
1616define SCRIPT << 'EOF '
1717BUILD_SCRIPT_PATH=$(dirname $(realpath -s $BASH_SOURCE))
18+
19+ # Config file can override BASE_BOARD from cli
20+ CONFIG_FILE="${DIST_PATH}"/config
21+
22+ if [ -f "${CONFIG_FILE}" ]; then
23+ echo "Found a dist config file, if BASE_BOARD is set there will source it before generating the extra board config"
24+ BASE_BOARD_FROM_CONFIG=$(bash -c "source \"$CONFIG_FILE\" >/dev/null 2>&1; echo \$BASE_BOARD")
25+ if [ -n "$BASE_BOARD_FROM_CONFIG" ]; then
26+ export BASE_BOARD="$BASE_BOARD_FROM_CONFIG"
27+ echo "BASE_BOARD set to ${BASE_BOARD} from ${CONFIG_FILE} before generating board config."
28+ else
29+ echo "BASE_BOARD not found in ${CONFIG_FILE}. It will be set from the cli or fallback to raspberrypiarmhf"
30+ fi
31+ else
32+ echo "Config file ${CONFIG_FILE} does not exist. You probably want to create one for you distrubtion."
33+ fi
34+
35+
1836export EXTRA_BOARD_CONFIG=$(mktemp)
1937${BUILD_SCRIPT_PATH}/custompios_core/generate_board_config.py "${EXTRA_BOARD_CONFIG}"
2038echo "Temp source file: ${EXTRA_BOARD_CONFIG}"
You can’t perform that action at this time.
0 commit comments