Showing with 18 additions and 6 deletions.
  1. +6 −1 CHANGELOG.md
  2. +6 −0 README.md
  3. +6 −5 sortbootorder.c
7 changes: 6 additions & 1 deletion CHANGELOG.md
Expand Up @@ -7,6 +7,10 @@ Releases 4.5.x and 4.6.x are based on mainline support submitted in
[this gerrit ref](https://review.coreboot.org/#/c/14138/).

## [Unreleased]
## [v4.6.22] - 2021-09-06
### Added
- guard against unsafe values for the watchdog timeout

## [v4.6.21] - 2021-05-27
### Added
- support for bootorder in FMAP region for persistent settings
Expand Down Expand Up @@ -207,7 +211,8 @@ initial commit based on [coreboot_140908](http://pcengines.ch/tmp/coreboot_14090
### Fixed
- used proper way to access extended SPI registers

[Unreleased]: https://github.com/pcengines/sortbootorder/compare/v4.6.21...master
[Unreleased]: https://github.com/pcengines/sortbootorder/compare/v4.6.22...master
[v4.6.22]: https://github.com/pcengines/sortbootorder/compare/v4.6.21...v4.6.22
[v4.6.21]: https://github.com/pcengines/sortbootorder/compare/v4.6.20...v4.6.21
[v4.6.20]: https://github.com/pcengines/sortbootorder/compare/v4.6.19...v4.6.20
[v4.6.19]: https://github.com/pcengines/sortbootorder/compare/v4.6.18...v4.6.19
Expand Down
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -112,6 +112,12 @@ Sortbootorder manages `bootorder` file which is initially shipped from
This is binary file that has to be 4096 bytes long in order to entirely fill
one FLASH sector.

In pre-v4.14 coreboot this file was part of main CBFS. Since v4.14.0.1 it is
located in a dedicated FMAP region (`BOOTORDER`), which allows for firmware
upgrades without loss of settings. Refer to [flashing instructions](https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md#corebootrom-flashing)
for proper command. Files `bootorder_def` and `bootorder_map` (see below) are
still located in CBFS.

Relevant content of this file may look like this:

```
Expand Down
11 changes: 6 additions & 5 deletions sortbootorder.c
Expand Up @@ -313,11 +313,12 @@ int main(void) {
break;
case 'i':
case 'I':
; // empty statement to avoid compilation error
char *prompt = readline("Specify the watchdog"
" timeout in seconds (0 to disable): ");
wdg_timeout = (u16) strtoul(prompt, NULL, 10);
prompt[0] = '\0';
printf("Specify the watchdog timeout in seconds\n");
do {
char *prompt = readline("minimum 60 or 0 to disable: ");
wdg_timeout = (u16) strtoul(prompt, NULL, 10);
prompt[0] = '\0';
} while (wdg_timeout != 0 && wdg_timeout < 60);
break;
case 'j':
case 'J':
Expand Down