summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* load_linux: the command line pointer depends on real_mode_baseH. Peter Anvin2013-02-041-12/+12
| | | | | | | The command line pointer depends on real_mode_base, so we can't set it up until we know where the real mode code will actually land. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* load_linux: boot protocol < 2.00 could still have a command lineH. Peter Anvin2013-02-041-6/+10
| | | | | | | | | | The command line existed before the 2.00 boot protocol, it was the initrd which was the new addition to that version. Therefore, allow the command line to be set even for the ancient kernels. This is necessary to specify a command line for memtest86+. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* ldlinux: Correct the attribute bit for foreground brightsyslinux-5.01Matt Fleming2013-01-251-1/+1
| | | | | | The foreground bright bit number is bit 3. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Convert all UsingVGA uses with display_mask_vga()Matt Fleming2013-01-251-24/+35
| | | | | | | | | | Introduce display_mask_vga() which does the necessary converting of UsingVGA into a mask to be AND'd with DisplayMask. Also, apply TextAttribute when clearing the screen after we've seen a form feed. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* elflink: Set PATH to the directory containing ldlinux.c32syslinux-5.01-pre5Matt Fleming2013-01-251-2/+23
| | | | | | | | | | | On ISOLINUX and PXELINUX, CurrentDirName doesn't contain anything useful when we enter load_env32(). commit 10bb72d1528b ("PATH: Use installation directory for 'PATH'") didn't handle the case where we don't have an installation path, or don't find ldlinux.c32 there. If we find ldlinux.c32 in one of 'search_directories' use that directory as the PATH string. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* NEWS: Add entries for 5.01Matt Fleming2013-01-241-0/+12
| | | | Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Merge branch 'doc-elflink-for-mfleming' of git://github.com/geneC/syslinux ↵Matt Fleming2013-01-2411-1/+1038
|\ | | | | | | | | | | | | | | | | | | | | | | | | into elflink Pull AsciiDoc-based documentation from Gene Cumm, * 'doc-elflink-for-mfleming' of git://github.com/geneC/syslinux: txt/Makefile: make directories txt/: Remove COMBOOT as of 5.00; spelling; add PATH NEWS: add txt/ Makefile: add txt/ txt/: Add new AsciiDoc formatted documentation
| * txt/Makefile: make directoriesGene Cumm2013-01-171-4/+7
| |
| * txt/: Remove COMBOOT as of 5.00; spelling; add PATHGene Cumm2013-01-173-14/+22
| | | | | | | | | | | | Also changing markup for AsciiDoc Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * NEWS: add txt/Gene Cumm2013-01-171-0/+4
| | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * Makefile: add txt/Gene Cumm2013-01-171-1/+1
| | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * txt/: Add new AsciiDoc formatted documentationGene Cumm2013-01-179-0/+1022
| | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | Merge branch 'for-upstream' of git://git.zytor.com/users/pcacjr/syslinux ↵Matt Fleming2013-01-247-199/+251
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into elflink Pull XFS changes from Paulo Alcantara, "feel free to pull my for-upstream branch on zytor. it contains the cache for directory blocks on XFS, ldlinux.c32 installation support for XFS and one trivial fix for shortform-directory lookup." * 'for-upstream' of git://git.zytor.com/users/pcacjr/syslinux: extlinux: Also install ldlinux.c32 file on XFS xfs: Flush cache of directory blocks once done with readdir() xfs: Remove unnecessary free()'s xfs: Fix bug when listing shortform directory entries xfs: Add cache for directory blocks xfs: Make xfs_dir2_entry_name_cmp() inline xfs: Avoid useless malloc()'s and free()'s xfs: Make it more verbose on debug xfs: Improve error and debug printing xfs: Do some refactoring
| * | extlinux: Also install ldlinux.c32 file on XFSPaulo Alcantara2013-01-221-4/+26
| | | | | | | | | | | | Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | xfs: Flush cache of directory blocks once done with readdir()Paulo Alcantara2013-01-223-4/+33
| | | | | | | | | | | | Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | xfs: Remove unnecessary free()'sPaulo Alcantara2013-01-223-37/+3
| | | | | | | | | | | | | | | | | | | | | Those freed memories are all now cached and need to get flushed at some point. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | xfs: Fix bug when listing shortform directory entriesPaulo Alcantara2013-01-221-2/+3
| | | | | | | | | | | | | | | | | | | | | The xfs_fmt_local_readdir() function should call xfs_readdir_dir2_local() instead. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | xfs: Add cache for directory blocksPaulo Alcantara2013-01-215-71/+118
| | | | | | | | | | | | | | | | | | | | | | | | This cache will avoid lots of malloc() and free() calls for getting an allocated area for directory blocks whenever listing and finding directory entries. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | xfs: Make xfs_dir2_entry_name_cmp() inlinePaulo Alcantara2013-01-212-13/+13
| | | | | | | | | | | | Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | xfs: Avoid useless malloc()'s and free()'sPaulo Alcantara2013-01-213-61/+25
| | | | | | | | | | | | | | | | | | | | | This patch speeds up the process of retrieving and comparing entry names while looking up inodes. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | xfs: Make it more verbose on debugPaulo Alcantara2013-01-215-11/+35
| | | | | | | | | | | | Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | xfs: Improve error and debug printingPaulo Alcantara2013-01-211-2/+6
| | | | | | | | | | | | Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | xfs: Do some refactoringPaulo Alcantara2013-01-211-20/+15
| | | | | | | | | | | | Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* | | ldlinux: Fix serial output and delete eprintf()Matt Fleming2013-01-2410-94/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tagging __syslinux_get_serial_info() with __constructor is pretty useless when the global variables it uses, such as SerialPort, etc, are assigned *after* the constructor has run. This constructor made sense when config parsing was done by the core, but parsing is now performed by ldlinux. We need to explicitly invoke the function to initialise __syslinux_serial_console_info once we've parsed any config files. eprintf.c was introduced in commit 086d698c642f ("ldlinux: Add eprintf() to print to VGA and serial") because printf() output wasn't appearing on the serial console. It turns out that the above __constructor confusion was the real bug. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | ldlinux: Don't update UsingVGA when we just want the valueMatt Fleming2013-01-241-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bug introduced when this code was copied from the old 4.x assembly implementation, we don't need to update UsingVGA everytime we read a character, we only need its value when comparing it against the DisplayMask. This bug caused every other character to be displayed when only writing to the text console, as well as other nasties such as making syslinux_force_text_mode() think it's in VGA mode even when it's in text mode. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | ldlinux: Dynamically allocate cmdline buffer to avoid overflowMatt Fleming2013-01-241-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | Also, because we no longer pass the allocated buffer to __intcall() and friends we can use malloc() instead of lmalloc(), leaving precious low memory for other users. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | ldlinux: Clear screen on ASCII 12 (form feed) in DISPLAY fileMatt Fleming2013-01-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | The ansi code won't handle \f the way we want, so we need to explicitly clear the screen and reset the cursor position, like the old 4.x code. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | module: Replace cur_module with module_current()syslinux-5.01-pre4Matt Fleming2013-01-233-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's easy for cur_module and prev_module to get out of sync with reality (the actual module that is running), so add module_current() which returns the module at the head of the module_list, i.e. the module that was loaded most recently. Better still, by using the list we don't have to do any kind of stacking of module pointers ourselves. This fixes a bug where cur_module contained a stale pointer (the module had actually been unloaded) but the pointer value had since been reallocated for a new module in spawn_load(), meaning that the following check, if (!strcmp(cur_module->name, module->name)) was always going to be true, even though *no* module was actually loaded at this point as we were reloading ldlinux.c32 from start_ldlinux(). This could have been fixed with a NULL-assignment after module_unload(), but using the modules_head list to detect the current module is much cleaner. Note that the core module loaded in load_env32() is always on the list, therefore module_current() will always return a valid pointer. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | hdt: Move ~162K byte data object from the stack to the bssMatt Fleming2013-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A struct s_hardware is far too large to be placed onto the stack and was causing us run past the end of the allocated stack and overwrite the diskcache, which resulted in apparent file system corruption. Move this hefty object into the bss. Cc: Erwan Velu <erwanaliasr1@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | module: Check for NULL ctors and dtorsMatt Fleming2013-01-232-2/+2
| | | | | | | | | | | | | | | | | | Don't dereference a NULL ctor/dtor as that can cause us to crash. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | module: Check the return value of malloc()Matt Fleming2013-01-231-0/+8
| | | | | | | | | | | | | | | | | | | | | Instead of blindly writing through a possible-NULL pointer, check the return value of malloc(). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | init: Leave mem_init() to fs_init()Matt Fleming2013-01-231-3/+0
| | | | | | | | | | | | | | | | | | Remove the superfluous call from init(). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | realloc: Set the HEAP when splitting a blockMatt Fleming2013-01-231-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | Failure to do so means we may put a free block in some random location because ARENA_HEAP_GET() can return something invalid when used to find the correct free list in __free_block(). This bug manifested as running out of available free memory. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge branch 'com32lib_spotless_for_mfleming' of ↵Matt Fleming2013-01-211-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://github.com/geneC/syslinux into elflink Pull clean up patch from Gene Cumm, * 'com32lib_spotless_for_mfleming' of git://github.com/geneC/syslinux: com32/lib: delete *.c32 on key target
| * | com32/lib: delete *.c32 on key targetGene Cumm2013-01-201-1/+1
| |/ | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | pxe: Add PXELINUX-specific symbols to symbol whitelistMatt Fleming2013-01-212-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to allow PXELINUX to link with required symbols at runtime otherwise, when executing prdhcp.c32, the user will be presented with the following message, Error: An undefined symbol was referenced Add pxe_call, dns_resolv and unload_pxe to the symbol whitelist. Reported-by: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | core/lzo: move LZO back to uncompressed sectionH. Peter Anvin2013-01-171-1/+1
|/ | | | | | | The LZO decompressor really can't live in the compressed part of the core, for some odd reason. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* elf: remove long-since-obsolete shallow module machineryH. Peter Anvin2013-01-176-223/+5
| | | | | | | Meant to handle symbols exported from the core, but we just pregenerate the dynamic section instead. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core: switch LZO decompressor to "fast safe" versionH. Peter Anvin2013-01-178-17/+42
| | | | | | | | Switch LZO decompressor to the "fast safe" version (and bump LZO source to version 2.06). This allows us to use that decompressor for module compression later without carrying another decompressor. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core/fs: remove some stale functions, inode refcount debugH. Peter Anvin2013-01-172-112/+9
| | | | | | | | Remove some stale (16-bit compatibility) functions in fs.c. Add some debugging for inode refcounts. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* bios.h: add missing dependent #includeH. Peter Anvin2013-01-171-0/+2
| | | | | | io_delay() defined in bios.h depends on outb() defined in <sys/io.h>. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Rename libcom32gpl.c32 to libgpl.c32H. Peter Anvin2013-01-172-4/+4
| | | | | | Conform to 8.3 filenames for essential files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Rename libutil_com.c32 to libutil.c32H. Peter Anvin2013-01-175-8/+7
| | | | | | Conform to 8.3 filenames for essential files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Always strip all the modulesH. Peter Anvin2013-01-1715-25/+35
| | | | | | | | Always strip the modules; they are too big unstripped. Specifically, we generate unstripped *.elf files, and then convert them to stripped *.c32 files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: obtain the executable pathname, cleanupsH. Peter Anvin2013-01-177-75/+175
| | | | | | | | | | | DOS actually does provide the fully qualified pathname to the executable, which would be useful to make ldlinux.c32 data rather than live inside the executable itself -- it has gotten too large. Also, move some DOS internals -- inline functions only used inside the dos directory -- out of libinstaller. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* ldlinux: Perform chdir() before parsing configsyslinux-5.01-pre3Matt Fleming2013-01-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The old 4.x behaviour for handling CONFIG directives of the form, CONFIG foo.cfg /bar was to lookup the absolute pathname of foo.cfg, then chdir to /bar and finally to parse foo.cfg. The 5.x behaviour reversed the chdir and parsing steps. This meant if foo.cfg's contents were simply, INCLUDE say.txt 4.x would include /bar/say.txt and 5.x would include /boot/syslinux/say.txt (assuming the current working directory was /boot/syslinux). What's even worse is that because of the way 'config_cwd' is used in 5.x we'd actually perform the chdir() operation after the first INCLUDE in foo.cfg, e.g. INCLUDE say.txt INCLUDE say.txt would include /boot/syslinux/say.txt and /bar/say.txt, respectively. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* module: Check return value of malloc()Matt Fleming2013-01-161-0/+5
| | | | | | | And return NULL after printing an appropriate error message if the call failed. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Strip whitespace from LABEL directiveMatt Fleming2013-01-151-5/+11
| | | | | | | Any LABEL directive arguments shouldn't include whitespace characters. If whitespace characters are needed use MENU LABEL. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* PXELINUX: Fix IPAPPEND to include BOOTIF and SYSUUIDsyslinux-5.01-pre2Matt Fleming2013-01-141-1/+3
| | | | | | | | | | commit 14531c47bc95 ("core: Delete code that is duplicated in ldlinux") erroneously deleted the BOOTIFStr and SYSUUIDStr entries from the PXELINUX-version of IPAppends, meaning that IPAPPEND 3 and IPAPPEND 4 didn't append the corresponding strings to the command line. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* isolinux: Update LBA in getlinsec loopMatt Fleming2013-01-111-0/+3
| | | | | | | | | | | | | | | | | We need to increment the Logical Block Address in eax by the number of sectors we passed to getlinsec after every invocation, otherwise we'll start with the same sector everytime. This bug was discovered when booting an isohybrid image, which failed to boot after printing the following error, "Image checksum error, sorry..." because the isolinux.bin was bigger than 32K, and thus invoked the getlinsec loop that reads the file in chunks. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>