3# this script is supposed to be executed from within 'firmware' folder
6 echo "Read meta.env: The file path was not given as a parameter!"
13if [ -z
"${BOARD_DIR}" ]; then
14 # magical version of BOARD_DIR=$(dirname "$BOARD_META_PATH")
15 export BOARD_DIR=
"${BOARD_META_PATH%/*}"
16 echo "common_script_read_meta_env.inc: BOARD_DIR was empty. Setting to fallback: $BOARD_DIR"
19if [ ! -f ${BOARD_META_PATH} ]; then
20 echo "Read $BOARD_META_PATH: The file was not found!"
24if [ ! -f ${BOARD_DIR}/board.mk ]; then
25 echo "WARNING! board.mk not found @ ${BOARD_DIR}..."
28echo "[META] Reading meta env from ${BOARD_META_PATH}"
30VARS=$(grep
"=" "$BOARD_META_PATH")
32while IFS=
read -r L;
do
33 # get the key and delete all spaces
34 K=$(
echo "$L" | cut -d
'=' -f
"-1" | tr -d
' ')
35 # get the value and delete any leading space
36 V=$(
echo "$L" | cut -d
'=' -f
"2-" | awk
'{$1=$1};1')
37 # put them together, closing the value in quotes
41if [ -z
"$BUNDLE_NAME" ]; then
42 BUNDLE_NAME=$(
echo "$BOARD_META_PATH" | sed -n
's/.*meta-info-\(.*\)\.env/\1/p')
43 if [ -z
"$BUNDLE_NAME" ]; then
44 export BUNDLE_NAME=
"$SHORT_BOARD_NAME"
50echo "[META] PROJECT_BOARD=${PROJECT_BOARD}"
51echo "[META] PROJECT_CPU=${PROJECT_CPU}"
52echo "[META] POST_BUILD_SCRIPT=${POST_BUILD_SCRIPT}"
53echo "[META] BOARD_DIR=${BOARD_DIR}"
54echo "[META] USE_OPENBLT=${USE_OPENBLT}"
static bool read(void *instance, uint32_t startblk, uint8_t *buffer, uint32_t)
static void echo(int value)
This is just a test function.