summaryrefslogtreecommitdiff
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* core/legacynet/dnsresolv.c: weaken pxe_dns()Gene Cumm2016-11-271-1/+1
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* unload_pxe(): fix string in dprintf()H. Peter Anvin2016-06-161-1/+1
| | | | | | Fix a dprintf() message so it matches reality. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* spelling: Auxillary to AuxiliaryGene Cumm2016-06-082-3/+3
| | | | | Reported-by: Ady <ady-sf@hotmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* removing double l from auxilliaryGeert Stappers2016-06-071-1/+1
| | | | | | | This patch changes only strings, no program code. Reported-by: Ady <ady-sf@hotmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* pxe.c: fix stray line-end garbageH. Peter Anvin2016-04-061-1/+1
| | | | | | The previous commit had some unfortunate line-end garbage; remove. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* libupload: use url_set_ip()H. Peter Anvin2016-04-062-4/+17
| | | | | | | | We already have a core function for setting the IP address of an URL object based on network lookup or the server default. Export and use it instead of open-coding the equivalent logic in upload_tftp.c. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* pxe_dns: remove obsolete pxe_dns.c wrapperH. Peter Anvin2016-04-063-13/+3
| | | | | | | | | We used to need a wrapper around the core function dns_resolv() to implement pxe_dns(), because the former function required its argument to live in low memory. This is no longer the case and hasn't been for a while, so remove this unnecessary level of indirection. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* libupload: don't error out because the tftp functions are unavailableH. Peter Anvin2016-04-061-1/+3
| | | | | | | | Provide weak stubs for the case where the tftp functions aren't available. This prevents link failures for the case of running on top of non-network cores. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* head.inc: error out on NASM 2.11.06H. Peter Anvin2016-03-081-0/+2
| | | | | | | | | NASM 2.11.06 is known to miscompile Syslinux, so error out on that NASM version. Kind of embarrassing for me... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Makefile: error out if the core has undefined symbolssyslinux-6.04-pre1H. Peter Anvin2016-03-011-0/+2
| | | | | | | | --unresolved-symbols=report-all apparently doesn't report the case where a symbol is requested but never referenced. Error out if necessary. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/extern.inc: http_bake_cookies is not called from assemblyH. Peter Anvin2016-03-011-1/+1
| | | | | | | http_bake_cookies() is never called from assembly code, remove the declaration. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: remove unused stub pm_local_boot()H. Peter Anvin2016-03-012-8/+0
| | | | | | pm_local_boot is never used, remove it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* syslinux.ld: align the initial heap to 4K rather than 64KH. Peter Anvin2016-03-011-2/+2
| | | | | | | There is absolutely no reason to align to 64K. Correct the note about this being the heap; COM32R modules were Syslinux 4.x specific. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/i386/syslinux.ld: Remove HIDDEN referenceGene Cumm2016-02-221-131/+131
| | | | | | | HIDDEN was added to ld in binutils version 2.23 published in August 2012. This helps preserve backwards compatibility for now. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* getfssec: update comment explaining next_extent() semanticsH. Peter Anvin2016-02-171-3/+8
| | | | | | | Update comments which explains next_extent() semantics to be slightly clearer, and also correct the statement that next_extent can be NULL. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core/layout.inc: we don't need the _lma symbols except in one caseH. Peter Anvin2016-02-111-1/+3
| | | | | | | | | We don't need any of the _lma symbols, except for the one associated with .pm_code. Don't export them unconditionally in SECINFO, because that makes the linker request them as unknown symbols in the dynamic section. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: Clean up the i386-bios buildH. Peter Anvin2016-02-093-172/+143
| | | | | | | | Remove symbols and data structures not used in the i386-bios build, and clean up the linker script so that most internal symbols are HIDDEN. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Makefile: make the handling of firmware selection a little sanerH. Peter Anvin2016-02-091-28/+25
| | | | | | Clean up the handling of firmware selection inside the Makefiles. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Delete unused filesH. Peter Anvin2016-02-092-803/+0
| | | | | | Remove several files which aren't used at all during the build. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge ↵Gene Cumm2016-01-191-1/+57
|\ | | | | | | | | | | | | 'git://github.com/Celelibi/syslinux.git/fix/bios/tail-call-stack-overflows' FIXME: this circumvents some of the issue but is not the cleanest and may reoccur.
| * core: Fix stack overflow when reloading configSylvain Gault2015-10-131-1/+57
| | | | | | | | | | | | | | | | | | | | | | The behavior when running a "CONFIG" command line is to reload ldlinux.c32 with the new file as argument. This call never return. In order to avoid stacking up the calls to start_ldlinux, this patch introduce a setjmp/longjmp to return to the first call to start_ldlinux, thus freeing all the stack space. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
* | core/xfs: Silence compiler warningGene Cumm2016-01-191-2/+2
| | | | | | | | | | | | | | "may be used uninitialized in this function [-Wuninitialized]" even though logic dictates it must be OK. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | Merge 'git://zytor.com/users/pcacjr/syslinux.git/xfs-v3-support' into masterGene Cumm2016-01-196-230/+399
|\ \
| * | xfs: Add support for v3 directoriesPaulo Alcantara2015-12-146-230/+399
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides supporting newer version of xfs file system, this patch also does some code refactoring and fix completely broken listing and searching on v2-3 node directories. Cc: Gene Cumm <gene.cumm@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Raphael S. Carvalho <raphael.scarv@gmail.com> Cc: Ady <ady-sf@hotmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* | | btrfs: Fix logical to physical block address mappingPaulo Alcantara2015-12-272-16/+35
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current btrfs support did not handled multiple stripes stored in chunk items, hence skipping the physical addresses that were needed to do the mapping. Besides, the chunk tree may contain DEV_ITEM keys which store information on all of the underlying block devices, so we must skip them instead of finishing lookup. The bug was reproduced with btrfs-progs v4.2.2. Cc: Gene Cumm <gene.cumm@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> --- v1 -> v2: * Do not set ignore_key multiple times. Set it before parsing chunk tree. v2 -> v3: * Replace an unnecessary goto with a continue statement.
* | xfs: rename xfs_is_valid_magicnum to xfs_is_valid_sbPaulo Alcantara2015-11-082-17/+15
| | | | | | | | | | | | | | | | xfs_is_valid_magicnum is not actually a generic function that checks for magic numbers, instead it checks only for superblock's one. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Gene Cumm <gene.cumm@gmail.com>
* | bios: Don't try to guess the sections alignmentSylvain Gault2015-11-082-102/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For the compression / decompression to succeed, the sections layout must be the same between the virtual memory and load memory. The section alignment was kept in sync by introducing aligment that should be greater or equal to the actual section alignment. This patch compute the load memory addresses of the sections so that the layout is the same as the virtual memory addresses. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Tested-by: poma <pomidorabelisima@gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* | bios: Fix alignment change with gcc 5Sylvain Gault2015-11-082-6/+6
|/ | | | | | | | | The section aligment specified in the ld scripts have to be greater or equal to those in the .o files generated by gcc. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Tested-by: poma <pomidorabelisima@gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* 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>
* 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>
* 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.
* libupload: Reworking tftp support to use core functionsErwan Velu2015-09-043-1/+182
| | | | | | | | | | | | | | | 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.
* debug: Adding -DDEBUG_THREADErwan Velu2015-09-041-0/+4
| | | | | | | | | 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.
* 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.
* 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>
* 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-203-6/+8
| | | | | | | 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>
* 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>
* fix a few typosJonathan Boeing2015-05-032-2/+2
| | | | Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* core/diskboot.inc: spellingGene Cumm2015-02-161-1/+1
| | | | | | Remove 1 spelling error Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* SYSAPPEND: Fix space strippingDany St-Amant2015-01-051-1/+1
| | | | | | | | The description of SYSAPPEND for the DMI information states that the spaces are replaced by underscores, but this replacement does not occur in 6.03. Signed-off-by: Dany St-Amant <dany.ephemeral.2014@icloud.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* build: sort sources to build in a more deterministic wayPhilippe Coval2015-01-051-5/+5
| | | | | | | | | | | | | | | | | It has been observed that binaries contents are depending on the order of linked objects. This order is caused by GNU make's wildcard function and the position of sources on filesystem. This change tries to prevent this kind of randomness. Also consider building using -j1 flag to make it even more reproductible. Change-Id: Ie8eee7f336e6f1fa2863c4150d967afd15519f1d Bug: http://bugzilla.syslinux.org/show_bug.cgi?id=57#related Signed-off-by: Philippe Coval <philippe.coval at open.eurogiciel.org>
* btrfs: Suffix 64b macroMartinS2015-01-051-1/+1
| | | | | | | | gcc complains about the size of the constant of BTRFS_MAGIC_N. It is a 64bit value, so it needs the ULL suffix. Signed-off-by: MartinS <ams@luminous.ludd.ltu.se> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* PXE ISR: Force polling on select hardware #3 WORKAROUNDGene Cumm2014-08-021-0/+1
| | | | | | | | Like 2fe3a7bd, certain Dell machines (Latitude E6510) state interrupts should work but effectively don't. Force polling. Reported-by: Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core, pxe: Don't push on one stack and pop from the other in pxenvsyslinux-6.03-pre19H. Peter Anvin2014-07-291-0/+4
| | | | | | | | | | | | | | When saving/restoring the flags around the stack switch test, we cannot leave live data on the stack *across* the stack switch that we are going to use on the other side (unlike the "big" stack frame which we only use once we are back on the original stack.) Use register BP, which is not live at either point, as a temporary holding place for the flags from the stack. Reported-by: Frank Mehnert <frank.mehnert@googlemail.com> Link: http://bugzilla.syslinux.org/show_bug.cgi?id=54 Signed-off-by: H. Peter Anvin <hpa@zytor.com>