Skip to content

Commit

Permalink
Optionally output config
Browse files Browse the repository at this point in the history
  • Loading branch information
calebdw committed Sep 22, 2023
1 parent c4d5f81 commit 11a4384
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ all:
-v $(PWD)/build.yaml:/app/build.yaml:ro \
-v $(PWD)/config:/app/config:ro \
-v $(PWD)/firmware:/app/firmware \
-e OUTPUT_CONFIG=$(OUTPUT_CONFIG) \
zmk

clean:
rm -rf firmware/*.uf2 build/[^.]*
rm -rf firmware/[^.]* build/[^.]*

distclean:
$(DOCKER) image rm zmk docker.io/zmkfirmware/zmk-build-arm:stable
6 changes: 4 additions & 2 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ while IFS=$',' read -r board shield; do
west build -d ${build_dir} -- -DZMK_CONFIG="$config_dir"
fi

# # echo -e "${display_name} KConfig\n"
# # grep -v -e "^#" -e "^$" ${build_dir}/zephyr/.config | sort
if [[ ! -z $OUTPUT_CONFIG ]]; then
grep -v -e "^#" -e "^$" ${build_dir}/zephyr/.config | sort > \
"firmware/${timestamp}-${artifact_name}.config"
fi

cp ${build_dir}/zephyr/zmk.uf2 "firmware/${timestamp}-${artifact_name}.uf2"
done < <(yq '
Expand Down

0 comments on commit 11a4384

Please sign in to comment.