Replies: 4 comments 9 replies
-
Our current focus is on dynamic configuration and official binary images ready for easy flashing but if we had to repeat all of those steps for development up to this point we'd be really bothered too! You're doing a lot of things you don't need to. A simple process is:
In container:
From wherever you flash: With this combination we can usually go from code update to running on device in two minutes or less (depending on build hardware) with three commands total. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your time. It still does not like me: bert@Ubuntu:~$ sudo docker run --rm -it -v "$PWD":/home/bert/willow -e TERM willow:latest ./utils.sh config idf.py build /opt/esp/entrypoint.sh: line 6: /willow/utils.sh: No such file or directory It behaves like this for all three options: install, config and build. Do not spend anymore time on this, at least I'm saving some time by running the script before and after the docker environment, I just have to run inside docker the install, config and build (and exit). Thanks |
Beta Was this translation helpful? Give feedback.
-
Makes no difference. I run it from my home directory, where the script lives. Still get the same error message: idf.py build /opt/esp/entrypoint.sh: line 6: /willow/utils.sh: No such file or directory It does not matter if I specifies install, config or build. It looks to me that the docker environment is rebuild each time. |
Beta Was this translation helpful? Give feedback.
-
ah-ha. The moment! it works, I run the script from my home directory, download the latest willow from git, build-docker, pass control over to the docker environment, run the install, config and build there, return to the willow directory, continue the flashing and it works! Thanks for your help and sorry about the frustration. |
Beta Was this translation helpful? Give feedback.
-
I know, I am probably jumping the gun here, but I am a lazy person. It seems like during this testing phase, we need to redo these commands over and over and honestly - I'm getting tired of typing.
SO, I came up with a script to run outside of the docker environment - no problem, it works fine,
It's simple and it stops if the previous command fails. Ok, granted - I am not the best coder on the planet, my bash sucks and I am sure there are much better ways to do this, but for me it works:
#!/bin/bash
red=
tput setaf 1
grn=
tput setaf 2
rst=
tput sgr0
clear
r_r () {
v0=0
if [ $v1 -eq $v0 ]
then
echo "${grn}Success : "$v2"${rst}"
else
echo "${red} * * * * Failed * * * * : "$v2" - Please research and correct${red}"
exit
fi
}
Sleep 3
echo "Remove the 'willow' directory from system"
cd ~
sudo rm -r -f ~/willow
v1=$?;v2="willow cleanup complete";r_r
git clone https://github.com/toverainc/willow.git && cd willow
v1=$?;v2="Got Willow downloaded";r_r
sudo ./utils.sh build-docker
v1=$?;v2="docker built";r_r
sleep 5
INSERT bash to docker script here
sudo ./utils.sh docker
v1=$?;v2="Configuration complete";r_r
cd ~/willow
echo "Please connect ESP-BOX [-lite] to USB port"
sleep 10
echo "Press ENTER when done"
read -s -n 1 key
sudo PORT=/dev/ttyACM0 ./utils.sh erase-flash
v1=$?;v2="First round of 'erase-flash' completed";r_r
sleep 5
sudo PORT=/dev/ttyACM0 ./utils.sh erase-flash
v1=$?;v2="Second round of 'erase-flash' completed";r_r
sleep 5
v1=$?;v2="Flashing device";r_r
sudo PORT=/dev/ttyACM0 ./utils.sh flash
Now: How do I pass the three ./utils.sh commands (install, config and build) to the docker environment, from this original bash script, that is outside the container? (See the "##### INSERT bash to docker script here ######" above)
Please don't hate me for this, I'm just trying to save myself some time.
(and truly, if you want complain about the indentation of the if statement above- do not even bother - I have better things to do with my life than trying to figure out why copy/paste drops the tab in the github environment.) ;)
Thanks
Beta Was this translation helpful? Give feedback.
All reactions