From 32075c0a70c262faef86220b9f42db4836962f9e Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 16 Sep 2021 06:50:15 +0000 Subject: scaffolding for the initrd: init can read files appended to it currently this is just a text file, but it will be a tar archive later on --- src/init/main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/init/main.c') diff --git a/src/init/main.c b/src/init/main.c index 265379d..db94d4a 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -8,6 +8,7 @@ extern char _bss_start; // provided by the linker extern char _bss_end; +extern char _initrd; int tty_fd; @@ -24,6 +25,8 @@ int main(void) { _syscall_exit(argify("couldn't open tty")); fs_test(); + + _syscall_write(tty_fd, &_initrd, 23); _syscall_exit(argify("my job here is done.")); } -- cgit v1.2.3