summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* read: handle the case of partial data from unreaddynamicH. Peter Anvin2009-08-102-6/+10
| | | | | | | | Correctly handle the case of partial data from the unread buffer, and partial data via the device read mechanism. We need to advance the buffer pointer. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lib: add unread() syscall; use it to implement ungetc()H. Peter Anvin2009-08-099-7/+114
| | | | | | | | | | Add an unread() syscall, which allows some read bytes to be pushed back into the read buffer. This allows us to read a header from a file and then push it back. This also makes ungetc() implementable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'core32' into dynamicH. Peter Anvin2009-08-091-1/+1
|\ | | | | | | | | | | | | Resolved Conflicts: core/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * core: remove hack for dynamic symbol table generationcore32H. Peter Anvin2009-08-092-15/+3
| | | | | | | | | | | | | | | | Kill hack we used to generate a dynamic symbol table. There is a much better technique for doing this which is already deployed on the "dynamic" branch. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'core32' into dynamicH. Peter Anvin2009-08-089-80/+331
|\ \ | |/
| * Merge branch 'master' into core32H. Peter Anvin2009-08-089-80/+331
| |\
| | * NEWS: document isohybrid -id fixed.H. Peter Anvin2009-08-031-0/+1
| | |
| | * isohybrid: convert -id to a binary stringSteffen Winterfeldt2009-08-031-1/+1
| | | | | | | | | | | | | | | Shouldn't 'isohybrid -id ID' write ID as 32bit number? Currently it ends up as string messing up the mbr.
| | * memdisk: remove unnecessary %ifdefsyslinux-3.83-pre6H. Peter Anvin2009-08-021-4/+0
| | | | | | | | | | | | Remove an %ifdef that the macros take care of anyway.
| | * memdisk: don't set CX:DX for INT 13h AH=15h for floppiesH. Peter Anvin2009-08-022-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Win98SE DOS apparently hangs if INT 13h, AH=15h returns the capacity in CX:DX for floppies... *unless* EDD is enabled. Confused yet? This patch also adds some more tracing framework. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * MEMDISK: additional EDD DPT FieldsMiller, Shao2009-08-021-2/+2
| | | | | | | | | | | | | | | | | | We incorrectly used "equ" instead of "dd" (or "db") for strings in memdisk.inc. Oops! My mistake in my 'freedos' branch. Silly mistake. - Shao
| | * memdisk: correct the types for the EDD DPT, and write a real onesyslinux-3.83-pre5H. Peter Anvin2009-07-312-27/+41
| | | | | | | | | | | | | | | | | | | | | Fix the sizes of some of the fields in the EDD DPT. Write a real one to the best of our ability. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * memdisk: don't write the EDD DPT unless we are in EDD mode...H. Peter Anvin2009-07-311-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't write the EDD DPT unless we're actually in EDD mode! Otherwise we end up corrupting memory beyond the defined code. This was the reason 5ca2764460883f5e9a5bd83db00f242ea1272e33 worked, by moving variables out of the corruption zone. Debugged-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * Merge commit 'andytim/freedos'H. Peter Anvin2009-07-302-0/+20
| | |\
| | | * [memdisk] Additional EDD Device Parameter Table fieldsShao Miller2009-07-312-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Some additional fields from the EDD-4 spec. draft for the Device Parameter Table have been added into the structure in setup.c and memdisk.inc. These were added in the hopes of resolving a FreeDOS MEMDISK bug on IBM ThinkPads.
| | * | graphics: actually do 32-bit writes to VGAH. Peter Anvin2009-07-301-2/+2
| | |/ | | | | | | | | | | | | | | | Use "rep movsd" to copy data to VGA memory, not "rep movsb". Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * graphics: trivial optimization of old-style graphic modesyslinux-3.83-pre4H. Peter Anvin2009-07-301-24/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Trivially optimize the old-style graphics by using another level of temporary buffering in bitplane format, thereby enabling the use of rep movsd to write the contents to the screen. This can speed things up substantially in virtualization environments. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * NEWS: document Thinkpad fixsyslinux-3.83-pre3H. Peter Anvin2009-07-301-0/+2
| | |
| | * memdisk: move temporary variables away from the EDD data blockH. Peter Anvin2009-07-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move a couple of variables away from the EDD data block. Without this change, FreeDOS doesn't boot on Thinkpads. Unfortunately, this should have been a null change, so it is really not clear why this happens. Stack overflows have been ruled out. Probably need to examine the FreeDOS kernel in some detail. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * memdisk: handle recursive INT 13h invocationH. Peter Anvin2009-07-301-12/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some systems, e.g. a lot of Thinkpads, invoke INT 13h recursively from within the stack itself. This is generally a bad idea as it re-runs any INT 13h hooks (including the ones that DOS installs!), but it should work. Keep a counter of recursive invocations and simply bypass the whole system including the DL shift if the invocation is recursive. With this, MS-DOS boots on a Thinkpad T61. FreeDOS is still broken, though, but apparently in a different manner... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * PXELINUX: allow filenames up to 251 characters longsyslinux-3.83-pre2H. Peter Anvin2009-07-283-1/+4
| | | | | | | | | | | | | | | | | | At least one users really need this, so be nice and provide it... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * Merge commit 'syslinux-3.83-pre1'H. Peter Anvin2009-07-272-2/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/modules/chain.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | | * NEWS: document chain.c32 ISOLINUX fix.syslinux-3.83-pre1H. Peter Anvin2009-07-231-0/+1
| | | |
| | | * chain.c32: set DL properly when loaded from ISOLINUXH. Peter Anvin2009-07-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When loaded from ISOLINUX, we still have a valid boot drive. Set it! This permits the use of chainloaded boot loaders. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * | gfxboot: remove obsolete message regarding pxelinux supportSebastian Herbszt2009-07-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | PXELINUX is supported by the gfxboot module. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
| | * | gfxboot: parse TIMEOUT keywordSebastian Herbszt2009-07-181-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | Parse the TIMEOUT keyword from the config file and pass it to gfxboot core. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
| | * | gfxboot: only call gfxboot core if labels are specifiedSebastian Herbszt2009-07-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Only call gfxboot core if labels are specified in the config file. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
| | * | gfxboot: display error message if bootlogo file not foundSebastian Herbszt2009-07-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Display an error message if the user specified bootlogo file is not found. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
| | * | gfxboot: change handling of keywordsSebastian Herbszt2009-07-181-23/+34
| | | | | | | | | | | | | | | | | | | | | | | | Makes handling of keywords more flexible. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
* | | | Add --hash-style=gnu to the relevant LDFLAGSH. Peter Anvin2009-08-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GNU hash style is the only one that matters to us. No need to bloat up the code with additional formats. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | file: clear fp->i.buf when the buffer is freedH. Peter Anvin2009-08-022-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To make debugging easier, when we free fp->i.buf, we also want to clear it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | file: use malloc/free to allocate and free buffersH. Peter Anvin2009-08-025-12/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of statically allocating huge buffers, use malloc/free to dynamically allocate them from the heap as needed. It really doesn't make any sense to create a half-megabyte .bss little of which will actually get used... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | prepcore: print compression statisticsH. Peter Anvin2009-08-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Print some basic compression statistics, so we know what we are dealing with. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | core: cleaner way to remove .rel.dyn; mark bss segments (NOLOAD)H. Peter Anvin2009-07-242-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A cleaner way to remove .rel.dyn without bloating the output: put it at the end, and then remove it in objcopy at the same time we convert to binary. Also, mark bss segments (NOLOAD) explicitly, to guard against linker bugs. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | MCONFIG: add a rule for STRIPH. Peter Anvin2009-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't use strip(1) from binutils at this point, but we might in the future. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | syslinux.ld: fix definition of __dynstr_lenH. Peter Anvin2009-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | __dynstr_len was really computing __dynsym_len, oops... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | Merge branch 'core32' into dynamicH. Peter Anvin2009-07-162-5/+27
|\ \ \ \ | |/ / /
| * | | extlinux: handle more than one sector of sector pointersH. Peter Anvin2009-07-161-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the extlinux installer so we can handle more than one sector of sector pointers. This code should be merged with the equivalent code in the syslinux installer. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | dos: add pointer to PE header in binaryH. Peter Anvin2009-07-101-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly add the pointer to the PE header in the binary. That way we might be eventually able to create a merged DOS/Win32 binary. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | core: add the -E option to the ld command lineH. Peter Anvin2009-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to add the -E (--export-dynamic) options to the ld command line, otherwise we don't necessarily export global symbols to modules. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | core: remove dependency on symbols.SH. Peter Anvin2009-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We don't need symbols.S anymore, remove it as a dependency. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | Add __dynsym_len and __dynstr_lenH. Peter Anvin2009-07-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The root elf_module wants these as lengths, not start and end, so we might just want to indulge it... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | core: generate a .dynamic section with all that jazzH. Peter Anvin2009-07-093-19/+51
|/ / / | | | | | | | | | | | | | | | | | | | | | Generate a .dynamic section plus all the relevant content. The magic trick seems to be to call ld with "-pie -Bsymbolic". The latter is necessary to force ld to resolve all relocations. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | com32: add openmem.o to the MakefileH. Peter Anvin2009-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | We need openmem.o in the Makefile if it's actually supposed to get built... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Add openmem() function to read from memory as if it were a fileH. Peter Anvin2009-07-094-9/+70
| | | | | | | | | | | | | | | | | | | | | | | | Reading from memory as if it were a file is pretty easy... we just treat it as a really big block buffer and tell the file layer that we already closed the underlying handle. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | core: include exported symbol informationH. Peter Anvin2009-07-093-3/+27
| | | | | | | | | | | | | | | | | | | | | Extract symbol table information to be exported to modules. This is a really hacky way of doing it, so replace it later. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | syslinux.ld: add support for .ctors and .dtorsH. Peter Anvin2009-07-081-2/+22
| | | | | | | | | | | | | | | | | | | | | We're going to need at least constructors when we start linking in com32 library code in a serious way. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | core: give 64K to the PM stackH. Peter Anvin2009-07-071-2/+2
| | | | | | | | | | | | | | | | | | Give a full aligned 64K chunk for the PM stack. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge branch 'master' into core32H. Peter Anvin2009-07-050-0/+0
|\ \ \ | |/ /
| * | dosutil/Makefile: more complete structureH. Peter Anvin2009-07-051-8/+20
| | | | | | | | | | | | | | | | | | More complete and consistent structure for dosutil/Makefile. Signed-off-by: H. Peter Anvin <hpa@zytor.com>