aboutsummaryrefslogtreecommitdiff
path: root/usr/src/foo.S
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-11-18 15:56:37 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-11-18 15:56:37 +0100
commitd79436a1170e4d5ffde77416313587f320c8e590 (patch)
treecc3bc766e912f757b0244d986519cd6bb49b3bf6 /usr/src/foo.S
parent54cf703d13bddbe81e15858b1bfdb7111a3f56de (diff)
downloadfbos-d79436a1170e.tar.gz
fbos-d79436a1170e.zip
usr: Bootstrap the initramfs for the kernel
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à <mikisabate@gmail.com>
Diffstat (limited to 'usr/src/foo.S')
-rw-r--r--usr/src/foo.S13
1 files changed, 13 insertions, 0 deletions
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"