-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Docker and OSX for esp-open-sdk toolchain #14
Conversation
Uses this docker hub image: https://hub.docker.com/r/brainstorm/dockcross-esp-open-sdk/ For which I intend to reduce its disk footprint by using Alpine Linux or similar in the near future (so don't get scared by its 3G filesize, that will get down in size pretty soon) |
Just to be sure regarding size. Did you delete all unnecessary files that esp-open-sdk creates? There is quite a lot of bloat of sources in there that don't need to remain after the build is done. At 3 GB I assume the bulk already is Linux components, but just wanted to check. |
|
||
ifeq ($(strip $(DOCKER)), yes) | ||
INCL = $(SDK)/include $(DOCKER_PREFIX)/esp82xx/include $(DOCKER_PREFIX) | ||
SRCS = $(DOCKER_PREFIX)/esp82xx/fwsrc/uart.c \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@con-f-use ... how would you collapse those with a Makefile $(foreach)
loop? It's just adding a prefix to each .c
in SRCS
:/
This c&p feels a bit too ugly to leave it as it is now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make has it's own filter and prefix functions. Also the +=
operator might be useful for INCL
.
@con-f-use, very good point there! No, I'm not deleting those yet. Will check if |
Almost everything in |
Hmm... I kept going without merging... Now there's some conflicts... I was wondering, @con-f-use ... Do you see anything wrong with this as it is? Did you want your issues to be addressed by @brainstorm before merging? |
No worries @cnlohr, just don't merge for now, I'm optimizing the docker filesize by using Alpine Linux and bringing in @con-f-use's feedback. Will make that mergeable again sometime this week, sorry for the confusion ;) Btw (offtopic-ish), did you guys see what espressif is up lately regarding dev environment(s)?: |
I did not see it! |
…tead of littering with . Thanks @con-f-use for the tips
Not sure about the README change here. You realize these are instructions on starting a new top-level project where
|
I'm confused, @con-f-use (really, swear, no bad pun intended)... are those changes on the README.md mine? I might have messed up with the branches perhaps? Will check ASAP. |
Other than the I'll try to use the |
Eventually I think I'll switch to @vowstar's Docker images, they seem quite cleaner than mine: https://github.com/vowstar/esp8266 @vowstar, I wonder if you have plans to support SDK 2.x there (if not already supported)? |
Thanks for your effort! Re: ReadMe - No idea where these changes came from, but they were there. Did you do a |
Not sure yet, looks like the SDK variable is unset. |
Oh I just noticed this nonsense I wrote, here's a mini patch:
|
Nope. If this line exists at all, it seems to break the variables.
|
I don't know. Is it possible to undelete your branch? That way I can revert this back out? I just can't seem to get the conditional to stop firing.
|
Bummer, just restored the branch. Sorry @cnlohr, we should have tested it more thoroughly locally before merging into master :/ |
I found another bug...
is what the set should be (I think) using eval seems to disregard the ifeq's etc. |
Thanks for that, Charles, don't know why I went for $(eval) on those in the first place... Will look at the |
Well, I don't know if I learned anything about git, but, after accidentally committing things the wrong way twice, at least the current master and dev both work. Aaaaaaa. @con-f-use does any more cleanup need to be done? Can we somehow pretend everything I did didn't happen? |
p.s. Docker support. Is there any way of making it less intrusive? Like having it limited to just a small section of one of the .mf's? |
Oh man! Now, I don't know how to re-open this pull request. I need to sleep. I really hope I start to understand this git thing more soon. |
Okay, I just got up and my mailbox was full. o_O
Well, yes we can. We can revert commits, by pointing {edit} I did it. Should be fine now. Hope I didn't go back too much! {/edit} Warning (and how it was done)These commands are absolutely lethal. Do this to the dev branch only and have a backup locally (totally independent clone that you don't use for any of this). Ensure no one commits or changes anything until completely done. Do not issue these commands twice (by accident). Only ever go back ONE commit, then double check if you did the right thing. If you want to go back more than one commit, repeat, then check, repeat, then check, ..., one commit at a time. So the syntax to go one commit back is:
Once you are done with ¹ Reasons this is never used: 1) If people are using your faulty commits, they end up with a detached head or a submodule pointing to nothing 2) If you mess up, the commit with this specific hash is forever gone - even if you commit the same changes again, it will have another hash 3) It's incredibly easy to mess this up 4) Merging becomes more difficult if others used your faulty commits |
Oh dear, sorry for all the mess I've caused :_S @cnlohr point taken, I'm extracting the docker stuff in its own Still a bit puzzled about that misbehaving
Was working neat (enabling/disabling docker support in my machine)... oh well, lesson learned: more local tests before merging for real, sigh. |
@cnlohr Seems that you are on the roll again, but just in case, for next time: http://megakemp.com/2016/08/25/git-undo/ |
May want to cleanly merge. Still looking forward to docker, next time I won't merge something right before I have to go to sleep. |
Any way for this to be re-opened? Also, I really hope that isn't in reference to you getting sick and tired of me. Maybe a new pull request? |
Yeah! Will reopen that against |
I hope you feel better. |
No worries @cnlohr and thanks for your patience dealing with this! I'm feeling a bit better now... I need assistance with Makefiles though, it's driving me nuts. I tried moving the docker logic away from the But it seems like
@con-f-use, really could use a bit of help here. I wish this was implemeted in SnakeMake or similar so that I could fix it myself easily, but now I'm as stuck as @cnlohr with that merge yesterday :_/ |
Certainly not, just found it amusing.
Sorry guys, don't expect anything from me the next few days or so. I'm pretty sick, too. Caught something on Wednesday and been puking ever since (inb4 tmi).
Not sure. I just deleted the faulty one and did a new |
Any motion on this front? I really think it could be helpful. |
Got stuck factoring it out the But have no idea how to tell make to evaluate it as a function and to address the weird |
Is there possibly a simpler way to go about this? Like ifeq'ing out an include statement? |
Then shepherding the docker stuff to an include? |
Not so easy if one does not want to replicate targets/variables from |
Thinking about this today... I don't think this makes sense anymore until docker's hypervisors (bhyve, xhyve or hyperkit) get real with USB passthrough support: https://docs.docker.com/docker-for-mac/faqs/#/can-i-pass-through-a-usb-device-to-a-container The mess I created with the makefiles is really not worth it if at the end of the day it's not really portable... so installing the SDK locally anyway for now :/ |
I'm always up for something else if it's good... but we'll have to see if any of that comes. |
Hello @cnlohr and @con-f-use,
I really appreciate your work in the esp82xx and I appreciate even more that you are putting some efforts into generalizing your fantastic dev environment for the community, love it!
Since I'm an OSX user, I couldn't run your setup right away. Instead, I've successfully dockerized @pfalcon's
esp-open-sdk
(which should fix pfalcon/esp-open-sdk#170, btw). This way I don't have to install the whole toolchain locally, hopefully facilitating portable cross-compiling toolchains for everyone else, see here for more context:dockcross/dockcross#26
http://blogs.nopcode.org/brainstorm/2016/07/26/cross-compiling-with-docker
Anyway, I've tried to keep this PR as unintrusive as possible, not getting in your dev env way (i.e: docker is off by default in
user.cfg
). Happy to tweak it further to fit your needs and see it integrated upstream.Cheers!