88 Commits

Author SHA1 Message Date
Justin C. Miller
a6e4995963 [boot] Fix call to exit_boot_services
Exiting boot services can't actually be done from inside
`bootloader_uefi_main`, because there are objects in that scope that run
code requiring boot services in their destructors.

Also added `support.cpp` with `memcpy` because clang will emit
references to `memcpy` even in freestanding mode.

Added a `debug_break` function to allow for faking breakpoints when
connecting to the bootloader with GDB.

Tags: debug
2020-05-13 02:08:47 -07:00
Justin C. Miller
c713f4ff6f [boot] Build the kernel mem map from the UEFI one
Created kernel args memory map structure, looping through UEFI's memory
map to copy and condense.

Tags: boot memory
2020-05-10 16:26:17 -07:00
Justin C. Miller
521c132801 Back to a basic UEFI stub 2020-02-22 01:54:00 -08:00
Justin C. Miller
ae651a4fcd Move cpptoml.h to external directory 2019-10-06 00:46:30 -07:00
Justin C. Miller
f066ac3ffd Move catch.hpp to external directory 2019-10-06 00:01:27 -07:00
Justin C. Miller
edcf633e84 Remove cargo-culted znocombreloc ld flag 2019-08-10 13:49:57 -07:00
Justin C. Miller
83897048ab Update for bonnibel 2.0 2019-07-20 23:19:21 -07:00
Justin C. Miller
b3f88bbe02 Further refine sysroot.
* remove need for NASM from sysroot
* have peru sync libc separately
2019-07-07 09:52:06 -07:00
Justin C. Miller
bb93dcef44 Remove sysroot binutils dependency
* Link host-targeted binaries with lld
 * Add peru script for getting prebuilt sysroot
 * Add readme for prebuilt sysroots
 * Remove non-working build_sysroot_gcc.sh, rename clang version to just
   build_sysroot.sh
2019-07-05 17:26:24 -07:00
Justin C. Miller
6285517ef7 Rename Popcorn to jsix.
See README.md for more information.
2019-05-27 14:07:29 -07:00
Justin C. Miller
b9c8edb657 Allow clang to colorize output in ninja 2019-04-18 00:28:23 -07:00
Justin C. Miller
ee6d69bcd2 Move builds to bonnibel 0.2 2019-03-30 01:33:00 -07:00
Justin C. Miller
ed3f9410a6 Make nulldrv a small C++ program 2019-03-24 13:44:25 -07:00
Justin C. Miller
94c491d286 Update to LLVM 8.0 2019-03-20 15:40:01 -07:00
Justin C. Miller
bf8286d15f Improve debugging functions
- More sensible stack tracer, in C++ (no symbols yet)
- Was forgetting to add null frame to new kernel stacks
- __kernel_assert was using an old vector
- A GP fault will only print its associated table entry
2019-03-15 00:47:46 -07:00
Justin C. Miller
4379256c11 Split OVMF into _code and _vars 2019-03-12 10:02:37 -07:00
Justin C. Miller
870ca1db45 Allow debug option to be communicated at boot 2019-03-11 03:04:57 -07:00
Justin C. Miller
2955e6c9c1 Add debugging files to build process 2019-03-10 23:34:47 -07:00
Justin C. Miller
24316ca0c4 Build native targets with debug symbols 2019-02-28 00:37:00 -08:00
Justin C. Miller
61df9cf32c Add -ggdb to tests build 2019-02-28 00:37:00 -08:00
Justin C. Miller
ec20e9f3d9 Stripping the kernel
Strip the kernel version that we put into the disk image, but keep the
debug symbols in a separate file for GDB.
2019-02-17 23:43:59 -08:00
Justin C. Miller
1965197ccd Fix sysroot ld setting 2019-02-10 10:31:16 -08:00
Justin C. Miller
29747f4891 Allow modules to specify defines
The modules.yaml now has an optional defines: list per module that adds
preprocessor definitions to the build scripts. Also added a --debug flag
to qemu.sh to run QEMU's debugger host.
2019-02-08 21:22:53 -08:00
Justin C. Miller
79711be46a Dump compiler args and defines.
As part of the build, dump the compiler arguments and defines per target
into files.
2019-02-07 17:39:10 -08:00
Justin C. Miller
f2d39f7df8 Refactoring build system for more control of inputs 2019-02-03 18:32:45 -08:00
Justin C. Miller
579f6f64e6 First step of moving bootloader to C++ 2019-02-03 01:38:12 -08:00
Justin C. Miller
237c242f96 Fix ninja not reloading buildfiles on regen 2019-02-03 00:20:01 -08:00
Justin C. Miller
bc01a37452 Ninja-based buildsystem now building a running kernel! 2019-02-02 21:35:39 -08:00
Justin C. Miller
acdca19f59 Ninja buildsystem produces working bootloader 2019-02-02 18:24:58 -08:00
Justin C. Miller
73df20d195 Ninja-based system now builds the disk images 2019-02-02 14:43:55 -08:00
Justin C. Miller
8d23fac6cc Allow for ninja files to regenerate themselves 2019-02-02 11:52:05 -08:00
Justin C. Miller
0f8efdb55e Moving to a ninja-based build system 2019-02-02 02:59:45 -08:00
Justin C. Miller
523d0b3b8c sysroot and cross-compiler based build WIP 2019-01-17 00:51:45 -08:00
Justin C. Miller
d33f1bc6f2 Page index to address translation script 2018-09-01 14:50:49 -07:00
Justin C. Miller
0c553b3406 Switch to waf build system, first attempt 2018-05-04 23:50:48 -07:00
Justin C. Miller
7009bb6d05 Move parse_version.py into scripts 2018-04-30 17:39:17 -07:00
Justin C. Miller
4d5da72e2e Add parse_memmap.py script 2018-04-13 23:54:34 -07:00
Justin C. Miller
656d5dfedf Save tool scripts like parse_font.py in a scripts dir 2018-04-12 09:02:56 -07:00