-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This turns on fwup output framing so that the error output is clean even if there are warnings.
- Loading branch information
Showing
8 changed files
with
135 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
all: ops-fail.fw ops.fw | ||
|
||
%.fw: %.conf | ||
fwup -c -f $< -o $@ | ||
|
||
.PHONY: all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Post-installation firmware operations (UNIT TEST VERSION) | ||
# | ||
# Run: fwup -c -f ops-fail.conf -o ops-fail.fw | ||
# | ||
# Tasks include: | ||
# | ||
# * `factory-reset` - Clear out the writable filesystem and any other writable | ||
# areas so that they can be re-initialized on the next boot. | ||
# * `prevent-revert` - Prevent `revert` from working until the next firmware | ||
# * `revert` - Revert to the previous firmware if it's still available | ||
# * `validate` - Mark this firmware as a good update. | ||
# * `status` - Print out which partition is active (`a` or `b`) | ||
# | ||
# To use: | ||
# | ||
# 1. Run `fwup -c -f fwup-ops.conf -o ops.fw` and copy ops.fw to | ||
# the device. This is done automatically as part of the Nerves system | ||
# build process. The file is stored in `/usr/share/fwup/ops.fw`. | ||
# 2. On the device, run `fwup -t <task> -d /dev/rootdisk0 --enable-trim /usr/share/fwup/ops.fw`. | ||
# 3. Reboot after running `revert` or `factory-reset`. | ||
|
||
require-fwup-version="1.0.0" | ||
|
||
## | ||
# factory-reset | ||
## | ||
task factory-reset { | ||
on-init { error("factory-reset error") } | ||
} | ||
|
||
## | ||
# prevent-revert | ||
# | ||
# Pass `--enable-trim` to also clear out the partition that no longer should be used. | ||
## | ||
task prevent-revert { | ||
on-init { error("prevent-revert error") } | ||
} | ||
|
||
## | ||
# revert | ||
## | ||
task revert { | ||
on-init { error("revert error") } | ||
} | ||
|
||
## | ||
# status | ||
# | ||
# Run "fwup /usr/share/fwup/ops.fw -t status -d /dev/rootdisk0 -q -U" to check the status. | ||
## | ||
task status { | ||
on-init { error("status error") } | ||
} | ||
|
||
## | ||
# validate | ||
# | ||
# The fwup configuration for this device always validates, so this doesn't do anything. | ||
## | ||
task validate { | ||
on-init { error("validate error") } | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters