| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
| |
Signed-off-by: Michal Soltys <soltys@ziu.info>
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
In gpt header, lba_cur and lba_alt alternate depending on whether we
read primary or backup copy.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This provides more fine grained control than single relax flag. to cover
case with wrong disk sizes.
relax and nostrict are equivalent to strict=0
norelax and strict are equivalent to strict=2
strict=1 does the same as strict=2, but ignores checks against disk size
The current default is strict=1. Options: 'fixchs', '[un]hide[all]' and
'save' will forcibly enable strict=2 (can be overridden by the user).
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
As partiter doesn't deallocate itself after finish (anymore), it should
be deleted after each loop iteration.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
| |
Use <0 for errors, 0 for normal state, and >0 for clean completion.
In future this would be necessary if it's decided to make partiter
a generic lib (similar to disklib) - though it has to be quieted first
and provide strerr()-like functionality in place of its verbosity.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
This patch fixes non-NULL value returned from pi_begin() in case of an
error (which resulted in further hang instead of proper exit). Probably
a leftover from pi_dealloc() times.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous version had some issues in case of error situations, among
those:
- backup gpt header was not read if reading of primary failed
- alternating nature of lba_cur and lba_alt was ignored
This patch fixes this and extends the gpt handling.
The current behavior is:
- try primary header; if unreadable or checksum fails (or sanity checks
fail unless relax flag is set) - try secondary header
- try main partition table referenced in the header that was read; if
it's unreadable or if its crc check fails - try alternative (so if we
managed to read primary header, table at the end would be considered
as alternative - if we managed to read secondary header, table at the
beginning would be treated as such)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
syslinux-5.10-pre2
Conflicts:
NEWS
com32/include/netinet/in.h
com32/include/sys/cpu.h
com32/lib/Makefile
core/Makefile
core/fs/diskio.c
core/fs/pxe/pxe.h
core/init.c
core/mem/free.c
core/mem/malloc.c
mk/devel.mk
version
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Welcome to Syslinux 5.10.
Conflicts:
NEWS
com32/lib/Makefile
com32/lib/sys/open.c
com32/lib/syslinux/ipappend.c
com32/modules/Makefile
com32/modules/prdhcp.c
core/Makefile
core/cmdline.inc
core/com32.inc
core/comboot.inc
core/configinit.inc
core/fs/chdir.c
core/fs/fs.c
core/fs/pxe/dnsresolv.c
core/fs/pxe/pxe.c
core/fs/pxe/pxe.h
core/idle.c
core/include/ctype.h
core/init.inc
core/mem/init.c
core/parseconfig.inc
core/runkernel.inc
core/syslinux.ld
core/ui.inc
doc/comboot.txt
version
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's possible, that fs_lba available through syslinux_derivative_info()
could be 0. So match the candidates including disk, instead of only
partitions.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Might be useful at some and/or when partiter becomes a non-chain
specific code.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make sure that *lba is set to 0, if start_lba in the record is 0. Not an
issue in any of the code using partiter currently, as that implies
either broken layout or a hole. Still useful for consistency with index
== -1 or when relax flag is set.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Also use enum instead of #defines for flags.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
disk.c also uses start_lba and it can mean few different things
depending on context (disk relative, BEBR relative, current EBR
relative).
partiter's main offset is always a disk relative value. To make it more
distinct and avoid suggestion the value is simply a copy of the one from
disk_dos_part_entry, we rename it to more fitting abs_lba.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have to be more careful, when in-entry start/length values are 0 (one
or both). Firstly they are relative to the disk or the [B]EBR (while CHS
are absolute). Secondly, length 0 would imply the end CHS being lower
than the start CHS.
Under normal circumstances, partiter would complain about corrupt layout
(unless relax flag is set) and value 0 in any of those fields generally
imply a hole, so the adjustments were harmless - nontheless they made
everything look silly and not really correct.
Adjusted approach is:
- for start entry - if the os entry is 0 /and/ the beginning is 0 -
reset to 0, otherwise calculate chs
- for end entry - as above /or/ length is 0 - reset to 0, otherwise
calculate chs
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently, the only situation when index could be set to -1 was empty
logical partition (with stepall flag active). To keep things consistent
(and with index0 already providing "full" info), adjust the partiter to
also set -1 on empty main partition.
This change also allows simple index check to see whether we're are at
the empty partition or not, without digging into disk_dos_part_entry
data and retesting ostype field. We rely on it now in manglepe_hide().
Also some retab! changes in partiter.h and one variable rename.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Whenever the computation imply use of that type, even if it's just
uint32_t.
Add dosmax (using 40:13) and dosmin (0x500) instead of separate ADDR*
and dosmem (in do_boot()).
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Only 2 defines there related to preliminary options.c's and chain.c's
hecks (real checks come later during mapping to real memory). So move
them to options.h and remove common.h.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The usual stuff - hidden sectors (now 64bit at different offset),
drive offest, "BPB" type.
Formally (?) region from 0x0B to 0x3F should be 0, but ... it's
tempting to fill "old" values there. Might be worth adding a switch to
handle such behavior.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We also take a bit relaxed approach - so we check for presence of 0xEE
at any place, then attempt to read GPT header only if prefmbr is not
set.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This flag tones down sanity checks during partition iteration.
This is useful in situations such as:
- inconsistent layouts, but with some partition still in sane bootable state
- usb sticks/disks moved between different PCs might return different
size, which might cause problems if the partitions span the whole disk
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Trivial change that tidies a bit warning / error reporting through
fatal()/error()/warn(). Also small doc/help updates.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Initial position of each itarator is whole disk, so this actually
matches.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Comments, output and minor adjustments.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | | |
'index0' provides the same "raw" info, complementing standard 'index'.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The code uses more abstractions than it's really worth or necessary, so
these patches simplify the code a bit. Partially suggested by Shao as
well.
Additionally, there're some added comments and more consistent naming
used.
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- add some comments to clarify c{nul,add,max} modes
- use enums instead of defines
- remove unnecessary integer casts
- avoid casts and uninline guid_is0()
- minor handover comment/flow changes
- clean up some old comment-outs
- add -fno-strict-aliasing as it's not picked anymore by default for
elf.mk
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Licenses:
chain.[ch] Makefile: GPLv2+
the rest: MIT
Defines:
Avoid prefixing with _
Signed-off-by: Michal Soltys <soltys@ziu.info>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Acked-by: Shao Miller <sha0.miller@gmail.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Makefile
NEWS
com32/cmenu/Makefile
com32/elflink/ldlinux/Makefile
com32/gfxboot/Makefile
com32/gpllib/Makefile
com32/include/sys/module.h
com32/lib/Makefile
com32/lib/sys/module/elf_module.c
com32/menu/Makefile
com32/rosh/Makefile
com32/samples/Makefile
core/init.c
mk/elf.mk
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Always strip the modules; they are too big unstripped. Specifically,
we generate unstripped *.elf files, and then convert them to
stripped *.c32 files.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that we have multiple firmware backends it no longer makes sense
to write object files to the same directory as their source. A better
solution is to write the object files to a per-firmware directory
under a top-level object directory.
The top-level object directory can be specified on the command-line
with the O= variable, e.g. make O=/tmp/obj. If no top-level object
directory is specified an 'obj' directory is created in the top-level
of the Syslinux source repository.
All the existing make targets continue to work as before, however now
they apply to all firmware backends, e.g. 'make installer' will build
the BIOS, 32-bit EFI and 64-bit EFI installers and place them under
$(OBJ)/bios, $(OBJ)/efi32 and $(OBJ)/efi64 respectively.
Note unlike every other bit of Syslinux, the gpxe objects are still
kept in the src directory, e.g. gpxe/src, since gpxe is only required
by the BIOS backend.
It is possible to specify a make target for a specific firmware or
list of firmware with the following syntax,
make [firmware[,firmware]] [target[,target]]
To clean the object directory for just the BIOS firmware type,
'make bios clean'
To build both the 32-bit and 64-bit EFI installers type,
'make efi32 efi64 installer'
Since the Syslinux make infrastructure is now more complex a new file
doc/building.txt has been created to explain how to build Syslinux.
The top-level Makefile now exports some make variables for use in
module Makefiles,
- topdir - the top-level source directory of the Syslinux
repository, e.g. /usr/src/syslinux
- objdir - the top-level object directory for the firmware
backend currently being built, e.g. /obj/syslinux/bios
- SRC - the source directory in the Syslinux repository for the
module currently being built,
e.g. /usr/src/syslinux/com32/libupload
- OBJ - the object directory for the module currently being
built, e.g. /obj/syslinux/bios/com32/libupload
Since we're rewriting the Makefile infrastructure anyway it seemed
like a good idea to add parallel support. By writing subdirectories as
prequisites for make targets the objects in those subdirectories can
be built in parallel.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
There's no reason to use the COMBOOT API at all now that we can have
any undefined symbols resolved at runtime - we can just access
functions directly.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The COM32 cs_bounce buffer is not usable with ELF modules, as we're
trying to move to an environment where memory is dynamically
allocated. All users of __com32.cs_bounce have been converted to using
lmalloc() to allocate low memory.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of development has gone on in the 'master' branch since the last
time we merged; new features, bug fixes, etc, etc.
Conflicts:
Makefile
com32/Makefile
com32/lib/Makefile
com32/lib/syslinux/load_linux.c
com32/modules/Makefile
com32/modules/chain.c
core/bootsect.inc
core/init.inc
version
|
|
|
|
|
|
| |
Fix misplaced #endif which made it impossible to build without DEBUG.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
| |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
|
|
|
|
|
| |
Seems to be most appropriate...
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
|
|
|
|
|
|
|
| |
Based on commit: ad4cf1470977f648ee1dd45e97939589ccb0393c
(might need address adjustments)
Signed-off-by: Michal Soltys <soltys@ziu.info>
|