| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
At least one USB keyboard BIOS has been reported to not properly
handle the keyboard flags in memory. See if actually using INT 16h
works better.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\
| |
| |
| |
| |
| |
| | |
Resolved Conflict:
diag/geodsp/Makefile
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Resolved Conflicts:
NEWS
core/fs/fs.c
version
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Ruben Kerkhof <ruben at rubenkerkhof.com>
Signed-off-by: Gene Cumm <gene.cumm@gmail.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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If EBIOS is detected for this drive it tries to read sector size and
use it. If error or no EBIOS 512 is assumed.
Buffer to read sector size is always allocated into the stack.
CHS informations are not readed as not needed and save space not
restoring %dl for drive number.
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Easy way to reduce code but actually I found the message is
readable at the same way as previous.
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Mostly of the time bx was set as phdr before calling read_sector
so add a specific function to set %bx and call read_sector
gaining 2 bytes
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
after read_sector %edx:%eax are unused or incremented so increment
always at end gaining 3 bytes
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Makefile
com32/elflink/ldlinux/Makefile
com32/lib/sys/module/elf_module.c
core/cleanup.c
core/comboot.inc
core/conio.c
core/fs/fs.c
core/init.c
core/mem/free.c
core/mem/malloc.c
core/timer.inc
diag/geodsp/Makefile
extlinux/main.c
mk/embedded.mk
modules/Makefile
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before reading the VBR into 0x7C00, we need to check the first 4 bytes of
the read sector and check whether it is a XFS superblock or not. If it
is, then we need to read the right sector, which is the 4th sector of
the XFS partition where the Syslinux boot sector lives in.
This patch adds support for booting off XFS partitions properly on
MBR HDDs.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.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>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Makefile
com32/elflink/ldlinux/adv.c
com32/elflink/ldlinux/kernel.c
com32/elflink/ldlinux/ldlinux.c
com32/include/bitsize/stddef.h
com32/include/bitsize/stdint.h
com32/include/stdint.h
com32/include/sys/module.h
com32/include/sys/x86_64/bitops.h
com32/include/syslinux/linux.h
com32/lib/Makefile
com32/lib/sys/ansicon_write.c
com32/lib/sys/module/elfutils.h
com32/lib/sys/vesa/efi/fill.h
com32/lib/syslinux/load_linux.c
com32/lib/syslinux/serial.c
com32/lib/syslinux/shuffle.c
core/conio.c
core/elflink/config.c
core/elflink/load_env32.c
core/graphics.c
core/include/graphics.h
core/init.c
core/pxelinux.asm
mk/elf.mk
mk/lib.mk
|
| |
| |
| |
| |
| |
| |
| |
| | |
We would fail to correctly invoke primary partitions 2-4 because of a
register usage bug.
Reported-by: Maxim Kammerer <mk@dee.su>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
EFI systems typically don't support booting off ISO 9660 filesystems,
even if written to USB sticks. This patch adds support for generating a
GPT that covers the stick as well, with an additional partition entry
pointing purely at the secondary El Torito image. When burned to CD the
secondary El Torito will be used as an EFI boot image, and when written
to a USB stick the GPT partition will be found and may be booted from.
However, some earlier EFI Macs don't support booting from El Torito
images via EFI. To cater for them this also supports generating an Apple
partition table, allowing a third El Torito image in HFS+ format to be
made available to the firmware. This requires padding the MBR images
slightly in order to leave space for the Apple header, but should have
no functional impact.
Sadly, this breaks the workaround for Acer BIOSes (magic xor
instruction) when Mac support is enabled via -m... not much that can
be done about that.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Pertinent changes are sprinkled through *.mk and Makefile in the syslinux tree.
Build architecture is specified at the command line via ARCH macro. This is to enable whether
one is building for the native platform or cross-building for a different architecture. Currently,
the only supported architectures via ARCH macro are i386 and x86_64.
There are some modules (e.g. memdump) that don't build under the EFI environment. To go forward
with efi boot support, a separate EFI_BUILD=1 macro has been added and is required to be
specified while building. This is a temporary solution for the current build environment.
example build:
On a x86_64 platform, the following cross-builds syslinux for i386
To build for i386: make EFI_BUILD=1 ARCH=i386
On a x86_64 platform, the following builds syslinux for x86_64
To build natively: make EFI_BUILD=1
Changes specific to GCC and LD options:
Architecture specific flags and include/search directories are set up for GCC and LD commands.
Internally, GCC options such as stack-boundary, PIC and machine architecture are set up
based on ARCH macro. While stack-boundary=2 is fine for i386, it does not work for x86_64
and so it is left to the default value. Using -fPIE with gcc does not work with ld on x86_64,
but -fPIC works fine. Similarly, target and elf options are set up for linking
as approrpriate for architecture.
Assumption about gnu-efi install path:
Since the EFI build supports both EFI32 and EFI64, the following assumptions
are made with regard to the installed location of gnu-efi on the build platform.
1. gnu-efi-ia32: assumed installed in /usr/local
[ EFI-32 include files in /usr/local/include/efi and gnu-efi library in /usr/local/lib/ ]
2. gnu-efi-x86_64: assumed installed in /usr
[ EFI-64 include files in /usr/include/efi and gnu-efi library in /usr/lib64/ ]
Remanants of the unused old i386-only files, if any, need to be pruned.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and executables into
the architecture-dependent scripts to facilitate building syslinux modules/executables
for i386 and x86_64 environments. The x86_64 linker scripts are derived from the earlier i386
counterparts.
Subdirectories i386 and x86_64 hold the respective linker scripts mentioned below.
com32/lib/sylinux.ld
com32/lib/elf.ld
core/syslinux.ld
efi/syslinux.ld
mbr/mbr.ld
memdisk/memdisk.ld
Remanants of the unused old i386-only files, if any, need to be pruned.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the MCONFIG files into a mk/ directory and give them more
descriptive names.
This is purely a cosmetic change to make the 'include' directives a
bit more coherent by making it obvious exactly which MCONFIG file
we're including. For example, in com32/lua/src/Makefile we exchange
the line,
include ../../MCONFIG
for the much more comprehensible,
include $(MAKEDIR)/com32.mk
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also numerous uses of *w opcodes and spacing fixes
|
|
|
|
|
|
|
| |
This mbr code entity shows DL, DS, SI, 16 bytes of [DS:SI], ES, DI,
4 bytes of [ES:DI], and scans F0000h-FFFFFh on 16 byte alignment for $PnP.
This is useful for testing when MBR or VBR/PBR handoff goes awry.
|
|
|
|
|
|
|
|
|
| |
Apparently some BIOSes (including some Acer Travelmate machines)
require an MBR to start with 0x33; apparently Micro$oft MBRs start
with 33 C0, an alternate coding of the "xorw %ax,%ax" instruction. As
such, follow suit to work on these braindead BIOSes.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Update the check for !GPT to match the updated protocol (with length).
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
PartitionTypeGUID being zero means an empty slot, and so we should not
count that partition type.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
The committee didn't like re-using 0xEE for this purpose and wants
0xED instead.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Save four bytes by observing that none of our code relies on
saturate_stosl not actually corrupting %eax.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Fix the offset for the MSW of the partition endpoint.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
My GPT-based protocol was modified by the UEFI and T13 committees (the
former responsible for the GPT format, the latter for EDD and
therefore for the disk-related part of the BIOS specification.) This
is thus now on its way to become an official protocol, so change the
implementation to match.
This still needs testing, and the Syslinux core needs to be adjusted
to leverage the extended information.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Actually generate the stack frame isolinux expects. This is not the
optimal order, but it appears to be what both earlier and later
versions of isolinux expects...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The partition information is pointed to by ds:si; although ds
will *usually* be 0 it isn't guaranteed (in particular, it may
very well be 0x40 or 0x60); therefore, move the partition parsing
up before the reset of %ds and %es. As a side benefit, we get
to use push again...
Also, fix the ordering of the two halves of the GPT LBA!
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cap altmbr at 439 bytes, so that the partition select byte is not part
of the file. This means that:
a) updating the altmbr doesn't clobber the configuration;
b) it is easier to simply concatenate the select byte to the file.
This also matches gptmbr behavior.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
Revert the isohybrid handover protocol so that it has a stack format
compatible with the previous versions; that way we can also revert the
magic number to a compatible one.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Unlike the main MBR, we need to keep careful count when we process
logical partitions... and we weren't.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Add a file missing from previous checkin
e462c28ffaca0132c1761736bc93cb06a41dc7a6.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
Fix CBIOS in isohybrid mode. Also allow an isohybrid image to be
booted from a partition. Unfortunately this breaks compatibility
between differing versions of isohybrid and isolinux.bin.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Unify dependency generation and move common rules into
MCONFIG.embedded.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the dependency generation more common; have a general pattern in
MCONFIG, and use it in rules (not in CFLAGS).
For NASM source, in order to stay compatible with old versions of
NASM, run NASM twice; newer versions of NASM is capable of generating
dependencies simultaneously like gcc can, but that would break
compatibility with older distros.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Produce MBR variants with normal (DL) behavior, force to drive 80
behavior, and force to 80 on Ctrl pressed behavior.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Update copyright notices; add Intel copyright notices where
appropriate.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Impact: new feature
Create an alternative MBR which takes a partition number in byte 439
instead of looking at the active flag. This is useful when
dual-booting legacy operating systems which assume that their
particular partition must be the active partition.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Impact: cleanup
Use a symbolic constant for BIOS_kbdflags instead of open-coding the
address.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Impact: BIOS bug workaround, possible unexpected consequences?
Escape hatch for BIOSes which pass in garbage in DL: if the Ctrl key
is pressed during boot, force the drive number to 0x80.
Based on a patch by "TJ <ubuntu@tjworld.net>".
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
| |
Remove a stay jmpw *%si which was a test instruction and wasn't meant
to have been checked in.
|
|
|
|
|
|
|
|
| |
Some, unknown, version of gas or ld miscompiles a relative jump to an
absolute symbol, resulting in a broken isohybrid. Implement a
workaround for it by using a far jmp, which is absolute. Fortunately,
the isohybrid prefix is one of the very few boot sectors we have which
isn't short on space.
|
|
|
|
|
|
|
|
| |
Using addw to restore the stack pointer clobbers CF. Use leaw
instead, even though this relies on the BIOS not clobbering %si.
Worst case we can add a mov %sp, %si or similar.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Save one byte in isohdpfx.S.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|