From 6519ab6ddccf6804efb16548bef4e47ece735015 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Sun, 11 Mar 2018 22:48:17 -0400 Subject: Include modules from modules-minimal in GRUB image --- projects/grub/configs/bios/modules-minimal | 2 ++ projects/grub/configs/coreboot/modules-minimal | 2 ++ projects/grub/grub-helper | 10 ++++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'projects') diff --git a/projects/grub/configs/bios/modules-minimal b/projects/grub/configs/bios/modules-minimal index ea936115..ab41ba65 100644 --- a/projects/grub/configs/bios/modules-minimal +++ b/projects/grub/configs/bios/modules-minimal @@ -1,5 +1,7 @@ biosdisk +cbfs cbmemc +configfile ext2 halt part_bsd diff --git a/projects/grub/configs/coreboot/modules-minimal b/projects/grub/configs/coreboot/modules-minimal index 310aef86..bd3248fd 100644 --- a/projects/grub/configs/coreboot/modules-minimal +++ b/projects/grub/configs/coreboot/modules-minimal @@ -1,5 +1,7 @@ ahci +cbfs cbmemc +configfile ehci ext2 halt diff --git a/projects/grub/grub-helper b/projects/grub/grub-helper index dd069290..0ffa8e27 100755 --- a/projects/grub/grub-helper +++ b/projects/grub/grub-helper @@ -128,6 +128,9 @@ grub_build_bootable_image() { local format="$(grub_format "$target" "$@")" local prefix="$(grub_prefix "$target" "$@")" local config_path="$(grub_config_path "$target" "$@")" + local modmin_path="$(grub_modmin_path "$target" "$@")" + + local -a modmin=($(< "$modmin_path")) local grub_mkimage="$sources_path/grub-mkimage" local grub_module_dir="$sources_path/grub-core" @@ -142,7 +145,7 @@ grub_build_bootable_image() { --output="$grubimg" \ --format="$format" \ --prefix="$prefix" \ - cbfs configfile + "${modmin[@]}" cat "$grub_bootimg" "$grubimg" > "$grub_bootable_img" rm -f "$grubimg" @@ -192,6 +195,9 @@ grub_build_standalone_image() { local format="$(grub_format "$target" "$@")" local prefix="$(grub_prefix "$target" "$@")" local config_path="$(grub_config_path "$target" "$@")" + local modmin_path="$(grub_modmin_path "$target" "$@")" + + local -a modmin=($(< "$modmin_path")) local grubimg="$build_path/grub2" @@ -204,7 +210,7 @@ grub_build_standalone_image() { --fonts='' \ --themes='' \ --locales='' \ - --install-modules='cbfs configfile' \ + --install-modules="${modmin[*]}" \ --directory="$grub_module_dir" \ --format="$format" \ --output="$grubimg" \ -- cgit v1.2.3-70-g09d2 From 2d4f3a85878998f3c934adf3bc5daea78ba3d205 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Sun, 11 Mar 2018 22:49:57 -0400 Subject: Be specific about size limit for floppy GRUB image --- projects/grub/grub-helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'projects') diff --git a/projects/grub/grub-helper b/projects/grub/grub-helper index 0ffa8e27..596f7d96 100755 --- a/projects/grub/grub-helper +++ b/projects/grub/grub-helper @@ -184,7 +184,7 @@ grub_build_floppy_image() { mv "$tempfile" "$grubimg" else printf '\n%s' "Error: Image ${grubimg##*/} is too large; " 1>&2 - printf '%s\n\n' "it must be less than ${size}KiB in size" 1>&2 + printf '%s\n\n' "it must be less than ${floppy_size}KiB in size" 1>&2 return 1 fi -- cgit v1.2.3-70-g09d2 From 63132cde4d70d2b2fe69e19909c53f4d269de247 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Sat, 7 Apr 2018 23:10:12 -0400 Subject: Add overlooked GRUB modules to modules-minimal --- projects/grub/configs/bios/modules-minimal | 4 ++++ projects/grub/configs/coreboot/modules-minimal | 1 + projects/grub/configs/uefi/modules-minimal | 3 +++ 3 files changed, 8 insertions(+) (limited to 'projects') diff --git a/projects/grub/configs/bios/modules-minimal b/projects/grub/configs/bios/modules-minimal index ab41ba65..706aa529 100644 --- a/projects/grub/configs/bios/modules-minimal +++ b/projects/grub/configs/bios/modules-minimal @@ -1,10 +1,14 @@ +ahci biosdisk cbfs cbmemc configfile +ehci ext2 halt +loadenv part_bsd part_gpt +pata reboot verify diff --git a/projects/grub/configs/coreboot/modules-minimal b/projects/grub/configs/coreboot/modules-minimal index bd3248fd..0480a0d0 100644 --- a/projects/grub/configs/coreboot/modules-minimal +++ b/projects/grub/configs/coreboot/modules-minimal @@ -5,6 +5,7 @@ configfile ehci ext2 halt +loadenv part_bsd part_gpt pata diff --git a/projects/grub/configs/uefi/modules-minimal b/projects/grub/configs/uefi/modules-minimal index 310aef86..0480a0d0 100644 --- a/projects/grub/configs/uefi/modules-minimal +++ b/projects/grub/configs/uefi/modules-minimal @@ -1,8 +1,11 @@ ahci +cbfs cbmemc +configfile ehci ext2 halt +loadenv part_bsd part_gpt pata -- cgit v1.2.3-70-g09d2