aboutsummaryrefslogtreecommitdiffstats
path: root/com32
Commit message (Collapse)AuthorAgeFilesLines
* pxe: Fix recognition of keeppxe optionAdam Goldman2017-03-052-9/+11
| | | | | | | | | | | | | | | The preprocessor directive IS_PXELINUX is no longer valid. Submitted-by: Adam Goldman <adamg@pobox.com> Move "keeppxe" processing from com32/elflink/ldlinux/kernel.c:new_linux_kernel() to com32/lib/syslinux/load_linux.c:bios_boot_linux() using strstr() (not find_argument in original patch). Should also be processed by firmware->boot_linux() if not yet done. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* chain.c32: update reactos= option for modern valueAdy2017-03-041-9/+3
| | | | | | | | | | | | | | | | | | | | Changed from "seg=0:0x8000:0x8100" to "seg=0x0F80" Reactos is "alpha", so the only version of Reactos that its devs support is the "latest" at each time. Older versions of Reactos are not relevant / supported by Reactos' devs. Submitted-By: Ady <ady-sf@hotmail.com> Old 2011-06-14 https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h;hb=28e58e6d01892c1f2f0e1d323745e6463cb9e6c9 https://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h?revision=52226&view=markup New 2011-06-18 https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h;hb=0eb6daaf66127de803d36d45a4eea29d30a7ca36 https://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h?revision=52346&view=markup Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* pxe_api.h: finish revert of 9acbffdGene Cumm2016-11-271-3/+3
| | | | | | | | 9acbffd33b9200ffe37833463b4d4478e824295a caused more issues than it solves. There appears to be a bigger underlying issue that the __weak argument masks. Until the underlying issue is solved, we need __weak. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* partial revert 9acbffdGene Cumm2016-11-271-2/+2
| | | | | | | | | Weaken 2 declarations. Seems to be the minimal amount for now. First exhibited issues with EFI but later also with BIOS beyond *pxelinux.0 when compiled with gcc-5.3.1 and gcc-6. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* menu: Apply VSHIFT to scrollbarBruno Levert2016-06-141-1/+2
| | | | | | | When VSHIFT is used, the scrollbar's position is relative to the old position. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* spelling: Auxillary to AuxiliaryGene Cumm2016-06-081-1/+1
| | | | | Reported-by: Ady <ady-sf@hotmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* removing double l from auxilliaryGeert Stappers2016-06-075-6/+6
| | | | | | | This patch changes only strings, no program code. Reported-by: Ady <ady-sf@hotmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* libupload: Use new TFTP OK status definitionGene Cumm2016-04-232-3/+3
| | | | | | | FTBFS: com32/hdt/hdt-dump.c:227:39: error: ‘TFTP_OK’ undeclared (first use in this function) Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* libupload: use url_set_ip()H. Peter Anvin2016-04-061-32/+18
| | | | | | | | 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-066-77/+4
| | | | | | | | | 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-062-16/+74
| | | | | | | | 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>
* pxe_api.h: remove __weak from prototypesH. Peter Anvin2016-04-061-5/+5
| | | | | | | The prototypes themselves are not weak, and declaring them as such forces the core definitions, which should not be weak, as weak. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Makefile: make the handling of firmware selection a little sanerH. Peter Anvin2016-02-093-3/+3
| | | | | | 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-813/+2
| | | | | | 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-192-9/+23
|\ | | | | | | | | | | | | '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.
| * ldlinux: fix stack overflow when running COM32 modulesSylvain Gault2015-10-132-9/+23
| | | | | | | | | | | | | | | | | | | | | | When a COM32 module exits, the functions never return and a new call to ldlinux_enter_command is made. This could fill the stack and overflow on some data present in memory. This patch use setjmp/longjmp to return to the main function and restart from there when a COM32 module exits. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
* | com32: Adding 'exit' entry in chain.c32Erwan Velu2015-12-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is coming after some bad experience with gfxboot. GFXboot was padding unexpected options on the chain.c32 commande line. As a result, chain was confused and didn't provided the expected behavior. This patch is a workaround to enforce chain.c32 not considering anything on the command line after this keyword. Example: chain.c32 hd0 exit ...garbage...
* | com32: Handle broken modules.aliasErwan Velu2015-12-061-0/+8
| | | | | | | | | | | | | | | | When parsing the modules.alias, we shall report it as broken if we cannot find any valid line in it. This patch simply count the number of valid lines and report a missing modules.alias if no valid lines are found.
* | Makefile: Pass down the variable EFI_BUILDSylvain Gault2015-11-271-1/+1
| | | | | | | | | | | | | | | | This variable indicates whether or nor the files are compiled for EFI. The lack of it lead the Makefiles to forget to add some compilation options specific to EFI. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
* | ldlinux: Fix return pointer to local dataSylvain Gault2015-10-181-1/+1
|/ | | | | | | | | | | | | The command-line parsing used to return a pointer to a local array. The code used to work by chance, but now, gcc 5 is able to detect it and return a NULL pointer instead. The buffer is now marked static. This shouldn't be a problem as only one command line can be read at a time. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Tested-by: poma <pomidorabelisima at gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* mboot.c32: add ELF64 support for Multiboot1Alex2015-10-102-0/+124
| | | | | | | | | mboot.c32 lacks support for loading ELF64 binaries (supported by GRUB2, for example). This is a trivial patch to add such feature. [reflow some changes to fit ~80 columns; remove trailing whitespace - gene.cumm@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>
* 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>
* 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>
* libupload: Reworking tftp support to use core functionsErwan Velu2015-09-041-147/+32
| | | | | | | | | | | | | | | 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.
* 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.
* 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.
* 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>
* 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>
* 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>
* 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-031-1/+1
| | | | 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-153-22/+45
| | | | | | | | 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>
* chain/partiter: call notsane_gpt_hdr() per headerMichal Soltys2015-03-151-48/+48
| | | | | | | | | | | | Instead of calling it just once after the examination of both headers (the 2nd one only if necessary) - call it per each header during examination. Thus in unlikely situation of passing crc check on primary gpt header and at the same time failing sanity checks, it will also try backup header. Signed-off-by: Michal Soltys <soltys@ziu.info>
* load_linux: correct a typeScot Doyle2015-02-141-2/+2
| | | | | | | | Correct base's type to match its initialization from prot_mode_base and passage to syslinux_memmap_find(). Tested with extlinux. Signed-off-by: Scot Doyle <lkml14@scotdoyle.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* Merge remote-tracking branch 'u-gh-wferi/pub'Gene Cumm2015-02-145-341/+329
|\ | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * lua: simplify the function/value handling in the automenu testFerenc Wágner2014-10-131-10/+7
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>