aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* core/http: Append port number to Host field if neededGene Cumm2015-10-101-2/+15
| | | | | | | | HTTP/1.1 header Host must contain the port number if not default for the protocol. Host isn't a part of HTTP/1.0 but let's implement it right. Reported-By: Michael DeCandia <michael.decandia@gmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/pxe: Allow DHCP option 54 Server IdentifierGene Cumm2015-10-081-2/+6
| | | | | | | | | | | Apparently some servers don't bother setting siaddr when pointing to itself for TFTP. Re-allow 54 but always set IPInfo.serverip from siaddr/dhcp->sip in packet #3 (PXEReply/proxyDHCP). Always set from siaddr if good in case parsing after-DHCP options. Reported-by: Celelibi <celelibi@gmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* chrreplace: Don't skip the first characterJosh Triplett2015-09-281-1/+1
| | | | | | | Check if the first character matches the character to replace, rather than skipping it and starting with the second. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
* extlinux: fix memory leakImran Zaman2015-09-271-14/+30
| | | | | | | | devname is put on heap for all cases to avoid memory leak, and ease of use in future as well Signed-off-by: Imran Zaman <imran.zaman@intel.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
* Add gpxe/ to clean-up targetsGene Cumm2015-09-272-4/+12
| | | | | | | | gpxe/ has a lot of binary blobs after a spotless. Start the cleanup measures. do-spotless-gpxe for bios target might be better in another spot. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core: readd gPXE/iPXE support for HTTP on pxelinux.0Gene Cumm2015-09-273-81/+108
| | | | | | | | | | | When adding lwIP functionality, the gPXE/iPXE callback was broken. This prevented pxelinux.0 from calling gPXE/iPXE for HTTP and FTP URLs. Re-add for pxelinux.0 and add code to find file size. Move to core/legacynet/core.c to access packet_buf and leave a dummy function for lpxelinux.0. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/fs/lib/loadconfig.c: Add architecture-specific config name to searchAdy2015-09-201-0/+5
| | | | | | | | When multiple architectures are on a single media, all will try to use the same config, preventing PATH from pointing to an architecture-specific directory. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* com32/modules: Split build by architecture. Add dir.c32Gene Cumm2015-09-201-7/+16
| | | | | | | | | Certain modules directly make BIOS calls or call library functions that will not be ported from BIOS (like syslinux_shuffle_boot_rm()). It appears dir.c32 was long-forgotten for the Makefile Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Don't unnecessarily rebuild syslinux.soSylvain Gault2015-09-161-4/+3
| | | | | | | | | | | OBJ directory creation changed from a .PHONY target to a real target used through an order-only dependency. A target depending on another target marked .PHONY is always rebuilt, thus forcing all the .o files to be rebuilt everytime. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
* zlib: use (void(0)) instead of empty #definesPatrick Masotta2015-09-131-6/+6
| | | | | | Originally-By: Patrick Masotta <masottaus@yahoo.com> [Use (void(0)) instead of a dummy function - gene.cumm@gmail.com] Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/x86_64: fix trivial compilation warningSylvain Gault2015-09-131-1/+1
| | | | | | | Missing */ at the end of a comment. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
* pxe/dhcp_option: Don't parse DHCP option 54 Server IdentifierGene Cumm2015-09-121-1/+0
| | | | | | | Server Identifier is NEVER the next server where Syslinux was loaded from. BOOTP field siaddr, BOOTP field sname and DHCP option 66 TFTP server name may contain this information. For now, just use siaddr.
* efi: Merge cleanupGene Cumm2015-09-102-4/+3
|\ | | | | | | | | | | Merge git://github.com/Celelibi/syslinux.git branch 'fix/efi/cleanup' Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * efi: fix warning about unused variableSylvain Gault2015-08-261-1/+0
| | | | | | | | Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
| * efi: fix pointer-type mismatch assigment warningSylvain Gault2015-08-261-1/+1
| | | | | | | | | | | | | | The assignment looks suspicious but is actually legit since it is protected by the type check. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
| * efi: fix warnings about argument typesSylvain Gault2015-08-261-2/+2
| | | | | | | | | | | | | | The function efi_get_MAC was given a pointer to array instead of a simple pointer, generating a warning with gcc. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
* | libinstaller: Explicit failure if path isn't writableErwan Velu2015-09-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per bug #4, we should report a clear failure if the target path is not writable. The current code was catching the fact the file was not writable but it didn't wrote an explicit message and even more confusing, was trying to process the file descriptor leading to a creepy "Bad file descriptor" error message. This patch does return EACCES to avoid process the file description. It also print an explicit message saying a particular file isn't writable which generates a fatal error. A typical output looks like : [root@host]: extlinux --once=plop /boot /boot is device /dev/sda Cannot open file '/boot/ldlinux.sys' in read/write mode ! Fatal error, exiting.
* | doc/menu.txt: further correctionsGene Cumm2015-09-061-6/+7
| | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | doc/menu.txt: correction, rewording and type corrections.Ady2015-09-061-89/+99
| | | | | | | | | | | | | | | | | | | | Correct the order of the parameters for MENU RESOLUTION. Update references. Rewording. Typos. [certain phrases seem clearer in original wording - gene.cumm@gmail.com] Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | efi/x86_64: leave long mode properlyThomas Letan2015-09-061-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Syslinux 6.03 (efi64) fails to boot a 32-bit kernel. The way Syslinux leaves long mode in kernel_jump assembly routine does not follow AMD64 specifications. More precisely: 1. After setting a new GADT, `cs` has to be refresh by doing a long jump, but it is not 2. Other segments have to be updated, but they are not 3. Disabling paging has to be done before disabling long mode, but the implementation does the opposite In most cases, a computer that tries to execute the kernel_jump routine reboot (it can also hangs). This patch fixes the kernel_jump routine. Signed-off-by: Thomas Letan <thomas.letan@ssi.gouv.fr> Tested-by: Patrick Masotta <masottaus@yahoo.com> Tested-by: Celelibi <celelibi@gmail.com>
* | libupload: Reworking tftp support to use core functionsErwan Velu2015-09-045-150/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The libupload was using the pxe_call() directly for doing the tftp uploading stuff. This was only working with pxelinux. Since we do have lpxelinux, the libupload should use the core functions to get rid of thoses direct PXE calls. This patch does - add a tftp_put() function which supports core functions. - implement the call from libupload making the code much more simplier As a result {l}pxelinux can upload data to a tftp server is a similar way. HDT is getting the benefit of such code.
* | tftp: Report server IP address on debug messageErwan Velu2015-09-041-1/+10
| | | | | | | | | | When debugging, it is very useful to get the ip adress of the server that reponsded to that packet.
* | hdt: print tftp error number & message if dump failedErwan Velu2015-09-041-1/+2
| | | | | | | | | | | | | | | | | | The current code was making a mistake by searching the -err element in the array as it was resulting into a negative value. The current patch does print the error number which could be useful but also retrieve the proper string to indicate the real error we encountered.
* | hdt: Removing commas and plus signs from filenameErwan Velu2015-09-041-0/+6
| | | | | | | | | | When uploading the dump file to a tftp server, removing the plus & comma sign from the filename could make the file easier to manipulate later.
* | debug: Adding -DDEBUG_THREADErwan Velu2015-09-042-0/+5
| | | | | | | | | | | | | | | | | | When debugging some syslinux code with debugging enabled, the threading code is so verbose that it completly slow down syslinux but also is so verbose that any other trace is invisible in the flood. This commit aims at requesting people to explicitly enable the threading logs by using -DDEBUG_THREAD.
* | gpllib: Updating dmi codeErwan Velu2015-09-046-30/+67
| | | | | | | | | | | | | | | | This is a simple rebase of the current code against current dmidecode version. This is pretty lame copy/paste but as we don't have a libification of dmidecode, that does the job. This patch does improve mostly the cpu & ram reporting.
* | hdt: Avoid false-positive single command detectionErwan Velu2015-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1697594b61f9a8f9d092996afc0e2c80bbb2a20a, some commands are said to be "nomodule" like "say". This patch was adding a check if the nomodule flag was set but didn't checked that the associated structure did exist leading to false positive detection. As a result, the commands were not executed meaning the CLI was unsuable since ... 3 years.... *shame* This commit simply avoid considering the nomodule flag if the structure is not allocated
* | hdt: Fixing argv usage to avoid crashErwan Velu2015-09-041-5/+5
| | | | | | | | | | | | | | argv shall be passed as a pointer to avoid a crash when running command like "dmi". Thanks genec for pointing this out.
* | core: dprintf on malloc/free if -DDEBUG_MALLOCErwan Velu2015-09-022-0/+6
| | | | | | | | | | | | | | | | | | | | | | When dynamic debug is engaged, the output is pretty flooded by malloc/free messages while you are looking at other traces. As devel.mk have a DEBUG_MALLOC option, it seems pretty logical to enable the malloc/free dprintf() only if this option is engaged. That patch make the dynamic debug output less floody while letting the choice to get the malloc/free dprintf() messages.
* | efi: Change status check when draining keyboardOliver Wagner2015-09-021-1/+1
| | | | | | | | | | | | | | PCs without keyboards may hang as they might return a status other than EFI_NOT_READY. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | com32: write_sectors() sizing correctionsRobert2015-08-271-3/+3
|/ | | | | | | | Memory allocation and copy length should be SECTOR * size for sectors operation. Signed-off-by: Robert <luyao-c@360.cn> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/main: set/check for NULL in efi_create_binding()Patrick Masotta2015-08-011-2/+2
| | | | | | | | If LibLocateHandle() returns success and either 0 handles or we find no matching handles, treat it the same. Originally-By: Patrick Masotta <masottaus@yahoo.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Hunt for service binding handle if neededGene Cumm2015-07-191-7/+39
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: add efi_get_MAC()Gene Cumm2015-07-191-0/+36
| | | | | | | | Extracts a MAC address from a device path Originally-By: Patrick Masotta <masottaus@yahoo.com> [gene.cumm@gmail.com: Respace] Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: rename pxe_handle to image_device_handleGene Cumm2015-07-193-9/+9
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* com32 readconfig: use my_isspace()Gene Cumm2015-07-182-2/+2
| | | | | | More consistent. Also ensures it's properly recast. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* com32/include/menu.h: Extend my_isspaceGene Cumm2015-07-181-1/+1
| | | | | | Add 0x7f as a space character Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/serirq: Use memset not memcpyGene Cumm2015-07-181-1/+1
| | | | | | | The intention is to nullify not copy the IRQ pointers Reported-By: Thomas Schmitt <scdbackup@gmx.net> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/udp: Don't use AllowPromiscuousGene Cumm2015-07-181-2/+0
| | | | | | | Unnecessary. On some systems, opens NIC in promiscuous mode or breaks UseDefaultAddress. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Provide feedback on Configure() failuresGene Cumm2015-07-182-6/+10
| | | | | | | There are more unsuccessful returns that are ignored. Restructure to allow for trapping other values. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/main.c: don't close handle earlyPatrick Masotta2015-06-271-3/+0
| | | | | | This clause closes the protocol before creating the child Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/pxe.c: missing returnPatrick Masotta2015-06-261-0/+1
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/pxe: Reuse handleGene Cumm2015-06-253-35/+23
| | | | | | | | | | | | | | | Store and reuse handle found with EFI_LOADED_IMAGE_PROTOCOL for EFI_PXE_BASE_CODE_PROTOCOL and EFI_UDP4_SERVICE_BINDING_PROTOCOL This caused machines with multiple NICs to not reliably attach to the correct NIC handle. gnu-efi LoadedImageProtocol PxeBaseCodeProtocol Udp4ServiceBindingProtocol Reported-By: Holger Baust <holger.baust@freenet.ag> Reported-By: Michael Glasgow <glasgow@beer.net> Reported-By: Da Shi Cao <dscao999@gmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/pxe/dhcp_option: Filter options based on pkt_typeGene Cumm2015-06-251-1/+4
| | | | | | | | Filter (by setting a minimum option number) the options based on pkt_type. DHCPDiscover/PXEReply should only contain info about client ID, boot server and PXELINUX options. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/pxe: Don't prevent serverip overrideGene Cumm2015-06-251-3/+0
| | | | | | | This prevented a proxyDHCP/PXEReply from overriding the IPInfo.serverip, most often stored in BOOTP field siaddr or DHCP option 54. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/pxe: extend parse_dhcp() for packet typeGene Cumm2015-06-204-9/+11
| | | | | | | Add packet type so we can eventually only grab certain data elements from the DHCP packets appropriately Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/fs/pxe/dhcp_option: comment spellingGene Cumm2015-06-091-1/+1
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/pxe: save MAC after parsing last packetPatrick Masotta2015-06-091-9/+11
| | | | | | | | | parse_dhcp() does this also, seeming to set a bad value for some clients. Fixes some deaf clients. Signed-off-by: Patrick Masotta <masottaus@yahoo.com> [gene.cumm@gmail.com: Just move existing code] Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/pxe: Use the appropriate 3rd packetPatrick Masotta2015-05-261-1/+9
| | | | | | | | | | EFI allows us to have access to more DHCP-related packets. Choose the packet with the highest priority for the third to parse. Signed-off-by: Patrick Masotta <masottaus@yahoo.com> [gene.cumm@gmail.com: Only change the third parsing iteration; reflow to better fit code standards; don't reparse DhcpAck] Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/pxe: Amend comments to clarify BIOS.Gene Cumm2015-05-251-3/+3
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>