diff options
Diffstat (limited to 'src/init')
-rw-r--r-- | src/init/linker.ld | 4 | ||||
-rw-r--r-- | src/init/main.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/init/linker.ld b/src/init/linker.ld index efb44fd..f2c9d24 100644 --- a/src/init/linker.ld +++ b/src/init/linker.ld @@ -17,6 +17,10 @@ SECTIONS { *(.data) } + + _initrd = .; /* is just appended onto the end of the binary */ + . += 2M; + _bss_start = .; .bss BLOCK(4K) : ALIGN(4K) { 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.")); } |