Still need to do proper loading of the ELF sections somewhere, but other
than that, we've got a standard interface now. Needs a syscall so we can
write an insmod or something like that.
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.
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
* fix some terminal bugs (some, not all)
* add a serial device to the VFS
* fix up serial so it works better
* add a serial-console application
* fix a bug in some other stuff relating to allocations
* change size of the terminal described by toaru.terminfo
* adds a new system call
- libc functions not implemented yet
- see `env` for an example of reading variables
- see `esh` for an example of how to set and maintain variables for
sending to other applications
Both of the above will be the basis for the libc implementation.
* Works with different block sizes
* Works with different inode sizes
* Tested on a real EXT2 file system made with mkfs.ext2
* MBR reading is available
* You can specify a partition with hdd=0 or hdd=1 etc.
* If you make a "real" disk image, you can get GRUB installed in
its MBR, toss in a suitable config file, and boot right off the
disk rather than having to use QEMU to boot the kernel or using
some silly CDROM ramdisk nonsense.
This is in favor of bootloader-assisted mode switching. Grub has a
wonderful option we will exploit to set the video mode.
My laptop supports a couple of 32-bit video modes, which is nice,
because I'm not support 24-bit modes.
I'm not sure whether the super-sketchy video memory locator will work
in the real world, but we'll find out sometime soon.
* Also cleaning up some kernel logging options here.
* You can log in as local or root with passwords local and toor
* Graphical sessions are still buggy, so don't kill that terminal.
- Can now register a userspace file descriptor as the output for kernel
print statements through kprintf()
- Can set logging levels for debug print messages, which are separate
from kernel log events and meant to be more readily visible. Log
events are recorded in a buffer to be viewed later, though nothing
actually using logging at the moment.
- Serial output is disabled by default now. You can enable it yourself
by appending the logtoserial argument to the kernel on boot.
This is an automated system by which we boot qemu headless and use the
serial line to capture output from a testing application that is started
on bootup, running with the VGA terminal shell. This might be expanded
to boot to the graphical display within VNC and perform more advanced
tests with the Python shim using a VNC module for Python; we'll see.