fix: read BASE_BOARD from config before generate EXTRA_BOARD_CONFIG
This PR fix the generate EXTRA_BOARD_CONFIG, because this was generated before CustomPiOS reads the config file. This is needed to build images which are not armhf, because generate_board_config.py has a fallback to raspberrypi os 32 bit with armhf, this override the BASE_ARCH with the EXTRA_BOARD_CONFIG.
This PR is based of the discussion from #240 and fixes #239
Yes this looks like a better solution to this than #240 Will test on my end, and merge.
@jxmx Does this solve your issue in #240 ?
Getting with this
+ tee build.log
++++ realpath -s /CustomPiOS/build
+++ dirname /CustomPiOS/build
++ CUSTOM_OS_PATH=/CustomPiOS
++ CONFIG_FILE=/CustomPiOS/config
++ '[' -f /CustomPiOS/config ']'
+++ bash -c 'source "/CustomPiOS/config" >/dev/null 2>&1; echo $BASE_BOARD'
++ BASE_BOARD_FROM_CONFIG=raspberrypiarmhf
++ '[' -n raspberrypiarmhf ']'
++ export BASE_BOARD=raspberrypiarmhf
++ BASE_BOARD=raspberrypiarmhf
++ echo 'BASE_BOARD set to raspberrypiarmhf from /CustomPiOS/config before generating board config.'
BASE_BOARD set to raspberrypiarmhf from /CustomPiOS/config before generating board config.
+++ mktemp
++ export EXTRA_BOARD_CONFIG=/tmp/tmp.zu4QyU1lSZ
++ EXTRA_BOARD_CONFIG=/tmp/tmp.zu4QyU1lSZ
++ /custompios_core/generate_board_config.py /tmp/tmp.zu4QyU1lSZ
/CustomPiOS/build: line 59: /custompios_core/generate_board_config.py: No such file or directory
+ exit 1
+ chmod 777 /mnt/sda1/PleromaPi/src/workspace /mnt/sda1/PleromaPi/src/workspace-raspios_lite_arm64
Need to investigate more. Looks like its picking up the config file in CustomPiOS and not the config file in the distribution file
Nope, on second thought #240 is better, its importing the correct distro config path and not custompios path