ui/ncurses: Add nc-auth and authenticate when required. When the user tries to perform actions that require authentication a new subscreen 'nc-auth' is launched which accepts a password and will send an authentication request before performing the action. This also adds a button in nc-config which launches an nc-auth screen allowing the user to set or change the system password. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
configure: Rename ENABLE_PS3 to PLATFORM_PS3 To prepare for other configure platform names. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
ui/ncurses: Safely handle lost terminal control commands Normally terminal control commands are caught and handled before ncurses or Petitboot could see them. However several combinations of broken terminal emulators or console connections can cause these command sequences to be seen by Petitboot, usually resulting in Petitboot exiting due to the ESC character and then the rest printed to the console. Aside from confusing the user this can also cancel autoboot, so it's important we don't let these sequences go unnoticed if possible. In ui/ncurses/console-codes we add a state machine that recognises the syntax of these control/escape sequences and handles the lost characters. We don't try to emulate the functionality of these commands, instead just logging them for reference. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
ui/ncurses: Add plugin menu and nc-plugin screen Add a second pmenu accessible via the main menu which displays uninstalled and installed pb-plugins. Uninstalled options can be selected to trigger pb-plugin to install them, after which they are updated and marked as installed in the menu. Installed plugins can be investigated by entering the new plugin screen, where plugin metadata and executables are displayed. Executables can be run from this screen via cui_run_cmd(). Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
ui/ncurses: Add status log UI Currently, status messages from the server are displayed in a single line at the bottom of the main menu UI, and are lost once a new status is reported. This change adds a facility for the UI to collect and display the status messages from the server, in a dedicated UI screen. This allows a user to look back through the discovery & boot process. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
ui/ncurses: Add nc-subset selection screen The nc-subset screen is intended to be used as a sub-screen from the current screen (eg. nc-config) which passes a pointer to a nc_widget_subset struct. The nc-subset screen allows the user to select an option from a list of 'inactive' options, before returning control back to the current screen. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
autotools: Use non-recursive make With the current testing infrastructure, we don't have a strictly hierarchical set of dependencies. This causes problems with a recursive make, and means we have to hack around some of the dependencies. This change generates a single, top-level makefile from all of the Makefile.am fragments. We still need the po/ directory as a separate SUBDIR, but all others can be converted to non-recursive. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Add support for 'add-url' action Creates a menu option to specify a remote conf file url to send to the server for parsing. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Add language selector & support for language changes This change adds a language selector UI, and allows language changes from incoming configuration messages. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Move menu initialisation to cui code We'll want to re-initialise the petitboot main menu (when the language is changed), which we can't do if the items are populated entirely from the main() function. This change moves the menu initilisation to the cui code, we we can re-init when necessary. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
i18n: Mark translatable strings for ncurses UI Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Unify key bindings & key help text This change is a small cleanup of the key bindings; we ensure that the general key bindings are available (and documented) on all screens. In order to keep things consistent, this change adds an initial UI guidelines text file, which documents the general key bindings. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Add help to boot editor screen Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Add help to system configuration screen Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Add help to sysinfo screen Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Add help text to nc-menu & generic-main Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Add support for help screens Add a textscreen-based help screen system, triggered from the cui module's cui_show_help() Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Abstract text-screen code from sysinfo screen We want to implement help screens, which are very similar to the sysinfo screen - show a set of lines, and allow scrolling. This change splits the text-screen rendering code into a new nc-textinfo module. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Add basic config editor This change adds a simple configuration editor to the ncurses UI. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses: Add simple ncurses form widget set We're doing a lot of the same stuff with forms, and we'll to implement a lot of fields with the upcoming configuration interface. This change introduces a simple ncurses widget set. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>