platform/upstream/syslinux.git
14 years agochain.c32: correctly set the length of the GPT handover structure syslinux-4.00-pre61
H. Peter Anvin [Fri, 25 Jun 2010 20:56:19 +0000 (13:56 -0700)]
chain.c32: correctly set the length of the GPT handover structure

We need to make sure the entire GPT handover structure is mapped
correctly by the shuffler.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoMerge remote branch 'sha0/chain_gpt'
H. Peter Anvin [Fri, 25 Jun 2010 20:48:49 +0000 (13:48 -0700)]
Merge remote branch 'sha0/chain_gpt'

14 years agopxe: don't corrupt the length of an RRQ packet on retry
H. Peter Anvin [Fri, 25 Jun 2010 20:13:11 +0000 (13:13 -0700)]
pxe: don't corrupt the length of an RRQ packet on retry

Due to double use of the variable "buf", we would end up corrupting
the length, but not the contents, of an RRQ packet if we ended up
having to re-send.  Some TFTP servers ignored the extra garbage
(including tftp-hpa), others would refuse to accept the RRQ, causing
failures.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agochain: Implement GPT hand-over protocol as documented
Shao Miller [Fri, 25 Jun 2010 10:45:07 +0000 (06:45 -0400)]
chain: Implement GPT hand-over protocol as documented

When a partition was yielded by a GPT partition iterator,
we follow the protocol documented in syslinux/doc/gpt.txt.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agopxe: fix the unload sequence
H. Peter Anvin [Fri, 25 Jun 2010 04:35:44 +0000 (21:35 -0700)]
pxe: fix the unload sequence

For somewhat unclear reasons, the PXE unload sequence took the old PXE
path (pre-2.00 API).  Take the new sequence if available.  Also
improve the error message.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agopxe: fix ip_ok()
H. Peter Anvin [Fri, 25 Jun 2010 03:55:43 +0000 (20:55 -0700)]
pxe: fix ip_ok()

Make it easier to read, but fix the address for the loopback network
(127, not 255).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agodoc/gpt.txt: this is now fully implemented
H. Peter Anvin [Fri, 25 Jun 2010 03:40:29 +0000 (20:40 -0700)]
doc/gpt.txt: this is now fully implemented

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agoRename dir.c32 -> ls.c32 syslinux-4.00-pre60
H. Peter Anvin [Thu, 24 Jun 2010 22:02:29 +0000 (15:02 -0700)]
Rename dir.c32 -> ls.c32

Use the term "ls" for directory listing, like real operating systems
;)

-hpa

14 years agochain: Allow booting the Syslinux partition with "fs"
Shao Miller [Thu, 24 Jun 2010 20:49:05 +0000 (16:49 -0400)]
chain: Allow booting the Syslinux partition with "fs"

We will now accept an "fs" option which instructs us to
chain-load whatever partition we were booted from.  Not
useful for PXELINUX, for obvious reasons.  Can be used
in combination with a "file=" option, to boot something
other than Syslinux.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agoMerge remote branch 'erwan/master_new'
H. Peter Anvin [Thu, 24 Jun 2010 20:36:54 +0000 (13:36 -0700)]
Merge remote branch 'erwan/master_new'

14 years agoifcpu: Adding PAE support
Erwan Velu [Thu, 24 Jun 2010 20:32:03 +0000 (22:32 +0200)]
ifcpu: Adding PAE support

14 years agoMerge branch 'master' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux syslinux-4.00-pre59
H. Peter Anvin [Thu, 24 Jun 2010 20:30:49 +0000 (13:30 -0700)]
Merge branch 'master' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux

14 years agoextlinux: fix ADV handling, so extlinux.sys -> ldlinux.sys actually works
H. Peter Anvin [Thu, 24 Jun 2010 20:08:46 +0000 (13:08 -0700)]
extlinux: fix ADV handling, so extlinux.sys -> ldlinux.sys actually works

Do the appropriate thing for various error cases, so that the
migration code actually does the right thing.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agodisklib: Add WEE bootloader detection code
Gert Hulselmans [Thu, 24 Jun 2010 20:08:21 +0000 (22:08 +0200)]
disklib: Add WEE bootloader detection code

WEE, is a bootloader based on grub4dos. It fits in the first 63 sectors of
the drive.

The first 4 bytes are:
$ hexdump -n 4 /media/Data/ubcd-new/wee-2010-06-20/wee63.mbr
0000000 5eeb 0090
0000004

Or in the format get_mbr_string wants it:
$ hexdump -C -n 4 wee63.mbr
00000000  eb 5e 90 00

Patch tested in qemu:
  qemu -boot d -cdrom hdt.iso -hda wee-2010-06-20/wee63.mbr

14 years agochain: A sprinkling of documentation
Shao Miller [Thu, 24 Jun 2010 20:05:21 +0000 (16:05 -0400)]
chain: A sprinkling of documentation

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agoadvio: make read_adv() distinguish ENOENT from other errors
H. Peter Anvin [Thu, 24 Jun 2010 20:03:35 +0000 (13:03 -0700)]
advio: make read_adv() distinguish ENOENT from other errors

Make it possible to distinguish ENOENT from other "non-fatal" errors
in read_adv(), so we can try more than one filename.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoifcpu: printing usage if no parameter
Erwan Velu [Thu, 24 Jun 2010 20:02:29 +0000 (22:02 +0200)]
ifcpu: printing usage if no parameter

If you just call the ifcpu.32 it display the usage.

14 years agoextlinux: add code to automate extlinux.sys -> ldlinux.sys migration
H. Peter Anvin [Thu, 24 Jun 2010 19:48:26 +0000 (12:48 -0700)]
extlinux: add code to automate extlinux.sys -> ldlinux.sys migration

- Be able to modify the ADV either in extlinux.sys or ldlinux.sys
- Be able to preserve the ADV from extlinux.sys
- Remove extlinux.sys when installing ldlinux.sys

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agolibfat: formatting fix
H. Peter Anvin [Thu, 24 Jun 2010 19:48:00 +0000 (12:48 -0700)]
libfat: formatting fix

Adjust indent damage...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agochain: Remove type-assurance macro for declarations
Shao Miller [Thu, 24 Jun 2010 18:21:30 +0000 (14:21 -0400)]
chain: Remove type-assurance macro for declarations

A coding pattern from WinVBlock leaked through whereby a
macro is used to declare functions having the same
prototype.  This makes their declarations look a little less
like a traditional declarations however, so that pattern
has been removed.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agochain: Support GPT disks
Shao Miller [Thu, 24 Jun 2010 18:01:34 +0000 (14:01 -0400)]
chain: Support GPT disks

A GPT disk partition iterator is introduced, so
we can chain-load partitions on such a disk.

Tested-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agochain: Change disk partition iteration strategy
Shao Miller [Thu, 24 Jun 2010 15:54:30 +0000 (11:54 -0400)]
chain: Change disk partition iteration strategy

In order to support more than just MBR and EBR walking, we
introduce the abstraction of a partition iterator.  Currently
there are just the two types: MBR partition iterator and
extended partition iterator.

Tested-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agochain: Fix allocation size in read_sectors
Shao Miller [Thu, 24 Jun 2010 15:45:35 +0000 (11:45 -0400)]
chain: Fix allocation size in read_sectors

Oops.  We might allocate more than just one sector.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agoMove modify_adv() into common code
H. Peter Anvin [Wed, 23 Jun 2010 23:31:45 +0000 (16:31 -0700)]
Move modify_adv() into common code

modify_adv() should be used by any installer which uses the common
CLI, so it should go into syslxopt.c.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agofs: enforce filetypes in open_file
H. Peter Anvin [Wed, 23 Jun 2010 19:11:49 +0000 (12:11 -0700)]
fs: enforce filetypes in open_file

Enforce that the file type in open_file is a plain file.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agoopendir: enforce the file type
H. Peter Anvin [Wed, 23 Jun 2010 19:11:21 +0000 (12:11 -0700)]
opendir: enforce the file type

Don't allow opendir() on a non-directory.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agopxe: set the file type in the inode structure
H. Peter Anvin [Wed, 23 Jun 2010 19:08:30 +0000 (12:08 -0700)]
pxe: set the file type in the inode structure

All "files" on PXE are regular files (there is no official directory
mechanism) and so, at least for now, it's all DT_REG.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agomemdiskfind: remove debugging printf
H. Peter Anvin [Wed, 23 Jun 2010 06:21:15 +0000 (23:21 -0700)]
memdiskfind: remove debugging printf

Remove accidentally checked in debugging printf.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agomemdiskfind: make sure we don't map unavailable RAM
H. Peter Anvin [Wed, 23 Jun 2010 06:19:40 +0000 (23:19 -0700)]
memdiskfind: make sure we don't map unavailable RAM

Sometimes FBM is below the reserved memory limit, which means memory
that is available to protected-mode operating systems only and which
will be claimed by the kernel and therefore be unmappable.  Read
/proc/iomem to make sure the memory range is safe to map.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agochain: Add DOS partition dumping routine for debugging
Shao Miller [Wed, 23 Jun 2010 04:23:30 +0000 (00:23 -0400)]
chain: Add DOS partition dumping routine for debugging

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agochain: Use struct mbr where applicable
Shao Miller [Wed, 23 Jun 2010 03:44:29 +0000 (23:44 -0400)]
chain: Use struct mbr where applicable

Instead of magic offsets.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agochain: Use CHS typedef and macros
Shao Miller [Wed, 23 Jun 2010 03:34:41 +0000 (23:34 -0400)]
chain: Use CHS typedef and macros

A DOS partition table entry contains cylinder, head, sector
tuples which can be convenient to group together and extract
with convenience macros.  Currently unused.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agochain: Allow reading more than a single sector
Shao Miller [Wed, 23 Jun 2010 03:32:26 +0000 (23:32 -0400)]
chain: Allow reading more than a single sector

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agochain: Run Nindent on com32/modules/chain.c
Shao Miller [Wed, 23 Jun 2010 03:28:03 +0000 (23:28 -0400)]
chain: Run Nindent on com32/modules/chain.c

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
14 years agomtools: create an empty ADV syslinux-4.00-pre58
H. Peter Anvin [Wed, 23 Jun 2010 00:09:52 +0000 (17:09 -0700)]
mtools: create an empty ADV

Create an install an empty ADV.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agodos: vacuous ADV support
H. Peter Anvin [Wed, 23 Jun 2010 00:07:03 +0000 (17:07 -0700)]
dos: vacuous ADV support

Vacuous ADV support: install an empty ADV.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agosetadv: remove unused, nonportable header file
H. Peter Anvin [Wed, 23 Jun 2010 00:06:23 +0000 (17:06 -0700)]
setadv: remove unused, nonportable header file

This file does not need <sys/types.h>.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agowin32: vacuous ADV support
H. Peter Anvin [Tue, 22 Jun 2010 23:52:32 +0000 (16:52 -0700)]
win32: vacuous ADV support

Install an empty ADV in the Windows installer to keep it from being
broken.  In order to do that, separate the Unix-specific ADV I/O
functions from the generic data structure manipulation.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agowin32: use .obj not .o, and build an intermediate library
H. Peter Anvin [Tue, 22 Jun 2010 22:59:04 +0000 (15:59 -0700)]
win32: use .obj not .o, and build an intermediate library

Use .obj as the extension, rather than .o, to match Windows
conventions.  Furthermore, build an intermediate library for the stuff
that we pick up from elsewhere; this makes it easier to build
additional Windows binaries with helper functions in libinstaller or
another source library.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agopxe: fix the timeout logic for RRQ syslinux-4.00-pre57
H. Peter Anvin [Tue, 22 Jun 2010 22:16:47 +0000 (15:16 -0700)]
pxe: fix the timeout logic for RRQ

Fix the timeout logic for RRQ, to avoid a spew of identical RRQ
packets which at best will annoy the server.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agopxe: fix bugs in DHCP parsing and config file selection
H. Peter Anvin [Tue, 22 Jun 2010 22:03:29 +0000 (15:03 -0700)]
pxe: fix bugs in DHCP parsing and config file selection

Fix several buffer-handling bugs in DHCP parsing and in the config
file selection.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agopxe: correct the generation of the UUID string
H. Peter Anvin [Tue, 22 Jun 2010 21:39:50 +0000 (14:39 -0700)]
pxe: correct the generation of the UUID string

The UUID string was generated incorrectly, starting over for each
component.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoMerge remote branch 'erwan/master_new'
H. Peter Anvin [Tue, 22 Jun 2010 21:34:59 +0000 (14:34 -0700)]
Merge remote branch 'erwan/master_new'

14 years agohdt: new release 0.3.6.1
Erwan Velu [Tue, 22 Jun 2010 21:32:09 +0000 (23:32 +0200)]
hdt: new release 0.3.6.1

Increase subrelease for syslinux4.
hdt just only received code cleaning, no new feature.

14 years agohdt: Using syslinux_reboot() call
Erwan Velu [Tue, 22 Jun 2010 21:30:25 +0000 (23:30 +0200)]
hdt: Using syslinux_reboot() call

Rebooting can be achieved via syslinux_reboot() instead of the useless reboot.c32 module.

14 years agohdt: updating memtest to 4.10
Erwan Velu [Tue, 22 Jun 2010 21:27:41 +0000 (23:27 +0200)]
hdt: updating memtest to 4.10

14 years agosysdump, be_srec: increment the address
H. Peter Anvin [Tue, 22 Jun 2010 20:39:44 +0000 (13:39 -0700)]
sysdump, be_srec: increment the address

Need to increment the address for each srec...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agosysdump: output S-records to the console
H. Peter Anvin [Tue, 22 Jun 2010 20:35:29 +0000 (13:35 -0700)]
sysdump: output S-records to the console

Sometimes we have a console path that can be captured (virtual
machine, serial console, ...) but no realistic path for two-way or
binary communication.  Add an option to output S-records to the
console as an inefficient but hopefully reliable way to get data out.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoReplacing strncpy by strlcpy
Erwan Velu [Tue, 22 Jun 2010 19:43:27 +0000 (21:43 +0200)]
Replacing strncpy by strlcpy

As reported by hpa, strlcpy is safer and could prevent some bugs.
So I replaced all strncpy by strlcpy calls.

14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/boot/syslinux/syslinux into...
Erwan Velu [Tue, 22 Jun 2010 19:32:27 +0000 (21:32 +0200)]
Merge branch 'master' of git://git./boot/syslinux/syslinux into master_new

14 years agomemdisk: add a sector_shift field to the MDI; fix memdiskfind
H. Peter Anvin [Tue, 22 Jun 2010 17:55:03 +0000 (10:55 -0700)]
memdisk: add a sector_shift field to the MDI; fix memdiskfind

Add a sector_shift field to the MDI rather than assuming 512-byte
sectors.  Fix memdiskfind to report size in bytes, not in sectors.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agodiskstart: if no partition table, we need Hidden == 0 syslinux-4.00-pre56
H. Peter Anvin [Tue, 22 Jun 2010 17:30:28 +0000 (10:30 -0700)]
diskstart: if no partition table, we need Hidden == 0

If we don't have a partition table, we need to make sure Hidden gets
set to zero.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoisohybrid: fix another type mismatch
H. Peter Anvin [Tue, 22 Jun 2010 17:20:54 +0000 (10:20 -0700)]
isohybrid: fix another type mismatch

Fix another printf type mismatch in the C version of isohybrid.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agosysdump: smarter ACPI dump
H. Peter Anvin [Tue, 22 Jun 2010 05:59:19 +0000 (22:59 -0700)]
sysdump: smarter ACPI dump

Follow the XSDT as well as the RSDT, at least as long as we can do
that with 32-bit addresses.  Actually keep track of what we have
already dumped.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agosysdump: make TFTP server optional
H. Peter Anvin [Tue, 22 Jun 2010 05:57:35 +0000 (22:57 -0700)]
sysdump: make TFTP server optional

Make entering the TFTP server optional (defaults to boot server).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years ago<syslinux/config.h> fix the order of struct syslinux_ipinfo
H. Peter Anvin [Tue, 22 Jun 2010 05:49:58 +0000 (22:49 -0700)]
<syslinux/config.h> fix the order of struct syslinux_ipinfo

Correct the order of the fields in struct syslinux_ipinfo to match
reality.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agomemdiskfind: sanity check the FBM value
H. Peter Anvin [Tue, 22 Jun 2010 00:33:57 +0000 (17:33 -0700)]
memdiskfind: sanity check the FBM value

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agomemdiskfind: utility to find an mBFT and output phram parameters
H. Peter Anvin [Tue, 22 Jun 2010 00:29:51 +0000 (17:29 -0700)]
memdiskfind: utility to find an mBFT and output phram parameters

A trivial Linux utility to search for mBFT and output its parameters
in a form which can be used as input to the phram Linux kernel module.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agomemdisk: make mstructs.h includable from Linux
H. Peter Anvin [Tue, 22 Jun 2010 00:29:11 +0000 (17:29 -0700)]
memdisk: make mstructs.h includable from Linux

Make mstructs.h includable from a Linux utility.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoutils/Makefile: fix build rules
H. Peter Anvin [Tue, 22 Jun 2010 00:18:02 +0000 (17:18 -0700)]
utils/Makefile: fix build rules

Fix isohybrid build rules.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoisohybrid: fix beginner mistakes
H. Peter Anvin [Tue, 22 Jun 2010 00:17:33 +0000 (17:17 -0700)]
isohybrid: fix beginner mistakes

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agocore: Make cfarcall IF-preserving
H. Peter Anvin [Mon, 21 Jun 2010 22:59:40 +0000 (15:59 -0700)]
core: Make cfarcall IF-preserving

cfarcall does not take a register image on input, so we need to
explicitly preserve IF in the code flow.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agocom32: make __farcall() IF-preserving
H. Peter Anvin [Mon, 21 Jun 2010 22:58:57 +0000 (15:58 -0700)]
com32: make __farcall() IF-preserving

Make __farcall preserve the current value of IF.  If we need to we can
create a __raw_farcall() operation which does not.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agolinux installer: better error message for missing /tmp
George David [Mon, 21 Jun 2010 22:16:58 +0000 (16:16 -0600)]
linux installer: better error message for missing /tmp

Our linux distribution at my job didn't include a /tmp directory. When ever
I tried to use syslinux, I would get the following error:

./syslinux: No such file or directory

I modified the code to report this:

./syslinux: Cannot access the /tmp/ directory.

This would have helped me a lot rather than having to download the source
and run it through the debugger to figure out that my /tmp/ directory was
missing. I suspect if this ever happens again I'll know exactly what was
wrong, but hopefully it will help someone else.

14 years agocomboot: allow the read disk API call to specify a 64-bit LBA
H. Peter Anvin [Mon, 21 Jun 2010 22:12:48 +0000 (15:12 -0700)]
comboot: allow the read disk API call to specify a 64-bit LBA

We already had two MBZ fields reserved, so use one of them to expand
into a 64-bit LBA.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agocore, adv: for CHS mode, the top 40 LBA bits must be zero
H. Peter Anvin [Mon, 21 Jun 2010 22:14:45 +0000 (15:14 -0700)]
core, adv: for CHS mode, the top 40 LBA bits must be zero

The top 40 bits of the LBA must be zero on CHS mode.  Enforce this,
and also fix leak of the drive number into a divide instruction with
resulting overflow.

Reported-by: Gert Hulselmans <gerth@zytor.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agopxelinux: use alignb not alignz in a bss sections
H. Peter Anvin [Mon, 21 Jun 2010 22:14:19 +0000 (15:14 -0700)]
pxelinux: use alignb not alignz in a bss sections

In .bss sections use alignb, not alignz.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoFixing compilation warning
Erwan Velu [Mon, 21 Jun 2010 20:24:21 +0000 (22:24 +0200)]
Fixing compilation warning

Reported by Genne Cumm, some more_printf calls generates gcc warning.

14 years agodiskstart: fix CHS mode, reinstate cyl 1023 check syslinux-4.00-pre55
H. Peter Anvin [Mon, 21 Jun 2010 17:39:38 +0000 (10:39 -0700)]
diskstart: fix CHS mode, reinstate cyl 1023 check

Fix loading in CHS mode; we were missing a popad.  Also reinstate the
check for exceeding cylinder 1023.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agodiskstart: clean up GPT handling
H. Peter Anvin [Mon, 21 Jun 2010 17:23:20 +0000 (10:23 -0700)]
diskstart: clean up GPT handling

We only need 56 bytes, not 92, and we should check for 0xED as the
partition type.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agodns: don't get stuck on no packet received syslinux-4.00-pre54
H. Peter Anvin [Mon, 21 Jun 2010 17:11:59 +0000 (10:11 -0700)]
dns: don't get stuck on no packet received

Make sure the timeout actually gets processed.  The right thing to do
for the receive loop is to check for timeout, then try to receive, and
loop until an acceptable packet has been received; we might as well do
that explicitly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agocore: Preserve IF through call16()
H. Peter Anvin [Mon, 21 Jun 2010 17:03:03 +0000 (10:03 -0700)]
core: Preserve IF through call16()

An intcall should always be invoked with interrupts off, but that is
not necessarily the case for a near or far call; in fact it is quite
the exception.  As such, do not filter IF in our register image, and
for our own internal call16() interface, propagate the protected-mode
IF value into real mode, just as we do for the pm_call interface.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agopxe: fix handling of lost packets in DNS resolution
H. Peter Anvin [Mon, 21 Jun 2010 07:19:37 +0000 (00:19 -0700)]
pxe: fix handling of lost packets in DNS resolution

When we have lost packets in DNS resolution, or otherwise no
response, both rotate through the known servers and advance through
the timeout table.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agopxe: properly null-terminate packet after tftp://
H. Peter Anvin [Mon, 21 Jun 2010 07:18:08 +0000 (00:18 -0700)]
pxe: properly null-terminate packet after tftp://

Properly null-terminate the output from a parsed tftp:// URL.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agopxe: correct the parsing of tftp:// URLs
H. Peter Anvin [Mon, 21 Jun 2010 05:59:51 +0000 (22:59 -0700)]
pxe: correct the parsing of tftp:// URLs

Correct the parsing of tftp:// URLs.  DNS handling still needs to be
unbroken.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agopxe: don't misidentify non-tftp URLs as tftp
H. Peter Anvin [Mon, 21 Jun 2010 01:42:43 +0000 (18:42 -0700)]
pxe: don't misidentify non-tftp URLs as tftp

Fix reversed test for tftp URLs

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agocore: align the EPA syslinux-4.00-pre53
H. Peter Anvin [Mon, 21 Jun 2010 00:03:38 +0000 (17:03 -0700)]
core: align the EPA

Align the Extended Patch Area.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agoMerge syslinux/extlinux patch code and core code
H. Peter Anvin [Mon, 21 Jun 2010 00:01:15 +0000 (17:01 -0700)]
Merge syslinux/extlinux patch code and core code

Merge the SYSLINUX and EXTLINUX patching code and core code, removing
EXTLINUX as a separate derivative.  All the disk-based systems now use
the same code.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agoReduce sector 1 space pressure; further merge installer code syslinux-4.00-pre52
H. Peter Anvin [Sun, 20 Jun 2010 22:21:05 +0000 (15:21 -0700)]
Reduce sector 1 space pressure; further merge installer code

Reduce sector 1 space pressure by moving objects that aren't needed by
Sector 1 proper into an "extended patch area".  While we're mucking
with the installer code, make the syslxint and extlinux installer code
even more similar.  It should now be pretty straightforward to
outright merge the code.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agofat: fix off-by-one error in the FAT installer syslinux-4.00-pre51
H. Peter Anvin [Sun, 20 Jun 2010 21:00:57 +0000 (14:00 -0700)]
fat: fix off-by-one error in the FAT installer

Fix off-by-one error in the FAT installer, which caused the install to
incorrectly abort without the patched version of the data.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agolinux/syslinux: handle the null pathname case
H. Peter Anvin [Sun, 20 Jun 2010 03:58:25 +0000 (20:58 -0700)]
linux/syslinux: handle the null pathname case

Fix mishandling of the null pathname case in the syslinux installer,
and generally clean up the handling of the subpath name.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agoMerge remote branch 'sha0/for_hpa' into pathbased
H. Peter Anvin [Sun, 20 Jun 2010 02:08:39 +0000 (19:08 -0700)]
Merge remote branch 'sha0/for_hpa' into pathbased

14 years agoMerge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into...
H. Peter Anvin [Sun, 20 Jun 2010 02:05:45 +0000 (19:05 -0700)]
Merge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into pathbased

14 years agopxe: mark ipinfo as IPv4
H. Peter Anvin [Sat, 19 Jun 2010 02:05:10 +0000 (19:05 -0700)]
pxe: mark ipinfo as IPv4

IP information is IPv4 for now.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoMerge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into... syslinux-4.00-pre50
H. Peter Anvin [Sat, 19 Jun 2010 01:45:02 +0000 (18:45 -0700)]
Merge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into pathbased

14 years agocore, pxe: remove stray debugging printf
H. Peter Anvin [Sat, 19 Jun 2010 01:30:44 +0000 (18:30 -0700)]
core, pxe: remove stray debugging printf

Remove debugging printf added for testing.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agosysdump: dump ACPI information
H. Peter Anvin [Sat, 19 Jun 2010 01:28:43 +0000 (18:28 -0700)]
sysdump: dump ACPI information

Dump ACPI tables.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agosysdump: use lmalloc/lfree
H. Peter Anvin [Sat, 19 Jun 2010 01:27:55 +0000 (18:27 -0700)]
sysdump: use lmalloc/lfree

Use lmalloc/lfree instead of using the fixed (obsolete) bounce buffer.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agosysdump: tftp: use lmalloc(), and set the gateway
H. Peter Anvin [Sat, 19 Jun 2010 01:24:14 +0000 (18:24 -0700)]
sysdump: tftp: use lmalloc(), and set the gateway

Use lmalloc() rather than the fixed (obsolete) bounce buffer, and set
the gateway for PXE stacks that need it.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agopxe: centralize all the IP information and export it to modules
H. Peter Anvin [Sat, 19 Jun 2010 01:16:48 +0000 (18:16 -0700)]
pxe: centralize all the IP information and export it to modules

It appears that there still are PXE stacks in the field which needs
the crutch of being pointed to the default gateway.  As such, put all
the IP information into a single memory structure and allow modules to
see it.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoMerge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into...
H. Peter Anvin [Fri, 18 Jun 2010 01:09:46 +0000 (18:09 -0700)]
Merge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into pathbased

14 years agoMerge remote branch 'sha0/boot_args' into pathbased
H. Peter Anvin [Thu, 17 Jun 2010 18:45:14 +0000 (11:45 -0700)]
Merge remote branch 'sha0/boot_args' into pathbased

14 years agoeltorito: Scan upwards instead of downwards
Shao Miller [Fri, 11 Jun 2010 04:15:19 +0000 (04:15 +0000)]
eltorito: Scan upwards instead of downwards

A developer for GRUB4DOS called tinybit has reported that some
BIOSes crash when the DOS ElTorito.Sys driver scans drive number
0xFF.  According to the El Torito specification, drive 0x7F
means "terminate all," so a plausible explanation suggested
by H. Peter Anvin is that the drive 0xFF is a shadow of drive
0x7F, thus contributing to a failure on these BIOSes.

Now we scan from 0x80 through 0xFF, instead.

[ hpa: dropped checkin of eltorito.sys ]

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoMerge remote branch 'sha0/mdiskchk_enh2' into pathbased
H. Peter Anvin [Thu, 17 Jun 2010 18:41:15 +0000 (11:41 -0700)]
Merge remote branch 'sha0/mdiskchk_enh2' into pathbased

14 years agoMerge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into... syslinux-4.00-pre49
H. Peter Anvin [Wed, 16 Jun 2010 18:45:32 +0000 (11:45 -0700)]
Merge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into pathbased

14 years agoMove Linux ioctl header magic into a single file
H. Peter Anvin [Wed, 16 Jun 2010 18:44:27 +0000 (11:44 -0700)]
Move Linux ioctl header magic into a single file

Put all the Linux ioctl header magic into a single shared file, and
try to make it as generally useful as possible.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoinstaller: fix use of FIEMAP
H. Peter Anvin [Wed, 16 Jun 2010 00:24:32 +0000 (17:24 -0700)]
installer: fix use of FIEMAP

Correct the implementation of block mapping using FIEMAP (as opposed
to FIBMAP).

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoextlinux: don't compile with -O0
H. Peter Anvin [Wed, 16 Jun 2010 00:15:02 +0000 (17:15 -0700)]
extlinux: don't compile with -O0

-O0 is good for debugging, but sucks for production.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agodos: fix get_64_sl() and set_64_sl()
H. Peter Anvin [Tue, 15 Jun 2010 23:49:41 +0000 (16:49 -0700)]
dos: fix get_64_sl() and set_64_sl()

We must make sure we actually use the modified pointer returned from
set_fs(), otherwise bad things happen...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
14 years agoMerge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into... syslinux-4.00-pre48
H. Peter Anvin [Tue, 15 Jun 2010 23:26:43 +0000 (16:26 -0700)]
Merge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into pathbased