summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* version: bump versionsyslinux-6.01-pre1Matt Fleming2013-06-241-1/+1
| | | | | | Welcome to the 6.01 release cycle. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* load_linux: fallback to the BIOS linux loaderMatt Fleming2013-06-241-6/+5
| | | | | | | | | | | | | | | | | | | | The BIOS firmware backend is missing a .load_linux pointer, and so anyone trying to boot a Linux kernel under BIOS is hitting the following error message, "No linux boot function registered for firmware" The usual way to handle this kind of abstraction would be to move bios_load_linux() to core/bios.c and assign it to .load_linux, but that would necessitate pulling the movebits and shuffler code into the core. For now, leave the BIOS loader where it is and use it as the default. In future we will want to move this to BIOS-specific code (though not necessarily in the core) because, by having it in the generic loader code, it is currently being built for the EFI backends even though it is never used. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Tag symbols with __exportMatt Fleming2013-06-212-2/+2
| | | | | | | I missed some symbols previously that are required to be exported when loading vesamenu.c32. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Export __bcopyxx_lenMatt Fleming2013-06-212-1/+2
| | | | | | | | We need to provide a __bcopyxx_len symbol for EFI because it's referenced in generic code in libcom32.c32. Without this change, libcom32.c32 will fail to load under EFI. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: delete unused varaiblessyslinux-6.00Matt Fleming2013-06-201-2/+0
| | | | | | | | efi/main.c: In function ‘find_addr’: efi/main.c:527:9: warning: unused variable ‘addr’ [-Wunused-variable] efi/main.c:524:13: warning: unused variable ‘status’ [-Wunused-variable] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* mk: stop complaining about unused parametersMatt Fleming2013-06-201-1/+2
| | | | | | | | Now that we've got the firmware abstraction, many backend functions don't use all of their parameters, and it isn't necessarily something we want to warn about all the time. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: return a value from sem_down()Matt Fleming2013-06-201-0/+1
| | | | | | | | | | | | | GCC is rightly complaining that we aren't returning a value from sem_down() like we should be, efi/main.c: In function ‘sem_down’: efi/main.c:174:1: warning: control reaches end of non-void function [-Wreturn-type] It doesn't really matter what value we return because the return value is only used in core/thread which EFI doesn't need. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: provide prototype for load_env32()Matt Fleming2013-06-202-1/+3
| | | | | | | | To get rid of the following GCC warning, efi/main.c:1237:2: warning: implicit declaration of function ‘load_env32’ [-Wimplicit-function-declaration] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: fix a bunch of casting to different size warnings,Matt Fleming2013-06-201-4/+9
| | | | | | | | | e.g. efi/main.c:997:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] efi/main.c:999:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: fix comparison between signed and unsigned typesMatt Fleming2013-06-201-8/+4
| | | | | | | | GCC is complaining, efi/main.c:534:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: fix prototype of efi_erase()Matt Fleming2013-06-201-2/+1
| | | | | | | | | and address the following compiler warning, efi/main.c:263:2: warning: initialization from incompatible pointer type [enabled by default] efi/main.c:263:2: warning: (near initialization for ‘efi_ops.erase’) [enabled by default] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: forward declare 'struct semaphore'Matt Fleming2013-06-191-0/+1
| | | | | | | | | | | | We don't need to include thread.h because struct semaphore is never actually used in the EFI code. Fixes, efi/main.c:171:26: warning: ‘struct semaphore’ declared inside parameter list [enabled by default] efi/main.c:171:26: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: cast third argument to HandleProtocol()Matt Fleming2013-06-191-4/+6
| | | | | | | | | and fix a bunch of compiler warnings along the lines of, efi/console.c:86:3: warning: passing argument 3 of ‘BS->HandleProtocol’ from incompatible pointer type [enabled by default] efi/console.c:86:3: note: expected ‘void **’ but argument is of type ‘struct EFI_GRAPHICS_OUTPUT_PROTOCOL **’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: don't compare integers of different signsMatt Fleming2013-06-191-4/+4
| | | | | | | | | Appease gcc and fix the following warning, efi/console.c: In function ‘setup_gop’: efi/console.c:81:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: cast to avoid compiler warningMatt Fleming2013-06-191-1/+1
| | | | | | | efi/tcp.c: In function ‘core_tcp_fill_buffer’: efi/tcp.c:210:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: include <string.h> for memcpy()/memset()Matt Fleming2013-06-191-0/+1
| | | | | | | | | | | and fix these warnings, efi/adv.c: In function ‘cleanup_adv’: efi/adv.c:48:5: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration] efi/adv.c: In function ‘syslinux_reset_adv’: efi/adv.c:54:5: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: include <string.h> for memcpy()Matt Fleming2013-06-191-0/+1
| | | | | | | | | to fix this warning, efi/mem.c: In function ‘efi_realloc’: efi/mem.c:14:2: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: fix definition of 'Hidden'Matt Fleming2013-06-191-1/+1
| | | | | | | | | and fix this compiler warning, core/ldlinux-c.c: In function ‘get_derivative_info’: core/ldlinux-c.c:18:22: warning: assignment makes pointer from integer without a cast [enabled by default] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* isolinux: fix type declarationsMatt Fleming2013-06-191-2/+2
| | | | | | | | | and fix the following compiler warnings, core/isolinux-c.c:19:22: warning: assignment makes pointer from integer without a cast [enabled by default] core/isolinux-c.c:21:21: warning: assignment makes pointer from integer without a cast [enabled by default] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* isolinux: use parenthesis to clarify operator precedenceMatt Fleming2013-06-191-1/+1
| | | | | | | | | and fix the following compiler warning, core/isolinux-c.c: In function ‘get_derivative_info’: core/isolinux-c.c:17:2: warning: suggest parentheses around ‘-’ inside ‘>>’ [-Wparentheses] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* bios: fix definition of 'bios_free_mem'Matt Fleming2013-06-191-1/+1
| | | | | | | | | and fix the following compiler warning, core/bios.c: In function ‘bios_init’: core/bios.c:515:16: warning: assignment makes integer from pointer without a cast [enabled by default] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ipappend: delete .ipappend_strings()Matt Fleming2013-06-193-35/+0
| | | | | | | It's no longer referenced anywhere as everything has now moved to *sysappend*. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* firmware: correct the get_cursor() argument typesMatt Fleming2013-06-193-3/+3
| | | | | | | | | | | | | We only ever pass uint8_t * to get_cursor(), so update the prototypes and fix the following compiler warnings, In function ‘__ansicon_open’: com32/lib/sys/ansicon_write.c:93:6: warning: passing argument 1 of ‘firmware->o_ops->get_cursor’ from incompatible pointer type [enabled by default] com32/lib/sys/ansicon_write.c:93:6: note: expected ‘int *’ but argument is of type ‘uint8_t *’ com32/lib/sys/ansicon_write.c:93:6: warning: passing argument 2 of ‘firmware->o_ops->get_cursor’ from incompatible pointer type [enabled by default] com32/lib/sys/ansicon_write.c:93:6: note: expected ‘int *’ but argument is of type ‘uint8_t *’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* com32: add prototype for get_derivative_info()Matt Fleming2013-06-191-0/+2
| | | | | | | | | and fix the following compiler warning, In function ‘__syslinux_get_derivative_info’: com32/lib/syslinux/dsinfo.c:37:5: warning: implicit declaration of function ‘get_derivative_info’ [-Wimplicit-function-declaration] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* load_linux: return a non-void value to fix compiler warningMatt Fleming2013-06-191-2/+2
| | | | | | | | | | ->boot_linux() actually returns an error value, so return it to the caller of syslinux_boot_linux() and fix the following compiler warning, com32/lib/syslinux/load_linux.c: In function ‘syslinux_boot_linux’: com32/lib/syslinux/load_linux.c:527:1: warning: control reaches end of non-void function [-Wreturn-type] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* NEWS: Add entry for EFI network supportMatt Fleming2013-06-191-0/+2
| | | | Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* version: We're now in 2013Matt Fleming2013-06-191-1/+1
| | | | Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ansi: partially revert 937f816addb214ca4c8c1ce977e0357eafa8c617Matt Fleming2013-06-191-5/+1
| | | | | | | | | Commit ("ansi: Improve EFI console support") broke writing to the display under BIOS in an attempt to get things working under EFI. Since the 'cols' and 'rows' arguments aren't used by the EFI console code, revert that chunk of the commit to restore the BIOS functionality. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Turn on symbol export whitelistMatt Fleming2013-06-198-12/+13
| | | | | | | Reduce the default visibility of objects in efi/ as was done for BIOS in commit e4b3ce2dd82c ("Symbol export whitelist"). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Mark global BIOS-only symbols as __weakMatt Fleming2013-06-192-8/+10
| | | | | | | | | | | | | | Unfortunately, there are still some references in generic code to symbols that only make sense under BIOS. Use the __weak tag to allow building for EFI without having to declare these symbols. Accessing these __weak symbols under EFI will generate an error at runtime, indicating to the user that they're executing a BIOS code path. The long-term solution is to move these BIOS-specific symbols into core/bios.c or somewhere equally BIOS-centric so that these symbols are no longer global. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* mk: reinstate -mregparm for BIOSMatt Fleming2013-06-194-0/+17
| | | | | | | | | | | | | There's still a bunch of assembly code that assumes we're building our C objects with -mregparm=3. For example, the code to transition from 16-bit real-mode mode to 32-bit protected mode assumes this. Violating this assumption leads to various hangs, caused by garbage function arguments. Put back -mregparm into CFLAGS that was removed in commit 8789d2689564 ("mk/embedded.mk: Don't use -mregparm in core"). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Merge tag 'syslinux-5.11-pre2' into firmwareMatt Fleming2013-06-1712-117/+187
|\ | | | | | | | | | | | | | | syslinux-5.11-pre2 Conflicts: core/elflink/load_env32.c version
| * cli: don't disable linewrap when redrawing the cmdlinesyslinux-5.11-pre2Matt Fleming2013-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It messes things up when we want to use printf(), for example when printing labels after the user has hit the TAB key. This fixes a bug where labels would be printed on a single line on the screen (with some being displayed off screen) when they should have been printed across multiple lines. I can't think of a reason to disable linerap when redrawing the command line - so let's not. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * ldlinux: fix loading of kbdmap filesMatt Fleming2013-06-131-9/+2
| | | | | | | | | | | | | | | | Use the canonical code sequence for opening the kbdmap file instead of referencing KernelName, which presumably is a remanent of the old assembly code. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * PATH: use a linked list internallysyslinux-5.11-pre1Matt Fleming2013-06-136-67/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In retrospect, choosing the colon character as the entry separator for the PATH directive was not a smart move, as that character is also used in TFTP-style paths. This conflict manifests as PXELINUX being unable to find and load files. An example dnsmasq log looks like, dnsmasq-tftp: sent /arch/boot/syslinux/lpxelinux.0 to 192.168.0.90 dnsmasq-tftp: file /arch/ldlinux.c32 not found dnsmasq-tftp: file /arch//ldlinux.c32 not found dnsmasq-tftp: file /arch//boot/isolinux/ldlinux.c32 not found dnsmasq-tftp: file /arch//isolinux/ldlinux.c32 not found dnsmasq-tftp: file /arch//boot/syslinuxldlinux.c32 not found dnsmasq-tftp: sent /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90 dnsmasq-tftp: error 0 No error, file close received from 192.168.0.90 dnsmasq-tftp: failed sending /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90 dnsmasq-tftp: sent /arch/boot/syslinux/archiso.cfg to 192.168.0.90 dnsmasq-tftp: sent /arch/boot/syslinux/whichsys.c32 to 192.168.0.90 dnsmasq-tftp: file /arch/libcom32.c32 not found dnsmasq-tftp: file /arch//libcom32.c32 not found dnsmasq-tftp: file /arch/libcom32.c32 not found dnsmasq-tftp: file /arch//arch//boot/syslinux/libcom32.c32 not found The last line of the log is the indication that there's a problem. Internally, Syslinux adds the location of ldlinux.c32 to PATH by querying the current working directory once ldlinux.c32 is successfully loaded. Under PXELINUX that means the initial PATH string will be, "::/arch/boot/syslinux/" The PATH parsing code doesn't know how to correctly parse the "::" string and hence, the file is searched for relative to the 210 dhcp option directory - /arch/. Implement PATH with a linked list which *greatly* simplifies the path code, and means we no longer have to parse strings backwards and forwards. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * version: Welcome to the 5.11 release cycleMatt Fleming2013-06-121-1/+1
| | | | | | | | Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * ldlinux: fix serial port handling regressionMatt Fleming2013-06-121-1/+3
| | | | | | | | | | | | | | | | commit c4fa33189f1d ("serial: Clean up and abstract handling of serial ports") removed an assignment to 'port' in the config parsing code which is used to setup the serial ports. Restore the assignment. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * NEWS: Mention noteworthy changes in 5.10syslinux-5.10Matt Fleming2013-06-041-0/+9
| | | | | | | | Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * NEWS: Clarify network stack filesMatt Fleming2013-06-041-1/+3
| | | | | | | | | | | | | | Point users in the right direction when looking for the new and legacy network stacks. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * font: write to 'fontbuf', not random memoryMatt Fleming2013-06-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | commit be5a345d385d ("font: load data as a single block") cleaned up the loop for reading into the font buffer but made the mistake of dropping the assignment to 'p', which means that the _fread() call is writing through a garbage pointer. Since 'p' was only used to keep track while writing into the font buffer in a loop, we can now delete it and reference 'fontbuf' directly. Also delete the unused variable 'i'. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * serial: Clean up and abstract handling of serial portsH. Peter Anvin2013-05-312-15/+18
| | | | | | | | | | | | | | | | | | | | | | The special handling of serial ports 0-3 meaning "look in a BIOS table" is at least officially BIOS-specific, so create an inline function and move it to bios.h. While we are at it, make the function look slightly less like converted assembly. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * font: load data as a single blockH. Peter Anvin2013-05-311-11/+7
| | | | | | | | | | | | | | The only reason for a loop is to interleave data, which we don't need anymore; instead the data is stored in packed form. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * serial: fix SERIAL directive for ports > 0Matt Fleming2013-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | There is a bug in the SERIAL directive parsing code that means that using a port other than the first (SERIAL 0) results in a non-working serial console. We need to use the serial port number from the config file to offset the BIOS I/O port base address, otherwise we always lookup the I/O port address for the first serial port instead of the one the user specified. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * font: increment pointer to fontbuf by font heightMatt Fleming2013-05-291-1/+1
| | | | | | | | | | | | | | | | Instead of always assuming that the font height is 32 bytes, use hdr.height to increment our fontbuf pointer. hdr.height is the size of the chunks we read from the .psf file. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * linux: Clear up error messageMatt Fleming2013-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing opt.device to perror() in do_open_file() results in confusing error messages, as Jack reports, Last night, I was trying to install syslinux (5.01) to a SD card of mine, writing to a subdirectory to keep the layout neat: syslinux-5.01/linux# ./syslinux -i -d /boot /dev/mmcblk0p1 /dev/mmcblk0p1: No such file or directory The message is coming from do_open_file() in syslinux.c: the call to open() fails because the containing directory isn't present, and then it calls perror(opt.device). We should instead be passing 'name' to perror() so that we know _which_ file doesn't exist. Reported-by: Jack Kelly <jack@jackkelly.name> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * load_linux: update errno before returningMatt Fleming2013-04-251-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | syslinux_boot_linux() only returns control to the caller when something has gone wrong, under normal circumstances a kernel is booted. Update errno accordingly in the error paths, so the user no longer sees inaccurate errno values which result in the following kinds of messages, "Booting kernel failed: Bad file descriptor" Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | txt: always rebuild necessary directoriesMatt Fleming2013-06-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if they're found in VPATH. This change ensures that txt/html is ignored in the source directory and that $(OBJ)/txt/html is always created in the output directory, avoiding the following error, asciidoc: FAILED: syslinux.txt: line 8: unexpected error: asciidoc: ------------------------------------------------------------ Traceback (most recent call last): File "/usr/bin/asciidoc", line 6016, in asciidoc writer.open(outfile, reader.bom) File "/usr/bin/asciidoc", line 4430, in open self.f = open(fname,'wb+') IOError: [Errno 2] No such file or directory: '/syslinux.git/efi64/txt/html/syslinux.html' Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi: install ldlinux.{e32,e64}Matt Fleming2013-06-112-6/+6
| | | | | | | | | | | | | | We need to install the corresonding ldlinux.* file for each of the firmware. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi: shrink the size of syslinux.efiMatt Fleming2013-05-213-15/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syslinux.efi currently includes the .bss section of the ELF shared object, syslinux.so, as zero'd space in the file. This dramatically increases the size of syslinux.efi. Use the 'initialized_data_sz' field in the MSDOS/COFF header to differentiate the on-disk and in-memory file size, and to make the firmware loader zero the .bss for us. efi/wrapper now only copies upto the offset of the .bss section from syslinux.so when building syslinux.efi. With this change syslinux.efi shrinks from 2.4M to 168K. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi: strip debug info from syslinux.soMatt Fleming2013-05-201-1/+1
| | | | | | | | | | | | | | | | | | There's no need to include debug information in the shared library, and subsequently syslinux.efi. Certainly not in releases. This commit reduces syslinux.efi from 3.0M to 2.4M. Signed-off-by: Matt Fleming <matt.fleming@intel.com>