mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
fix(userland): Fix 'clear' command, backspace keycodes (0x7F/0x08), serial keyboard input & make run target
- Add 'clear' and 'cls' builtin handlers in LazyBox shell - Output ANSI \033[2J\033[H sequence on tty_clear() to clear serial/UART terminals - Support both ASCII 0x7F (DEL) and 0x08 (BS) for Backspace in shell and nano editor - Connect 16550 serial input to keyboard_get_key() on x86_64 for headless terminals - Add ANSI escape sequence decoding for arrow keys (Up/Down/Left/Right/Home/End/Del) - Update Makefile 'make run' and 'make qemu' with -display none for smooth terminal execution - Add 'make run-gui' target for optional graphical SDL/GTK window
This commit is contained in:
1 parent
f5dbc1453c
commit
6ad90542ac
7 files changed
+118
-23
No files matched your search
@@ -53,7 +53,7 @@ ifeq ($(ARCH), x86_64)
|
||||
TARGET = $(IMAGE)
|
||||
QEMU_CMD = qemu-system-x86_64 -drive format=raw,file=$(IMAGE) \
|
||||
-netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:80 \
|
||||
-device e1000,netdev=net0 -serial stdio
|
||||
-device e1000,netdev=net0 -serial stdio -display none
|
||||
|
||||
else ifneq ($(filter $(ARCH), aarch64 arm64),)
|
||||
CROSS_COMPILE ?= aarch64-linux-gnu-
|
||||
@@ -375,6 +375,17 @@ $(IMAGE): $(BUILD_DIR)/boot/boot.bin $(BUILD_DIR)/boot/stage2.bin $(BUILD_DIR)/k
|
||||
run qemu: $(TARGET)
|
||||
$(QEMU_CMD)
|
||||
|
||||
run-gui: $(TARGET)
|
||||
ifeq ($(ARCH), x86_64)
|
||||
qemu-system-x86_64 -drive format=raw,file=$(IMAGE) \
|
||||
-netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:80 \
|
||||
-device e1000,netdev=net0 -serial stdio
|
||||
else ifneq ($(filter $(ARCH), aarch64 arm64),)
|
||||
qemu-system-aarch64 -M virt -cpu cortex-a57 -m 128M -kernel $(BUILD_DIR)/kernel.elf -serial stdio
|
||||
else
|
||||
qemu-system-arm -M virt -cpu cortex-a15 -m 128M -kernel $(BUILD_DIR)/kernel.elf -serial stdio
|
||||
endif
|
||||
|
||||
run-server: $(IMAGE)
|
||||
qemu-system-x86_64 -drive format=raw,file=$(IMAGE) \
|
||||
-netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:80 \
|
||||
|
||||
Reference in new issue
Block a user