[ipxe-devel] Patch: Make shell command available when BANNER_TIMEOUT is set to 0

Julian Brost julian at 0x4a42.net
Sun Dec 8 15:21:33 UTC 2013


Hi,

when building iPXE with BANNER_TIMEOUT set to 0, it's impossible to use
the "shell" command in scripts. Trying to use it results in the error
message "shell: command not found".

The only uses of symbols from the shell.o file seem to be in
src/usr/autoboot.c in an if ( shell_banner() ) block which becomes dead
code if BANNER_TIMEOUT is 0 as shell_banner() always returns 0 in this
case. Thus shell.o doesn't get linked and the "shell" and "help"
commands are unavailable as they're missing from the symbol table.

Adding REQUIRE_OBJECT ( shell ); to src/config/config.c fixes this, see
the attached patch. Probably you want to move this to some other place
in the file and add an explaining comment.

Regards,
Julian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipxe_shell_cmd.patch
Type: text/x-patch
Size: 393 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20131208/e12699ed/attachment.bin>


More information about the ipxe-devel mailing list