From: hpa Date: Tue, 9 Sep 2003 01:08:57 +0000 (+0000) Subject: Add "ipappend 2" X-Git-Tag: syslinux-3.11~521 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60cff1d57e391e136b5d10c2dc2c89456f4d1df3;p=platform%2Fupstream%2Fsyslinux.git Add "ipappend 2" --- diff --git a/NEWS b/NEWS index 10584aa..640313e 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ Changes in 2.07: * MEMDISK: Workaround for BIOSes which go into a snit when they get a RESET command for the floppy system when there is no floppy in the system. + * PXELINUX: Add "ipappend 2", which passes the hardware + address of the boot interface to the kernel as a + command-line option. Changes in 2.06: * ALL: Fix problem that would occationally cause a diff --git a/pxelinux.asm b/pxelinux.asm index 3becef2..47feae2 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -210,7 +210,7 @@ IPOption resb 80 ; ip= option buffer MACLen resb 1 ; MAC address len MACType resb 1 ; MAC address type MAC resb 16 ; Actual MAC address -MACStr resb 51 ; MAC address as a string +MACStr resb 3*17 ; MAC address as a string alignb 32 KernelName resb FILENAME_MAX ; Mangled name for kernel KernelCName resb FILENAME_MAX ; Unmangled kernel name @@ -894,14 +894,23 @@ config_scan: %define HAVE_SPECIAL_APPEND %macro SPECIAL_APPEND 0 mov al,[IPAppend] ; ip= - and al,al - jz .noipappend + test al,01h ; IP append + jz .noipappend1 mov si,IPOption mov cx,[IPOptionLen] rep movsb mov al,' ' stosb -.noipappend: +.noipappend1: + test al,02h + jz .noipappend2 + mov si,bootif_str + mov cx,bootif_str_len + rep movsb + mov si,MACStr + call strcpy + mov byte [di-1],' ' ; Replace null with space +.noipappend2: %endmacro ; Unload PXE stack @@ -2337,8 +2346,11 @@ cfgprefix_len equ ($-cfgprefix) ; ; mem= and vga= are handled as normal 32-bit integer values initrd_cmd db 'initrd=' -initrd_cmd_len equ 7 +initrd_cmd_len equ $-initrd_cmd +; This one we make ourselves +bootif_str db 'BOOTIF=' +bootif_str_len equ $-bootif_str ; ; Config file keyword table ; diff --git a/syslinux.doc b/syslinux.doc index 9948991..e217812 100644 --- a/syslinux.doc +++ b/syslinux.doc @@ -124,14 +124,33 @@ APPEND options... them. This is the equivalent of the LILO "append" option. IPAPPEND flag_val [PXELINUX only] - The IPAPPEND option is available only on PXELINUX, and - indicates (if the flag value is 1) that an option of the - following format should be generated and added: + The IPAPPEND option is available only on PXELINUX. The + flag_val is an OR of the following options: + + 1: indicates that an option of the following format + should be generated and added to the kernel command line: ip=::: ... based on the input from the DHCP/BOOTP or PXE boot server. + THE USE OF THIS OPTION IS NOT RECOMMENDED. If you have to use + it, it is probably an indication that your network configuration + is broken. Using just "ip=dhcp" on the kernel command line + is a preferrable option, or, better yet, run dhcpcd/dhclient, + from an initrd if necessary. + + 2: indicates that an option of the following format + should be generated and added to the kernel command line: + + BOOTIF= + + ... in dash-separated hexadecimal with leading hardware type + (same as for the configuration file; see pxelinux.doc.) + + This allows an initrd program to determine from which + interface the system booted. + LABEL label KERNEL image APPEND options...