summaryrefslogtreecommitdiff
path: root/com32/gfxboot
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-12-28 17:51:07 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-12-28 17:51:07 -0800
commit978437d3bed21595e1fea1057084487fc413bef3 (patch)
tree7d04f89e76e4d0bcc32e17324b350978596e395c /com32/gfxboot
parent93dfdd720e66e45609e1af321d4a2eeeb4da36c5 (diff)
parentb4753621f708d1c1817109b12d1a495db7edbe07 (diff)
downloadsyslinux-978437d3bed21595e1fea1057084487fc413bef3.tar.gz
Merge commit 'sherbszt/gfxboot32'syslinux-3.85-pre1
Diffstat (limited to 'com32/gfxboot')
-rw-r--r--com32/gfxboot/Makefile4
-rw-r--r--com32/gfxboot/gfxboot.c11
-rw-r--r--com32/gfxboot/realmode_callback.asm2
3 files changed, 12 insertions, 5 deletions
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