efilinux: Minimal configuration file support
efilinux lacks a way of automatically booting a default
kernel. Instead, the kernel image path and kernel command line
arguments must be passed as arguments to efilinux on every invocation.
This commit allows a simple config file to specify a default kernel
and kernel arguments, which are passed to efilinux instead of
requiring them to be entered at the EFI shell. Now, when efilinux is
started it will first search for a file named 'efilinux.cfg' in the
same directory as the efilinux executable.
The syntax for a configuration file is exactly the same as the syntax
for efilinux's command line arguments. For example, to boot a linux
kernel the contents of 'efilinux.cfg' would be a single line,
"-f 0:\EFI\BOOT\vmlinux console=ttys0 initrd=0:\EFI\BOOT\initrd"
The contents of the file are passed to efilinux as though they were
typed at the EFI shell prompt. Multiple lines are not supported.
Cc: Darrent Hart <email@example.com>
Signed-off-by: Matt Fleming <firstname.lastname@example.org>
4 files changed