mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
7e94b090fe
This implements a simple bootloader that is capable of loading ELF64 kernel images. It does this by using QEMU/GRUB to load the kernel image from disk and pass it to our bootloader as a Multiboot module. The bootloader then parses the ELF image and sets it up appropriately. The kernel's entry point is a C++ function with architecture-native code. Co-authored-by: Liav A <liavalb@gmail.com>
6 lines
220 B
Bash
6 lines
220 B
Bash
#!/bin/sh
|
|
tmp=$(mktemp)
|
|
nm -n Kernel | grep -vE \\.Lubsan_data | awk '{ if ($2 != "a") print; }' | uniq > "$tmp"
|
|
printf "%08x\n" "$(wc -l "$tmp" | cut -f1 -d' ')" > kernel.map
|
|
c++filt < "$tmp" >> kernel.map
|
|
rm -f "$tmp"
|