]> git.ipfire.org Git - thirdparty/ipxe.git/log
thirdparty/ipxe.git
14 years ago[cmdline] Expand settings within each command-line token individually
Michael Brown [Mon, 28 Mar 2011 16:35:23 +0000 (17:35 +0100)] 
[cmdline] Expand settings within each command-line token individually

Perform settings expansion after tokenisation, and only at the point
of executing each command.  This allows statements such as

   dhcp && echo ${net0/ip}

to work correctly.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Allow ";" as an unconditional command separator
Michael Brown [Mon, 28 Mar 2011 15:32:30 +0000 (16:32 +0100)] 
[cmdline] Allow ";" as an unconditional command separator

It is currently possible to construct a sequence of commands to be
executed regardless of success or failure using "|| &&" as the command
separator.  (The "||" captures the failure case, the blank command
converts it to a success case.)

Allow ";" to be used as a more visually appealing (and
space-efficient) alternative.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Avoid unused-but-set variable warning in gcc 4.6
Thomas Miletich [Mon, 28 Mar 2011 12:43:31 +0000 (14:43 +0200)] 
[linux] Avoid unused-but-set variable warning in gcc 4.6

Temporary modification to prevent valgrind.h from breaking compilation
with gcc 4.6.  When this problem is fixed upstream, a new and
unmodified copy of valgrind.h should be imported.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[forcedeth] Avoid unused-but-set variable warning in gcc 4.6
Thomas Miletich [Mon, 28 Mar 2011 12:48:59 +0000 (14:48 +0200)] 
[forcedeth] Avoid unused-but-set variable warning in gcc 4.6

Avoid unused-but-set variable warning in gcc 4.6 which was introduced
by commit 9215b7f ("[forcedeth] Clear the MII link status register on
link status changes").

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[exeprefix] Add .exe prefix
Michael Brown [Mon, 28 Mar 2011 00:05:40 +0000 (01:05 +0100)] 
[exeprefix] Add .exe prefix

An iPXE .exe image can be loaded from DOS.  Tested using bin/ipxe.exe
to load a Linux kernel and simple initramfs from within MS-DOS 6.22.
(EDD must be disabled using the "edd=off" kernel parameter, since the
loaded kernel image has already overwritten parts of DOS' INT 13
wrapper.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[prefix] Avoid using base memory for temporary decompression area
Michael Brown [Sun, 27 Mar 2011 23:55:15 +0000 (00:55 +0100)] 
[prefix] Avoid using base memory for temporary decompression area

In the unlikely (but observable) event that INT 15,88 returns less
memory above 1MB than is required for the temporary decompression
area, ignore it and use the 1MB point anyway.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Generate hybrid ISO images if isohybrid is available
Michael Brown [Sun, 27 Mar 2011 21:32:11 +0000 (22:32 +0100)] 
[build] Generate hybrid ISO images if isohybrid is available

Suggested-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Delete incomplete targets if building fails for any reason
Michael Brown [Sun, 27 Mar 2011 21:33:33 +0000 (22:33 +0100)] 
[build] Delete incomplete targets if building fails for any reason

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Make malloc and linux_umalloc valgrindable
Piotr Jaroszyński [Thu, 1 Jul 2010 01:47:52 +0000 (03:47 +0200)] 
[linux] Make malloc and linux_umalloc valgrindable

Make the allocators used by malloc and linux_umalloc valgrindable.
Include valgrind headers in the codebase to avoid a build dependency
on valgrind.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Remove redundant call to basename()
Michael Brown [Sun, 27 Mar 2011 18:36:00 +0000 (19:36 +0100)] 
[image] Remove redundant call to basename()

There is no need to explicitly call basename() to construct an image
name in imgfetch_core_exec(), since image_set_uri() will do so
automatically anyway (and will do so without getting confused by URIs
with query strings).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Use image_set_name() only if name != NULL
Piotr Jaroszyński [Sun, 27 Mar 2011 18:19:47 +0000 (20:19 +0200)] 
[image] Use image_set_name() only if name != NULL

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[netdevice] Mark devices as open only if opening succeeds
Piotr Jaroszyński [Sun, 27 Mar 2011 17:26:28 +0000 (19:26 +0200)] 
[netdevice] Mark devices as open only if opening succeeds

netdev_close() assumes that devices that are open are on the
open_list, which wasn't true if device specific opening failed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Add "read" command
Michael Brown [Sun, 27 Mar 2011 12:23:18 +0000 (13:23 +0100)] 
[settings] Add "read" command

The "read" command allows a script to prompt a user to enter a
setting.  For example:

  echo -n Static IP address:
  read net0/ip

Total cost: 17 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Allow "echo -n" to inhibit trailing newline
Michael Brown [Sun, 27 Mar 2011 11:49:18 +0000 (12:49 +0100)] 
[cmdline] Allow "echo -n" to inhibit trailing newline

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[parseopt] Add support for boolean options
Michael Brown [Sun, 27 Mar 2011 11:46:55 +0000 (12:46 +0100)] 
[parseopt] Add support for boolean options

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[tcp] Record ts_recent on first received packet
Michael Brown [Sat, 26 Mar 2011 14:58:17 +0000 (14:58 +0000)] 
[tcp] Record ts_recent on first received packet

Commit 6861304 ("[tcp] Handle out-of-order received packets")
introduced a regression in which ts_recent would not be updated until
the first packet is received in the ESTABLISHED state, i.e. the
timestamp from the SYN+ACK packet would be ignored.  This causes the
connection to be dropped by strictly-conforming TCP peers, such as
FreeBSD.

Fix by delaying the timestamp window check until after processing the
received SYN flag.

Reported-by: winders@sonnet.com
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Include ipxe.lkrn in default build
Michael Brown [Sat, 26 Mar 2011 14:23:21 +0000 (14:23 +0000)] 
[build] Include ipxe.lkrn in default build

bin/ipxe.lkrn is built anyway in order to create bin/ipxe.iso, so
there is no additional cost to including it within the default build.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[monojob] Avoid overflow when calculating percentage progress
Michael Brown [Sat, 26 Mar 2011 13:13:45 +0000 (13:13 +0000)] 
[monojob] Avoid overflow when calculating percentage progress

Normalise the progress figures to ensure that multiplication by 100
(to produce a percentage) cannot result in integer overflow.

Reported-by: Sven Dreyer <sven@dreyer-net.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Match terminology in online documentation
Michael Brown [Wed, 23 Mar 2011 21:21:12 +0000 (21:21 +0000)] 
[settings] Match terminology in online documentation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Avoid memory leak when unregistering autovivified settings blocks
Michael Brown [Wed, 23 Mar 2011 20:17:24 +0000 (20:17 +0000)] 
[settings] Avoid memory leak when unregistering autovivified settings blocks

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Refer to online documentation for settings help
Michael Brown [Wed, 23 Mar 2011 18:23:42 +0000 (18:23 +0000)] 
[settings] Refer to online documentation for settings help

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Match terminology used elsewhere
Michael Brown [Wed, 23 Mar 2011 18:11:11 +0000 (18:11 +0000)] 
[settings] Match terminology used elsewhere

iPXE documentation tends to refer to "settings" rather than "options",
since settings can be more general than DHCP options.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[undi] Cope with devices that erroneously claim not to use interrupts
Michael Brown [Wed, 23 Mar 2011 13:51:32 +0000 (13:51 +0000)] 
[undi] Cope with devices that erroneously claim not to use interrupts

Some PXE stacks advertise that interrupts are not supported, despite
requiring the use of interrupts.  Attempt to cope with such cards
without breaking others by always hooking the interrupt, and using the
"interrupts supported" flag only to decide whether or not to wait for
an interrupt before calling PXENV_UNDI_ISR_IN_PROCESS.

The possible combinations are therefore:

1. Card generates interrupts and claims to support interrupts

   iPXE will call PXENV_UNDI_ISR_IN_PROCESS only after an interrupt
   has been observed.  (This is required to avoid lockups in some PXE
   stacks, which spuriously sulk if called before an interrupt has
   been generated.)

   Such a card should work correctly.

2. Card does not generate interrupts and does not claim to support
   interrupts

   iPXE will call PXENV_UNDI_ISR_IN_PROCESS indiscriminately, matching
   the observed behaviour of at least one other PXE NBP (winBoot/i).

   Such a card should work correctly.

3. Card generates interrupts but claims not to support interrupts

   iPXE will call PXENV_UNDI_ISR_IN_PROCESS indiscriminately.  An
   interrupt will still result in a call to PXENV_UNDI_ISR_IN_START.

   Such a card may work correctly.

4. Card does not generate interrupts but claims to support interrupts

   Such a card will not work at all.

Reported-by: Jerry Cheng <jaspers.cheng@msa.hinet.net>
Tested-by: Jerry Cheng <jaspers.cheng@msa.hinet.net>
Reported-by: Mauricio Silveira <mauricio@livreti.com.br>
Tested-by: Mauricio Silveira <mauricio@livreti.com.br>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Impose a fixed order on settings
Michael Brown [Wed, 23 Mar 2011 11:57:29 +0000 (11:57 +0000)] 
[settings] Impose a fixed order on settings

Improve the appearance of the "config" user interface by ensuring that
settings appear in some kind of logical order.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Fix setting expansion
Michael Brown [Wed, 23 Mar 2011 10:08:16 +0000 (10:08 +0000)] 
[settings] Fix setting expansion

Commit 5fbd020 ("[settings] Display canonical setting name in output
of "show" command") introduced a regression causing all setting
expansions (e.g. "${net0/mac}") to expand to an empty string.

Fix by returning the formatted value length from
fetchf_named_setting(), as expected by the caller.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Return to first row on navigating to a new settings block
Michael Brown [Wed, 23 Mar 2011 01:49:00 +0000 (01:49 +0000)] 
[settings] Return to first row on navigating to a new settings block

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Add hierarchy navigation in "config" user interface
Michael Brown [Tue, 22 Mar 2011 22:58:24 +0000 (22:58 +0000)] 
[settings] Add hierarchy navigation in "config" user interface

Allow the user to browse through the settings block hierarchy.

Originally-implemented-by: Glenn Brown <glenn@myri.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Reject attempts to change a network device's bus ID
Michael Brown [Wed, 23 Mar 2011 01:24:37 +0000 (01:24 +0000)] 
[settings] Reject attempts to change a network device's bus ID

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Display locally-originated settings in bold
Michael Brown [Tue, 22 Mar 2011 21:35:08 +0000 (21:35 +0000)] 
[settings] Display locally-originated settings in bold

Originally-implemented-by: Glenn Brown <glenn@myri.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Display canonical setting name in "config" user interface
Michael Brown [Tue, 22 Mar 2011 21:24:54 +0000 (21:24 +0000)] 
[settings] Display canonical setting name in "config" user interface

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Display only applicable settings in "config" user interface
Michael Brown [Tue, 22 Mar 2011 21:07:22 +0000 (21:07 +0000)] 
[settings] Display only applicable settings in "config" user interface

Display only settings relevant to the current scope.  For example,
"config net0" no longer displays SMBIOS settings, and "config smbios"
displays only SMBIOS settings.

Originally-implemented-by: Glenn Brown <glenn@myri.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Display canonical setting name in output of "show" command
Michael Brown [Tue, 22 Mar 2011 19:12:10 +0000 (19:12 +0000)] 
[settings] Display canonical setting name in output of "show" command

Enable the "show" command to display the full, canonicalised name of
the fetched setting.  For example:

  iPXE> show mac
  net0/mac:hex = 52:54:00:12:34:56

  iPXE> dhcp && show ip
  DHCP (net0 52:54:00:12:34:56)... ok
  net0.dhcp/ip:ipv4 = 10.0.0.168

  iPXE> show net0/6
  net0.dhcp/dns:ipv4 = 10.0.0.6

Inspired-by: Glenn Brown <glenn@myri.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Provide fetch_setting_origin()
Michael Brown [Tue, 22 Mar 2011 17:41:47 +0000 (17:41 +0000)] 
[settings] Provide fetch_setting_origin()

Inspired-by: Glenn Brown <glenn@myri.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Expose settings_name()
Glenn Brown [Tue, 22 Mar 2011 17:49:03 +0000 (17:49 +0000)] 
[settings] Expose settings_name()

Expose settings_name(), shrink the unnecessarily large static buffer,
properly name root settings block, and simplify.

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Use concat_args() in "set" command
Michael Brown [Tue, 22 Mar 2011 17:29:08 +0000 (17:29 +0000)] 
[settings] Use concat_args() in "set" command

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Formalise notion of setting applicability
Michael Brown [Tue, 22 Mar 2011 16:56:35 +0000 (16:56 +0000)] 
[settings] Formalise notion of setting applicability

Expose a function setting_applies() to allow a caller to determine
whether or not a particular setting is applicable to a particular
settings block.

Restrict DHCP-backed settings blocks to accepting only DHCP-based
settings.

Restrict network device settings blocks to accepting only DHCP-based
settings and network device-specific settings such as "mac".

Inspired-by: Glenn Brown <glenn@myri.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[forcedeth] Clear the MII link status register on link status changes
Yann Cézard [Sun, 20 Mar 2011 12:29:05 +0000 (12:29 +0000)] 
[forcedeth] Clear the MII link status register on link status changes

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[console] Try to avoid problems caused by keycode 86
Michael Brown [Wed, 16 Mar 2011 21:31:16 +0000 (21:31 +0000)] 
[console] Try to avoid problems caused by keycode 86

The "us" keyboard layout contains a mapping for keycode 86 (which
seems not to correspond to any physical key on many US keyboards) to
the ASCII character '<'.  This mapping causes conflicts with the
mapping for keycode 51, which also maps (with shift) to '<'.

Change the keyboard mapping generator to choose the lowest keycode for
each ASCII character as indicating the relevant mapping to use, on the
basis that a lower keycode roughly indicates a "more normal" key.  On
a German keyboard, which has keys for both keycode 51 and keycode 86
present, this causes '<' to be remapped to ';', which is a closer
match to typical user expectations.

Reported-by: Sven Dreyer <sven@dreyer-net.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[uri] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 20:21:08 +0000 (20:21 +0000)] 
[uri] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[qib7322] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 20:19:54 +0000 (20:19 +0000)] 
[qib7322] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 20:16:45 +0000 (20:16 +0000)] 
[hermon] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[arbel] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 20:15:39 +0000 (20:15 +0000)] 
[arbel] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vxge] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:57:38 +0000 (19:57 +0000)] 
[vxge] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[ath5k] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:54:52 +0000 (19:54 +0000)] 
[ath5k] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[eepro] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:51:02 +0000 (19:51 +0000)] 
[eepro] Avoid unused variable warning in gcc 4.6

From a cursory examination, it appears as though the calculation of
tx_available is redundant, since eepro_transmit() waits for transmit
completion before returning anyway.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[w89c840] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:24:29 +0000 (19:24 +0000)] 
[w89c840] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[smc9000] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:23:47 +0000 (19:23 +0000)] 
[smc9000] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[etherfabric] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:22:41 +0000 (19:22 +0000)] 
[etherfabric] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[sis190] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:21:39 +0000 (19:21 +0000)] 
[sis190] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[epic100] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:20:49 +0000 (19:20 +0000)] 
[epic100] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[sky2] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:19:36 +0000 (19:19 +0000)] 
[sky2] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[forcedeth] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:17:59 +0000 (19:17 +0000)] 
[forcedeth] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[ns83820] Update to standard debugging infrastructure
Michael Brown [Wed, 16 Mar 2011 19:15:31 +0000 (19:15 +0000)] 
[ns83820] Update to standard debugging infrastructure

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[atl1e] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:08:16 +0000 (19:08 +0000)] 
[atl1e] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[via-velocity] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:05:53 +0000 (19:05 +0000)] 
[via-velocity] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[sis900] Avoid unused variable warning in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 19:02:50 +0000 (19:02 +0000)] 
[sis900] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[e1000] Remove unused variable when ICR register is simply cleared
Michael Brown [Wed, 16 Mar 2011 18:58:52 +0000 (18:58 +0000)] 
[e1000] Remove unused variable when ICR register is simply cleared

On reset and close, the ICR register is read to clear any pending
interrupts, but the value is simply ignored.  Avoid assigning the
value to a variable, to inhibit a warning from gcc 4.6.

Also fix a potential race condition in reset routines which clear
interrupts before disabling them.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[igbvf] Remove some unused Linux-specific portions of igbvf.h
Michael Brown [Wed, 16 Mar 2011 18:41:47 +0000 (18:41 +0000)] 
[igbvf] Remove some unused Linux-specific portions of igbvf.h

These unused portions trigger a compiler warning under gcc 4.6, due to
the ambiguity over the "page" field in struct igbvf_buffer.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[phantom] Remove unused variable in phantom_dmesg()
Michael Brown [Wed, 16 Mar 2011 18:35:57 +0000 (18:35 +0000)] 
[phantom] Remove unused variable in phantom_dmesg()

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Avoid spurious address comparison warnings in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 18:10:49 +0000 (18:10 +0000)] 
[build] Avoid spurious address comparison warnings in gcc 4.6

A construction such as "assert ( ptr != NULL )" seems to trigger a
false positive warning in gcc 4.6 if the value of "ptr" is known at
compile-time to be non-NULL.  Use -Wno-address to inhibit this
warning.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Avoid spurious unused-but-set-variable warnings in gcc 4.6
Michael Brown [Wed, 16 Mar 2011 17:15:25 +0000 (17:15 +0000)] 
[build] Avoid spurious unused-but-set-variable warnings in gcc 4.6

The __table_entries() construction seems to trigger a false positive
warning in gcc 4.6 relating to variables which are set but never
used.  Add __attribute__((unused)) to inhibit this warning.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Allow workaround-specific flags to override default flags
Michael Brown [Wed, 16 Mar 2011 19:30:42 +0000 (19:30 +0000)] 
[build] Allow workaround-specific flags to override default flags

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Fix building with latest binutils
Bastian Blank [Wed, 16 Mar 2011 14:44:33 +0000 (15:44 +0100)] 
[build] Fix building with latest binutils

Signed-off-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Avoid rebuilding keymap files automatically
Michael Brown [Wed, 16 Mar 2011 14:06:46 +0000 (14:06 +0000)] 
[build] Avoid rebuilding keymap files automatically

The keymap files, though autogenerated, are checked in to version
control and should be considered as source files.  They should never
be automatically rebuilt.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[console] Add keyboard map selection
Michael Brown [Wed, 16 Mar 2011 12:01:48 +0000 (12:01 +0000)] 
[console] Add keyboard map selection

The active keyboard map may be selected by editing KEYBOARD_MAP in
config/console.h.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[console] Add keymap generator
Michael Brown [Wed, 16 Mar 2011 03:22:45 +0000 (03:22 +0000)] 
[console] Add keymap generator

Inspired by LILO's keytab-lilo.pl, genkeymap.pl uses "loadkeys -b" to
obtain a Linux keyboard map, and generates a file keymap_xx.c in
hci/keymap.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[console] Add facility for rudimentary keyboard mapping
Michael Brown [Wed, 16 Mar 2011 03:17:34 +0000 (03:17 +0000)] 
[console] Add facility for rudimentary keyboard mapping

Allow for remapping of ASCII characters returned by the BIOS, using a
map consisting of (from,to) pairs.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[efi] Mark SNP devices as children of EFI PCI device
Michael Brown [Tue, 15 Mar 2011 16:55:04 +0000 (16:55 +0000)] 
[efi] Mark SNP devices as children of EFI PCI device

Re-open the EFI_PCI_IO_PROTOCOL specifying an Attributes value of
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.  This causes the SNP devices to
be marked as children of the EFI PCI device (as shown in the "devtree"
command).

On at least one IBM blade system, this is required in order to have
the relevant drivers automatically attach to the SNP controller at
device creation time.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[romprefix] Use correct size for PMM allocation of image source block
Michael Brown [Tue, 15 Mar 2011 01:52:58 +0000 (01:52 +0000)] 
[romprefix] Use correct size for PMM allocation of image source block

iPXE allocates its first PMM block using the image source length,
which is rounded up to the nearest 16-byte paragraph.  It then copies
in data of a length calculated from the ROM size, which is
theoretically less than or equal to the image source length, but is
rounded up to the nearest 512-byte sector.  This can result in copying
beyond the end of the allocated PMM block, which can corrupt the PMM
data structures (and other essentially arbitrary areas of memory).

Fix by rounding up the image source length to the nearest 512-byte
sector before using it as the PMM allocation length.

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Reported-by: Jarrod Johnson <jarrod.b.johnson@gmail.com>
Reported-by: Itay Gazit <itayg@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[eepro100] Do not discard short packets
Michael Brown [Sat, 12 Mar 2011 12:48:29 +0000 (12:48 +0000)] 
[eepro100] Do not discard short packets

In a virtual environment such as qemu, we can legitimately receive
packets less than 64 bytes in length, such as ARP replies.  These are
currently discarded, causing most IPv4 communication to fail.

Fix by ignoring the RFDShort bit when receiving packets.

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[bios] Use INT 16,11 instead of INT 16,01 to check for keystrokes
Michael Brown [Thu, 10 Mar 2011 22:50:05 +0000 (22:50 +0000)] 
[bios] Use INT 16,11 instead of INT 16,01 to check for keystrokes

INT 16,01 will discard some extended keystrokes on some BIOSes, making
it impossible for iPXE to detect keypresses such as F12.  Fix by using
INT 16,11 instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pxe] Report an IRQ number only if device supports interrupts
Michael Brown [Thu, 10 Mar 2011 18:25:05 +0000 (18:25 +0000)] 
[pxe] Report an IRQ number only if device supports interrupts

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[syslog] Add support for sending console output to a syslog server
Michael Brown [Thu, 10 Mar 2011 05:33:45 +0000 (05:33 +0000)] 
[syslog] Add support for sending console output to a syslog server

Originally-implemented-by: Anselm Martin Hoffmeister <anselm@hoffmeister.be>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[console] Move include/console.h to include/ipxe/console.h
Michael Brown [Wed, 9 Mar 2011 20:09:26 +0000 (20:09 +0000)] 
[console] Move include/console.h to include/ipxe/console.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[script] Allow scripts to be replaced
Michael Brown [Wed, 9 Mar 2011 17:32:32 +0000 (17:32 +0000)] 
[script] Allow scripts to be replaced

A script that downloads a new image using imgdownload() with the
action register_and_replace_image() can now be freed immediately
before the replacement image is executed.  This functionality is not
yet exposed via an iPXE command.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Avoid ending up with multiple selected images on re-registration
Michael Brown [Wed, 9 Mar 2011 17:21:10 +0000 (17:21 +0000)] 
[image] Avoid ending up with multiple selected images on re-registration

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Simplify use of imgdownload()
Michael Brown [Wed, 9 Mar 2011 16:55:51 +0000 (16:55 +0000)] 
[image] Simplify use of imgdownload()

Allow imgdownload() to be called without first having to allocate (and
so keep track of) an image.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Generalise "currently-running script" to "currently-running image"
Michael Brown [Wed, 9 Mar 2011 13:38:56 +0000 (13:38 +0000)] 
[image] Generalise "currently-running script" to "currently-running image"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Move the register_and_{select|boot}_image() functions to imgmgmt.c
Michael Brown [Wed, 9 Mar 2011 13:11:35 +0000 (13:11 +0000)] 
[image] Move the register_and_{select|boot}_image() functions to imgmgmt.c

These functions are used only as the "action" parameters to
imgdownload() or imgfetch(), and so belong in imgmgmt.c rather than
image.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[monojob] Display percentage progress, if available
Michael Brown [Mon, 7 Mar 2011 23:55:57 +0000 (23:55 +0000)] 
[monojob] Display percentage progress, if available

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[prefix] Allow iPXE's own command line to be executed as a script
Michael Brown [Mon, 7 Mar 2011 22:02:07 +0000 (22:02 +0000)] 
[prefix] Allow iPXE's own command line to be executed as a script

Some prefixes (e.g. .lkrn) allow a command line to be passed in to
iPXE.  At present, this command line is ignored.

If a command line is provided, treat it as an embedded script (without
an explicit "#!ipxe" magic marker).  This allows for patterns of
invocation such as

  title  iPXE
  kernel /boot/ipxe.lkrn dhcp && \
         sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage

Here GRUB is instructed to load ipxe.lkrn with an embedded script
equivalent to

  #!ipxe
  dhcp
  sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage

This can be used to effectively vary the embedded script without
having to rebuild ipxe.lkrn.

Originally-implemented-by: Dave Hansen <dave@sr71.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[main] Remove shell prompt when using an embedded image
Michael Brown [Mon, 7 Mar 2011 20:42:36 +0000 (20:42 +0000)] 
[main] Remove shell prompt when using an embedded image

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Use list_first_entry() to clarify logic in main()
Michael Brown [Mon, 7 Mar 2011 17:10:24 +0000 (17:10 +0000)] 
[image] Use list_first_entry() to clarify logic in main()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[script] Add "prompt" command
Michael Brown [Mon, 7 Mar 2011 18:32:30 +0000 (18:32 +0000)] 
[script] Add "prompt" command

The "prompt" command exposes the prompt() function, allowing a script
to prompt the user for a keypress and take action depending on the
result.  For example

  #!ipxe

  prompt -k 0x197e -t 2000 Press F12 to boot from network... || exit
  autoboot

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[prompt] Replace shell_banner() with a generic prompt() function
Michael Brown [Mon, 7 Mar 2011 17:42:06 +0000 (17:42 +0000)] 
[prompt] Replace shell_banner() with a generic prompt() function

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[console] Add a timeout parameter to getkey()
Michael Brown [Mon, 7 Mar 2011 19:33:50 +0000 (19:33 +0000)] 
[console] Add a timeout parameter to getkey()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[console] Avoid timer wraparound problems in getchar_timeout()
Michael Brown [Mon, 7 Mar 2011 17:40:12 +0000 (17:40 +0000)] 
[console] Avoid timer wraparound problems in getchar_timeout()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[bios] Recognise scancodes for F5-F12 inclusive
Michael Brown [Mon, 7 Mar 2011 19:17:51 +0000 (19:17 +0000)] 
[bios] Recognise scancodes for F5-F12 inclusive

The function keys F5-F12 all conform to the same ANSI pattern as the
other "special" keys that we currently recognise.  Add these key
definitions, and shrink the representation of the ANSI sequences in
bios_console.c to compensate.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Add generic concat_args() function
Michael Brown [Mon, 7 Mar 2011 18:31:38 +0000 (18:31 +0000)] 
[cmdline] Add generic concat_args() function

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[script] Add an iPXE error URI to the "not in a script" message
Michael Brown [Mon, 7 Mar 2011 03:11:14 +0000 (03:11 +0000)] 
[script] Add an iPXE error URI to the "not in a script" message

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Clear the command line rather than setting an empty command line
Michael Brown [Mon, 7 Mar 2011 02:44:24 +0000 (02:44 +0000)] 
[image] Clear the command line rather than setting an empty command line

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Allow image_set_cmdline() to clear the command line
Michael Brown [Mon, 7 Mar 2011 02:43:56 +0000 (02:43 +0000)] 
[image] Allow image_set_cmdline() to clear the command line

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[comboot] Do not assume that image has a non-NULL command line
Michael Brown [Mon, 7 Mar 2011 02:38:26 +0000 (02:38 +0000)] 
[comboot] Do not assume that image has a non-NULL command line

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Simplify image management
Michael Brown [Mon, 7 Mar 2011 00:37:50 +0000 (00:37 +0000)] 
[image] Simplify image management

Refactor the {load,exec} image operations as {probe,exec}.  This makes
the probe mechanism cleaner, eliminates some forward declarations,
avoids holding magic state in image->priv, eliminates the possibility
of screwing up between the "load" and "exec" stages, and makes the
documentation simpler since the concept of "loading" (as distinct from
"executing") no longer needs to be explained.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[spi] Reset device on each access
Michael Brown [Fri, 4 Mar 2011 19:17:53 +0000 (19:17 +0000)] 
[spi] Reset device on each access

When chainloading rtl8139.pxe from an old Etherboot rtl8139.zrom, iPXE
can end up misreading the first word of the MAC address from the
EEPROM as being all zeroes.  This is presumably because Etherboot has
left the serial EEPROM in an unexpected state.

Fix by using the chip select line to reset the SPI device before we
start accessing it.

Reported-by: Mandar U Jog <mandarjog@gmail.com>
Tested-by: Mandar U Jog <mandarjog@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[parseopt] Refer to online documentation for command help
Michael Brown [Fri, 4 Mar 2011 12:14:51 +0000 (12:14 +0000)] 
[parseopt] Refer to online documentation for command help

The online documentation (e.g. http://ipxe.org/cmd/ifopen), though not
yet complete, is far more comprehensive than could be provided within
the iPXE binary.  Save around 200 bytes (compressed) by removing the
command descriptions from the interactive help, and instead referring
users directly to the web page describing the relevant command.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[arbel] Make driver 64-bit safe
Michael Brown [Fri, 4 Mar 2011 01:59:43 +0000 (01:59 +0000)] 
[arbel] Make driver 64-bit safe

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Make driver 64-bit safe
Michael Brown [Fri, 4 Mar 2011 01:37:08 +0000 (01:37 +0000)] 
[hermon] Make driver 64-bit safe

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[iscsi] Change default initiator IQN
Michael Brown [Thu, 3 Mar 2011 22:08:50 +0000 (22:08 +0000)] 
[iscsi] Change default initiator IQN

The default initiator IQN is "iqn.2000-09.org.etherboot:UNKNOWN".
This is problematic for two reasons:

  a) the etherboot.org domain (and hence the associated IQN namespace)
     is not under the control of the iPXE project, and

  b) some targets (correctly) refuse to allow concurrent connections
     from different initiators using the same initiator IQN.

Solve both problems by changing the default initiator IQN to be

  iqn.2010-04.org.ipxe:<hostname> if a hostname is set, or

  iqn.2010-04.org.ipxe:<uuid> if no hostname is set.

Explicit initiator IQNs set via DHCP option 203 are not affected by
this change.

Unfortunately, this change is likely to break some existing
configurations, where ACL rules have been put in place referring to
the old default initiator IQN.  Users may need to update ACLs, or
force the use of the old IQN using an iPXE script line such as

  set initiator-iqn iqn.2000-09.org.etherboot:UNKNOWN

or a dhcpd.conf option such as

   option iscsi-initiator-iqn "iqn.2000-09.org.etherboot:UNKNOWN"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dns] Fix memory leak in settings applicator
Michael Brown [Thu, 3 Mar 2011 20:09:29 +0000 (20:09 +0000)] 
[dns] Fix memory leak in settings applicator

Signed-off-by: Michael Brown <mcb30@ipxe.org>