Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Makeconf.local
.DS_Store
*.swp
*.xz
grub/boot/grub
drivers/acpi/acpica/source/
third-party/libpfm/COPYING
third-party/libpfm/Makefile
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ GRUB_FILE := grub-file
GRUB_MKRESCUE := grub-mkrescue
GRUB_MODULES := multiboot2 iso9660 serial normal
ifneq ($(UNITTEST),)
GRUB_CONFIG := $(GRUB_DIR)/grub/grub-test.cfg
GRUB_CONFIG := grub/grub-test.cfg
else
GRUB_CONFIG := $(GRUB_DIR)/grub/grub.cfg
GRUB_CONFIG := grub/grub-prod.cfg
endif
XORRISO := xorriso
QEMU_BIN := qemu-system-x86_64
Expand Down Expand Up @@ -222,6 +222,7 @@ clean:
$(VERBOSE) find $(PFMLIB_DIR) -mindepth 1 ! -name $(PFMLIB_NAME)-$(PFMLIB_VER).tar.gz -delete
$(VERBOSE) $(RM) -rf $(ACPICA_DEST_DIR)/source
$(VERBOSE) $(RM) -f $(TARGET_DEBUG)
$(VERBOSE) $(RM) -rf $(GRUB_DIR)

# Check whether we can use kvm for qemu
ifeq ($(SYSTEM),LINUX)
Expand Down Expand Up @@ -255,7 +256,9 @@ else
$(ISO_FILE): $(TARGET)
@echo "GEN ISO" $(ISO_FILE)
$(VERBOSE) $(GRUB_FILE) --is-x86-multiboot2 $(TARGET) || { echo "Multiboot not supported"; exit 1; }
$(VERBOSE) $(RM) -rf $(GRUB_DIR) && mkdir -p $(GRUB_DIR)/grub
$(VERBOSE) cp $(TARGET) $(GRUB_DIR)/
$(VERBOSE) cp $(GRUB_CONFIG) $(GRUB_DIR)/grub/grub.cfg
$(VERBOSE) $(XZ) -q -f $(GRUB_DIR)/$(TARGET)
$(VERBOSE) $(GRUB_MKRESCUE) --install-modules="$(GRUB_MODULES)" --fonts=no --compress=xz -o $(ISO_FILE) grub &> /dev/null
endif
Expand Down
10 changes: 0 additions & 10 deletions grub/boot/grub/grub-test.cfg

This file was deleted.

File renamed without changes.
15 changes: 15 additions & 0 deletions grub/grub-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
set timeout=0
set default=0

insmod serial
insmod multiboot2
insmod all_video

serial --speed=115200 --word=8 --parity=no --stop=1
terminal_input --append serial
terminal_output --append serial

menuentry "kernel64" {
multiboot2 /boot/kernel64.bin.xz poweroff=1 com1=0x3f8,115200,8,n,1 integer=42 boolean=1 string=foo badstring=toolong booleantwo tests=unit_tests
boot
}
2 changes: 2 additions & 0 deletions tests/unittests.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ int unit_tests(void *_unused) {
schedule_task(task_user1, get_bsp_cpu());
schedule_task(task_user2, get_cpu(1));

#ifdef UNITTEST_LONGMODE
printk("Long mode to real mode transition:\n");
long_to_real();
#endif

return 0;
}