aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-12-28 17:52:38 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-12-28 17:52:38 -0800
commit4f9ce633a638d02e9c09a707e5457be6f3deed5f (patch)
tree3ec9b34911807da32f7867bad3af64f3e7452308
parentc5ac7c32116fb4bd4ab05b651150ae8c8da20e05 (diff)
parent978437d3bed21595e1fea1057084487fc413bef3 (diff)
downloadsyslinux-4f9ce633a638d02e9c09a707e5457be6f3deed5f.tar.gz
syslinux-4f9ce633a638d02e9c09a707e5457be6f3deed5f.tar.xz
syslinux-4f9ce633a638d02e9c09a707e5457be6f3deed5f.zip
Merge commit 'origin/master' into fscsyslinux-4.00-pre9
Resolved Conflicts: version Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--NEWS3
-rw-r--r--com32/gfxboot/.gitignore1
-rw-r--r--com32/gfxboot/Makefile4
-rw-r--r--com32/gfxboot/gfxboot.c11
-rw-r--r--com32/gfxboot/realmode_callback.asm2
-rw-r--r--com32/modules/chain.c27
-rw-r--r--dosutil/eltorito.asm9
-rw-r--r--memdisk/memdisk.inc2
-rw-r--r--memdisk/setup.c4
9 files changed, 49 insertions, 14 deletions
diff --git a/NEWS b/NEWS
index 044a3047..226a4d31 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ Starting with 1.47, changes marked with SYSLINUX, PXELINUX, ISOLINUX
or EXTLINUX apply to that specific program only; other changes apply
to all derivatives.
+Changes in 3.85:
+ * vesamenu.c32: unbreak the default "grey hole" background.
+
Changes in 3.84:
* SYSLINUX: make the DOS installer work for MS-DOS 7.x/8.x
(Win9x/ME) again.
diff --git a/com32/gfxboot/.gitignore b/com32/gfxboot/.gitignore
new file mode 100644
index 00000000..1944fd61
--- /dev/null
+++ b/com32/gfxboot/.gitignore
@@ -0,0 +1 @@
+*.tmp
diff --git a/com32/gfxboot/Makefile b/com32/gfxboot/Makefile
index 2affcdea..73133e1b 100644
--- a/com32/gfxboot/Makefile
+++ b/com32/gfxboot/Makefile
@@ -22,8 +22,8 @@ gfxboot.elf : gfxboot.o realmode_callback.o $(LIBS) $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
realmode_callback.o: realmode_callback.asm
- nasm -f bin -O99 -o $*.tmp -l $*.lst $<
- objcopy -B i386 -I binary -O elf32-i386 \
+ $(NASM) -f bin -O99 -o $*.tmp -l $*.lst $<
+ $(OBJCOPY) -B i386 -I binary -O elf32-i386 \
--redefine-sym _binary_$*_tmp_start=$*_start \
--redefine-sym _binary_$*_tmp_end=$*_end \
--strip-symbol _binary_$*_tmp_size \
diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index e1b865a1..3937e305 100644
--- a/com32/gfxboot/gfxboot.c
+++ b/com32/gfxboot/gfxboot.c
@@ -424,7 +424,7 @@ unsigned magic_ok(unsigned char *buf, unsigned *code_size)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-// Search cpio archive for gfx file.
+// Search (cpio archive) for gfx file.
//
unsigned find_file(unsigned char *buf, unsigned len, unsigned *gfx_file_start, unsigned *file_len, unsigned *code_size)
{
@@ -433,6 +433,8 @@ unsigned find_file(unsigned char *buf, unsigned len, unsigned *gfx_file_start, u
*gfx_file_start = 0;
*code_size = 0;
+ if((code_start = magic_ok(buf, code_size))) return code_start;
+
for(i = 0; i < len;) {
if((len - i) >= 0x1a && (buf[i] + (buf[i + 1] << 8)) == 0x71c7) {
fname_len = *(unsigned short *) (buf + i + 20);
@@ -730,7 +732,12 @@ void boot_entry(menu_t *menu_ptr, char *arg)
file = menu_ptr->kernel;
if(!file) file = menu_ptr->linux;
- if(!file) return;
+ if(!file) {
+ gfx_done();
+ asprintf(&cmd_buf, "%s %s", menu_ptr->label, arg);
+ syslinux_run_command(cmd_buf);
+ return;
+ }
// first, load kernel
diff --git a/com32/gfxboot/realmode_callback.asm b/com32/gfxboot/realmode_callback.asm
index fb5461d9..2ff30f26 100644
--- a/com32/gfxboot/realmode_callback.asm
+++ b/com32/gfxboot/realmode_callback.asm
@@ -111,7 +111,7 @@ cb_fread_90:
; edx filename
;
cb_getcwd:
- mov ax,15h
+ mov ax,1fh
int 22h
mov edx,es
shl edx,4
diff --git a/com32/modules/chain.c b/com32/modules/chain.c
index 03893c96..c5154888 100644
--- a/com32/modules/chain.c
+++ b/com32/modules/chain.c
@@ -48,6 +48,10 @@
* ntldr=<loader>:
* equivalent to -seg 0x2000 -file <loader>, used with WinNT's loaders
*
+ * cmldr=<loader>:
+ * used with Recovery Console of Windows NT/2K/XP.
+ * same as ntldr=<loader> & "cmdcons\0" written to memory address 0000:7C03
+ *
* freedos=<loader>:
* equivalent to -seg 0x60 -file <loader>, used with FreeDOS kernel.sys.
*
@@ -76,6 +80,7 @@
#include <syslinux/loadfile.h>
#include <syslinux/bootrm.h>
#include <syslinux/config.h>
+#include <syslinux/video.h>
#define SECTOR 512 /* bytes/sector */
@@ -84,6 +89,7 @@ static struct options {
uint16_t keeppxe;
uint16_t seg;
bool isolinux;
+ bool cmldr;
bool swap;
bool hide;
} opt;
@@ -449,6 +455,7 @@ static void do_boot(void *boot_sector, size_t boot_size,
uint8_t swapdrive = driveno & 0x80;
int i;
addr_t loadbase = opt.seg ? (opt.seg << 4) : 0x7c00;
+ static const char cmldr_signature[8] = "cmdcons";
mmap = syslinux_memory_map();
@@ -464,10 +471,21 @@ static void do_boot(void *boot_sector, size_t boot_size,
endimage = loadbase + boot_size;
- if (syslinux_add_movelist
- (&mlist, loadbase, (addr_t) boot_sector, boot_size))
+ if (syslinux_add_movelist(&mlist, loadbase,
+ (addr_t) boot_sector, boot_size))
goto enomem;
+ /*
+ * To boot the Recovery Console of Windows NT/2K/XP we need to write
+ * the string "cmdcons\0" to memory location 0000:7C03.
+ * Memory location 0000:7C00 contains the bootsector of the partition.
+ */
+ if (opt.cmldr) {
+ if (syslinux_add_movelist(&mlist, 0x7c03, (addr_t)cmldr_signature,
+ sizeof cmldr_signature))
+ goto enomem;
+ }
+
if (opt.swap && driveno != swapdrive) {
static const uint8_t swapstub_master[] = {
/* The actual swap code */
@@ -678,6 +696,10 @@ int main(int argc, char *argv[])
} else if (!strncmp(argv[i], "ntldr=", 6)) {
opt.seg = 0x2000; /* NTLDR wants this address */
opt.loadfile = argv[i] + 6;
+ } else if (!strncmp(argv[i], "cmldr=", 6)) {
+ opt.seg = 0x2000; /* CMLDR wants this address */
+ opt.loadfile = argv[i] + 6;
+ opt.cmldr = true;
} else if (!strncmp(argv[i], "freedos=", 8)) {
opt.seg = 0x60; /* FREEDOS wants this address */
opt.loadfile = argv[i] + 8;
@@ -714,6 +736,7 @@ int main(int argc, char *argv[])
"Options: file=<loader> load file, instead of boot sector\n"
" isolinux=<loader> load another version of ISOLINUX\n"
" ntldr=<loader> load Windows bootloaders: NTLDR, SETUPLDR, BOOTMGR\n"
+ " cmldr=<loader> load Recovery Console of Windows NT/2K/XP\n"
" freedos=<loader> load FreeDOS kernel.sys\n"
" msdos=<loader> load MS-DOS io.sys\n"
" pcdos=<loader> load PC-DOS ibmbio.com\n"
diff --git a/dosutil/eltorito.asm b/dosutil/eltorito.asm
index 1ff8b38c..eabda126 100644
--- a/dosutil/eltorito.asm
+++ b/dosutil/eltorito.asm
@@ -71,10 +71,11 @@ DriveLetter db 0 ; |
NumUnitsSupp db 1 ;-+
DriverName db 'El-Torito CD-ROM Device Driver',0
-ReqHdrLoc dw 0,0 ; 35h
-DriveNumber db 0 ; 39h
-XferAddr dw 0,0 ; 3ah
-Checksum dw -1,-1
+ align 4, db 0
+ReqHdrLoc dd 0
+XferAddr dd 0
+Checksum dd -1
+DriveNumber db 0
ReadBytes db 0 ;0 --> 2048 bytes/sector
;1 --> 1024 bytes/sector
;2 --> 512 bytes/sector
diff --git a/memdisk/memdisk.inc b/memdisk/memdisk.inc
index a92bbda2..e1a0901b 100644
--- a/memdisk/memdisk.inc
+++ b/memdisk/memdisk.inc
@@ -938,7 +938,7 @@ writehex_common:
ret
%endif
- section .data
+ section .data align=16
alignb 2
Int13Funcs dw Reset ; 00h - RESET
dw GetStatus ; 01h - GET STATUS
diff --git a/memdisk/setup.c b/memdisk/setup.c
index ea17afda..b8eadfb7 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -592,7 +592,7 @@ static const struct geometry *get_disk_image_geometry(uint32_t where,
while (!ok) {
/* Assume it's a floppy drive, guess a geometry */
unsigned int type, track;
- int c, h, s;
+ int c, h, s = 0;
if (xsectors < 320 * 2) {
c = 40;
@@ -795,7 +795,7 @@ static void relocate_rm_code(uint32_t newbase)
static uint8_t checksum_buf(const void *buf, int count)
{
const uint8_t *p = buf;
- uint8_t c;
+ uint8_t c = 0;
while (count--)
c += *p++;