aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/kernel.c
Commit message (Collapse)AuthorAgeFilesLines
* ldlinux: Delete dead code and useless printfsyslinux-5.00-pre10Matt Fleming2012-11-131-28/+0
| | | | | | | | Seeing the cmdline re-printed every time the user presses enter is very annoying, so delete the offending printf(). Also delete some code that has been commented out for ages. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Delete inaccurate 'insufficient memory' messageMatt Fleming2012-11-131-3/+4
| | | | | | | Instead, use strerror() to print a more useful message if we fail to load a kernel. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Merge branch 'master' into elflinkMatt Fleming2012-07-191-1/+1
| | | | | | | | | | | 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
* elflink: Remove unused variablesMatt Fleming2012-04-171-1/+0
| | | | | | Reduce the number of build warnings by deleting unused variables. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Fix uninitialized variable warningMatt Fleming2012-04-171-1/+1
| | | | | | | | Fix the following warning by initializing 'kernel_name' to NULL, kernel.c:18:14: warning: ‘kernel_name’ may be used uninitialized in this function Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* kernel: Support multiple initrdsH. Peter Anvin2012-03-271-9/+22
| | | | | | | | | Support loading multiple initrd images separated by commas. It still doesn't correctly handle a secondary initrd= argument overriding the first; not clear if that really was a good idea or if they would be considered additive arguments. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Revert "ldlinux: Disable VGA graphics when loading a kernel"H. Peter Anvin2012-03-271-1/+0
| | | | | | | | | | | | This reverts commit 87320b8de8f331b9c1810e98e24426e70b0ae29f. That commit would change the mode before the kernel was actually loaded, but would leave the console nonfunctional if it was vesacon. We may need to do something similar eventually, but that one is not correct. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ldlinux: Don't alloc initramfs unless initrd= is specifiedMatt Fleming2012-03-231-6/+6
| | | | | | | | | | | | | | | | | It only makes sense to allocate memory for 'initramfs' if an initrd= argument was on the command line, otherwise we're wasting memory. Furthermore needlessly allocating 'initramfs' actually caused old kernels, such as memtest86, to fail to run because of the following check in syslinux_boot_kernel(), if (initramfs && hdr.version < 0x0200) goto bail; /* initrd/initramfs not supported */ Move the allocation after we've checked for and found an initrd= argument. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Disable VGA graphics when loading a kernelMatt Fleming2012-03-231-0/+1
| | | | | | | | | | | | | | The state of the graphics hardware is unknown when we're about to load a new kernel. It could be running in VGA mode, so let's disable VGA graphics before passing control to the kernel. The old assembly version of this code made extensive used of writestr(), which always calls vgaclearmode(). In the C version we're using printf() and so need to call vgaclearmode() directly. Doing it directly has the added advantage of documenting exactly where we need to reset the graphics hardware. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* elflink: Delete core-elf.hMatt Fleming2011-04-261-1/+0
| | | | | | | This header file really just duplicates code that is available in other header files. It has no reason to exist. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* elflink: Move more code from core/ into ldlinuxMatt Fleming2011-04-261-0/+128
ldlinux now contains all the code necessary to load and execute modules, none is contained in the core. This change also allows us to change the spawn_load() prototype and to push the job of processing arguments to executable functions (e.g. the contents of char *argv[] as passed to a module's main function) into ldlinux/execute.c instead of doing it in spawn_load(). Moving it into ldlinux/ makes sense because the only core user of spawn_load() is load_env32() and we don't require any sort of argument processing in that path. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>