From ef53aab24a92fd5a314c1ba5d5c0983e6718bc42 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 17 Nov 2023 20:38:38 +0200 Subject: [PATCH] Bootloader add temporary initial command line This will probably be read from some config file at some point --- bootloader/command_line.S | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bootloader/command_line.S b/bootloader/command_line.S index 8a041211..43582a06 100644 --- a/bootloader/command_line.S +++ b/bootloader/command_line.S @@ -6,10 +6,20 @@ # NO REGISTERS SAVED .global read_user_command_line read_user_command_line: + # print initial command line movw $command_line_enter_msg, %si call puts + movw $command_line_buffer, %si + call puts + # prepare registers for input + movw $command_line_enter_msg, %si 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: call getc @@ -65,11 +75,9 @@ read_user_command_line: command_line_enter_msg: .asciz "cmdline: " - -.section .bss - .global command_line command_line: # 100 character command line command_line_buffer: - .skip 100 + .ascii "root=/dev/sda2 console=ttyS0" + .skip 100 - 28