Add flash script and fix build script
This commit is contained in:
parent
2af3d082fe
commit
dec5fb3e62
|
@ -3,13 +3,16 @@
|
||||||
test -d zmk/app || git clone git@github.com:zmkfirmware/zmk.git
|
test -d zmk/app || git clone git@github.com:zmkfirmware/zmk.git
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
-v (pwd):/zorne \
|
-v (pwd):/zorne \
|
||||||
zmkfirmware/zmk-build-arm:2.4 bash -c '
|
zmkfirmware/zmk-build-arm:2.4 sh -c 'cd /zorne
|
||||||
cd /zorne
|
mkdir -p /zorne/config
|
||||||
west init
|
mkdir -p /zorne/_built
|
||||||
|
cp -r /zorne/west.yml /zorne/config/west.yml
|
||||||
|
west init -l config
|
||||||
west update
|
west update
|
||||||
west zephyr-export
|
west zephyr-export
|
||||||
west build -s zmk/app -b nice_nano -- -DSHIELD=corne_left -DZMK_CONFIG="./"
|
echo "Building left"
|
||||||
cp build/zephyr/zmk.uf2 corne_left_nice_nano.uf2
|
west build -s zmk/app -b nice_nano -- -DSHIELD=corne_left -DZMK_CONFIG="."
|
||||||
|
cp build/zephyr/zmk.uf2 _built/corne_left_nice_nano.uf2
|
||||||
|
echo "Building right"
|
||||||
west build --pristine -s zmk/app -b nice_nano -- -DSHIELD=corne_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
west build --pristine -s zmk/app -b nice_nano -- -DSHIELD=corne_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
cp build/zephyr/zmk.uf2 corne_right_nice_nano.uf2
|
cp build/zephyr/zmk.uf2 _built/corne_right_nice_nano.uf2'
|
||||||
exec bash'
|
|
||||||
|
|
17
zorne/flash.sh
Executable file
17
zorne/flash.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
test (whoami) != root && begin
|
||||||
|
echo must be root
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
|
mkdir -p /tmp/flashmnt
|
||||||
|
echo Mounting $argv[1] to /tmp/flashmnt...
|
||||||
|
mount $argv[1] /tmp/flashmnt # arg 1
|
||||||
|
echo Copying $argv[2] to /tmp/flashmnt...
|
||||||
|
cp $argv[2] /tmp/flashmnt
|
||||||
|
echo Syncing...
|
||||||
|
sync
|
||||||
|
echo Unmounting /tmp/flashmnt...
|
||||||
|
umount /tmp/flashmnt
|
||||||
|
echo Done!
|
|
@ -7,5 +7,3 @@ manifest:
|
||||||
remote: zmkfirmware
|
remote: zmkfirmware
|
||||||
revision: main
|
revision: main
|
||||||
import: app/west.yml
|
import: app/west.yml
|
||||||
self:
|
|
||||||
path: config
|
|
||||||
|
|
Loading…
Reference in a new issue