Comments (10)
This functionality was implemented in API v2.0.
from toboot.
@xobs - FYI
from toboot.
We don't clear the entire application area for a number of reasons. First, we're not sure what's application and what's data. An application may want to save configuration data across firmware versions.
The proposed solution is to set the Configuration Value to disable the Toboot short-to-enter ability. Then when a user wants to update, the U2F program should clear its own keys, set the magic value, and reboot. That way an application can determine what areas to erase and what to keep.
from toboot.
OK. Then I need to come up with a good way to tell U2F firmware to reset itself. I think it may even be the same "short-at-boot"...
from toboot.
Second thought. What if we add another magic value to indicate that entering into bootloader via shorting pads should erase application area. I think there must be a way to get to bootloader even from locked device and adding it to application just makes things more complex and creates duplication of code and features. If we agree on that I volunteer to implement this feature.
from toboot.
Changed u2f firmware to
- turn off toboot short-to-boot feature
- added short-to-reset feature to erase secret keys and unlock toboot
There is now build option (turned off by default) to make u2f firmware to debug-lock the board on first start. It is not on by default because J Link required to unlock device.
Still I would happily throw this patch away if toboot allowed to erase application area.
from toboot.
The v2.0 API includes a 64-bit mask field in the header that allows you to request sectors to be erased. Is that sufficient to implement this request?
from toboot.
I guess yes. Just to make sure. If pages are erased during update, will toboot get the bitmask from the newly loaded program, or from the previous one?
from toboot.
It reads it from the previous image.
Toboot determines what the previous image is by looking at all blocks on the system and selecting the valid header that has the highest "generation" value. It will use that as an image to boot to.
Additionally, when performing an update it will use the existing header as a guideline for what blocks to erase. If you want to erase everything (except Toboot itself), set the value to 0xffffffff ffffffff.
from toboot.
Sounds good! Thank you for implementing that!
from toboot.
Related Issues (20)
- Come up with a way to update the bootloader HOT 1
- API docs improvements HOT 4
- Clarify license HOT 1
- TOMU detects as "ComNav GNSS receiver" on Windows 10 HOT 2
- Remove the old Silicon Labs bootloader HOT 4
- Update the openocd / blackmagic flashing documentation to refer to toboot HOT 1
- The dfu bootloader flash pattern looks identical to blinky HOT 5
- tomu_flash.conf should wipe the device HOT 1
- Figure out how to use openocd without needing to overwrite the system file HOT 2
- toboot always runs on power cycle HOT 4
- Autorun flag behaviour is opposed to documented one HOT 4
- LUFA ? HOT 1
- Signed tags
- Clarify API license HOT 5
- Cannot boot after flashing HOT 4
- Packet-sized control transfers broken
- Clarify documentation points.
- Please make a new release :)
- toboot reflash is a bit vague
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toboot.