| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It has been observed that binaries contents
are depending on the order of linked objects.
This order is caused by GNU make's wildcard function
and the position of sources on filesystem.
This change tries to prevent this kind of randomness.
Also consider building using -j1 flag
to make it even more reproductible.
Change-Id: Ie8eee7f336e6f1fa2863c4150d967afd15519f1d
Bug: http://bugzilla.syslinux.org/show_bug.cgi?id=57#related
Signed-off-by: Philippe Coval <philippe.coval at open.eurogiciel.org>
|
|
|
|
|
|
|
|
|
|
|
| |
As per commit f775e740a3a817a4ff5ba26bea99dbfd735456b3, inreg parameters
of intcall() shall be zeroified.
Having unclean inreg could trigger bad behaviors on some hosts.
This patch is about adding memset() calls prior any intcall() :
- some intcall didn't had any memset at all
- some successive intcall() calls didn't memset inreg in between calls
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately commit 4eb06d95d882 ("mk: Add -fPIC for x86_64 to
embedded.mk") left -mregparm enabled when compiling objects in core/,
which means that when compiling for i386 those objects are compiled
with a different ABI compared with everything else, leading to hangs
when booting under 32-bit EFI.
We should only enable -mregparm for code that absolutely requires it,
such as dos/crt0.S which would need to be re-written to use another
ABI.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This merge also includes the Syslinux-4.06 release.
Conflicts:
Makefile
com32/hdt/Makefile
com32/modules/Makefile
com32/samples/hello.c
mtools/Makefile
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Swap order of sectors/track with bytes/sector to match diskette
parameter table order (as pointed to by INT 1Eh).
References: (additional ones available if necessary)
'System BIOS for IBM PC/XT/AT computers and compatibles' by Phoenix
Technologies Ltd. copyright 1987,88,89 3rd printing 1990 ISBN:
0-201-51806-6 pages 61-62
'PC Interrupts' 2nd edition by Ralf Brown & Jim Kyle copyright 1994
1st printing 1993 ISBN: 0-201-62485-0 page 211
Note: this fixes an issue with older FreeDOS kernels that expect this
structure to contain valid values.
Signed-off-by: Kenneth J. Davis <jeremyd@fdos.org>
Signed-off-by: Matt Fleming <matt.fleming@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>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 already require a new enough version of NASM that the -Ox option is
supported, so just use it.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
i386 and x86_64.
The memcpy, memset and memmove routines originated from klibc.
Remanants of the unused old i386-only files, if any, need to be pruned.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
If this fails, the machine should never be working.
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
| | |
|
| |
| |
| |
| | |
BX was listed before AH
|
| |
| |
| |
| | |
Only probe_int13h_15h() showed the AH01h output; show it in the others also
|
| |
| |
| |
| |
| | |
By listing current regs, evaluate present, then display present last, it
allows it to conveniently use only 1 output line.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
INT13h AH01h is supposed to show the status of the last command. Show
its status and determine if it's a known failure.
This does not affect the "present" variable at this time.
|
| |
| |
| |
| |
| | |
Include all registers that should include anything of value and display
the value of the "present" variable.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some BIOSs lie and don't set CF when they should.
Additional comments from Shao:
Fix INT 0x13, AH==0x08 disk drive probe.
This function might return CF==0 ("success"), but could return a
standard response no matter which drive number is passed in DL, but
based only on DL's bit 7. Fortunately, AH should be 0 for an existent
drive and 01h for a non-existent drive. Now we check AH.
Fix INT 0x13, AH==0x41 disk drive probe
This function might return CF==0 ("success"), but could also include BX
left unchanged. If extensions are present, BX should be returned with
0xAA55. So we now check for this special value in our determination of
a drive's presence.
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Make sure we actually set the disk CMOS type.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
| |
| |
| |
| |
| |
| | |
The old name was intended as a test to prevent collision. New name
seems more logical and appropriate. By reusing the mem= parameter and
adjusting all of the memory calls that MEMDISK replaces through the use
of insertrange(), there's nothing better that we can do.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This removes the need to have these tiny files around. This also
changes it to be relative to $(topdir), allowing for memdisk to be moved
if needed in the future.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Only touch the ranges that are type 1 (available)
|
| | |
|
| | |
|
|/
|
|
|
|
| |
Add a new parameter, int15maxres, for specifying (in decimal bytes) the
maximum amount of free RAM that different calls will return. The RAM is
tagged in INT15h AXe820h as reserved in order to satisfy this.
|
|
|
|
|
|
|
|
| |
The function might return CF==0 ("success"), but could
include AH==0 ("no such drive"). This is the case on
at least a number of Dell models. Now we check AH, too.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
|
|
|
|
|
|
|
|
|
| |
In an effort to trouble-shoot a problem report on some Dell
models (including an Optiplex GX260), we add further debugging
output to try to find out at which point things go wrong. The
problem units are apparently probing as "drive present" for all
drives, which obviously isn't right.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
|
|
|
|
|
| |
By removing the use of #ifdef-#endif blocks.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
|
|
|
|
|
|
| |
Use "extern const char foo[];" for an external symbol rather than
"extern void" (gcc 4.5 fix.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Make mstructs.h includable from a Linux utility.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two changes to the INT 0x13, AH=0x7B El Torito function:
1. Support the DL=0x7F "terminate all" parameter
2. Only respond to DL=0x7F or DL=our particular emulated drive number
This prevents tools like Bart Lagerweij's El Torito tools from
receiving false positives when probing all drive numbers.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When mstructs.h is used by MDISKCHK.COM, pointers have
a 16-bit size and thus the mBFT structure sizeof() is
smaller under OpenWatcom. We now union this pointer
member with a uint32_t to force the field to at least
32 bits.
There is another pointer in this header file which is
already unioned with a uint32_t, due to that field's
dual-purpose. That field is fine under OpenWatcom.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
| |
| |
| |
| |
| |
| |
| | |
This needs to be in here in order for the header file
to be useful to any C file other than setup.c.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of padding the mBFT so its size is correct, we
actually put the MDI struct in there, since the last
commit provided it.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the patch area began after the beginning of
the MDI, but continued past its end. This is difficult
to express with C structures, so we've simply changed
the patch area to include the entire MDI. So it now
includes the MDI size and MEMDISK version info, which
we simply make constant to avoid modifying.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit moves the MEMDISK header structure into
the common structures header file.
It also adds the "safe hook" structure to the MEMDISK
header structure, since that matches what's in the hook
binaries. Thus, we access the "safe hook" via the
header pointer, instead of separately.
Tested against a DOS floppy image including an
experimental MDISKCHK.COM and also gainst WinVBlock.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|