diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-12-22 09:45:59 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-12-22 09:45:59 -0800 |
commit | 9e25d6029b8c1568a74a7d9b5bc07f22b0fb8ade (patch) | |
tree | 5804b971440fca843ae7c6fbe96db70d2f506291 | |
parent | 2b164fd1078bc9640836f15598ed901cc7a31ae2 (diff) | |
parent | 6c7159d13c948afcc067635d0cc0c6aae39a04bf (diff) | |
download | syslinux-9e25d6029b8c1568a74a7d9b5bc07f22b0fb8ade.tar.gz |
Merge commit 'syslinux-3.84'
Resolved Conflicts:
Makefile
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | com32/include/syslinux/video.h | 2 | ||||
-rw-r--r-- | com32/lib/Makefile | 5 | ||||
-rw-r--r-- | com32/lib/sys/vesa/initvesa.c | 19 | ||||
-rw-r--r-- | com32/lib/syslinux/video/fontquery.c | 54 | ||||
-rw-r--r-- | com32/lib/syslinux/video/forcetext.c | 42 | ||||
-rw-r--r-- | com32/lib/syslinux/video/reportmode.c | 45 | ||||
-rw-r--r-- | com32/modules/chain.c | 3 | ||||
-rw-r--r-- | dosutil/Makefile | 7 | ||||
-rw-r--r-- | dosutil/eltorito.asm | 1 | ||||
-rw-r--r-- | syslinux.spec.in | 7 |
12 files changed, 177 insertions, 17 deletions
@@ -43,6 +43,7 @@ BOBJECTS = $(BTARGET) \ mbr/mbr_f.bin mbr/altmbr_f.bin mbr/gptmbr_f.bin \ core/pxelinux.0 core/isolinux.bin core/isolinux-debug.bin \ gpxe/gpxelinux.0 dos/syslinux.com win32/syslinux.exe \ + dosutil/*.com dosutil/*.sys \ $(MODULES) # BSUBDIRs build the on-target binary components. @@ -52,7 +53,7 @@ BOBJECTS = $(BTARGET) \ # files that depend only on the B phase, but may have to be regenerated # for "make installer". BSUBDIRS = codepage com32 lzo core memdisk modules mbr memdump gpxe sample \ - libinstaller dos win32 + libinstaller dos win32 dosutil ITARGET = IOBJECTS = $(ITARGET) dos/copybs.com \ utils/gethostip utils/isohybrid utils/mkdiskimage \ @@ -71,7 +72,7 @@ INSTALL_AUX = core/pxelinux.0 gpxe/gpxelinux.0 core/isolinux.bin \ INSTALL_AUX_OPT = win32/syslinux.exe # These directories manage their own installables -INSTALLSUBDIRS = com32 utils +INSTALLSUBDIRS = com32 utils dosutil # Things to install in /boot/extlinux EXTBOOTINSTALL = $(MODULES) @@ -20,6 +20,10 @@ Changes in 3.84: experimental. This will replace gfxboot.com in the future. * vesamenu.c32: new MENU RESOLUTION directive to set a screen resolution other than 640x480. + * chain.c32: add support for loading isolinux.bin. + * chain.c32: make sure to always return to text mode. + * eltorito.sys: DOS driver for generic CD-ROMs; by Gary Tong + and Bart Lagerweij. Changes in 3.83: * PXELINUX: clear memory before handing over to a chainloaded diff --git a/com32/include/syslinux/video.h b/com32/include/syslinux/video.h index 737c742b..93df2a06 100644 --- a/com32/include/syslinux/video.h +++ b/com32/include/syslinux/video.h @@ -38,6 +38,6 @@ void syslinux_force_text_mode(void); int syslinux_report_video_mode(uint16_t flags, uint16_t xsize, uint16_t ysize); -int syslinux_font_query(void **font); +int syslinux_font_query(uint8_t **font); #endif /* _SYSLINUX_API_H */ diff --git a/com32/lib/Makefile b/com32/lib/Makefile index 6062bcd2..e66b6560 100644 --- a/com32/lib/Makefile +++ b/com32/lib/Makefile @@ -111,7 +111,10 @@ LIBOBJS = \ syslinux/pxe_get_cached.o syslinux/pxe_get_nic.o \ \ syslinux/adv.o syslinux/advwrite.o syslinux/getadv.o \ - syslinux/setadv.o + syslinux/setadv.o \ + \ + syslinux/video/fontquery.o syslinux/video/forcetext.o \ + syslinux/video/reportmode.o BINDIR = /usr/bin LIBDIR = /usr/lib diff --git a/com32/lib/sys/vesa/initvesa.c b/com32/lib/sys/vesa/initvesa.c index 0221fcf7..f1224a17 100644 --- a/com32/lib/sys/vesa/initvesa.c +++ b/com32/lib/sys/vesa/initvesa.c @@ -37,6 +37,7 @@ #include <stdlib.h> #include <string.h> #include <sys/fpu.h> +#include <syslinux/video.h> #include "vesa.h" #include "video.h" #include "fill.h" @@ -240,12 +241,10 @@ static int vesacon_set_mode(int x, int y) __vesacon_format_pixels = __vesacon_format_pixels_list[bestpxf]; /* Download the SYSLINUX- or BIOS-provided font */ - rm.eax.w[0] = 0x0018; /* Query custom font */ - __intcall(0x22, &rm, &rm); - if (!(rm.eflags.l & EFLAGS_CF) && rm.eax.b[0]) { - __vesacon_font_height = rm.eax.b[0]; - rom_font = MK_PTR(rm.es, rm.ebx.w[0]); - } else { + __vesacon_font_height = syslinux_font_query(&rom_font); + if (!__vesacon_font_height) { + /* Get BIOS 8x16 font */ + rm.eax.w[0] = 0x1130; /* Get Font Information */ rm.ebx.w[0] = 0x0600; /* Get 8x16 ROM font */ __intcall(0x10, &rm, &rm); @@ -270,17 +269,13 @@ static int vesacon_set_mode(int x, int y) __vesacon_init_copy_to_screen(); /* Tell syslinux we changed video mode */ - rm.eax.w[0] = 0x0017; /* Report video mode change */ /* In theory this should be: - rm.ebx.w[0] = (mi->mode_attr & 4) ? 0x0007 : 0x000f; + flags = (mi->mode_attr & 4) ? 0x0007 : 0x000f; However, that would assume all systems that claim to handle text output in VESA modes actually do that... */ - rm.ebx.w[0] = 0x000f; - rm.ecx.w[0] = mi->h_res; - rm.edx.w[0] = mi->v_res; - __intcall(0x22, &rm, NULL); + syslinux_report_video_mode(0x000f, mi->h_res, mi->v_res); __vesacon_pixel_format = bestpxf; diff --git a/com32/lib/syslinux/video/fontquery.c b/com32/lib/syslinux/video/fontquery.c new file mode 100644 index 00000000..dd5d86e3 --- /dev/null +++ b/com32/lib/syslinux/video/fontquery.c @@ -0,0 +1,54 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 2007-2008 H. Peter Anvin - All Rights Reserved + * Copyright 2009 Intel Corporation; author: H. Peter Anvin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall + * be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * ----------------------------------------------------------------------- */ + +/* + * syslinux/video/forcetext.c + */ + +#include <syslinux/video.h> +#include <com32.h> + +/* + * Returns height of font or zero if no custom font loaded + */ +int syslinux_font_query(uint8_t **font) +{ + static com32sys_t ireg; + com32sys_t oreg; + int height; + + ireg.eax.w[0] = 0x0018; + __intcall(0x22, &ireg, &oreg); + + height = !(oreg.eflags.l & EFLAGS_CF) ? oreg.eax.b[0] : 0; + if (height) + *font = MK_PTR(oreg.es, oreg.ebx.w[0]); + + return height; +} + diff --git a/com32/lib/syslinux/video/forcetext.c b/com32/lib/syslinux/video/forcetext.c new file mode 100644 index 00000000..136cb279 --- /dev/null +++ b/com32/lib/syslinux/video/forcetext.c @@ -0,0 +1,42 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 2007-2008 H. Peter Anvin - All Rights Reserved + * Copyright 2009 Intel Corporation; author: H. Peter Anvin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall + * be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * ----------------------------------------------------------------------- */ + +/* + * syslinux/video/forcetext.c + */ + +#include <syslinux/video.h> +#include <com32.h> + +void syslinux_force_text_mode(void) +{ + static com32sys_t ireg; + + ireg.eax.w[0] = 0x0005; + __intcall(0x22, &ireg, NULL); +} diff --git a/com32/lib/syslinux/video/reportmode.c b/com32/lib/syslinux/video/reportmode.c new file mode 100644 index 00000000..6e100f15 --- /dev/null +++ b/com32/lib/syslinux/video/reportmode.c @@ -0,0 +1,45 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 2007-2008 H. Peter Anvin - All Rights Reserved + * Copyright 2009 Intel Corporation; author: H. Peter Anvin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall + * be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * ----------------------------------------------------------------------- */ + +/* + * syslinux/video/reportmode.c + */ + +#include <syslinux/video.h> +#include <com32.h> + +int syslinux_report_video_mode(uint16_t flags, uint16_t xsize, uint16_t ysize) +{ + static com32sys_t ireg; + + ireg.eax.w[0] = 0x0017; + ireg.ebx.w[0] = flags; + ireg.ecx.w[0] = xsize; + ireg.edx.w[0] = ysize; + __intcall(0x22, &ireg, NULL); +} diff --git a/com32/modules/chain.c b/com32/modules/chain.c index 27220143..03893c96 100644 --- a/com32/modules/chain.c +++ b/com32/modules/chain.c @@ -548,6 +548,9 @@ static void do_boot(void *boot_sector, size_t boot_size, /* Tell the shuffler not to muck with this area... */ syslinux_add_memmap(&mmap, endimage, 0xa0000 - endimage, SMT_RESERVED); + /* Force text mode */ + syslinux_force_text_mode(); + fputs("Booting...\n", stdout); syslinux_shuffle_boot_rm(mlist, mmap, opt.keeppxe, regs); error("Chainboot failed!\n"); diff --git a/dosutil/Makefile b/dosutil/Makefile index f3f90b3e..53b3859a 100644 --- a/dosutil/Makefile +++ b/dosutil/Makefile @@ -1,6 +1,9 @@ # # OpenWatcom compile and link utility # +topdir = .. +include $(topdir)/MCONFIG + WCL = wcl WCLOPT = -6 -osx -mt -bt=DOS -l=COM @@ -42,4 +45,8 @@ clean: tidy spotless: clean -rm -f *.com *.sys *~ +installer: all +install: installer + mkdir -m 755 -p $(INSTALLROOT)$(AUXDIR)/dosutil + install -m 644 $(TARGETS) $(INSTALLROOT)$(AUXDIR)/dosutil diff --git a/dosutil/eltorito.asm b/dosutil/eltorito.asm index 3294c6fc..1ff8b38c 100644 --- a/dosutil/eltorito.asm +++ b/dosutil/eltorito.asm @@ -757,6 +757,7 @@ print_char_exit: ;The 96h data is used for testing the number of bytes returned by an Extended ; CD-ROM sector read + align 16, db 0 Buffer times 2049 db 96h ;============================================================================= diff --git a/syslinux.spec.in b/syslinux.spec.in index d245fc75..c4b466b5 100644 --- a/syslinux.spec.in +++ b/syslinux.spec.in @@ -11,7 +11,7 @@ Source0: ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{VERSION}.t ExclusiveArch: i386 i486 i586 i686 athlon pentium4 x86_64 Packager: H. Peter Anvin <hpa@zytor.com> Buildroot: %{_tmppath}/%{name}-%{VERSION}-root -BuildPrereq: nasm >= 0.98.39, perl +BuildPrereq: nasm >= 2.03, perl Autoreq: 0 %ifarch x86_64 Requires: mtools, libc.so.6()(64bit) @@ -93,6 +93,7 @@ rm -rf %{buildroot} %{_datadir}/syslinux/*.bin %{_datadir}/syslinux/*.0 %{_datadir}/syslinux/memdisk +%{_datadir}/syslinux/dosutil/* %files devel %{_datadir}/syslinux/com32 @@ -119,6 +120,10 @@ fi %postun %changelog +* Fri Dec 18 2009 H. Peter Anvin <hpa@zytor.com> +- Require NASM 2.03 +- Package dosutil + * Thu May 29 2008 H. Peter Anvin <hpa@zytor.com> - Use install targets; clean up various paths. |