[syslinux:elflink] linux.c32: Add new initrd+= option for multiple initrds
syslinux-bot for Shao Miller
sha0.miller at gmail.com
Mon Nov 5 08:03:10 PST 2012
Commit-ID: 66484b55fe52e1393b8c6b522ca8d18b898e18f3
Gitweb: http://www.syslinux.org/commit/66484b55fe52e1393b8c6b522ca8d18b898e18f3
Author: Shao Miller <sha0.miller at gmail.com>
AuthorDate: Thu, 25 Oct 2012 03:58:07 -0400
Committer: Shao Miller <sha0.miller at gmail.com>
CommitDate: Sat, 3 Nov 2012 01:07:37 -0400
linux.c32: Add new initrd+= option for multiple initrds
linux.c32 now processes the kernel's command-line for "initrd+="
options.
Given "initrd+=foo", linux.c32 will concatenate the file "foo"
to the initrds that it has already loaded due to the "initrd="
option.
Given "initrd+=foo,bar", linux.c32 will concatenate both files
"foo" and "bar" to the initrds that it has already loaded due
to the "initrd=" option. That is, multiple filenames can be
specified with comma separators.
Given "initrd+=foo initrd+=bar", linux.c32 will concatenate
both files "foo" and "bar" to the initrds that it has already
loaded due to the "initrd=" option. That is, the "initrd+="
option can be specified multiple times.
The position of any "initrd=" option relative to any "initrd+="
option is irrelevant. The "initrd=" option is always processed
before all "initrd+=" options.
PLEASE NOTE: It is important to note that there are NO SPACES
involved in using the "initrd+=" option. "initrd += foo" will
not work.
Signed-off-by: Shao Miller <sha0.miller at gmail.com>
---
com32/modules/linux.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/com32/modules/linux.c b/com32/modules/linux.c
index 3ff5007..11cdc18 100644
--- a/com32/modules/linux.c
+++ b/com32/modules/linux.c
@@ -291,6 +291,14 @@ int main(int argc, char *argv[])
goto bail;
}
+ argl = argv;
+ while ((argl = find_arguments(argl, &arg, "initrd+="))) {
+ argl++;
+ if (process_initramfs_args(arg, initramfs, kernel_name, ldmode_raw,
+ opt_quiet))
+ goto bail;
+ }
+
/* Append the DHCP info */
if (opt_dhcpinfo &&
!pxe_get_cached_info(PXENV_PACKET_TYPE_DHCP_ACK, &dhcpdata, &dhcplen)) {
More information about the Syslinux-commits
mailing list