From 40ffc517e20c381ce8fdb3a881726a26a52e35db Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 21 Nov 2024 13:09:21 +0100 Subject: Initial parsing of the provided initrd file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We expect a CPIO archive with the 'newc' format for the initrd. Parse this archive from the given initrd address and fetch the address for each ELF executable while also pairing which task correspond to which ELF. This commit leaves to do the actual parsing of the ELF file for each task, while also leaving some string utilities to be refined. Signed-off-by: Miquel Sabaté Solà --- usr/src/bar.S | 13 +++++++++++++ usr/src/foobar.S | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 usr/src/bar.S create mode 100644 usr/src/foobar.S (limited to 'usr/src') diff --git a/usr/src/bar.S b/usr/src/bar.S new file mode 100644 index 0000000..09c68e3 --- /dev/null +++ b/usr/src/bar.S @@ -0,0 +1,13 @@ +.global _start +.text + +_start: + li a0, 1 + la a1, bar + ecall +.Loop: + j .Loop + +.section .rodata +bar: + .string "bar\n" diff --git a/usr/src/foobar.S b/usr/src/foobar.S new file mode 100644 index 0000000..49c9e1d --- /dev/null +++ b/usr/src/foobar.S @@ -0,0 +1,13 @@ +.global _start +.text + +_start: + li a0, 1 + la a1, foobar + ecall +.Loop: + j .Loop + +.section .rodata +foobar: + .string "foobar\n" -- cgit v1.2.3