aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules/linux.c
Commit message (Collapse)AuthorAgeFilesLines
* linux.c32: Introduce initrdfile= optionShao Miller2012-11-031-0/+53
| | | | | | | | | | | | | | | | | | | | | | | It is useful to be able to load a file and pass it into a kernel's rootfs via the initramfs scheme. Given "initrdfile=foo", we will load the file foo, encapsulate it with the initramfs cpio format, then pass it alongside any initramfs files that were specified by "initrd=" and "initrd+=" options. One can specify the desired path/filename for the file to have within the rootfs by using the at (@) sign, as in: initrdfile=foo@/goes/to/foo One can also specify multiple files, separated by commas, such as: initrdfile=foo,bar@/somewhere/bar,baz One can also use this option multiple times, as in: initrdfile=foo,bar initrdfile=baz@/somewhere/baz Signed-off-by: Shao Miller <sha0.miller@gmail.com>
* linux.c32: Add new initrd+= option for multiple initrdsShao Miller2012-11-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@gmail.com>
* linux.c32: Move some initrd=x,y,z code out of mainShao Miller2012-11-031-21/+61
| | | | | | | | | In handling an "initrd=x,y,z" option, it seems reasonable to be able to handle similar options in a similar fashion, so some of the code has been moved out of 'main' and into a new 'process_initramfs_args' function. Signed-off-by: Shao Miller <sha0.miller@gmail.com>
* linux.c32: Add find_arguments functionMatt Fleming2012-11-031-16/+41
| | | | | | | | | | | | The 'find_argument' function already finds the last instance of a command-line option. For symmetry, we introduce a 'find_arguments' function which will help to iterate each instance of a command-line option. Also, this commit uses 'strncmp' in both, instead of 'memcmp'. Modified-by: Shao Miller <sha0.miller@gmail.com> Signed-off-by: Shao Miller <sha0.miller@gmail.com>
* Merge branch 'master' into elflinkMatt Fleming2012-07-191-3/+51
|\ | | | | | | | | | | | | | | | | | | | | The reason for this merge is that we need the fix to core/fs/cache.c without which we can potentially dereference an invalid pointer. The below conflict is a result of the new setup_data blob code being merged from the master branch. Conflicts: com32/lib/Makefile
| * linux.c32: add missing break;H. Peter Anvin2012-06-291-0/+1
| | | | | | | | | | | | Add missing break; for ENOMEM. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * linux.c32: allow loading arbitrary setup_data blobsH. Peter Anvin2012-06-291-12/+36
| | | | | | | | | | | | | | | | | | Allow loading arbitrary setup_data blobs via the syntax blob.NN=filename where NN is a decimal number. This also allows loading multiple device tree blobs. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * linux.c32: add support for a device tree blob (dtb)H. Peter Anvin2012-06-291-2/+25
| | | | | | | | | | | | | | | | | | | | | | Based on a patch by Thierry Reding, add support for loading a device tree blob using the generic setup_data framework. I used the name dtb= instead of fdt= since it looks like dtb= is the common acronym for the filenames and what is used in the kernel. Originally-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * Change fdt-specific loader into a generic setup_data loaderH. Peter Anvin2012-06-291-1/+1
| | | | | | | | | | | | | | Make it a generic setup_data loader keyed by type. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Thierry Reding <thierry.reding@avionic-design.de>
* | Merge remote-tracking branch 'origin/master' into elflinkH. Peter Anvin2012-06-121-7/+34
|\|
| * linux.c32: Make errors clearer for usersGene Cumm2012-06-091-7/+34
| | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | com32: console is already initialised when we enter main()Matt Fleming2011-04-261-2/+0
|/ | | | | | | | | There's no need to initialise the console when we enter main() as ldlinux.c32 will already have initialised it for us. Leaving the calls to openconsole() causes the console settings to be reset whenever we run a module. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* Run Nindent on com32/modules/linux.cH. Peter Anvin2009-05-291-137/+137
| | | | | | | | | Automatically reformat com32/modules/linux.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* linux.c32: replace the kernel name with BOOT_IMAGE=syslinux-3.81-pre2H. Peter Anvin2009-05-051-13/+10
| | | | | | | | | The BOOT_IMAGE= argument is generated by replacing the kernel name in the argument array. As a result, we shouldn't advance argp. Move the code around slightly, to make it more obvious that that is what is happening. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* linux.c32: honor the "quiet" flagH. Peter Anvin2009-05-051-6/+34
| | | | | | | Honor the "quiet" flag for linux.c32, since some distros have odd notions about these things. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* linux.c32: move handling of mem= and vga= into the library functionsyslinux-3.80-pre5H. Peter Anvin2009-04-291-67/+1
| | | | | | | Move the handling of mem= and vga= into syslinux_boot_linux(), so that the user of that function doesn't need to worry about it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Update copyright yearH. Peter Anvin2008-01-101-1/+1
|
* Handle vga={ask|normal|ext} in linux.c32syslinux-3.55-pre4H. Peter Anvin2008-01-041-2/+16
| | | | linux.c32 didn't handle vga={ask|normal|ext}, fix that.
* linux.c32: saturate memory size to 32 bits if too largeH. Peter Anvin2007-04-261-1/+7
|
* Fix the handling of namelen and argument parsing in linux.c32Ferenc Wagner2007-04-031-0/+1
|
* Linux-loading module with optional DHCP generation.syslinux-3.40-pre15H. Peter Anvin2007-03-151-0/+236
Load a Linux module, generate initramfs and optionally add /dhcpinfo.dat with the DHCP query information.