summaryrefslogtreecommitdiffstats
path: root/discover/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* pb-config: Move config storage modules to "platform" modules in discover codeJeremy Kerr2014-01-301-0/+3
| | | | | | | | | | | | | | | | | | There's no need to include the config storage code in lib/ as only the discover server should be using it. This change moves the config-storage code to discover/, with the platform-specific parts moved to a 'struct platform'. Each platform has a probe function, which is called during init. The first probe function to return a platform is used. At present we only have the one platform, but it's now non-intrusive to add others. We keep an array of platform pointers in a separate ("platforms") section, to allow the test module to drop-in its own test "platform". Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Fix CDROM handlingJeremy Kerr2013-12-021-0/+2
| | | | | | | | | | | | | Currently, we don't handle CDROM devices well; we'll try to mount on boot, and not detect any media changes. Also, the default rules shipping with udev will put the CDROM tray into a locked state, blocking eject from working. This change adds a set of cdrom utility functions, which the udev code can use to properly initialise cdrom devices and handle eject and media change requests. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/sysinfo: Add helper script to populate sysinfo identifiersJeremy Kerr2013-10-091-0/+1
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add system info messagesJeremy Kerr2013-10-091-0/+2
| | | | | | | | 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>
* discover/grub2: Hook up flex/bison parser to discover serverJeremy Kerr2013-09-241-2/+3
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Remove unnecessary event passingJeremy Kerr2013-09-191-1/+0
| | | | | | | | | | | | | | | Currently, we pass "events" between the udev, user-event and device-handler layers. These events all get sent through device_handler_event, then de-multiplexed to an appropriate handler, depending on their source. Instead, just export relevant device_handler functions, and have the (old) event sources call these functions directly. This also means we can include a lot more of the device hander code in the parser tests. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: separate file-reading code into file.cJeremy Kerr2013-08-081-0/+2
| | | | | | | We'll need to read files in the network config code, so add a 'file' object, containing the read_file function. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: remove libparser objectJeremy Kerr2013-08-081-21/+14
| | | | | | | | There's no real need for a separate libparser object. Our tests pull-in the parsers directly, and the discover server is the only thing that actually links to libparser.ro. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* automake: Add $(EXEEXT) to .ro objectsGeoff Levand2013-07-231-1/+1
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* discover: Fix automake warningsGeoff Levand2013-06-301-4/+4
| | | | | | | | | | | | | Change the Makfile.am relocatable output files from automake _LIBRARIES to automake _PROGRAMS. Also, change the output file name extension from .o to .ro to better show these are relocatable files. Fixes automake warnings like these: discover/Makefile.am: `libparser.o' is not a standard library name discover/Makefile.am: did you mean `libparser.a'? Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add pkgsysconfdirJeremy Kerr2013-06-241-0/+3
| | | | | | We'll need a sysconf dir to store the boot hooks. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Add network handlingJeremy Kerr2013-06-241-0/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Update udev routines to use libudevGeoff Levand2013-05-031-0/+2
| | | | | | | Support for 'RUN+="socket:' in udev rules files has been removed in udev version 183. Update the discover server to use libudev. Signed-off-by: Geoff Levand <geoff@infradead.org>
* discover: Add PXE parserJeremy Kerr2013-04-291-1/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* parsers: dynamically register parsersJeremy Kerr2013-04-291-7/+8
| | | | | | | | | | | | | | | Currently, we require all parsers to be defined in an array in parsers.c. This change removes this requirement, by introducting a register_parser() macro, which adds a constructor to register the parser with the core parser infrastructure. Because each parser no longer resolves an undefined symbol, we need to use a `ld -r` object for libparser, instead of using libtool, which creates a .a (and hence has no parsers included). Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Change parsers to emit resources rather than filenamesJeremy Kerr2013-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change switches the parsers over to populate the resources in discover_boot_option, rather than the string parameters in boot_option. To do this, we need a few things: * Add struct resources to discover_boot_option for the boot_image, initrd and icon data. * Have the parsers populate the resources, rather than the strings. Currently, parsers can all use the devpath resource type. * Add a resolve_resource callback to parsers; this is how the device handler will attempt to resolve resources. * Change load_file to load_url, as we should be only accessing (resolved) resources by URLs. This then allows us to remove the mount map, and associated lookup code, as well as the UUID and label links to devices. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Add devpath resourcesJeremy Kerr2013-04-291-0/+1
| | | | | | | | | Add a generic resource type, to handle "dev:path"-style file references. This creates a duplicate of is_prefix_ignorecase, which we'll switch over to later. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Add struct resourceJeremy Kerr2013-04-291-0/+1
| | | | | | | | | | | | Introduce a new type, struct resource, for handling resources such as kernels and initrds. This allows the parsers to better describe resources that are required for booting. Firstly, we enforce all resources to be URLs, rather than local paths. Also, resources allow us to describe files devices that have not-yet been hotplugged. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Implement device handler boot pathJeremy Kerr2013-04-151-0/+2
| | | | | | | | | | This change adds a funtion, device_handler_boot, which processes the boot command message from the discover server. We add a new file, discover/boot.c (and a corresponding header) with a skeleton for the final kexec code. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: remove unused message.h fileJeremy Kerr2013-03-051-1/+0
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add grub2 conf file parserGeoff Levand2012-03-181-0/+1
| | | | | | | | Add grub2 parser and sample config file. Reorder parser priorities: From (yaboot -> kboot) to (kboot -> grub2 -> yaboot). Signed-off-by: Geoff Levand <geoff@infradead.org>
* Convert test to automakeGeoff Levand2012-03-161-5/+9
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Move installed programs from bin to sbinGeoff Levand2012-02-241-1/+1
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Convert build to use automakeGeoff Levand2012-02-121-0/+58
Signed-off-by: Geoff Levand <geoff@infradead.org>
OpenPOWER on IntegriCloud