summaryrefslogtreecommitdiffstats
path: root/common/cmd_pxe.c
Commit message (Collapse)AuthorAgeFilesLines
* PXE: FDT: Add support for fdt in PXEChander Kashyap2012-09-271-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now DT support is becoming common for all new SoC's. Hence it is better to have option for getting specific FDT from the remote server. This patch adds support for new label i.e. 'fdt'. This will allow to retrieve 'fdt blob' from the remote server. This patch take care for the following scenarios. The usage of fdt is optional. The 'fdt blob' can be retrieved from tftp or can be available locally or can be absent. If 'fdt_addr_r' environment variable is set and 'fdt' label is defined retrieve 'fdt blob' from tftp. 'fdt_addr_r' is then passed along bootm command. If 'fdt_addr' is set and 'fdt blob' is not retrieved from the tftp pass 'fdt_addr' to bootm command. In this case 'fdt blob' will be available at 'fdt_addr'. If 'fdt_addr' is not set and 'fdt blob' is not retrieve from tftp pass NULL to boot command. In this case 'fdt blob' is not required and absent. Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org> Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
* Add run_command_list() to run a list of commandsSimon Glass2012-08-091-17/+3
| | | | | | | | | This new function runs a list of commands separated by semicolon or newline. We move this out of cmd_source so that it can be used by other code. The PXE code also uses the new function. Suggested-by: Michael Walle <michael@walle.cc> Signed-off-by: Simon Glass <sjg@chromium.org>
* Minor Coding Style cleanupWolfgang Denk2012-07-101-4/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* pxe: add support for parsing local syslinux filesRob Herring2012-06-211-8/+133
| | | | | | | | Add a new command "sysboot" which parses syslinux menu files and boots using kernel and initrd specified by menu files. The operation is similar to "pxe boot" except local files on ext2 or fat filesystem are parsed. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* pxe: parse initrd file from append stringRob Herring2012-06-211-1/+14
| | | | | | | | For syslinux, the initrd can be set in the append string as "initrd=<file>", so try to find it there if we haven't already set the initrd. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* pxe: support absolute pathsRob Herring2012-06-211-11/+12
| | | | | | | | If the file path starts with a '/', then don't pre-pend the bootfile path. This fixes a problem with running 'pxe boot' multiple times where the bootfile path gets pre-pended to itself each time. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* pxe: support linux entries for labelsRob Herring2012-06-211-0/+3
| | | | | | | | Kernels can be specified using "linux" or "kernel" entry. The difference is kernel is supposed to detect the type of file, but for u-boot both are treated the same. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* pxe: add support for label menu textRob Herring2012-06-211-4/+9
| | | | | | Use a menu string if present, otherwise use the kernel string. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* pxe: support include files at top-levelRob Herring2012-06-211-0/+5
| | | | | | Include files outside of a menu were not getting included and parsed. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* cmd_pxe.c: fix strict-aliasing warningsJason Hobbs2012-03-271-8/+8
| | | | | | | | | | | Without this patch, some versions of gcc (at least ELDK 4.2) complain about dereferencing type-punned pointers. Reported-by: Marek Vasut <marex@denx.de> Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com> Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
* Convert cmd_usage() calls in common to use a return valueSimon Glass2012-03-061-4/+4
| | | | | | | | | Change all files in common/ to use CMD_RET_USAGE instead of calling cmd_usage() directly. I'm not completely sure about this patch since the code since impact is small (100 byte or so on ARM) and it might need splitting into smaller patches. But for now here it is. Signed-off-by: Simon Glass <sjg@chromium.org>
* Rename run_command2() to run_command()Simon Glass2012-03-061-1/+1
| | | | | | | This is a more sensible name, so rename it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* common/cmd_pxe.c: Fix GCC 4.6 build warningsHeiko Schocher2011-12-201-1/+1
| | | | | | | | | | | | Fix: cmd_pxe.c: In function 'parse_pxefile_top': cmd_pxe.c:941:5: warning: 'err' may be used uninitialized in this function [-Wuninitialized] cmd_pxe.c:921:6: note: 'err' was declared here Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Jason Hobbs <jason.hobbs@calxeda.com> Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
* pxe: make the first label the implicit defaultJason Hobbs2011-12-061-3/+14
| | | | | | | | | | If no default label is specified, but a situation arises where the default label should be used, treat the first label specified as the default label. Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com> Cc: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Cc: Wolfgang Denk <wd@denx.de>
* Add pxe commandJason Hobbs2011-10-171-0/+1355
Add pxe command, which is intended to mimic PXELINUX functionality. 'pxe get' uses tftp to retrieve a file based on UUID, MAC address or IP address. 'pxe boot' interprets the contents of PXELINUX config like file to boot using a specific initrd, kernel and kernel command line. This patch also adds a README.pxe file - see it for more details on the pxe command. Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
OpenPOWER on IntegriCloud