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

## [Unreleased]
## [v4.0.6] - 2017-05-30
### Added
- Add option in setup for setting `mPCIe1 SATA` priority (ASM106X cards)

### Changed
- Letters reserved for device sorting: from `a-m` to `a-j`

### Fixed
- Change `ehci enable` letter from `e` to `h` (conflict with `ipxe` priority)

## [v4.0.5.1] - 2017-03-31
### Changed
- changed the name to `PC Engines apu setup` in welcome string
Expand Down Expand Up @@ -63,6 +73,7 @@ initial commit based on [coreboot_140908](http://pcengines.ch/tmp/coreboot_14090
- used proper way to access extended SPI registers

[Unreleased]: https://github.com/pcengines/sortbootorder/compare/v4.0.5.1...coreboot-4.0.x
[v4.0.6]: https://github.com/pcengines/sortbootorder/compare/v4.0.5.1...v4.0.6
[v4.0.5.1]: https://github.com/pcengines/sortbootorder/compare/v4.0.5...v4.0.5.1
[v4.0.5]: https://github.com/pcengines/sortbootorder/compare/v4.0.4...v4.0.5
[v4.0.4]: https://github.com/pcengines/sortbootorder/compare/v4.0.3...v4.0.4
Expand Down
16 changes: 15 additions & 1 deletion README.md
@@ -1,5 +1,5 @@
Sortbootorder
-------------
=============

This repository contain source code of `sortbootorder` payload that sorts and
save boot order in flash.
Expand All @@ -23,3 +23,17 @@ make -j$(nproc)

For adding `sortbootorder` to `coreboot.rom` image please follow
[README.md](https://github.com/pcengines/apu2-documentation)

## Options description

* `r Restore boot order defaults` - restores boot order to default settings
* `n Network/PXE boot` - enables/disables the network boot (iPXE)
* `t Serial console` - enables/disables output to the serial console
* `l Legacy console redirection` - enables/disables serial redirection to the sgabios (serial text console emulation).
Useful for legacy software, which is not using native serial port output, but uses standard PC text console instead (eg. FreeDOS).
* `u USB boot` - enables/disables boot from USB drives
* `e EHCI0 controller` - enables/disables EHCI0 controller (used in apu3)
* `o UART C` - enables/disables UART C on GPIO header. Disabled UART means enabled GPIO.
* `p UART D` - enables/disables UART D on GPIO header. Disabled UART means enabled GPIO.
* `x Exit setup without save` - exits setup menu without saving the settings
* `s Save configuration and exit` - exits setup menu saving the settings
14 changes: 9 additions & 5 deletions sortbootorder.c
Expand Up @@ -42,7 +42,9 @@
#define SDCARD 4
#define MSATA 5
#define SATA 6
#define IPXE 7
#define MPCIE1_SATA1 7
#define MPCIE1_SATA2 8
#define IPXE 9

/*** prototypes ***/
static void show_boot_device_list( char buffer[MAX_DEVICES][MAX_LENGTH], u8 line_cnt, u8 lineDef_cnt );
Expand Down Expand Up @@ -99,6 +101,8 @@ int main(void) {
device_toggle[SDCARD] = 1;
device_toggle[MSATA] = 1;
device_toggle[SATA] = 1;
device_toggle[MPCIE1_SATA1] = 1;
device_toggle[MPCIE1_SATA2] = 1;

#ifdef CONFIG_USB /* this needs to be done in order to use the USB keyboard */
usb_initialize();
Expand Down Expand Up @@ -185,8 +189,8 @@ int main(void) {
case 'P':
uartd_toggle ^= 0x1;
break;
case 'e':
case 'E':
case 'h':
case 'H':
ehci0_toggle ^= 0x1;
break;
case 's':
Expand All @@ -206,7 +210,7 @@ int main(void) {
outb(0x06, 0x0cf9); /* reset */
break;
default:
if (key >= 'a' && key <= 'm' ) {
if (key >= 'a' && key <= 'j' ) {
line_start = 0;
while ((line_number = get_line_number(line_start, max_lines, key)) > line_start) {
move_boot_list( bootlist, line_number , max_lines );
Expand Down Expand Up @@ -290,7 +294,7 @@ static void show_boot_device_list( char buffer[MAX_DEVICES][MAX_LENGTH], u8 line
printf(" t Serial console - Currently %s\n", (console_toggle) ? "Enabled" : "Disabled");
printf(" l Legacy console redirection - Currently %s\n", (sga_toggle) ? "Enabled" : "Disabled");
printf(" u USB boot - Currently %s\n", (usb_toggle) ? "Enabled" : "Disabled");
printf(" e EHCI0 controller - Currently %s\n", (ehci0_toggle) ? "Enabled" : "Disabled");
printf(" h EHCI0 controller - Currently %s\n", (ehci0_toggle) ? "Enabled" : "Disabled");
printf(" o UART C - Currently %s\n", (uartc_toggle) ? "Enabled" : "Disabled");
printf(" p UART D - Currently %s\n", (uartd_toggle) ? "Enabled" : "Disabled");
printf(" x Exit setup without save\n");
Expand Down
2 changes: 1 addition & 1 deletion version.h
Expand Up @@ -18,6 +18,6 @@
#ifndef _VERSION_H_
#define _VERSION_H_

#define SORTBOOTORDER_VER "v4.0.5.1"
#define SORTBOOTORDER_VER "v4.0.6"

#endif /* _VERSION_H_ */