From 2ecc3fc83d02b4e99ac7b77f590f9bfc27be9d8d Mon Sep 17 00:00:00 2001 From: Greg Bowne Date: Tue, 17 Oct 2023 23:02:33 -0700 Subject: [PATCH] Pushing up the ABOUT.md grub.cfg and menu.lst files --- ABOUT.md | 35 +++++++++++++++ src/boot/grub/grub.cfg | 97 ++++++++++++++++++++++++++++++++++++++++++ src/boot/grub/menu.lst | 8 ++++ 3 files changed, 140 insertions(+) create mode 100644 ABOUT.md create mode 100644 src/boot/grub/grub.cfg create mode 100644 src/boot/grub/menu.lst diff --git a/ABOUT.md b/ABOUT.md new file mode 100644 index 0000000..bbf805c --- /dev/null +++ b/ABOUT.md @@ -0,0 +1,35 @@ +# About ClassicOS + +I am making a custom operating system as an OSDev project. I am calling it ClassicOS! + +We are using C11/C17 standard code. + +This OS is x86 32 bit meant to be run on any 32 bit Intel processor including: + +- 386 +- 486 +- Pentium +- Pentium Pro +- Pentium II +- Pentium 3 +- "Prescott" & "Northwood" Pentium 4 + +Able to run on systems with EISA, VESA, MCA, PCI or ISA architecture. + +This will include: + +- a GUI +- a shell/terminal/tty/console +- 16 bit Real mode bootloader +- NE2000 compatible Network drivers +- FAT Filesystem support including FAT12, FAT16, FAT32 +- ext2 Filesystem support +- NTFS Filesystem support +- Supports ATA, IDE, EIDE, UltraATA 33 and 66, PATA drives +- Supports Floppy to 1.2MB 5.25" and 1.44MB 3.5" +- Supports ISO9660 +- DOS mode + +Features: + +Note: This OS eventually may ship for 64 bit architecture and support legacy LGA775 and LGA115x processors. \ No newline at end of file diff --git a/src/boot/grub/grub.cfg b/src/boot/grub/grub.cfg new file mode 100644 index 0000000..1f82854 --- /dev/null +++ b/src/boot/grub/grub.cfg @@ -0,0 +1,97 @@ +# ClassicOS 0.0.1 grub.cfg +# Config for GNU GRand Unified Bootloader (GRUB) +# /boot/grub/grub.cfg + +insmod efi_gop +insmod efi_uga +insmod all_video +insmod font +insmod png +insmod gfxterm + +if loadfont ${prefix}/unicode.pf2 +then + set gfxmode=auto + set gfxpayload=keep + set gfxterm_font=unicode + terminal_input console + terminal_output console +fi + +# Enable serial console +if serial --unit=0 --speed=115200; then + terminal_input --append serial + terminal_output --append serial +fi + +function load_video { + if [ x$feature_all_video_module = xy ]; then + insmod all_video + else + insmod efi_gop + insmod efi_uga + insmod ieee1275_fb + insmod vbe + insmod vga + insmod video_bochs + insmod video_cirrus + fi +} + +set cfgdir="$prefix/boot/grub/" + +probe -u $root --set=usbuuid +insmod search_fs_uuid +export isopart +set isopath="/iso/" + +menuentry "ClassicOS" { + # Load partition table and file system modules + insmod part_msdos + insmod part_gpt + insmod gzio + insmod fat + insmod iso9660 + insmod ntfs + insmod ntfscomp + insmod exfat + insmod ext2 + set root='(hd0,msdos1)' + multiboot /boot/kernel.bin + multiboot2 /boot/kernel.bin + module2 /boot/setup1 setup1 + module2 /boot/kernel kernel + boot +} + +# Set default menu entry +set default=0 +set timeout=0 +set timeout_style=menu +set fallback=0 +set check_signatures=enforce +export check_signatures + +# Welcome Text _ Menu Entries +menuentry "Welcome to ClassicOS" { +insmod ext2 +} +menuentry "----------------------------------------------------" { +insmod ext2 +} + +menuentry "Reboot" --unrestricted { + reboot +} + +color_normal=light-cyan/dark-gray +color_highlight=light-red/red +menu_color_normal=cyan/blue +menu_color_highlight=white/black + +search --no-floppy --set=root -l 'boot' +set root=${root} + +if [ "${timeout}" = 0 ]; then + set timeout=10 +fi diff --git a/src/boot/grub/menu.lst b/src/boot/grub/menu.lst new file mode 100644 index 0000000..5d68028 --- /dev/null +++ b/src/boot/grub/menu.lst @@ -0,0 +1,8 @@ +# This doesn't work +# If you wanna use the old GRUB, please fix this thing + +title Linux + configfile /config/linux.lst + +title Tools + configfile /config/tools.lst \ No newline at end of file