summaryrefslogtreecommitdiffstats
path: root/ui/common
Commit message (Collapse)AuthorAgeFilesLines
* ui/common/discover-client: explicit #include <string.h>Brett Grandbois2018-03-231-0/+1
| | | | | | | for musl libc Signed-off-by: Brett Grandbois <brett.grandbois@opengear.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* ui/ncurses: Add plugin menu and nc-plugin screenSamuel Mendoza-Jonas2017-08-152-0/+58
| | | | | | | | | | | | 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>
* types: shorten boot_status definitionsJeremy Kerr2016-12-202-5/+5
| | | | | | | | | | | struct boot_status is a bit misnamed; we report status on things that aren't just the boot status (eg, discovery). This change refactors struct boot_status into just struct status. We give the type enum a name, and shorten the enum values to suit. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Use 'consoles' instead of 'tty' to refer to interfacesSamuel Mendoza-Jonas2016-09-081-1/+1
| | | | | | | 'Console' is more readily understandable and technically more correct than 'tty' for referring to the interfaces that Petitboot starts a UI on. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Add support for GPG signature enforcement on bootedtpearson@raptorengineering.com2016-08-262-0/+2
| | | | | | | | | | | | | kernels and related blobs This can be used to implement a form of organization-controlled secure boot, whereby kernels may be loaded from a variety of sources but they will only boot if a valid signature file is found for each component, and only if the signature is listed in the /etc/pb-lockdown file. Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> (Minor build fixes and gpgme.m4, comment on secure boot in gpg.c)
* ui/common: Set current console on boot commandSamuel Mendoza-Jonas2016-06-291-0/+1
| | | | Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Fix sparse warningsAndrew Donnellan2016-04-201-1/+1
| | | | | | | | Fix some sparse warnings by using NULL instead of 0 and static-ifying a variable not used outside its file. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* ui/common: Only close valid file descriptorSamuel Mendoza-Jonas2016-02-091-2/+2
| | | | | | Fixes Coverity defect #30466 Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
* ui/common: Free message on returnSamuel Mendoza-Jonas2015-12-181-6/+7
| | | | | | Fixes Coverity defect #30468 Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* autotools: Use non-recursive makeJeremy Kerr2014-08-011-32/+23
| | | | | | | | | | | | 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' actionSamuel Mendoza-Jonas2014-07-282-0/+22
| | | | | | | | 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/common: Add discover_client_enumerate to re-add device dataJeremy Kerr2014-07-282-0/+23
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/common: associate boot options with devicesJeremy Kerr2014-04-021-0/+2
| | | | | | | The discover client isn't currently associating boot options with their devices. This change adds appropriate device list management. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* protocol: expose discovery reinit over client/server protocolJeremy Kerr2014-04-022-0/+16
| | | | | | | Now that we can re-initialise the device handler, allow this to be triggered from UIs over the petitboot protocol. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* configure: Use AC_GNU_SOURCEJeremy Kerr2013-12-184-4/+6
| | | | | | | Rather than #defining _GNU_SOURCE in our .c files, we can define this from config.h instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Parse configuration form & send to serverJeremy Kerr2013-11-142-0/+22
| | | | | | | This change implements the configuration save action, when the user submits the nc-config form. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/common: Don't talloc_free sysinfo and status explicitlyJeremy Kerr2013-11-132-8/+21
| | | | | | | | | | | | | Currently, we talloc_free() the sysinfo and status messages in the discover client, right after performing the ui's callback. However, the client may wish to keep a reference to this information beyond the callback invocation. This change introduces a per-message talloc context, which these structures are allocated under. This allows the callbacks to talloc_steal() anything they wish to keep a reference to. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* config: Implement config messagesJeremy Kerr2013-11-132-0/+19
| | | | | | On client connect, send a PB_PROTOCOL_ACTION_CONFIG message. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* logging: Clean up debug logsJeremy Kerr2013-11-012-7/+7
| | | | | | | We have quite a few pb_logs which should be pb_debug. This change moves developer-specific info to pb_debug. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Allow booting custom boot optionsJeremy Kerr2013-10-101-2/+1
| | | | | | | Currently, we can't boot user-created boot options, as they have no option ID associated. This change removes the check for option ID. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add system info messagesJeremy Kerr2013-10-092-0/+20
| | | | | | | | Add a little infrastructure for communicating information about the system to the petitboot UIs. We just send some identifying info (type and identifier), as well as the interfaces. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/process: replace pb_run_cmdJeremy Kerr2013-08-192-11/+17
| | | | | | | This change replaces the pb_run_cmd() function with proper usage of the process API. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add initial dtb supportGeoff Levand2013-06-242-0/+2
| | | | | | | Updates & fixes by Jeremy Kerr <jk@ozlabs.org>. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/common: Add code to send cancel-default messagesJeremy Kerr2013-06-242-0/+17
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: implement timers with waitsetsJeremy Kerr2013-06-242-80/+21
| | | | | | | A temporary change to the timers; we'll eventually remove these from the ui code. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/waiter: Add timeout waitersJeremy Kerr2013-06-241-2/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Makefiles: remove -I$(includedir)Jeremy Kerr2013-05-071-1/+0
| | | | | | | | | | | Currently, we include the system include dir in some of our makefiles; this is causing build problems when cross-compiling, as the system include dir may not contain files for the host. The compiler should be searing in the proper system include dir, so just remove the redundant -I. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: Receive boot status messagesJeremy Kerr2013-05-062-0/+20
| | | | | | | | Add support in the discover client code to handle boot status messages, and pass them to the UI thorugh a new callback ("update_status") in the client_ops. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* protocol: Separate device add from boot-option add messagesJeremy Kerr2013-04-162-4/+52
| | | | | | | | | | | | | | | | | | | | We want to cater for situations where boot options may be discovered some time after we get notificiation about devices. For instance, discovering boot options from DHCP configuration parameters. In this case, we'll need to notify UIs of boot options appear some time after the device (and/or other boot options on the same device) has appeared. This change adds a new protocol message type, PB_PROTOCOL_ACTION_BOOT_OPTION_ADD. We also rename PB_PROTOCOL_ACTION_ADD to make it clear that it is just for devices. The discover server is updated to send boot option add events at device discover time, but we are now able to decouple this later. We also update the clients to handle the boot option add events separately. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-protocol: Don't allocate in deserialise functionsJeremy Kerr2013-04-161-2/+5
| | | | | | | | | | | | | Curently, the protocol deserialise functions are allocating device and boot_command structures. This (implicitly) makes them responsible for initialisation of these structures too. Rather that making the protocol responsible for initialising the devices and boot commands, this change gives the deserialise functions an argument to an already-instanciated structure. This means that the creation is no longer implied by the deserialise. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Move boot to discover serverJeremy Kerr2013-04-155-481/+0
| | | | | | | | | | | | | | | | | | | | | This change moves the boot-via-kexec functionality from the UIs to the discover server. On the UI side: rather than run kexec directly, we just send a message to the discover server. Because this is generic discover client functionality, we no longer need the boot callbacks in the twin- and ncurses-specific code. We also remove the kexec and URL-loading code from the UIs, and add it to the discover server code, in paths.c. We expose this to the server though a new function: load_path(void *, const char *, unsigned int *); On the server side, we simply move hook up the boot() function to use the load_file and kexec calls. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/url: Move URL-handling code to libJeremy Kerr2013-04-154-284/+2
| | | | | | | We'll need to use the URL handling code in the server, so move it to the lib/ directory. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover-client: interact directly with waitsetJeremy Kerr2013-04-152-57/+46
| | | | | | | | | | | | | | Currently, clients need to mess with the discover client fd directly, and manually register the waiter. Instead, this change adds a waitset parameter to discover_client_register, so that the discover client can register itself, and call discover_client_process directly. This means no proxy handlers, and no casts to waiter callbacks. We can also get rid of discover_client_get_fd. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover-client: Add discover_client_bootJeremy Kerr2013-04-153-6/+55
| | | | | | | | This change implements the client side of the server-based boot interface. We add a funcion, discover_client_boot, which serialises a boot message, then sends it to the server. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: callback & boot actions: kexec -> bootJeremy Kerr2013-04-152-3/+3
| | | | | | | | | find ui/ -type f | xargs sed -i -e s/kexec_cb/boot_cb/g \ -e s/on_kexec/on_boot/g \ -e s/run_kexec/boot/g Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: pb_kexec_data -> pb_boot_dataJeremy Kerr2013-04-152-12/+12
| | | | | | | | find ui/ -type f | xargs sed -i -e s/pb_kexec_data/pb_boot_data/g \ -e 's/\<kd\>/bd/g' Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/common: Remove unused artworkJeremy Kerr2013-04-104-3/+0
| | | | | | | | | | | | A few of the oxygen icons are no longer used, so remove them from the artwork tree. Coincidentally, this fixes and issue with `make dist`, as the drive-removable-media-usb-pendrive.png file is too long (when used with an autogenerated git version string) to be tar-ed up. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* lib/types: Create common file for type definitionsJeremy Kerr2013-04-102-2/+4
| | | | | | | | | | | | The device and boot_option types are defined in pb-protocol.h, but aren't really specific to the procotol. This means a lot of non-messaging-related files are #including the protocol definitions unnecessarily. This change separates the types out into lib/types/types.h. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/common/url: Fix multiple-preceeding-slash on pathnamesJeremy Kerr2013-03-061-0/+5
| | | | | | | Fix the double-slash URL test. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/common/url: Add pb_url_scheme_nameJeremy Kerr2013-03-062-0/+13
| | | | | | | | Add a function to lookup the name of a scheme, for more useful URL output. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/common/url: remove scheme separator from URL scheme definitionsJeremy Kerr2013-03-061-20/+35
| | | | | | | To make the scheme definitions more useful for other functions. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/common/url: move pb_scheme_info array to file scopeJeremy Kerr2013-03-061-16/+15
| | | | | | | | We'd like to use the scheme info array for other functions, so move it to file scope, and rename to schemes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fix sftp loaderGeoff Levand2012-04-021-6/+5
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Cleanup --dry-run option codeGeoff Levand2012-03-302-10/+9
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add UI option --dry-runGeoff Levand2012-03-272-12/+13
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fixup artwork licensesGeoff Levand2012-03-0915-6/+236
| | | | | | | Replace icon files with files from KDE 4.3 Oxygen. Add artwork license info. Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add --start-daemon option to ui programsGeoff Levand2012-03-083-8/+33
| | | | | | | | Add the option --start-daemon to automatically start pb-discover if it is not already started. For use when running as a stand-alone app. Signed-off-by: Geoff Levand <geoff@infradead.org>
* Remove union in pb_opt_dataGeoff Levand2012-02-151-4/+2
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Minor include path fixGeoff Levand2012-02-151-1/+1
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add artwork files network.png, system.pngGeoff Levand2012-02-123-8/+8
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
OpenPOWER on IntegriCloud