From 0189cc9d771e5911b07fbf91ca18da3a338f8d30 Mon Sep 17 00:00:00 2001 From: Nathan Lee Date: Sat, 3 Oct 2026 21:37:57 -0500 Subject: add first userspace invocation --- website-kernel/include/fs/cpio.h | 24 ++++++++++++++++++++++++ website-kernel/include/fs/elf.h | 1 + 2 files changed, 25 insertions(+) create mode 100644 website-kernel/include/fs/cpio.h (limited to 'website-kernel/include/fs') diff --git a/website-kernel/include/fs/cpio.h b/website-kernel/include/fs/cpio.h new file mode 100644 index 0000000..43440d2 --- /dev/null +++ b/website-kernel/include/fs/cpio.h @@ -0,0 +1,24 @@ +#pragma once +#include +#define CPIO_HEADER_LEN 110 + +struct cpio_newc_hdr { + char magic[6]; + char ino[8]; + char mode[8]; + char uid[8]; + char gid[8]; + char nlink[8]; + char mtime[8]; + char filesize[8]; + char devmajor[8]; + char devminor[8]; + char rdevmajor[8]; + char rdevminor[8]; + char namesize[8]; + char check[8]; +}; + +void *cpio_get_file(void *archive, size_t size, const char *filename); + + diff --git a/website-kernel/include/fs/elf.h b/website-kernel/include/fs/elf.h index 8157384..65d2817 100644 --- a/website-kernel/include/fs/elf.h +++ b/website-kernel/include/fs/elf.h @@ -77,3 +77,4 @@ struct elf_program_header { int elf_chk_header(struct elf_header *header); struct elf_section_header *elf_get_section(struct elf_header *hdr, void *data, uint32_t index); char *elf_get_section_name(struct elf_header *hdr, struct elf_section_header *section, void *data); +void elf_exec(void *executable); -- cgit v1.2.3