diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | comboot.doc | 17 | ||||
-rw-r--r-- | comboot.inc | 11 | ||||
-rw-r--r-- | isolinux.asm | 1 | ||||
-rw-r--r-- | ldlinux.asm | 3 | ||||
-rw-r--r-- | pxelinux.asm | 19 |
6 files changed, 40 insertions, 14 deletions
@@ -2,6 +2,9 @@ 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 2.11: + * ALL: Add an API call to get the configuration file name. + Changes in 2.10: * MEMDISK: Handle images compressed with zip as well as with gzip. Some Windows-based image tools apparently generate diff --git a/comboot.doc b/comboot.doc index 48e7f8f3..cab8c936 100644 --- a/comboot.doc +++ b/comboot.doc @@ -247,7 +247,7 @@ AX=0003h Run command Input: AX 0003h ES:BX null-terminated command string - Output: None + Output: Does not return This API call terminates the program and executes the command string as if the user had entered it at the SYSLINUX command @@ -257,7 +257,7 @@ AX=0003h Run command AX=0004h Run default command Input: AX 0004h - Output: None + Output: Does not return This API call terminates the program and executes the default command string as if the user had pressed Enter alone on the @@ -424,7 +424,7 @@ AX=000Bh Get Serial Console Configuration AX=000Ch Perform final cleanup Input: AX 000Ch DX derivative-specific flags (0000h = clean up all) - Output: None + Output: Does not return This routine performs any "final cleanup" the boot loader would normally perform before loading a kernel, such as @@ -461,7 +461,7 @@ AX=000Dh Cleanup and replace bootstrap code EBX(!) initial value of EDX after bootstrap ESI initial value of ESI after bootstrap DS initial value of DS after bootstrap - Output: None + Output: Does not return This routine performs final cleanup, then takes a piece of code, copies it over the primary bootstrap at address 7C00h, @@ -476,3 +476,12 @@ AX=000Dh Cleanup and replace bootstrap code For PXELINUX, if the PXE stack is not unloaded, all registers (except DS, ESI and EDX) and the stack will be set up as they were set up by the PXE ROM. + + +AX=000Eh Get configuration file name + Input: AX 0000Eh + Output: ES:BX null-terminated file name string + + Returns the name of the configuration file. Note that it is + possible that the configuration file doesn't actually exist. + diff --git a/comboot.inc b/comboot.inc index 3318a311..3a8f377b 100644 --- a/comboot.inc +++ b/comboot.inc @@ -551,6 +551,16 @@ comapi_chainboot: push P_ECX jmp replace_bootstrap + +; +; INT 22h AX=000Eh Get configuration file name +; +comapi_configfile: + mov P_ES,cs + mov P_BX,ConfigName + clc + ret + ; ; This stuff should really be in the data section... ; @@ -588,6 +598,7 @@ int22_table: dw comapi_serialcfg ; 000B get serial port config dw comapi_cleanup ; 000C perform final cleanup dw comapi_chainboot ; 000D clean up then bootstrap + dw comapi_configfile ; 000E get name of config file int22_count equ ($-int22_table)/2 APIKeyWait db 0 diff --git a/isolinux.asm b/isolinux.asm index 04d829ce..d1d250b2 100644 --- a/isolinux.asm +++ b/isolinux.asm @@ -1680,6 +1680,7 @@ default_str db 'default', 0 default_len equ ($-default_str) boot_dir db '/boot' ; /boot/isolinux isolinux_dir db '/isolinux', 0 +ConfigName equ $ isolinux_cfg db 'isolinux.cfg', 0 err_disk_image db 'Cannot load disk image (invalid file)?', CR, LF, 0 diff --git a/ldlinux.asm b/ldlinux.asm index ad367100..b58211b0 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -1412,7 +1412,8 @@ aborted_msg db ' aborted.' ; Fall through to crlf_msg! crlf_msg db CR, LF null_msg db 0 crff_msg db CR, FF, 0 -syslinux_cfg db 'SYSLINUXCFG' +syslinux_cfg db 'SYSLINUXCFG' ; Mangled form +ConfigName db 'syslinux.cfg',0 ; Unmangled form %if IS_MDSLINUX manifest db 'MANIFEST ' %endif diff --git a/pxelinux.asm b/pxelinux.asm index 3b8a818f..58ae7e34 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -817,10 +817,7 @@ prefix: test byte [DHCPMagic], 04h ; Did we get a path prefix option ; Load configuration file ; find_config: - mov di,trackbuf - mov si,cfgprefix - mov cx,cfgprefix_len - rep movsb + ; ; Begin looking for configuration file ; @@ -829,7 +826,6 @@ config_scan: jz .no_option ; We got a DHCP option, try it first - push di mov si,trying_msg call writestr mov di,ConfigName @@ -837,18 +833,23 @@ config_scan: call writestr call crlf call open - pop di jnz .success -.no_option: ; Have to guess config file name +.no_option: + mov di,ConfigName + mov si,cfgprefix + mov cx,cfgprefix_len + rep movsb + ; Try loading by MAC address + ; Have to guess config file name push di mov si,MACStr mov cx,(3*17+1)/2 rep movsw mov si,trying_msg call writestr - mov di,trackbuf + mov di,ConfigName mov si,di call writestr call crlf @@ -887,7 +888,7 @@ config_scan: .not_default: pusha mov si,trying_msg call writestr - mov di,trackbuf + mov di,ConfigName mov si,di call writestr call crlf |