aboutsummaryrefslogtreecommitdiff
path: root/projects/grub/grub-helper
diff options
context:
space:
mode:
authorKoDDoS Mirror <mirror@koddos.net>2018-07-27 19:16:01 +0700
committerKoDDoS Mirror <mirror@koddos.net>2018-07-27 19:16:01 +0700
commit4cf7c27e5dca04492495f1fc08256f57f86faf56 (patch)
tree8128850191e6ea0cc364f17ae73e9f705ad1ecdd /projects/grub/grub-helper
parent59d7df676b7222b532c2acf4309b16d255a0808b (diff)
parentfbe7031b606c5716b7bb87a069da05a0cf56fc12 (diff)
downloadlibrebootfr-4cf7c27e5dca04492495f1fc08256f57f86faf56.tar.gz
librebootfr-4cf7c27e5dca04492495f1fc08256f57f86faf56.zip
Merge with original repo
Diffstat (limited to 'projects/grub/grub-helper')
-rwxr-xr-xprojects/grub/grub-helper12
1 files changed, 9 insertions, 3 deletions
diff --git a/projects/grub/grub-helper b/projects/grub/grub-helper
index dd069290..596f7d96 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"
@@ -181,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
@@ -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" \