Kernel: Stop bootloader from setting video mode with Multiboot

Meta: Update INSTALL.md and grub configs for new boot_mode option
This commit is contained in:
etaIneLp 2020-05-27 10:36:14 -04:00 committed by Andreas Kling
parent eae4843712
commit 7bc871ca8d
5 changed files with 18 additions and 10 deletions

View file

@ -47,4 +47,4 @@ $ cu -s 57600 -l /dev/ttyUSB0
## Troubleshooting boot issues without a serial port
Serenity is a graphical OS and thus boots directly to the desktop. If your computer doesn't have a serial port and it fails to boot, you can force Serenity to boot into text mode by editing **Kernel/Arch/i386/Boot/boot.S** and removing **| MULTIBOOT_VIDEO_MODE** from the end of the **multiboot_flags** line before (re)running **make** and **make install**.
Serenity is a graphical OS and thus boots directly to the desktop. If your computer doesn't have a serial port and it fails to boot, you can force Serenity to boot into text mode by selecting the **SerenityOS (text mode)** option in GRUB.

View file

@ -1,8 +1,7 @@
.set MULTIBOOT_MAGIC, 0x1badb002
.set MULTIBOOT_PAGE_ALIGN, 0x1
.set MULTIBOOT_MEMORY_INFO, 0x2
.set MULTIBOOT_VIDEO_MODE, 0x4
.set multiboot_flags, MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_VIDEO_MODE
.set multiboot_flags, MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO
.set multiboot_checksum, -(MULTIBOOT_MAGIC + multiboot_flags)
.section .multiboot
@ -20,12 +19,6 @@
.long 0x00000000 /* bss_end_addr */
.long 0x00000000 /* entry_addr */
/* for MULTIBOOT_VIDEO_MODE */
.long 0x00000000 /* mode_type */
.long 1280 /* width */
.long 1024 /* height */
.long 32 /* depth */
.section .stack, "aw", @nobits
stack_bottom:
.skip 32768

View file

@ -5,6 +5,11 @@ menuentry 'SerenityOS (normal)' {
multiboot /boot/Kernel root=/dev/hda5
}
menuentry 'SerenityOS (text mode)' {
root=hd0,5
multiboot /boot/Kernel boot_mode=text root=/dev/hda5
}
menuentry 'SerenityOS (No ACPI)' {
root=hd0,5
multiboot /boot/Kernel root=/dev/hda5 acpi=off

View file

@ -5,6 +5,11 @@ menuentry 'SerenityOS (normal)' {
multiboot /boot/Kernel root=/dev/hda2
}
menuentry 'SerenityOS (text mode)' {
root=hd0,2
multiboot /boot/Kernel boot_mode=text root=/dev/hda2
}
menuentry 'SerenityOS (No ACPI)' {
root=hd0,2
multiboot /boot/Kernel root=/dev/hda2 acpi=off

View file

@ -5,12 +5,17 @@ menuentry 'SerenityOS (normal)' {
multiboot /boot/Kernel root=/dev/hda1
}
menuentry 'SerenityOS (text mode)' {
root=hd0,1
multiboot /boot/Kernel boot_mode=text root=/dev/hda1
}
menuentry 'SerenityOS (No ACPI)' {
root=hd0,1
multiboot /boot/Kernel root=/dev/hda1 acpi=off
}
menuentry 'SerenityOS (with serial debug)' {
root=hd0,1
root=hd0,1
multiboot /boot/Kernel serial_debug root=/dev/hda1
}