mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
Misc improvements
This commit is contained in:
parent
0bf82fb057
commit
6f942441e3
5 changed files with 17 additions and 18 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ docs/Boot/
|
||||||
build/limine
|
build/limine
|
||||||
build/ovmf
|
build/ovmf
|
||||||
ZealOS-*.iso
|
ZealOS-*.iso
|
||||||
|
ZealOS-*.raw
|
||||||
|
|
|
@ -101,19 +101,20 @@ echo "Rebuilding kernel and OS..."
|
||||||
qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -device isa-debug-exit
|
qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -device isa-debug-exit
|
||||||
|
|
||||||
mount_tempdisk
|
mount_tempdisk
|
||||||
sudo cp limine/limine-cd-efi.bin $TMPISODIR/
|
sudo cp -rf $TMPMOUNT/* $TMPISODIR
|
||||||
sudo cp limine/limine-cd.bin $TMPISODIR/
|
sudo cp limine/limine-cd-efi.bin $TMPISODIR/Boot/
|
||||||
|
sudo cp limine/limine-cd.bin $TMPISODIR/Boot/
|
||||||
sudo cp limine/limine.sys $TMPISODIR/
|
sudo cp limine/limine.sys $TMPISODIR/
|
||||||
sudo cp $TMPMOUNT/limine.cfg $TMPISODIR/limine.cfg
|
sudo cp $TMPMOUNT/limine.cfg $TMPISODIR/limine.cfg
|
||||||
sudo cp -rf $TMPMOUNT/* $TMPISODIR
|
sudo rm -rf $TMPISODIR/EFI
|
||||||
sudo cp -rf ../zealbooter/zealbooter.elf $TMPISODIR/Boot/ZealBooter.ELF
|
sudo cp -rf ../zealbooter/zealbooter.elf $TMPISODIR/Boot/ZealBooter.ELF
|
||||||
umount_tempdisk
|
umount_tempdisk
|
||||||
|
|
||||||
sudo ls $TMPISODIR -al
|
sudo ls $TMPISODIR -al
|
||||||
|
|
||||||
xorriso -as mkisofs -b limine-cd.bin \
|
xorriso -as mkisofs -b Boot/limine-cd.bin \
|
||||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||||
--efi-boot limine-cd-efi.bin \
|
--efi-boot Boot/limine-cd-efi.bin \
|
||||||
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
||||||
$TMPISODIR -o ZealOS-UEFI-limine-dev.iso
|
$TMPISODIR -o ZealOS-UEFI-limine-dev.iso
|
||||||
|
|
||||||
|
|
|
@ -99,10 +99,12 @@ fi
|
||||||
echo "Rebuilding kernel and OS..."
|
echo "Rebuilding kernel and OS..."
|
||||||
qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -device isa-debug-exit
|
qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -device isa-debug-exit
|
||||||
|
|
||||||
|
mv $TMPDISK ./ZealOS-UEFI-limine-dev.raw
|
||||||
|
|
||||||
echo "Testing UEFI..."
|
echo "Testing UEFI..."
|
||||||
qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4
|
qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=ZealOS-UEFI-limine-dev.raw -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4
|
||||||
echo "Testing BIOS..."
|
echo "Testing BIOS..."
|
||||||
qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4
|
qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=ZealOS-UEFI-limine-dev.raw -m 1G -rtc base=localtime -smp 4
|
||||||
|
|
||||||
echo "Deleting temp folder..."
|
echo "Deleting temp folder..."
|
||||||
rm -rf $TMPDIR
|
rm -rf $TMPDIR
|
||||||
|
|
|
@ -4,10 +4,10 @@ override KERNEL := zealbooter.elf
|
||||||
|
|
||||||
# Convenience macro to reliably declare overridable command variables.
|
# Convenience macro to reliably declare overridable command variables.
|
||||||
define DEFAULT_VAR =
|
define DEFAULT_VAR =
|
||||||
ifeq ($(origin $1), default)
|
ifeq ($(origin $1),default)
|
||||||
override $(1) := $(2)
|
override $(1) := $(2)
|
||||||
endif
|
endif
|
||||||
ifeq ($(origin $1), undefined)
|
ifeq ($(origin $1),undefined)
|
||||||
override $(1) := $(2)
|
override $(1) := $(2)
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
@ -65,9 +65,9 @@ override NASMFLAGS += \
|
||||||
-f elf64
|
-f elf64
|
||||||
|
|
||||||
# Use find to glob all *.c, *.S, and *.asm files in the directory and extract the object names.
|
# Use find to glob all *.c, *.S, and *.asm files in the directory and extract the object names.
|
||||||
override CFILES := $(shell find ./ -type f -name '*.c')
|
override CFILES := $(shell find . -type f -name '*.c')
|
||||||
override ASFILES := $(shell find ./ -type f -name '*.S')
|
override ASFILES := $(shell find . -type f -name '*.S')
|
||||||
override NASMFILES := $(shell find ./ -type f -name '*.asm')
|
override NASMFILES := $(shell find . -type f -name '*.asm')
|
||||||
override OBJ := $(CFILES:.c=.o) $(ASFILES:.S=.o) $(NASMFILES:.asm=.o)
|
override OBJ := $(CFILES:.c=.o) $(ASFILES:.S=.o) $(NASMFILES:.asm=.o)
|
||||||
override HEADER_DEPS := $(CFILES:.c=.d) $(ASFILES:.S=.d)
|
override HEADER_DEPS := $(CFILES:.c=.d) $(ASFILES:.S=.d)
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,6 @@ static volatile struct limine_module_request module_request = {
|
||||||
.revision = 0
|
.revision = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
static volatile struct limine_kernel_address_request kernel_address_request = {
|
|
||||||
.id = LIMINE_KERNEL_ADDRESS_REQUEST,
|
|
||||||
.revision = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static volatile struct limine_hhdm_request hhdm_request = {
|
static volatile struct limine_hhdm_request hhdm_request = {
|
||||||
.id = LIMINE_HHDM_REQUEST,
|
.id = LIMINE_HHDM_REQUEST,
|
||||||
.revision = 0
|
.revision = 0
|
||||||
|
@ -155,7 +150,7 @@ struct E801 {
|
||||||
size_t uppermem;
|
size_t uppermem;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct E801 get_E801(void) {
|
static struct E801 get_E801(void) {
|
||||||
struct E801 E801 = {0};
|
struct E801 E801 = {0};
|
||||||
|
|
||||||
for (size_t i = 0; i < memmap_request.response->entry_count; i++) {
|
for (size_t i = 0; i < memmap_request.response->entry_count; i++) {
|
||||||
|
|
Loading…
Reference in a new issue