summaryrefslogtreecommitdiffstats
path: root/discover/pxe-parser.c
Commit message (Collapse)AuthorAgeFilesLines
* discover/pxe: Format IPAPPEND mac addresses correctlySamuel Mendoza-Jonas2014-12-031-3/+15
| | | | | | | | | | | | | | | | | | | | | The SYSAPPEND/IPAPPEND option 2 in PXE configs requires the MAC address of the booting interface to be appended to the boot options. Previously we formatted this as "BOOTIF=01:02:03:04:05:06", but syslinux/pxelinux implementation use this format: "BOOTIF=01-01-02-03-04-05-06", where the leading '01' represents the hardware type. The relevant part of the pxelinux doc is at: http://www.syslinux.org/wiki/index.php/SYSLINUX#SYSAPPEND_bitmask Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Implement PXE SYSAPPEND syntaxJeremy Kerr2014-08-251-1/+47
| | | | | | | This change implements SYSAPPEND/IPAPPEND 2, to add a BOOTIF argument to the kernel command line. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/pxe-parser: Remove unnecessary semicolonJeremy Kerr2014-07-161-1/+1
| | | | | | | We have an unnecessary semicolon on an empty for-loop, which causes a clang warning. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/pxe: pxe parser should only treat "::" paths as absoluteJeremy Kerr2014-02-271-3/+41
| | | | | | | | | | PXELinux treats all paths as relative, requiring a "::/path" syntax for truly absolute URLs. This change implements the same behaviour in petitboot, and updates the testcases to suit. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/pxe: Add pxelinux.cfg/ directory to autodiscovered pxe pathsJeremy Kerr2014-02-271-9/+13
| | | | | | | | | | The pxelinux project will perform autodiscovery by looking for files under the pxelinux.cfg/ prefix (in addition to any pxepathprefix from DHCP option 210) This change unifies petitboot's behaviour with pxelinux. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Don't rely on ctx->conf_url side-effect in user_event_parse_conf_urlJeremy Kerr2014-01-171-2/+5
| | | | | | | | Currently, user_event_parse_conf_url sets dc->conf_url if it detects we have a full URL (rather than a base URL). This is a little too subtle, so replace it with an explicit output parameter. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* configure: Use AC_GNU_SOURCEJeremy Kerr2013-12-181-1/+3
| | | | | | | 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>
* discover: Fix potentially-uninitialised variablesJeremy Kerr2013-11-131-0/+2
| | | | | | | We've been compiling with --enable-debug; this change fixes some problems exposed by the optimiser. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Change parsers to explicitly request configuration filesNeelesh Gupta2013-11-061-4/+58
| | | | | | | | | | | | | | | | | | | Add a new function parser_request_url() to read the data from configuration files present remotely. We deprecate iterate_parser_files() and download_config() functions along with the 'filenames' and 'method' members of the 'parser' structure so that individual parsers would now require to request the configuration files data from the parser code and doesn't necessarily export the list of configuration files. Add the support to handle incoming DHCP event, done by passing all the relevant environment variables of the udhcpc to the discover code. Also, update the pxe parser code to populate the list of configuration file names as per PXELINUX convention of fallback names using mac and ip addresses of the booting machine. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/pxe: Implement default optionsJeremy Kerr2013-09-201-4/+24
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/pxe: check for a valid boot option before addingJeremy Kerr2013-09-061-1/+2
| | | | | | | | | | If we didn't find any valid boot options in the pxe buffer, we'll call discover_context_add_boot_option with a NULL boot option. This change adds a check before we try to add the boot option, and a test to verify this situation. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/pxe: remove debug statementJeremy Kerr2013-07-231-1/+0
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/pxe: Handle initrdsJeremy Kerr2013-07-231-1/+25
| | | | | | | We may see initrds specified on the kernel argument line, or as their own configuration directive. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/pxe-parser: All options are name <space> value pairsJeremy Kerr2013-07-041-0/+3
| | | | | | Abort the pair parse if we don't have both a name and a value. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: handle boot_option->device_id entirely within handlerJeremy Kerr2013-05-091-2/+1
| | | | | | | No need for parsers to populate (or forget to populate, in the case of most parsers) opt->device_id, as we should do it on finalise. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Add PXE parserJeremy Kerr2013-04-291-0/+78
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud