-
Notifications
You must be signed in to change notification settings - Fork 56
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
Allow updating with just a USB connection #595
Conversation
52237dd
to
717b0ec
Compare
On weird issue I'm facing is that running |
Try adding |
You can just modify |
Thanks, I'll give that a try. |
Unfortunately, modifying Strangely, But I could run either |
flag: false, | ||
help: 'Update with the OpenWRT image at the indicated local path.' | ||
}) | ||
.option('firmwarePath', { |
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.
We should avoid camel casing command line options :P
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.
👍
I think something else must be going on because I was able to successfully sysupgrade from the CLI with this patch and the |
I've confirmed that two changes are necessary:
Because I did not implement 2, it seemed as though 1 made no difference but with both implementations, the update succeeds. |
Working on the OpenWRT patch here but the documentation on patches is pretty lacking. @kevinmehall can you look it over for me when you get a chance? |
The file is in the openwrt tree, so just modify it in a normal commit. Patches are used to make changes to 3rd-party code that is downloaded as an upstream tarball and doesn't live in the repository. (The directory where you added that patch is supposed to be for patches against the uClibc source) |
Ah okay, that makes much more sense. Thanks for the clarification. |
4387b9c
to
845a18e
Compare
So this feature introduces a fun complication which is that because we have to update our OpenWRT build to make updating over USB work, all previous builds will not have this capability. That means we have to check the version running on the Tessel and confirm that it's > 0.0.11 before moving forward with a USB-only update. @rwaldron any thoughts on that? It's kind of shitty but I'm not sure we have a good way to get around it. |
If you want a hack, the CLI could modify |
@kevinmehall I'm ashamed of you for even suggesting such a dirty hack. But yeah, does |
Don't you need If you were to include the whole original line, it would be a no-op in the case that the update had already been applied. Also, watch the escaping of the |
Yes, I do and busybox sed does support it.
Ugh I don't think my fingers can type that many escapes. It's not physically possible. |
For anyone who's checking in on this PR, it's currently blocked by my effort to add a hacky to fix an issue described here so that folks running older versions of the T2 firmware can do updates over USB. The command to overwrite a specific line of a file which determines how the update process works doesn't seem to be effective over the USB Daemon but it does work on the Tessel shell console. I'm guessing the escapes aren't being handled properly... |
There must be an easier way to do that :\ |
I've tried all kinds of escaping with no luck. I may go the kinda hackier route and just ship the file with the CLI, then write it to a temporary file on T2, then rename the temporary file to the real file name (thus replacing it). |
de91f4a
to
e5887cc
Compare
remoteProc.once('close', resolve); | ||
// Write the image | ||
remoteProc.stdin.end(image); | ||
logs.info('Transferring image of size', (image.length / 1e6).toFixed(2), 'MB. This will take 2-4 minutes...'); |
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.
Use template string
Damn dude, that was smoooooooth
First time, with new Tessel 2 out of the box. |
Unplugged, re-plugged, ran t2 wifi setup and we're in business. Please address the nit-picks and I will land this tomorrow |
e5887cc
to
181e098
Compare
Nit-picks addressed! |
Dependent on: tessel/openwrt-tessel#47