aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-04-19 11:40:10 -0400
committerH. Peter Anvin <hpa@zytor.com>2008-04-19 11:40:10 -0400
commit75f156f68da694eae5f12cfe995903f91ad23e8b (patch)
tree0b8b765236010d05b0e880dc4e78c02f08302a34
parent16983e80939790e598656c1d91c24e7069feec34 (diff)
downloadsyslinux-elf-75f156f68da694eae5f12cfe995903f91ad23e8b.tar.gz
syslinux-elf-75f156f68da694eae5f12cfe995903f91ad23e8b.tar.xz
syslinux-elf-75f156f68da694eae5f12cfe995903f91ad23e8b.zip
Support LOCALBOOT (ISOLINUX-style) in SYSLINUX/EXTLINUX
Add support for ISOLINUX-style LOCALBOOT in SYSLINUX/EXTLINUX. No way to do the same for PXELINUX, due to the keyword collision. Suck.
-rw-r--r--NEWS4
-rw-r--r--comboot.inc4
-rw-r--r--config.inc5
-rw-r--r--extlinux.asm1
-rw-r--r--isolinux.asm42
-rw-r--r--keywords.inc2
-rw-r--r--ldlinux.asm1
-rw-r--r--parseconfig.inc6
-rw-r--r--pxelinux.asm4
-rw-r--r--ui.inc2
10 files changed, 24 insertions, 47 deletions
diff --git a/NEWS b/NEWS
index 84a8b6a4..7df0b1c0 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ Starting with 1.47, changes marked with SYSLINUX/PXELINUX/ISOLINUX
apply to that specific program only; other changes apply to all of
them.
+Changes in 3.64:
+ * SYSLINUX/EXTLINUX: support "localboot" with the same feature
+ set as ISOLINUX.
+
Changes in 3.63:
* Fix errors in the PCI and DMI detection modules (Erwan Velu,
Sebastian Herbszt).
diff --git a/comboot.inc b/comboot.inc
index 3a9b4332..b7b31475 100644
--- a/comboot.inc
+++ b/comboot.inc
@@ -661,13 +661,13 @@ comapi_idle equ comapi_err
;
; INT 22h AX=0014h Local boot
;
-%if IS_PXELINUX || IS_ISOLINUX
+%if HAS_LOCALBOOT
comapi_localboot:
mov ax,P_DX
jmp local_boot
%else
comapi_localboot equ comapi_err
-%endif
+%endif ; HAS_LOCALBOOT
;
; INT 22h AX=0015h Feature flags
diff --git a/config.inc b/config.inc
index d6a981e8..f0f59ce4 100644
--- a/config.inc
+++ b/config.inc
@@ -28,6 +28,11 @@ MAX_FKEYS equ 12 ; Number of F-key help files
%assign DO_WBINVD 0 ; Should we use WBINVD or not?
;
+; Local boot supported
+;
+%assign HAS_LOCALBOOT 1
+
+;
; Set this to return the A20 gate to its previous state, instead of
; leaving it open. This has caused problems, because there appear
; to be a race condition between disabling the A20 gate and trying to
diff --git a/extlinux.asm b/extlinux.asm
index c96e1102..352e7e11 100644
--- a/extlinux.asm
+++ b/extlinux.asm
@@ -1528,6 +1528,7 @@ getfssec:
%include "strecpy.inc" ; strcpy with end pointer check
%include "cache.inc" ; Metadata disk cache
%include "adv.inc" ; Auxillary Data Vector
+%include "localboot.inc" ; Disk-based local boot
; -----------------------------------------------------------------------------
; Begin data section
diff --git a/isolinux.asm b/isolinux.asm
index c2457697..57ca1d42 100644
--- a/isolinux.asm
+++ b/isolinux.asm
@@ -1092,46 +1092,6 @@ is_disk_image:
.done_sector: ret
;
-; Boot a specified local disk. AX specifies the BIOS disk number; or
-; 0xFFFF in case we should execute INT 18h ("next device.")
-;
-local_boot:
- call vgaclearmode
- lss sp,[cs:Stack] ; Restore stack pointer
- xor dx,dx
- mov ds,dx
- mov es,dx
- mov fs,dx
- mov gs,dx
- mov si,localboot_msg
- call writestr
- cmp ax,-1
- je .int18
-
- ; Load boot sector from the specified BIOS device and jump to it.
- mov dl,al
- xor dh,dh
- push dx
- xor ax,ax ; Reset drive
- call xint13
- mov ax,0201h ; Read one sector
- mov cx,0001h ; C/H/S = 0/0/1 (first sector)
- mov bx,trackbuf
- call xint13
- pop dx
- cli ; Abandon hope, ye who enter here
- mov si,trackbuf
- mov di,07C00h
- mov cx,512 ; Probably overkill, but should be safe
- rep movsd
- lss sp,[cs:InitStack]
- jmp 0:07C00h ; Jump to new boot sector
-
-.int18:
- int 18h ; Hope this does the right thing...
- jmp kaboom ; If we returned, oh boy...
-
-;
; close_file:
; Deallocates a file structure (pointer in SI)
; Assumes CS == DS.
@@ -1487,6 +1447,7 @@ getfssec:
%include "strcpy.inc" ; strcpy()
%include "rawcon.inc" ; Console I/O w/o using the console functions
%include "adv.inc" ; Auxillary Data Vector
+%include "localboot.inc" ; Disk-based local boot
; -----------------------------------------------------------------------------
; Begin data section
@@ -1494,7 +1455,6 @@ getfssec:
section .data
-localboot_msg db 'Booting from local disk...', CR, LF, 0
default_str db 'default', 0
default_len equ ($-default_str)
boot_dir db '/boot' ; /boot/isolinux
diff --git a/keywords.inc b/keywords.inc
index e98f879c..b6a701bb 100644
--- a/keywords.inc
+++ b/keywords.inc
@@ -90,7 +90,7 @@ keywd_table:
%if IS_PXELINUX
keyword ipappend, pc_ipappend
%endif
-%if IS_PXELINUX || IS_ISOLINUX
+%if HAS_LOCALBOOT
keyword localboot, pc_localboot
%endif
diff --git a/ldlinux.asm b/ldlinux.asm
index 0f063154..5593f716 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -1529,6 +1529,7 @@ getfatsector:
%include "strcpy.inc" ; strcpy()
%include "cache.inc" ; Metadata disk cache
%include "adv.inc" ; Auxillary Data Vector
+%include "localboot.inc" ; Disk-based local boot
; -----------------------------------------------------------------------------
; Begin data section
diff --git a/parseconfig.inc b/parseconfig.inc
index 90c1f3c9..2ef9c3a2 100644
--- a/parseconfig.inc
+++ b/parseconfig.inc
@@ -81,7 +81,8 @@ pc_ipappend: call getint
;
; "localboot" command (PXELINUX, ISOLINUX)
;
-%if IS_PXELINUX || IS_ISOLINUX
+%if HAS_LOCALBOOT
+
pc_localboot: call getint
cmp byte [VKernel],0 ; ("label" section only)
je .err
@@ -97,7 +98,8 @@ pc_localboot: call getint
mov [VKernelBuf+vk_rname+1], bx ; Return type
%endif
.err: ret
-%endif
+
+%endif ; HAS_LOCALBOOT
;
; "kernel", "config", ... command
diff --git a/pxelinux.asm b/pxelinux.asm
index 2f08bac5..7cc8d748 100644
--- a/pxelinux.asm
+++ b/pxelinux.asm
@@ -845,6 +845,8 @@ config_scan:
; Boot to the local disk by returning the appropriate PXE magic.
; AX contains the appropriate return code.
;
+%if HAS_LOCALBOOT
+
local_boot:
push cs
pop ds
@@ -863,6 +865,8 @@ local_boot:
popfd
retf ; Return to PXE
+%endif
+
;
; kaboom: write a message and bail out. Wait for quite a while,
; or a user keypress, then do a hard reboot.
diff --git a/ui.inc b/ui.inc
index 69ba7dc6..b26c3950 100644
--- a/ui.inc
+++ b/ui.inc
@@ -343,7 +343,7 @@ vk_check:
mov al, [VKernelBuf+vk_type]
mov [KernelType], al
-%if IS_PXELINUX || IS_ISOLINUX
+%if HAS_LOCALBOOT
; Is this a "localboot" pseudo-kernel?
%if IS_PXELINUX
cmp byte [VKernelBuf+vk_rname+4], 0