From d79436a1170e4d5ffde77416313587f320c8e590 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 18 Nov 2024 15:56:37 +0100 Subject: usr: Bootstrap the initramfs for the kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a sample `foo` program which already calls the `write_and_block` system call which is yet to be implemented by this kernel. Moreover, the same CPIO format is used for the initramfs as with Linux, so we can pass it with QEMU without worries. Signed-off-by: Miquel Sabaté Solà --- usr/src/foo.S | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 usr/src/foo.S (limited to 'usr/src') diff --git a/usr/src/foo.S b/usr/src/foo.S new file mode 100644 index 0000000..57e82a1 --- /dev/null +++ b/usr/src/foo.S @@ -0,0 +1,13 @@ +.global _start +.text + +_start: + li a0, 1 + la a1, foo + ecall +.Loop: + j .Loop + +.section .rodata +foo: + .string "foo\n" -- cgit v1.2.3