summaryrefslogtreecommitdiff
path: root/config/grub
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-15 22:53:34 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-15 23:15:27 +0100
commit340eea0b1cd445feb7134eae4211f469fd6f5d2a (patch)
treeebab8cb6434222d273046eb2dd4f9b3b5f2c0c42 /config/grub
parented9c90e59d959bab544598d330c724e44afcc096 (diff)
grub: insert background in memdisk instead
the background is only a few kb. the whole rationale before was to limit the space used in memdisk, but this decision was made when the background was much bigger; it has since been optimised greatly, and the grub modules were heavily reduce, so it should be safe. grub's memdisk breaks when you add too much data to it. as part of simplifying the rest of lbmk, this change removes some more bloat from the rest of lbmk. handling this in the memdisk is much simpler than handling it with cbfstool. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/grub')
-rw-r--r--config/grub/default/config/payload15
-rw-r--r--config/grub/nvme/config/payload15
-rw-r--r--config/grub/xhci/config/payload15
3 files changed, 24 insertions, 21 deletions
diff --git a/config/grub/default/config/payload b/config/grub/default/config/payload
index a405ae25..313290ed 100644
--- a/config/grub/default/config/payload
+++ b/config/grub/default/config/payload
@@ -26,13 +26,14 @@ else
gfxpayload=keep
terminal_output --append gfxterm
- if [ -f (cbfsdisk)/background.png ]; then
- insmod png
- background_image (cbfsdisk)/background.png
- elif [ -f (cbfsdisk)/background.jpg ]; then
- insmod jpeg
- background_image (cbfsdisk)/background.jpg
- fi
+ for dt in cbfsdisk memdisk; do
+ for it in png jpg; do
+ if [ -f (${dt})/background.${it} ]; then
+ insmod ${it}
+ background_image (${dt})/background.${it}
+ fi
+ done
+ done
fi
# Keep CTRL pressed to enable default serial terminal (COM1 or the like)
diff --git a/config/grub/nvme/config/payload b/config/grub/nvme/config/payload
index f81d5930..d7a3c57d 100644
--- a/config/grub/nvme/config/payload
+++ b/config/grub/nvme/config/payload
@@ -26,13 +26,14 @@ else
gfxpayload=keep
terminal_output --append gfxterm
- if [ -f (cbfsdisk)/background.png ]; then
- insmod png
- background_image (cbfsdisk)/background.png
- elif [ -f (cbfsdisk)/background.jpg ]; then
- insmod jpeg
- background_image (cbfsdisk)/background.jpg
- fi
+ for dt in cbfsdisk memdisk; do
+ for it in png jpg; do
+ if [ -f (${dt})/background.${it} ]; then
+ insmod ${it}
+ background_image (${dt})/background.${it}
+ fi
+ done
+ done
fi
# Keep CTRL pressed to enable default serial terminal (COM1 or the like)
diff --git a/config/grub/xhci/config/payload b/config/grub/xhci/config/payload
index 0e16ecb6..cd5b49b3 100644
--- a/config/grub/xhci/config/payload
+++ b/config/grub/xhci/config/payload
@@ -27,13 +27,14 @@ else
gfxpayload=keep
terminal_output --append gfxterm
- if [ -f (cbfsdisk)/background.png ]; then
- insmod png
- background_image (cbfsdisk)/background.png
- elif [ -f (cbfsdisk)/background.jpg ]; then
- insmod jpeg
- background_image (cbfsdisk)/background.jpg
- fi
+ for dt in cbfsdisk memdisk; do
+ for it in png jpg; do
+ if [ -f (${dt})/background.${it} ]; then
+ insmod ${it}
+ background_image (${dt})/background.${it}
+ fi
+ done
+ done
fi
# Keep CTRL pressed to enable default serial terminal (COM1 or the like)