/rustless

sandbox

Primary LanguageMakefile

rustless

sandbox


5/4/2023:


Simple Rust Binary lays foundation
Basic binary is buildable with cargo build --target thumbv7em-none-eabihf
Alternatively can compile with:
cargo rustc -- -C link-arg=-nostartfiles

Some Notes on Kernel approach


On boot, the machine loads Basic IO System (BIOS)
*** UEFI Unsupported ***
BIOS finds a bootable disc, and control is transferred to bootloader.
Bootloader must determine kernel image on disk and load into memory.
Passes memory map into OS Kernel
Disc Image will print a statement when booted by extending binary
Using nightly rust channel

Target Specification


Special configuration parameters are to be set via JSON File,
Kernel target specifies Os as none to run on bare metal.
@5/9/2023
I can compile with target specifications, but only after configuring build-std to recompile core and compiler_builtins. Also, I received many errors using stable rust channel and required nightly channel.
To compile, must redirect target to the JSON Specification as such:
cargo build --target x86_64-rustless.json
Now configured target so target argument can be voided

Printing from Kernel build

@5/10/2024
Implemented basic driver for VGA Buffer. You can now: use bootimage to compile kernel to an ELF file, compile bootloader dependency as a standalone executable, and link bytes of the kernel ELF file to the bootloader.
With host OS as Linux, I am able to boot the disk image with QEMU Virtual Machine Use the following command:
> qemu-system-x86_64 -drive format=raw,file=target/x86_64-blog_os/debug/bootimage-blog_os.bin

Printing

Users can now print with start function simply