platform/upstream/syslinux.git
15 years agocore: more filesystem-specific files into subdirectories
H. Peter Anvin [Thu, 13 Aug 2009 03:23:47 +0000 (20:23 -0700)]
core: more filesystem-specific files into subdirectories

Preemptively move filesystem-specific files into core/fs/<fsname> so
we can start trying to pretend to be organized.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agocore: VFS cleanups: add a persistent generic struct file
H. Peter Anvin [Wed, 12 Aug 2009 00:25:43 +0000 (17:25 -0700)]
core: VFS cleanups: add a persistent generic struct file

Major cleanups to the VFS layer:
- add a persistent generic "struct file"
- pass "struct file *" to getfssec
- add a close_file method
- use VFS-assigned indicies instead of pointers as file handles.
  This allows the file structures to be allocated from high memory.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge commit 'liu/master' into fsc syslinux-4.00-pre2
H. Peter Anvin [Tue, 11 Aug 2009 20:20:04 +0000 (13:20 -0700)]
Merge commit 'liu/master' into fsc

15 years agopxe: more tweaks to the open (searchdir) routine
H. Peter Anvin [Tue, 11 Aug 2009 20:17:27 +0000 (13:17 -0700)]
pxe: more tweaks to the open (searchdir) routine

More tweaks to the open (searchdir) routine, in particular in the OACK
packet parsing.  From testing it appears substantially more robust
now.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agonetinet/in.h: adjust hton/ntoh macros to be true constants
H. Peter Anvin [Tue, 11 Aug 2009 20:16:13 +0000 (13:16 -0700)]
netinet/in.h: adjust hton/ntoh macros to be true constants

Tweak the hton/ntoh macros so that they are true constants if the
input is a constant expression; this makes them usable in the
preprocessor.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agopxe: clean up C code; reimplement "Plan C"; share PXE API definitions
H. Peter Anvin [Tue, 11 Aug 2009 18:49:04 +0000 (11:49 -0700)]
pxe: clean up C code; reimplement "Plan C"; share PXE API definitions

Minor cleanups to the C code.
Reimplement "Plan C" for finding the entry point.
Share the PXE API definitions between com32 and the core.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoCore:SYSLINUX: make searchdir do work
Liu Aleaxander [Tue, 11 Aug 2009 09:18:38 +0000 (17:18 +0800)]
Core:SYSLINUX: make searchdir do work

well, still get lots of bugs, like when we execute
dir /boot/syslinux
in fact, it will list the file in /boot/ directory but not in /boot/syslinux/

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
15 years agoCore:SYSLINUX: fix the vfat_searchdir
Liu Aleaxander [Tue, 11 Aug 2009 06:16:23 +0000 (14:16 +0800)]
Core:SYSLINUX: fix the vfat_searchdir

This makes the searchdir can find a dir; it's also prepared for the readdir function used in rosh

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
15 years agocore: remove assembly definition of Files in iso/pxelinux
H. Peter Anvin [Tue, 11 Aug 2009 00:30:25 +0000 (17:30 -0700)]
core: remove assembly definition of Files in iso/pxelinux

Remove the assembly definition of Files in isolinux and pxelinux.
Still to do: remove dependencies on Files living in .bss16 space.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMCONFIG: update GCCOPT
H. Peter Anvin [Mon, 10 Aug 2009 23:56:06 +0000 (16:56 -0700)]
MCONFIG: update GCCOPT

Add -fwrapv, -freg-struct-return, -fno-exceptions,
-fno-asynchronous-unwind-tables, -fno-strict-aliasing.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agocore: add missing (void), drop casts for Files[], cleanups
H. Peter Anvin [Mon, 10 Aug 2009 23:45:44 +0000 (16:45 -0700)]
core: add missing (void), drop casts for Files[], cleanups

Add missing (void) on no-argument functions, drop casts for Files
(it's now a properly typed array), clean up loop forms.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoext2: fix missing (void), use standard form for loop
H. Peter Anvin [Mon, 10 Aug 2009 23:42:53 +0000 (16:42 -0700)]
ext2: fix missing (void), use standard form for loop

Use the standard form for a for loop; add missing (void).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge commit 'liu/master'; fix Files[] definition
H. Peter Anvin [Mon, 10 Aug 2009 23:39:29 +0000 (16:39 -0700)]
Merge commit 'liu/master'; fix Files[] definition

Resolved Conflicts:
core/extlinux.asm
core/ldlinux.asm

Merge in liu's changes, but fix Files[] to be a private structure
inside the filesystem, thus we don't have to worry about the
size of it in the assembly code at all.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agocore/diskstart.inc: make the root filesystem a configurable
H. Peter Anvin [Mon, 10 Aug 2009 21:27:21 +0000 (14:27 -0700)]
core/diskstart.inc: make the root filesystem a configurable

Instead of using conditional compilation, just set the root filesystem
type in the assembly stub.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agocore: merge ldlinux.asm and extlinux.asm
H. Peter Anvin [Mon, 10 Aug 2009 02:47:24 +0000 (19:47 -0700)]
core: merge ldlinux.asm and extlinux.asm

ldlinux.asm and extlinux.asm are by now extremely similar.  Merge
them.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge branch 'core32' into fsc
H. Peter Anvin [Sun, 9 Aug 2009 21:44:34 +0000 (14:44 -0700)]
Merge branch 'core32' into fsc

15 years agocore: remove hack for dynamic symbol table generation
H. Peter Anvin [Sun, 9 Aug 2009 21:42:50 +0000 (14:42 -0700)]
core: remove hack for dynamic symbol table generation

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>
15 years agoCore:pxelinux: improves the tftp options parsing
Liu Aleaxander [Sun, 9 Aug 2009 07:00:48 +0000 (15:00 +0800)]
Core:pxelinux: improves the tftp options parsing

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
15 years agopxe: fix OACK packet handling
Liu Aleaxander [Sun, 9 Aug 2009 06:54:08 +0000 (14:54 +0800)]
pxe: fix OACK packet handling

The current code only works iff the tsize option is set.
This patch fixes the handling of the OACK packet and makes the code
work with all combinations of the tsize and blksize options.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
15 years agoMerge branch 'master' into core32
H. Peter Anvin [Sun, 9 Aug 2009 01:48:35 +0000 (18:48 -0700)]
Merge branch 'master' into core32

15 years agoCore: code-clean
Liu Aleaxander [Sat, 8 Aug 2009 09:49:48 +0000 (17:49 +0800)]
Core: code-clean

removes the unused variables and functions

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
15 years agoCore: unmangle_name converted
Liu Aleaxander [Sat, 8 Aug 2009 09:39:43 +0000 (17:39 +0800)]
Core: unmangle_name converted

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
15 years agoCore:EXTLINUX: fix the bug of open_file_t struct in extlinux
Liu Aleaxander [Sat, 8 Aug 2009 09:03:56 +0000 (17:03 +0800)]
Core:EXTLINUX: fix the bug of open_file_t struct in extlinux

The size of open_file_t structure in extlinux is twice than in the others derivatiives. So we
should cut the MAX_OPEN to half.

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
15 years agoCore: move the comman externs to core.h
Liu Aleaxander [Sat, 8 Aug 2009 08:53:24 +0000 (16:53 +0800)]
Core: move the comman externs to core.h

the trackbuf and Files are all uesed in all the four fs, so it would be nice to put the externs
in core.h instead in each c file of the four fs

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
15 years agoCore: add _static_ statement to all fs
Liu Aleaxander [Sat, 8 Aug 2009 08:36:26 +0000 (16:36 +0800)]
Core: add _static_ statement to all fs

This well let me far away from some werid trouble

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
15 years agocore:PXELINUX: fix the OACK option parsing bug.
Liu Aleaxander [Sat, 8 Aug 2009 08:05:08 +0000 (16:05 +0800)]
core:PXELINUX: fix the OACK option parsing bug.

the current code can just handle one option beacuse I put the do-while loop in the wrong position.

15 years agoCore: get the rid of the ld warnings
Liu Aleaxander [Sat, 8 Aug 2009 07:51:34 +0000 (15:51 +0800)]
Core: get the rid of the ld warnings

we extern the SecPerClust from diskstart.inc and used in fat.c, but we also defined another
SecPerClust in ext2.c. So we should be better to make more things in _static_, just like hpa told.

15 years agoextlinux: add ext4 support to the installer syslinux-4.00-pre1
H. Peter Anvin [Fri, 7 Aug 2009 07:11:21 +0000 (00:11 -0700)]
extlinux: add ext4 support to the installer

The filesystem code now supports ext4, so support it in the installer
as well.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMakefile: add back the gpxe directory
H. Peter Anvin [Fri, 7 Aug 2009 07:07:02 +0000 (00:07 -0700)]
Makefile: add back the gpxe directory

Add the gpxe directory back into the build.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge branch 'core32' into fsc
H. Peter Anvin [Fri, 7 Aug 2009 07:05:28 +0000 (00:05 -0700)]
Merge branch 'core32' into fsc

Resolved Conflicts:
core/extlinux.asm
core/pxelinux.asm

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoCore:PXELINUX: pxelinux derivative merged succeesfully
Liu Aleaxander [Thu, 6 Aug 2009 09:27:02 +0000 (17:27 +0800)]
Core:PXELINUX: pxelinux derivative merged succeesfully

So, now we have all the fs converted, and the rest is to make it better and more simple

15 years agoCore:PXELINUX: try to merge pxelinux
Liu Aleaxander [Thu, 6 Aug 2009 07:17:48 +0000 (15:17 +0800)]
Core:PXELINUX: try to merge pxelinux

the others Syslinux derivative disabled for now

15 years agoNEWS: document isohybrid -id fixed.
H. Peter Anvin [Mon, 3 Aug 2009 21:14:40 +0000 (14:14 -0700)]
NEWS: document isohybrid -id fixed.

15 years agoisohybrid: convert -id to a binary string
Steffen Winterfeldt [Mon, 3 Aug 2009 13:21:02 +0000 (15:21 +0200)]
isohybrid: convert -id to a binary string

Shouldn't 'isohybrid -id ID' write ID as 32bit number? Currently it ends up
as string messing up the mbr.

15 years agomemdisk: remove unnecessary %ifdef syslinux-3.83-pre6
H. Peter Anvin [Sun, 2 Aug 2009 18:59:03 +0000 (11:59 -0700)]
memdisk: remove unnecessary %ifdef

Remove an %ifdef that the macros take care of anyway.

15 years agomemdisk: don't set CX:DX for INT 13h AH=15h for floppies
H. Peter Anvin [Sun, 2 Aug 2009 18:56:38 +0000 (11:56 -0700)]
memdisk: don't set CX:DX for INT 13h AH=15h for floppies

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>
15 years agoMEMDISK: additional EDD DPT Fields
Miller, Shao [Sun, 2 Aug 2009 05:33:36 +0000 (01:33 -0400)]
MEMDISK: additional EDD DPT Fields

We incorrectly used "equ" instead of "dd" (or "db") for strings in
memdisk.inc.  Oops!  My mistake in my 'freedos' branch.  Silly
mistake.  - Shao

15 years agomemdisk: correct the types for the EDD DPT, and write a real one syslinux-3.83-pre5
H. Peter Anvin [Fri, 31 Jul 2009 15:27:58 +0000 (08:27 -0700)]
memdisk: correct the types for the EDD DPT, and write a real one

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>
15 years agomemdisk: don't write the EDD DPT unless we are in EDD mode...
H. Peter Anvin [Fri, 31 Jul 2009 15:24:27 +0000 (08:24 -0700)]
memdisk: don't write the EDD DPT unless we are in EDD mode...

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>
15 years agoMerge commit 'andytim/freedos'
H. Peter Anvin [Fri, 31 Jul 2009 05:40:06 +0000 (22:40 -0700)]
Merge commit 'andytim/freedos'

15 years agographics: actually do 32-bit writes to VGA
H. Peter Anvin [Fri, 31 Jul 2009 05:27:16 +0000 (22:27 -0700)]
graphics: actually do 32-bit writes to VGA

Use "rep movsd" to copy data to VGA memory, not "rep movsb".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years ago[memdisk] Additional EDD Device Parameter Table fields
Shao Miller [Fri, 31 Jul 2009 05:27:05 +0000 (01:27 -0400)]
[memdisk] Additional EDD Device Parameter Table fields

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.

15 years agographics: trivial optimization of old-style graphic mode syslinux-3.83-pre4
H. Peter Anvin [Fri, 31 Jul 2009 00:44:12 +0000 (17:44 -0700)]
graphics: trivial optimization of old-style graphic mode

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>
15 years agoNEWS: document Thinkpad fix syslinux-3.83-pre3
H. Peter Anvin [Thu, 30 Jul 2009 19:31:10 +0000 (12:31 -0700)]
NEWS: document Thinkpad fix

15 years agomemdisk: move temporary variables away from the EDD data block
H. Peter Anvin [Thu, 30 Jul 2009 19:28:45 +0000 (12:28 -0700)]
memdisk: move temporary variables away from the EDD data block

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>
15 years agomemdisk: handle recursive INT 13h invocation
H. Peter Anvin [Thu, 30 Jul 2009 18:24:25 +0000 (11:24 -0700)]
memdisk: handle recursive INT 13h invocation

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>
15 years agoPXELINUX: allow filenames up to 251 characters long syslinux-3.83-pre2
H. Peter Anvin [Wed, 29 Jul 2009 03:19:14 +0000 (20:19 -0700)]
PXELINUX: allow filenames up to 251 characters long

At least one users really need this, so be nice and provide it...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge commit 'syslinux-3.83-pre1'
H. Peter Anvin [Mon, 27 Jul 2009 18:15:43 +0000 (11:15 -0700)]
Merge commit 'syslinux-3.83-pre1'

Conflicts:
com32/modules/chain.c

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoNEWS: document chain.c32 ISOLINUX fix. syslinux-3.83-pre1
H. Peter Anvin [Fri, 24 Jul 2009 00:24:13 +0000 (17:24 -0700)]
NEWS: document chain.c32 ISOLINUX fix.

15 years agochain.c32: set DL properly when loaded from ISOLINUX
H. Peter Anvin [Fri, 24 Jul 2009 00:23:04 +0000 (17:23 -0700)]
chain.c32: set DL properly when loaded from ISOLINUX

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>
15 years agoCore: some bugs fixed
Liu Aleaxander [Mon, 20 Jul 2009 00:46:16 +0000 (08:46 +0800)]
Core: some bugs fixed

15 years agogfxboot: remove obsolete message regarding pxelinux support
Sebastian Herbszt [Sat, 18 Jul 2009 15:06:32 +0000 (17:06 +0200)]
gfxboot: remove obsolete message regarding pxelinux support

PXELINUX is supported by the gfxboot module.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
15 years agogfxboot: parse TIMEOUT keyword
Sebastian Herbszt [Sat, 18 Jul 2009 15:05:22 +0000 (17:05 +0200)]
gfxboot: parse TIMEOUT keyword

Parse the TIMEOUT keyword from the config file and pass it to gfxboot core.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
15 years agogfxboot: only call gfxboot core if labels are specified
Sebastian Herbszt [Sat, 18 Jul 2009 15:03:29 +0000 (17:03 +0200)]
gfxboot: only call gfxboot core if labels are specified

Only call gfxboot core if labels are specified in the config file.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
15 years agogfxboot: display error message if bootlogo file not found
Sebastian Herbszt [Sat, 18 Jul 2009 15:01:19 +0000 (17:01 +0200)]
gfxboot: display error message if bootlogo file not found

Display an error message if the user specified bootlogo file is not found.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
15 years agogfxboot: change handling of keywords
Sebastian Herbszt [Sat, 18 Jul 2009 14:53:09 +0000 (16:53 +0200)]
gfxboot: change handling of keywords

Makes handling of keywords more flexible.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
15 years agoextlinux: handle more than one sector of sector pointers
H. Peter Anvin [Thu, 16 Jul 2009 16:11:14 +0000 (12:11 -0400)]
extlinux: handle more than one sector of sector pointers

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>
15 years agoCore: do trick on the hybrid mode detection
Liu Aleaxander [Mon, 13 Jul 2009 08:08:12 +0000 (16:08 +0800)]
Core: do trick on the hybrid mode detection

15 years agoCore: fix the hybride mode detection code
Liu Aleaxander [Mon, 13 Jul 2009 07:56:51 +0000 (15:56 +0800)]
Core: fix the hybride mode detection code

15 years agoCore: code clean
Liu Aleaxander [Mon, 13 Jul 2009 06:47:02 +0000 (14:47 +0800)]
Core: code clean

cleans the unused variables\18

15 years agoCore: fix the HD-mode error in isolinux
Liu Aleaxander [Mon, 13 Jul 2009 06:34:52 +0000 (14:34 +0800)]
Core: fix the HD-mode error in isolinux

error fixed. Just as what hpa told, deal with that might simply be to consider a 2K CD sector a
"block" rather than a "sector". so, in cdrom mode, we have 2K blocksize and 2k sector size, while
in hybrid mode we have 2k blocksize and 512 bytes sector size.

15 years agodos: add pointer to PE header in binary
H. Peter Anvin [Fri, 10 Jul 2009 23:40:20 +0000 (16:40 -0700)]
dos: add pointer to PE header in binary

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>
15 years agoCore: changes the sector_t and block_t types to be uint64_t
Liu Aleaxander [Fri, 10 Jul 2009 21:46:47 +0000 (05:46 +0800)]
Core: changes the sector_t and block_t types to be uint64_t

15 years agocom32: add openmem.o to the Makefile
H. Peter Anvin [Thu, 9 Jul 2009 19:15:21 +0000 (12:15 -0700)]
com32: add openmem.o to the Makefile

We need openmem.o in the Makefile if it's actually supposed to get
built...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoAdd openmem() function to read from memory as if it were a file
H. Peter Anvin [Thu, 9 Jul 2009 18:56:17 +0000 (11:56 -0700)]
Add openmem() function to read from memory as if it were a file

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>
15 years agocore: include exported symbol information
H. Peter Anvin [Thu, 9 Jul 2009 17:48:57 +0000 (10:48 -0700)]
core: include exported symbol information

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>
15 years agosyslinux.ld: add support for .ctors and .dtors
H. Peter Anvin [Wed, 8 Jul 2009 23:29:35 +0000 (16:29 -0700)]
syslinux.ld: add support for .ctors and .dtors

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>
15 years agocore: give 64K to the PM stack
H. Peter Anvin [Wed, 8 Jul 2009 00:02:44 +0000 (17:02 -0700)]
core: give 64K to the PM stack

Give a full aligned 64K chunk for the PM stack.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoCore: code clean: cuts the unnecessary data type conversion in disk read-write function
Liu Aleaxander [Tue, 7 Jul 2009 16:59:03 +0000 (00:59 +0800)]
Core: code clean: cuts the unnecessary data type conversion in disk read-write function

It's unnecessary to do that conversion.

15 years agoCore: code clean: breakup the fs->fs_dev->disk stuff
Liu Aleaxander [Tue, 7 Jul 2009 16:44:45 +0000 (00:44 +0800)]
Core: code clean: breakup the fs->fs_dev->disk stuff

Add a new disk structure pointer disk to point to fs->fs_dev_disk to break the
long code.

15 years agoMerge branch 'master' into core32
H. Peter Anvin [Mon, 6 Jul 2009 00:14:54 +0000 (17:14 -0700)]
Merge branch 'master' into core32

15 years agodosutil/Makefile: more complete structure
H. Peter Anvin [Sun, 5 Jul 2009 21:15:12 +0000 (14:15 -0700)]
dosutil/Makefile: more complete structure

More complete and consistent structure for dosutil/Makefile.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agodosutil/Makefile: more complete structure
H. Peter Anvin [Sun, 5 Jul 2009 21:15:12 +0000 (14:15 -0700)]
dosutil/Makefile: more complete structure

More complete and consistent structure for dosutil/Makefile.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge branch 'master' into core32
H. Peter Anvin [Sun, 5 Jul 2009 08:05:48 +0000 (01:05 -0700)]
Merge branch 'master' into core32

15 years agodosutil: update mdiskchk, add Makefile
H. Peter Anvin [Sun, 5 Jul 2009 08:04:50 +0000 (01:04 -0700)]
dosutil: update mdiskchk, add Makefile

Update mdiskchk and add a Makefile.  Note that since this needs
OpenWatcom to compile, we still check in the binary file (which is
quite small, anyway.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agocore/rllpack.c: fix some particular bad formatting
H. Peter Anvin [Wed, 1 Jul 2009 21:24:23 +0000 (14:24 -0700)]
core/rllpack.c: fix some particular bad formatting

indent doesn't always do the right thing...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge branch 'master' into core32
H. Peter Anvin [Sat, 27 Jun 2009 00:45:51 +0000 (17:45 -0700)]
Merge branch 'master' into core32

15 years agoCreate a dosutil subdirectory and move mdiskchk there
H. Peter Anvin [Sat, 27 Jun 2009 00:44:22 +0000 (17:44 -0700)]
Create a dosutil subdirectory and move mdiskchk there

DOS utilities aren't really "samples".  Create a dedicated "dosutil"
directory, and move mdiskchk there for now.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agodos: assume NASM 2.03, so use -MP -MD for dependencies
H. Peter Anvin [Wed, 24 Jun 2009 23:39:08 +0000 (16:39 -0700)]
dos: assume NASM 2.03, so use -MP -MD for dependencies

Assume NASM 2.03 or later, so use -MP -MD to generate dependencies.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agocore: assume NASM 2.03 or later, so we can use -MD for deps
H. Peter Anvin [Wed, 24 Jun 2009 23:36:50 +0000 (16:36 -0700)]
core: assume NASM 2.03 or later, so we can use -MD for deps

Let's require NASM 2.03 or later, so we can use the -MD and -MP
options to generate dependencies.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMCONFIG: we need NASM 2 these days, use -Ox
H. Peter Anvin [Wed, 24 Jun 2009 23:26:59 +0000 (16:26 -0700)]
MCONFIG: we need NASM 2 these days, use -Ox

We need NASM 2 anyway for this branch, so we might as well use the -Ox
option.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMCONFIG: build GCCOPT one step at a time, don't align stack
H. Peter Anvin [Wed, 24 Jun 2009 22:55:43 +0000 (15:55 -0700)]
MCONFIG: build GCCOPT one step at a time, don't align stack

Some gcc options are only valid together with other gcc options, so
build GCCOPT one bit at a time, and change gcc_ok to take already
existing GCCOPT flags into account.

This lets us build with -mpreferred-stack-boundary=2, which is only
valid on 32 bits and therefore with -m32.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agocore: generate DWARF debugging info from NASM
H. Peter Anvin [Wed, 24 Jun 2009 21:29:00 +0000 (14:29 -0700)]
core: generate DWARF debugging info from NASM

NASM 2.03 or higher can generate DWARF debugging info, which is also
what gcc produces.  Mixing debugging info seems to cause a lot of
problems.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoCore: fixs the chunk>>=1 problem
Liu Aleaxander [Tue, 23 Jun 2009 22:44:11 +0000 (06:44 +0800)]
Core: fixs the chunk>>=1 problem

well, it seems ugly, but it can do the right work(I think). here is the new way:
    chunk = chunk == 1 ? 0 : ((chunk+1) >> 1);
if we are reading ONE sector, and after six retries, we can mark it as _failed_.
So just make it be ZERO.

15 years agoCore: code clean
Liu Aleaxander [Tue, 23 Jun 2009 22:31:39 +0000 (06:31 +0800)]
Core: code clean

removes the unused variables and unused functions

15 years agoCore:ISOLINUX: fixs the bug to make the isolinux do the work
Liu Aleaxander [Tue, 23 Jun 2009 22:08:52 +0000 (06:08 +0800)]
Core:ISOLINUX: fixs the bug to make the isolinux do the work

15 years agoMerge branch 'isolinux'
Liu Aleaxander [Tue, 23 Jun 2009 09:59:06 +0000 (17:59 +0800)]
Merge branch 'isolinux'

Conflicts:

core/Makefile
core/diskstart.inc
core/fs.c

15 years agoCore: merge ldlinux
Liu Aleaxander [Tue, 23 Jun 2009 09:28:02 +0000 (17:28 +0800)]
Core: merge ldlinux

15 years agoMerge branch 'ldlinux'
Liu Aleaxander [Tue, 23 Jun 2009 09:17:20 +0000 (17:17 +0800)]
Merge branch 'ldlinux'

Conflicts:

core/fs.c

15 years agoCore:LDLINUX: removes the ugly code
Liu Aleaxander [Tue, 23 Jun 2009 08:20:43 +0000 (16:20 +0800)]
Core:LDLINUX: removes the ugly code

Make the ConfigName to store the config file path, well it's enough because the
longest config file path lenght is just 28.

15 years agoCore:EXTLINUX: add more debug stuff
Liu Aleaxander [Tue, 23 Jun 2009 04:45:55 +0000 (12:45 +0800)]
Core:EXTLINUX: add more debug stuff

15 years agoremoves the %if IS_ISOLINUX stuff in the layout.inc
Liu Aleaxander [Mon, 22 Jun 2009 21:17:15 +0000 (05:17 +0800)]
removes the %if IS_ISOLINUX stuff in the layout.inc

removes the %if IS_ISOLINUX stuff in the layout.inc to make the fs.c can find
the core_cache_buf symbol from ISOLINUX.

15 years agoCore:ISOLINUX: make the isolinux do the work
Liu Aleaxander [Mon, 22 Jun 2009 07:11:43 +0000 (15:11 +0800)]
Core:ISOLINUX: make the isolinux do the work

15 years agoCore:ISOLINUX: convert the isolinux.asm to C
Liu Aleaxander [Sun, 21 Jun 2009 06:59:46 +0000 (14:59 +0800)]
Core:ISOLINUX: convert the isolinux.asm to C

15 years agoCore:EXTLINUX: applies the path from hpa to EXTLINUX
Liu Aleaxander [Sat, 20 Jun 2009 07:34:12 +0000 (15:34 +0800)]
Core:EXTLINUX: applies the path from hpa to EXTLINUX

I just added it to EXTLINUX first, and I will consider if I should added it
SYLSINUX and ISOLINUX and so on tomorrow (I'm not sure for now).

And I added a new structure disk to store the disk specific information, so
some changes happened on the vfs-like interface. Hope you will like it, hap;)

the new code broken on the non-standard disk geometry, like the exttest package
given by hpa.

15 years agoextlinux: remove duplicate "const char *program;"
Gilles Espinasse [Sat, 20 Jun 2009 00:21:19 +0000 (17:21 -0700)]
extlinux: remove duplicate "const char *program;"

Remove redundant declaration.

15 years agocore: new diskio library
Liu Aleaxander [Mon, 15 Jun 2009 23:42:07 +0000 (07:42 +0800)]
core: new diskio library

Beginnings of a diskio library capable of reading and writing, and
with proper handling of bounce buffers and segment boundaries.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoAdd .gitignore files for generated files
H. Peter Anvin [Mon, 15 Jun 2009 21:39:20 +0000 (14:39 -0700)]
Add .gitignore files for generated files

Create new .gitignore files and add generated files to them.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoCore:SYSLINUX: applies the sector_t data types
Liu Aleaxander [Mon, 15 Jun 2009 07:19:01 +0000 (15:19 +0800)]
Core:SYSLINUX: applies the sector_t data types

Applies the sector_t data types and makes come code clean

15 years agoCore:SYSLINUX: code clean
Liu Aleaxander [Mon, 15 Jun 2009 06:54:17 +0000 (14:54 +0800)]
Core:SYSLINUX: code clean

removes the unused variables in ldlinux.asm