summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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>
* ldlinux.c32: SERIAL directive: Allow octal/hex on port/flow controlAndrew J. Schorr2015-05-241-2/+2
| | | | | | | | | For the SERIAL directive, allow octal (0###) and hexidecimal (0x###) notation on the port and flow control arguments. Two of the old ASM getint/parseint callers Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* com32/Makefile: resequence/regroupGene Cumm2015-05-171-10/+8
| | | | | | | | A lot more items have identical dependencies; regroup. Certain items make more sense to build first; resequence. Group library dependencies before COM32 directories Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* com32/Makefile: additional dependenciesJonathan Boeing2015-05-171-2/+2
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* hdt: fix sizeof(char *) misuseJonathan Boeing2015-05-031-3/+2
| | | | | | | | | | | | The code was passing sizeof(const char *) - not the length of the string or the size of the buffer - as the length to strncmp(). These two cases don't need the length, so switch to strcmp. Fixes the warning: argument to 'sizeof' in 'strncmp' call is the same expression as the second source; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* hdt: fix sizeof(char *) misuseJonathan Boeing2015-05-031-89/+89
| | | | | | | | | | | | The code was passing sizeof(char *) - not the length of the buffer - to memset. Change the function to take the length of the buffer as a parameter. Fixes the warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* hdt: fix sizeof(char *) misuseJonathan Boeing2015-05-031-89/+89
| | | | | | | | | | | | The code was passing sizeof(char *) - not the length of the buffer - to memset. Change the function to take the length of the buffer as a parameter. Fixes the warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* gpllib: fix sizeof(char *) misuseJonathan Boeing2015-05-031-10/+14
| | | | | | | | | | | | The code was passing sizeof(char *) - not the length of the buffer - to strlcpy and snprintf. Change the function to take the length of the buffer as a parameter. Fixes the warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* pxe: fix truncation warningJonathan Boeing2015-05-031-1/+1
| | | | | | | | When building efi64, there's a size mismatch between the uint32_t variable (32 bits) and the -1UL (64 bits). This fixes the warning: large integer implicitly truncated to unsigned type Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* Use z width specifier when printing size_t variableJonathan Boeing2015-05-031-1/+1
| | | | | | | Fixes the warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'size_t' Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* add missing '\n' to dprintfJonathan Boeing2015-05-031-2/+2
| | | | Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* fix a few typosJonathan Boeing2015-05-033-3/+3
| | | | Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* com32/lib/syslinux/load_linux.c: update prot_mode_baseScot Doyle2015-04-181-0/+1
| | | | | | | | | | | | | | | | | If the kernel is relocatable and the protected mode code will not fit in the initially determined location, that code will be moved to the next available location. However, beginning with commit 8f470e7b, the code is moved to the initially determined location instead of the next available location because prot_mode_base is no longer updated to the correct location. Since whdr->code32_start is updated, it is pointing to the wrong execution start location, random code is executed and the machine is rebooted. Restore the old behavior by assigning prot_mode_base the value of base. Tested on a machine that exposed this behavior. Signed-off-by: Scot Doyle <lkml14@scotdoyle.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* chain: year update in commments (trivial)Gene Cumm2015-03-1511-11/+11
| | | | | Signed-off-by: Michal Soltys <soltys@ziu.info> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* chain/partiter: add options to ignore GPT crc checksMichal Soltys2015-03-154-23/+57
| | | | | | | | This can be useful to force boot even if checksums of GPT header and/or partition list are invalid. This works independently from 'strict' option. Signed-off-by: Michal Soltys <soltys@ziu.info>