There's a lot here, so let's through it:
- Lots of work to include a symbol table in the kernel. We can't rely on
our bootloader to give us our own ELF information, so we do this
separately. This probably should be changed to output a C source
rather than assembly, but that's a TODO.
- Makefile can now generate modules. It works basically the same way any
other kernel object works, expect with a slightly different linking
scheme.
- Commands have been added to the debug shell to load modules, but they
don't work yet - still need to get through relocation and linking.
- Commands have been added to the debug shell to print the symbol list,
as well as print symbol values (but note that printing symbol values
is kinda dangerous if you don't know what they are, so don't just go
printing things willy-nilly).
I know, this is a lot slower than the old one, but it's a transition to
a new-new args parser that will use a hashmap... as soon as I get around
to writing a hashmap implementation.
- Tasklets are essentially kernel threads. Still working on passing
arguments to them, but they essentially just run functions and have
special names like [[kttydebug]]. Eventually, I want disk scheduling
and various (non-interrupt-driven) drivers running on these, but I'm
still not sure how stable they are.
- Fix the scheduler so it supports not having anything to run. This took
some tracking of what's running, and then inserting some liberal
sleeps. Doesn't appear to break anything. Makes the system work when
you try to sleep with only one process "running", so that's good.
- Start working on reimplementing the old kernel shell, but this time as
a tasklet running in the background over serial. Probably going to try
to add all the same features as before (tab completion, history, rich
editing), but it may take some time to get it all in there. This
console is mostly focused on helping with debugging EXT2 and other
future stuff.
They now use interrupts and thus can be blocked on without sitting in a
busy loop. Not sure if they still work perfectly, need to debug. Works
fine with the console "serial" stuff in qemu.
Todo: Investigate further.
This is still a work in progress. ext2 writes are quite broken, so they
have been completely disabled, but there's a new tmpfs mounted to /tmp
that you can try to poke at. I'm still fixing up quirks in the VFS that
make it incompatible with a bunch of stuff, but I did manage to write
some files with vim, and swap files appear to be working at least
somewhat. It's all still broken as fuck.
Address for program loading, kernel heap, userspace SHM regions, and
stacks have been changed.
Delete:
toolchain/build
toolchain/local
.userspace_check
Run:
python userspace/build.py clean
make clean-disk
make clean
./build.sh
Also, sleep() as a function (implemented by way of nanosleep) and new
absolute and relative sleep system calls added to newlib.
[ci skip] I damn well know this is going to break CI.