summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ui/ncurses: in lockdown ensure system reboot in ncurses menu exitBrett Grandbois2018-08-282-1/+13
| | | | | | | | | | | | | | | | In a lockdown situation in the ncurses menu there is a switch to replace the 'Exit to shell' option with 'Reboot', so the intent seems to be to not allow the user the option to exit to shell in a lockdown situation. However the associated foreced reboot logic is in the process atexit so is only triggered when completely exiting the menu system. The default menu item logic to exit to shell is still in place though so the menu exit never occurs and shell access is still available. Add a switch to a different menu exit callback to force a menu abort using the same mechanism as a signal in lockdown situations so the shell can never be entered. This also affects the 'x' or esc shortcut keys. Signed-off-by: Brett Grandbois <brett.grandbois@opengear.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Let 'boot' user-event boot by nameSamuel Mendoza-Jonas2018-08-283-6/+48
| | | | | | | | | If a 'name' parameter is used for a boot user event, search existing boot options for one that matches that name on the given device. This allows a pb-event user to boot based on name rather than having to specify the exact boot arguments. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* travis: Update to job matrixGeoff Levand2018-08-281-5/+9
| | | | | | | | | | o Set language to bash (same as generic), so just the scrip steps run. o Move build-builder to 'before_script'. o Switch to a job matrix of 'os' entries with names. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* docker: Update to Ubuntu 18.04 LTSJoel Stanley2018-08-281-4/+4
| | | | | | | | Ubuntu 17.10 was end of life in July. Update to the latest LTS. Signed-off-by: Joel Stanley <joel@jms.id.au> [Docker tag bumped] Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/network: Stop udhcpc6 process on requerySamuel Mendoza-Jonas2018-08-281-0/+6
| | | | Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* README: UpdateGeoff Levand2018-08-281-10/+16
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* travis: Use docker scriptsv1.9.0Samuel Mendoza-Jonas2018-08-162-8/+4
| | | | | | | Update the Travis config to use Petitboot's own docker scripts, and add ppc64le to the list of recognised architectures. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/arm64: Update to struct efi_mountGeoff Levand2018-08-151-32/+25
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* test/efivar: Rework for efi_mountGeoff Levand2018-08-151-79/+49
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/efi: Move magic to implementationGeoff Levand2018-08-142-6/+5
| | | | | | | | efi_check_mount now does a magic number check by default, so move the magic number related code from efivar.h to efivar.c. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/efi: Add new struct efi_mountGeoff Levand2018-08-142-33/+85
| | | | | | | | | | | | | | To make it easier to manage EFI variables add a new struct efi_mount that holds the path to the EFI file system mount and the EFI variable name GUID. Update the lib/efi routines to use struct efi_mount. Add a new routine efi_check_mount based on the checks done in platform-arm64. This change to using struct efi_mount removes the static variable efivarfs_path making the lib/efi routines stateless. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/efi: Log operations to debug logGeoff Levand2018-08-141-0/+3
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/efi: Add EFI_DEFALT_ATTRIBUTES macroGeoff Levand2018-08-142-4/+7
| | | | | | | | For convenience, add a new efi data attributes macro EFI_DEFALT_ATTRIBUTES. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* docker: Use host networkingSamuel Mendoza-Jonas2018-08-141-0/+1
| | | | | | | Use the host driver by default to simplify networking for build-builder, especially when DNS settings need to be inherited from the host. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/efi: Add check for ioctl_iflags supportGeoff Levand2018-08-141-2/+17
| | | | | | | | | The efi tests may use a filesystem which does not support ioctl_iflags. Add a check and skip the ioctl_iflags operations if not supported. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/platforms: Fix param_list talloc failureGeoff Levand2018-08-142-12/+14
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/talloc: Fix TALLOC_ABORTGeoff Levand2018-08-141-14/+9
| | | | | | | | | | | | | | The current TALLOC_ABORT macro had a number of problems. Failures were not going to the pb log, but only to stderr. If the object passed in was not a talloc object the printing of an object name would be printing random data. The use of a macro obscured the code. To clean this up, remove all reference to TALLOC_ABORT and put the logging and abort calls directly into talloc_chunk_from_ptr. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* pb_log: Break out timestampGeoff Levand2018-08-141-2/+9
| | | | | | | Fixes double timestamp on pb_log_fn, pb_debug_fn. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/platform: Use pb_log_fnGeoff Levand2018-08-141-1/+1
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* docker: Add strace for interactive debuggingGeoff Levand2018-08-143-4/+5
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Add platform-arm64Ge Song2018-08-073-1/+293
| | | | | | | Signed-off-by: Ge Song <ge.song@hxt-semitech.com> [Split from a larger patch and cleaned up] Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/system: Add dmidecode as system appGeoff Levand2018-08-073-0/+3
| | | | | | | For use by the arm64 get_sysinfo. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* configure: Add conditional platform buildsGeoff Levand2018-08-072-4/+45
| | | | | | | | | | | | Add configure --enable-platform-XXX options to allow specifying which platform support to build. --enable-platform-auto, the default, will use the host triplet to guess which platforms to build. --enable-platform-all will build all platforms. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Add platform-dummyGeoff Levand2018-08-072-0/+19
| | | | | | | | | | With the new configure enable-platform parameters it is possible configure no platform support. Add a new minimal 'dummy' platform so that the __start_platforms and __stop_platforms variables needed by platform_init are created. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* configure: Rename ENABLE_PS3 to PLATFORM_PS3Geoff Levand2018-08-074-11/+8
| | | | | | | To prepare for other configure platform names. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Move generic params routines to platformGe Song2018-08-073-123/+129
| | | | | | | | | | Move the generic params routines from platform-powerpc to platform. Also, for clarity, add a params prefix to the names. Signed-off-by: Ge Song <ge.song@hxt-semitech.com> [Split from a larger patch and cleaned up] Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Move generic config routines to platformGe Song2018-08-073-309/+311
| | | | | | | | | | Move the generic config routines from platform-powerpc to platform. Also, for clarity, add a config_ prefix to the names. Signed-off-by: Ge Song <ge.song@hxt-semitech.com> [Split from a larger patch and cleaned up] Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/powerpc: Switch to new param_listGeoff Levand2018-08-072-149/+54
| | | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> [Name string fixup] Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/powerpc: Add param_name argGeoff Levand2018-08-071-7/+7
| | | | | | | | Update update_network_config and update_bootdev_config to operate on a generic parameter name passed as an argument. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/powerpc: Rearange save_configGe Song2018-08-071-14/+11
| | | | | | | | | | Rearange update_config and save_config so that update_config only operates on the platform params list. Signed-off-by: Ge Song <ge.song@hxt-semitech.com> [Split from a larger patch and cleaned up] Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/param_list: Add new parameter list routinesGeoff Levand2018-08-073-1/+169
| | | | | | | | Based on the powerpc param routines adds new generic routines to manage a name + value parameter list. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/event: Rename param -> event_paramGeoff Levand2018-08-072-5/+5
| | | | | | | To avoid name clash with other 'struct param'. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Move generic ipmi routines to ipmiGe Song2018-08-073-129/+131
| | | | | | | Signed-off-by: Ge Song <ge.song@hxt-semitech.com> [Split from a larger patch] Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* test-efivar: Update to latest lib/efi routinesSamuel Mendoza-Jonas2018-08-072-11/+17
| | | | | | From: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/efi: Cleanup read/write routinesGeoff Levand2018-08-072-104/+112
| | | | | | | | | | Make a new stucture struct efi_data to hold the info that describes an efi variable. Make a common routine efi_open that opens the efi variable file. Switch the efi get/set/del routines over to use efi_open. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/efi: Add new routines to access efi variablesGe Song2018-08-074-1/+367
| | | | | | | | | | Provide methods to load/store petitboot's configuration on efi-based platforms. A test case is also provided. Signed-off-by: Ge Song <ge.song@hxt-semitech.com> [Cleanup file comments, make efivarfs_path static.] Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/powerpc: Use process_get_stdoutGeoff Levand2018-08-071-11/+5
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/process: Add process_get_stdoutGeoff Levand2018-08-072-18/+62
| | | | | | | | | | | | Add a new structure 'struct process_stdout' and optional parameter 'stdout' to the process_run_simple functions to allow the caller to get a buffer filled with the stdout from the child process. Rename the process_run_simple functions to process_get_stdout and add wrappers for the old process_run_simple function names. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/process: Cleanup stdout callbackGeoff Levand2018-08-073-26/+10
| | | | | | | | | | | General cleanup of async stdout processing. The process_stdout_cb and process_stdout_custom routines were doing the same thing, so rename process_stdout_custom to process_process_stdout and make process_stdout_cb a wrapper that calls process_process_stdout. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/parser: Hookup parser_is_uniqueGeoff Levand2018-08-072-39/+23
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* test/parser: Add parser_is_uniqueGeoff Levand2018-08-071-0/+12
| | | | | Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/parser: Add new parser_is_uniqueGeoff Levand2018-08-072-0/+44
| | | | | | | | | Add a new routine parser_is_unique that tests a file's inode against a list of known file inodes. Useful when searching case-insensitive filesystems. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Add some debug print messagesGeoff Levand2018-08-072-0/+2
| | | | | | | | To aid in debugging print some additinal discover messages to the log. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/kboot-parser: Look in /bootGeoff Levand2018-08-071-0/+4
| | | | | | | | Other parsers look in /boot for config files, so add it to the kboot parser. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Add --debug to kexecGeoff Levand2018-08-073-6/+16
| | | | | | | | | If verbose logging is enabled then add '--debug' to the kexec command line. Adds a new routine pb_log_get_debug() that can be used to query the log debug state. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/log: Switch to pb_log_fnGeoff Levand2018-08-0732-148/+148
| | | | | | | | The only functional change should be an additional '/n' to a few log messagees that seemed to be missing it. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/log: Add verbose logging routinesGeoff Levand2018-08-073-0/+41
| | | | | | | | | | Add three new logging routines pb_log_fn and pb_debug_fn, which print the calling function's name to the log, and pb_debug_fl which prints the calling function's name and the file line number to the log. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* configure: Remove unused ENABLE_DEBUGGeoff Levand2018-08-071-1/+0
| | | | | | | | We setup debug builds in the configure script with DEFAULT_CFLAGS and DEFAULT_CPPFLAGS. Remove the unused ENABLE_DEBUG AM conditional. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* configure: Add check for UI buildGeoff Levand2018-08-071-0/+7
| | | | | | | Emit configure warning if no UI program is to be built. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* docker: Add libfdt-devGeoff Levand2018-08-072-1/+2
| | | | | | | Add package libfdt-dev to the pb-builder docker image. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
OpenPOWER on IntegriCloud