aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2000-07-06 07:33:28 +0000
committerhpa <hpa>2000-07-06 07:33:28 +0000
commit0ab786f53d9d572a277897730bcb5968a076a7e0 (patch)
tree22a6deae259689d76231f4d93fbfe30666994fed
parent32e9ad305fdfcfbea01e2d95f2b1db0cb7e728bc (diff)
downloadsyslinux-0ab786f53d9d572a277897730bcb5968a076a7e0.tar.gz
syslinux-0ab786f53d9d572a277897730bcb5968a076a7e0.tar.xz
syslinux-0ab786f53d9d572a277897730bcb5968a076a7e0.zip
- Add support for boot protocol 0x0202 to SYSLINUX (not PXELINUX yet)syslinux-1.49-0x3964365c
- Fix PXELINUX "p" bug - Remove padding from end of MBR binary
-rw-r--r--NEWS10
-rw-r--r--ldlinux.asm83
-rw-r--r--mbr.asm9
-rw-r--r--pxelinux.asm4
4 files changed, 63 insertions, 43 deletions
diff --git a/NEWS b/NEWS
index f5bafb67..4b470f25 100644
--- a/NEWS
+++ b/NEWS
@@ -8,8 +8,8 @@ Changes in 1.49:
low 512K is available; PXELINUX requires 384K. Machines
with a physical memory hole in the low 640K cannot boot
Linux no matter what.) Depending what the reason is for the
- memory hole, a new kernel (2.4.0-test3 or later) may be
- required.
+ memory hole, a new kernel (2.4.0-test3-pre3 or later) may be
+ required. [PXELINUX NOT FULLY DONE IN THIS TEST VERSION]
* SYSLINUX: Default installer binary now compiled against
glibc 2.1. If this is inappropriate for your system and you
still want to use the offical version of SYSLINUX, please
@@ -21,7 +21,11 @@ Changes in 1.49:
individual partition of a whole-harddisk image.
* Include the source code to a Master Boot Record (MBR)
functionally equivalent to the one installed DOS except it
- includes EBIOS support. The MBR code is public domain.
+ includes EBIOS support, and should be resistant to geometry
+ changes. The MBR code is public domain.
+ * PXELINUX: Fix "double p" bug: if the tftp prefix was null,
+ all filenames would get a "p" preprended, e.g.
+ "ppxelinux.cfg" and "pvmlinux".
Changes in 1.48:
* PXELINUX: Workaround for PXE ROMs based on the Intel PXE PDK
diff --git a/ldlinux.asm b/ldlinux.asm
index 917102e8..f43ceeef 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -61,41 +61,43 @@ fake_setup_seg equ real_mode_seg+020h
struc real_mode_seg_t
resb 20h-($-$$) ; org 20h
-kern_cmd_magic resw 1 ; Magic # for command line
-kern_cmd_offset resw 1 ; Offset for kernel command line
+kern_cmd_magic resw 1 ; 0020 Magic # for command line
+kern_cmd_offset resw 1 ; 0022 Offset for kernel command line
resb 497-($-$$) ; org 497d
-bs_setupsecs resb 1 ; Sectors for setup code (0 -> 4)
-bs_rootflags resw 1 ; Root readonly flag
-bs_syssize resw 1
-bs_swapdev resw 1 ; Swap device (obsolete)
-bs_ramsize resw 1 ; Ramdisk flags, formerly ramdisk size
-bs_vidmode resw 1 ; Video mode
-bs_rootdev resw 1 ; Root device
-bs_bootsign resw 1 ; Boot sector signature (0AA55h)
-su_jump resb 1 ; 0EBh
-su_jump2 resb 1
-su_header resd 1 ; New setup code: header
-su_version resw 1 ; See linux/arch/i386/boot/setup.S
-su_switch resw 1
-su_setupseg resw 1
-su_startsys resw 1
-su_kver resw 1 ; Kernel version pointer
-su_loader resb 1 ; Loader ID
-su_loadflags resb 1 ; Load high flag
-su_movesize resw 1
-su_code32start resd 1 ; Start of code loaded high
-su_ramdiskat resd 1 ; Start of initial ramdisk
+bs_setupsecs resb 1 ; 01F1 Sectors for setup code (0 -> 4)
+bs_rootflags resw 1 ; 01F2 Root readonly flag
+bs_syssize resw 1 ; 01F4
+bs_swapdev resw 1 ; 01F6 Swap device (obsolete)
+bs_ramsize resw 1 ; 01F8 Ramdisk flags, formerly ramdisk size
+bs_vidmode resw 1 ; 01FA Video mode
+bs_rootdev resw 1 ; 01FC Root device
+bs_bootsign resw 1 ; 01FE Boot sector signature (0AA55h)
+su_jump resb 1 ; 0200 0EBh
+su_jump2 resb 1 ; 0201 Size of following header
+su_header resd 1 ; 0202 New setup code: header
+su_version resw 1 ; 0206 See linux/arch/i386/boot/setup.S
+su_switch resw 1 ; 0208
+su_setupseg resw 1 ; 020A
+su_startsys resw 1 ; 020C
+su_kver resw 1 ; 020E Kernel version pointer
+su_loader resb 1 ; 0210 Loader ID
+su_loadflags resb 1 ; 0211 Load high flag
+su_movesize resw 1 ; 0212
+su_code32start resd 1 ; 0214 Start of code loaded high
+su_ramdiskat resd 1 ; 0218 Start of initial ramdisk
su_ramdisklen equ $ ; Length of initial ramdisk
-su_ramdisklen1 resw 1
-su_ramdisklen2 resw 1
-su_bsklugeoffs resw 1
-su_bsklugeseg resw 1
-su_heapend resw 1
+su_ramdisklen1 resw 1 ; 021C
+su_ramdisklen2 resw 1 ; 021E
+su_bsklugeoffs resw 1 ; 0220
+su_bsklugeseg resw 1 ; 0222
+su_heapend resw 1 ; 0224
+su_pad1 resw 1 ; 0226
+su_cmd_line_ptr resd 1 ; 0228
resb (8000h-12)-($-$$) ; Were bootsect.S puts it...
-linux_stack equ $
+linux_stack equ $ ; 7FF4
linux_fdctab equ $
resb 8000h-($-$$)
-cmd_line_here equ $ ; Should be out of the way
+cmd_line_here equ $ ; 8000 Should be out of the way
endstruc
setup_seg equ 9020h
@@ -154,9 +156,9 @@ vk_end: equ $ ; Should be <= vk_size
; 0000h - main code/data segment (and BIOS segment)
; 7000h - real_mode_seg
;
-vk_seg equ 6000h ; This is where we stick'em
-xfer_buf_seg equ 5000h ; Bounce buffer for I/O to high mem
-fat_seg equ 3000h ; 128K area for FAT (2x64K)
+fat_seg equ 5000h ; 128K area for FAT (2x64K)
+vk_seg equ 4000h ; This is where we stick'em
+xfer_buf_seg equ 3000h ; Bounce buffer for I/O to high mem
comboot_seg equ 2000h ; COMBOOT image loading zone
;
@@ -2092,12 +2094,25 @@ high_load_done:
; capable of starting their setup from a different address.
;
mov bx,real_mode_seg ; Real mode segment
+ mov fs,bx ; FS -> real_mode_seg
;
; Copy command line. Unfortunately, the kernel boot protocol requires
; the command line to exist in the 9xxxxh range even if the rest of the
; setup doesn't.
;
- mov fs,bx ; FS -> real_mode_seg
+ test byte [LoadFlags],LOAD_HIGH
+ jz need_high_cmdline
+ cmp word [fs:su_version],0202h ; Support new cmdline protocol?
+ jb need_high_cmdline
+ ; New cmdline protocol
+ ; Store 32-bit (flat) pointer to command line
+ mov dword [fs:su_cmd_line_ptr],(real_mode_seg << 4) + cmd_line_here
+ jmp short in_proper_place
+
+need_high_cmdline:
+;
+; Copy command line up to 90000h
+;
mov ax,9000h
mov es,ax
mov si,cmd_line_here
diff --git a/mbr.asm b/mbr.asm
index ca6ca74c..6103ae3f 100644
--- a/mbr.asm
+++ b/mbr.asm
@@ -194,11 +194,12 @@ missing_os_msg db 'Missing operating system', 13, 10, 0
bad_disk_msg db 'Operating system loading error', 13, 10, 0
;
-; Total MBR size: 446 bytes
-; (End-of-boot-sector signature also needed.)
+; Maximum MBR size: 446 bytes; end-of-boot-sector signature also needed.
+; Note that some operating systems (NT, DR-DOS) put additional stuff at
+; the end of the MBR, so shorter is better.
;
- times 446-($-$$) db 0
-PartitionTable equ $ ; Start of partition table
+
+PartitionTable equ $$+446 ; Start of partition table
;
; BSS data; put at 800h
diff --git a/pxelinux.asm b/pxelinux.asm
index 3411243d..3c52a1ee 100644
--- a/pxelinux.asm
+++ b/pxelinux.asm
@@ -692,10 +692,9 @@ prefix: mov si,BootFile
mov di,PathPrefix
cld
call strcpy
- lea cx,[di-PathPrefix]
+ lea cx,[di-PathPrefix-1]
std
lea si,[di-2] ; Skip final null!
- dec cx
.find_alnum: lodsb
or al,20h
cmp al,'.' ; Count . or - as alphanum
@@ -711,6 +710,7 @@ prefix: mov si,BootFile
cmp al,'z'
ja .notalnum
.alnum: loop .find_alnum
+ dec si
.notalnum: mov byte [si+2],0 ; Zero-terminate after delimiter
cld
mov si,tftpprefix_msg