https://github.com/tailix/libkernaux
Now it can read registers cr0, cr4, write to registers cr0, cr3, cr4, perform port I/O, print (using given printing function pointer) and validate Multiboot 2 information. I'm going to implement much more.
I decided to move code to library to use automated unit testing and make code cleaner by eliminating global state.
Library can be built with cross-compiler using "configure" command from README. To build and install it when it was configured with cross-compiler use the following commands (just make && sudo make install doesn't work):
Code: Select all
make libkernaux.a
sudo make install-libLIBRARIES
sudo make install-data