From 5a7042e93474bf37f92e7e4b4da3751ab4b66955 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Tue, 4 Dec 2018 00:55:33 -0500 Subject: Remove unnecessary commands from embedded grub.cfg All modules listed in a given target's modules-minimal file are preloaded so there's no need to specifically load any. --- projects/grub/configs/bios/config | 8 +++----- projects/grub/configs/coreboot/config | 8 +++----- projects/grub/configs/uefi/config | 8 +++----- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/projects/grub/configs/bios/config b/projects/grub/configs/bios/config index 0b4a8d4e..f5d969f9 100644 --- a/projects/grub/configs/bios/config +++ b/projects/grub/configs/bios/config @@ -1,6 +1,4 @@ -insmod cbfs - -set prefix=(cbfsdisk)/fallback - set root=(cbfsdisk) -source (cbfsdisk)/fallback/grub.cfg +set prefix=($root)/fallback + +source $prefix/grub.cfg diff --git a/projects/grub/configs/coreboot/config b/projects/grub/configs/coreboot/config index 0b4a8d4e..f5d969f9 100644 --- a/projects/grub/configs/coreboot/config +++ b/projects/grub/configs/coreboot/config @@ -1,6 +1,4 @@ -insmod cbfs - -set prefix=(cbfsdisk)/fallback - set root=(cbfsdisk) -source (cbfsdisk)/fallback/grub.cfg +set prefix=($root)/fallback + +source $prefix/grub.cfg diff --git a/projects/grub/configs/uefi/config b/projects/grub/configs/uefi/config index 0b4a8d4e..f5d969f9 100644 --- a/projects/grub/configs/uefi/config +++ b/projects/grub/configs/uefi/config @@ -1,6 +1,4 @@ -insmod cbfs - -set prefix=(cbfsdisk)/fallback - set root=(cbfsdisk) -source (cbfsdisk)/fallback/grub.cfg +set prefix=($root)/fallback + +source $prefix/grub.cfg -- cgit v1.2.3-70-g09d2 From 73d3ac2b4f6b64554f55e50ef1fa2f77eb9589a3 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Mon, 3 Dec 2018 00:48:30 -0500 Subject: Add useful modules to GRUB modules-minimal files Module "biosdisk" is necessary for GRUB to boot from the floppy image we're working to create. If this module is not included in core.img it will simply not load. Module "minicmd" has been added in order to provide the commands "lsmod" and "rmmod" which are useful for listing loaded modules and unloading them, respectively (especially great for testing). --- projects/grub/configs/bios/modules-minimal | 2 ++ projects/grub/configs/coreboot/modules-minimal | 1 + projects/grub/configs/uefi/modules-minimal | 1 + 3 files changed, 4 insertions(+) diff --git a/projects/grub/configs/bios/modules-minimal b/projects/grub/configs/bios/modules-minimal index 6cb1d499..604b8091 100644 --- a/projects/grub/configs/bios/modules-minimal +++ b/projects/grub/configs/bios/modules-minimal @@ -1,4 +1,5 @@ ahci +biosdisk cbfs cbmemc configfile @@ -7,6 +8,7 @@ ext2 halt loadenv memdisk +minicmd part_bsd part_gpt pata diff --git a/projects/grub/configs/coreboot/modules-minimal b/projects/grub/configs/coreboot/modules-minimal index e2033cb8..f67c1dcc 100644 --- a/projects/grub/configs/coreboot/modules-minimal +++ b/projects/grub/configs/coreboot/modules-minimal @@ -6,6 +6,7 @@ ehci ext2 halt loadenv +minicmd part_bsd part_gpt pata diff --git a/projects/grub/configs/uefi/modules-minimal b/projects/grub/configs/uefi/modules-minimal index e2033cb8..f67c1dcc 100644 --- a/projects/grub/configs/uefi/modules-minimal +++ b/projects/grub/configs/uefi/modules-minimal @@ -6,6 +6,7 @@ ehci ext2 halt loadenv +minicmd part_bsd part_gpt pata -- cgit v1.2.3-70-g09d2 From 8abe1e9b213bb49756297a60691d7c3ec1061ec7 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Tue, 4 Dec 2018 00:41:10 -0500 Subject: Load modules from (fd0) in GRUB bios target config (fd0) should be the proper device for SeaGRUB. $prefix is set using (fd0) as the device considering modules will be placed onto the floppy image--not in CBFS. grub.cfg is still sourced from (cbfsdisk) --- projects/grub/configs/bios/config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/grub/configs/bios/config b/projects/grub/configs/bios/config index f5d969f9..f971795c 100644 --- a/projects/grub/configs/bios/config +++ b/projects/grub/configs/bios/config @@ -1,4 +1,4 @@ -set root=(cbfsdisk) -set prefix=($root)/fallback +set root=(fd0) +set prefix=($root)/boot/grub -source $prefix/grub.cfg +source (cbfsdisk)/fallback/grub.cfg -- cgit v1.2.3-70-g09d2