I wasn't having much luck appending multiboot kernel command line params
w/ etherboot & mkElfImage until I found that head.S in mkElfImage was
overwriting the multiboot info pointer it saved away in %esi...
# Save the arguments safely out of the way
movl %eax, %ebp
movl %ebx, %esi
...
# Move the gdt where Linux will not smash it during decompression
movl $gdt, %esi
I just saved the args to vars instead & it works fine, cmdline params get
appended & recognized by the kernel... (heh, and this might have other
"positive" side effects, since the multiboot code was looking at who knows
where for the mb info... ;)
-Jake
diff -uN elf32-i386/head.S.ORIG elf32-i386/head.S
--- elf32-i386/head.S.ORIG Sat Jul 27 00:49:25 2002
+++ elf32-i386/head.S Sun Jul 28 14:53:11 2002
@@ -249,8 +249,8 @@
cli
# Save the arguments safely out of the way
- movl %eax, %ebp
- movl %ebx, %esi
+ movl %eax, boot_type
+ movl %ebx, boot_data
movl stack_start, %esp
@@ -289,8 +289,8 @@
movl %eax, %gs
movl %eax, %ss
- pushl %esi # boot data pointer as second arg
- pushl %ebp # boot data type as first argument
+ pushl boot_data # boot data pointer as second arg
+ pushl boot_type # boot data type as first argument
call convert_params
movl %eax, %esi # put the real mode pointer in a safe place
@@ -597,3 +597,8 @@
.word 0xffff,(RELOC&0xffff)
.byte (RELOC>>16),0x93,0x00,(RELOC>>24)
gdt_end:
+
+boot_type:
+ .long 0
+boot_data:
+ .long 0