summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/extlinux.asm7
-rw-r--r--core/isolinux.asm6
-rw-r--r--core/keywords1
-rw-r--r--core/keywords.inc27
-rw-r--r--core/ldlinux.asm7
-rw-r--r--core/parseconfig.inc32
-rw-r--r--core/pxelinux.asm7
-rw-r--r--core/runkernel.inc7
8 files changed, 49 insertions, 45 deletions
diff --git a/core/extlinux.asm b/core/extlinux.asm
index 02c2e229..bacb8a28 100644
--- a/core/extlinux.asm
+++ b/core/extlinux.asm
@@ -1550,13 +1550,6 @@ err_bootfailed db CR, LF, 'Boot failed: please change disks and press '
config_name db 'extlinux.conf',0 ; Unmangled form
;
-; Command line options we'd like to take a look at
-;
-; mem= and vga= are handled as normal 32-bit integer values
-initrd_cmd db 'initrd='
-initrd_cmd_len equ 7
-
-;
; Config file keyword table
;
%include "keywords.inc"
diff --git a/core/isolinux.asm b/core/isolinux.asm
index 5452012c..a3eb9ee5 100644
--- a/core/isolinux.asm
+++ b/core/isolinux.asm
@@ -1472,12 +1472,6 @@ dbg_isodir_msg db 'isolinux directory at LBA = ', 0
dbg_config_msg db 'About to load config file...', CR, LF, 0
dbg_configok_msg db 'Configuration file opened...', CR, LF, 0
%endif
-;
-; Command line options we'd like to take a look at
-;
-; mem= and vga= are handled as normal 32-bit integer values
-initrd_cmd db 'initrd='
-initrd_cmd_len equ 7
;
; Config file keyword table
diff --git a/core/keywords b/core/keywords
index d7d8fa65..16fe7720 100644
--- a/core/keywords
+++ b/core/keywords
@@ -2,6 +2,7 @@ menu
text
include
append
+initrd
config
default
display
diff --git a/core/keywords.inc b/core/keywords.inc
index b6a701bb..65b657c1 100644
--- a/core/keywords.inc
+++ b/core/keywords.inc
@@ -49,6 +49,7 @@ keywd_table:
keyword text, pc_text
keyword include, pc_opencmd, pc_include
keyword append, pc_append
+ keyword initrd, pc_filename, InitRD
keyword default, pc_default
keyword display, pc_opencmd, get_msg_file
keyword font, pc_filecmd, loadfont
@@ -74,19 +75,19 @@ keywd_table:
keyword onerror, pc_onerror
keyword allowoptions, pc_setint16, AllowOptions
keyword noescape, pc_setint16, NoEscape
- keyword f1, pc_fkey, FKeyN(1)
- keyword f2, pc_fkey, FKeyN(2)
- keyword f3, pc_fkey, FKeyN(3)
- keyword f4, pc_fkey, FKeyN(4)
- keyword f5, pc_fkey, FKeyN(5)
- keyword f6, pc_fkey, FKeyN(6)
- keyword f7, pc_fkey, FKeyN(7)
- keyword f8, pc_fkey, FKeyN(8)
- keyword f9, pc_fkey, FKeyN(9)
- keyword f10, pc_fkey, FKeyN(10)
- keyword f0, pc_fkey, FKeyN(10)
- keyword f11, pc_fkey, FKeyN(11)
- keyword f12, pc_fkey, FKeyN(12)
+ keyword f1, pc_filename, FKeyN(1)
+ keyword f2, pc_filename, FKeyN(2)
+ keyword f3, pc_filename, FKeyN(3)
+ keyword f4, pc_filename, FKeyN(4)
+ keyword f5, pc_filename, FKeyN(5)
+ keyword f6, pc_filename, FKeyN(6)
+ keyword f7, pc_filename, FKeyN(7)
+ keyword f8, pc_filename, FKeyN(8)
+ keyword f9, pc_filename, FKeyN(9)
+ keyword f10, pc_filename, FKeyN(10)
+ keyword f0, pc_filename, FKeyN(10)
+ keyword f11, pc_filename, FKeyN(11)
+ keyword f12, pc_filename, FKeyN(12)
%if IS_PXELINUX
keyword ipappend, pc_ipappend
%endif
diff --git a/core/ldlinux.asm b/core/ldlinux.asm
index 9cf1c03d..2be865da 100644
--- a/core/ldlinux.asm
+++ b/core/ldlinux.asm
@@ -1716,13 +1716,6 @@ syslinux_cfg3 db '/' ; /syslinux.cfg
config_name db 'syslinux.cfg', 0 ; syslinux.cfg
;
-; Command line options we'd like to take a look at
-;
-; mem= and vga= are handled as normal 32-bit integer values
-initrd_cmd db 'initrd='
-initrd_cmd_len equ 7
-
-;
; Config file keyword table
;
%include "keywords.inc"
diff --git a/core/parseconfig.inc b/core/parseconfig.inc
index 2ef9c3a2..e004cab5 100644
--- a/core/parseconfig.inc
+++ b/core/parseconfig.inc
@@ -289,9 +289,9 @@ pc_serial: call getint
ret
;
-; "F"-key command
+; Store mangled filename command
;
-pc_fkey: push ax
+pc_filename: push ax
call pc_getline
pop di
call mangle_name ; Mangle file name
@@ -301,6 +301,7 @@ pc_fkey: push ax
; "label" command
;
pc_label: call commit_vk ; Commit any current vkernel
+ mov byte [InitRD+NULLOFFSET],NULLFILE ; No "initrd" statement
mov di,VKernelBuf ; Erase the vkernelbuf for better compression
mov cx,(vk_size >> 1)
xor ax,ax
@@ -392,10 +393,30 @@ parse_config:
; commit_vk: Store the current VKernelBuf into buffer segment
;
commit_vk:
- ; For better compression, clean up the append field
- mov ax,[VKernelBuf+vk_appendlen]
+ cmp byte [VKernel],0
+ jz .nolabel ; Nothing to commit...
+
mov di,VKernelBuf+vk_append
- add di,ax
+ add di,[VKernelBuf+vk_appendlen]
+
+ ; If we have an initrd statement, append it to the
+ ; append statement
+ cmp byte [InitRD+NULLOFFSET],NULLFILE
+ je .noinitrd
+
+ mov si,initrd_cmd
+ mov cx,initrd_cmd_len
+ rep movsb
+ mov si,InitRD
+ call unmangle_name
+ mov al,' '
+ stosb
+
+ ; For better compression, clean up the append field
+.noinitrd:
+ mov ax,di
+ sub ax,VKernelBuf+vk_append
+ mov [VKernelBuf+vk_appendlen],ax
mov cx,max_cmd_len+1
sub cx,ax
xor ax,ax
@@ -407,6 +428,7 @@ commit_vk:
mov cx,vk_size
call rllpack
mov [VKernelEnd],edi
+.nolabel:
ret
.overflow:
mov si,vk_overflow_msg
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
index 3efd3c67..812bbeb2 100644
--- a/core/pxelinux.asm
+++ b/core/pxelinux.asm
@@ -2731,13 +2731,6 @@ syslinux_banner db CR, LF, 'PXELINUX ', version_str, ' ', date, ' ', 0
cfgprefix db 'pxelinux.cfg/' ; No final null!
cfgprefix_len equ ($-cfgprefix)
-;
-; Command line options we'd like to take a look at
-;
-; mem= and vga= are handled as normal 32-bit integer values
-initrd_cmd db 'initrd='
-initrd_cmd_len equ $-initrd_cmd
-
; This one we make ourselves
bootif_str db 'BOOTIF='
bootif_str_len equ $-bootif_str
diff --git a/core/runkernel.inc b/core/runkernel.inc
index bbd9c7af..4d627787 100644
--- a/core/runkernel.inc
+++ b/core/runkernel.inc
@@ -617,6 +617,13 @@ err_noinitrd db CR, LF, 'Could not find ramdisk image: ', 0
boot_image db 'BOOT_IMAGE='
boot_image_len equ $-boot_image
+;
+; Command line options we'd like to take a look at
+;
+; mem= and vga= are handled as normal 32-bit integer values
+initrd_cmd db 'initrd='
+initrd_cmd_len equ $-initrd_cmd
+
section .bss
alignb 4
MyHighMemSize resd 1 ; Possibly adjusted highmem size