ref: d88d5c75f64ca8eb1605cf9a8bbef65bc26aa902
parent: 102af13743e15535c93005d77d4ba2bbcdd35eff
author: mkf <mkf@cloud9p.org>
date: Fri Nov 24 03:51:21 EST 2023
cmd/check: import (basic tool to check subsystems are working well)
--- a/Makefile
+++ b/Makefile
@@ -10,11 +10,13 @@
LDFLAGS += -T linker.ld -z noexecstack
QEMU ?= qemu-system-i386
-QFLAGS +=-machine accel=kvm:tcg -m 2M -serial stdio -kernel teppich.elf
+QFLAGS +=-machine accel=kvm:tcg -m 16M -serial stdio -kernel teppich.elf
C = \
cmd/rc.o\
cmd/echo.o\
+ cmd/clear.o\
+ cmd/check.o\
L = \
libc/strlen.o\
@@ -29,6 +31,7 @@
libc/lldel.o\
libc/printf.o\
libc/scanf.o\
+ libc/itoa.o\
K = \
pc/boot.o\
--- a/cmd/rc.h
+++ b/cmd/rc.h
@@ -1,9 +1,14 @@
#pragma once
-int echo_main(int argc, char **argv);
void rc_main(void);
+int echo_main(int, char**);
+int clear_main(int, char**);
+int check_main(int, char**);
+
static prog_t cmdtbl[] =
{
{"echo", echo_main},
+ {"clear", clear_main},
+ {"check", check_main},
};