Bootloader add temporary initial command line
This will probably be read from some config file at some point
This commit is contained in:
parent
cb5a5d3ed1
commit
ef53aab24a
|
@ -6,10 +6,20 @@
|
||||||
# NO REGISTERS SAVED
|
# NO REGISTERS SAVED
|
||||||
.global read_user_command_line
|
.global read_user_command_line
|
||||||
read_user_command_line:
|
read_user_command_line:
|
||||||
|
# print initial command line
|
||||||
movw $command_line_enter_msg, %si
|
movw $command_line_enter_msg, %si
|
||||||
call puts
|
call puts
|
||||||
|
movw $command_line_buffer, %si
|
||||||
|
call puts
|
||||||
|
|
||||||
|
# prepare registers for input
|
||||||
|
movw $command_line_enter_msg, %si
|
||||||
movw $command_line_buffer, %di
|
movw $command_line_buffer, %di
|
||||||
|
.read_user_command_line_goto_end:
|
||||||
|
cmpb $0, (%di)
|
||||||
|
jz .read_user_command_line_loop
|
||||||
|
incw %di
|
||||||
|
jmp .read_user_command_line_goto_end
|
||||||
|
|
||||||
.read_user_command_line_loop:
|
.read_user_command_line_loop:
|
||||||
call getc
|
call getc
|
||||||
|
@ -65,11 +75,9 @@ read_user_command_line:
|
||||||
command_line_enter_msg:
|
command_line_enter_msg:
|
||||||
.asciz "cmdline: "
|
.asciz "cmdline: "
|
||||||
|
|
||||||
|
|
||||||
.section .bss
|
|
||||||
|
|
||||||
.global command_line
|
.global command_line
|
||||||
command_line:
|
command_line:
|
||||||
# 100 character command line
|
# 100 character command line
|
||||||
command_line_buffer:
|
command_line_buffer:
|
||||||
.skip 100
|
.ascii "root=/dev/sda2 console=ttyS0"
|
||||||
|
.skip 100 - 28
|
||||||
|
|
Loading…
Reference in New Issue