From 674794a8f4d61a729d2dbd6d99385d2826138694 Mon Sep 17 00:00:00 2001 From: Raphaël Hertzog Date: Tue, 22 Nov 2016 18:17:53 +0100 Subject: Try to reuse /isolinux/splash.png in default grub configuration. --- debian/changelog | 1 + scripts/build/binary_loopback_cfg | 17 ++++------------- scripts/build/efi-image | 1 + share/bootloaders/grub-pc/grub.cfg | 23 ++++++++++++++++++++--- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index 502e178dd..3eaede13d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ live-build (1:20160105) UNRELEASED; urgency=medium on APT's trusted=yes attribute instead. Thus we no longer have remaining key in /etc/apt/trusted.gpg after building. Closes: #816204 + * Try to reuse /isolinux/splash.png in default grub configuration. -- Raphaël Hertzog Tue, 05 Jan 2016 18:03:44 +0100 diff --git a/scripts/build/binary_loopback_cfg b/scripts/build/binary_loopback_cfg index 45e1aecac..52943dc44 100755 --- a/scripts/build/binary_loopback_cfg +++ b/scripts/build/binary_loopback_cfg @@ -105,13 +105,6 @@ Grub_live_autodetect_entry () LINUX_LIVE="${LINUX_LIVE}\n}" } -Grub_live_video () -{ - - LINUX_LIVE="${LINUX_LIVE}\ninsmod all_video\n" - -} - if [ -e "config/bootloaders/grub-pc" ] then # Internal local copy @@ -226,8 +219,6 @@ do done IFS="$OLDIFS" -Grub_live_video - if [ -z ${FOUND_SYSLINUX} ] then @@ -383,12 +374,12 @@ fi # Copying templates mkdir -p binary/boot/grub -cp "${_SOURCE}"/grub.cfg binary/boot/grub/grub.cfg +cp "${_SOURCE}"/* binary/boot/grub/ -sed -i -e "s|LINUX_LIVE|${LINUX_LIVE}|" -e "s|LINUX_INSTALL|${LINUX_INSTALL}|" -e "s|MEMTEST|${MEMTEST}|" binary/boot/grub/grub.cfg -sed -i -e "s#LB_BOOTAPPEND_INSTALL#${LB_BOOTAPPEND_INSTALL}#" -e "s#LB_BOOTAPPEND_LIVE#${LB_BOOTAPPEND_LIVE}#" binary/boot/grub/grub.cfg +sed -i -e "s|LINUX_LIVE|${LINUX_LIVE}|" -e "s|LINUX_INSTALL|${LINUX_INSTALL}|" -e "s|MEMTEST|${MEMTEST}|" binary/boot/grub/*.cfg +sed -i -e "s#LB_BOOTAPPEND_INSTALL#${LB_BOOTAPPEND_INSTALL}#" -e "s#LB_BOOTAPPEND_LIVE#${LB_BOOTAPPEND_LIVE}#" binary/boot/grub/*.cfg -sed -i -e 's|\ $||g' binary/boot/grub/grub.cfg +sed -i -e 's|\ $||g' binary/boot/grub/*.cfg echo "source /boot/grub/grub.cfg" > binary/boot/grub/loopback.cfg diff --git a/scripts/build/efi-image b/scripts/build/efi-image index 724095f5c..c37232709 100755 --- a/scripts/build/efi-image +++ b/scripts/build/efi-image @@ -81,5 +81,6 @@ mcopy -i "$outdir/efi.img" "$workdir/boot$efi_name.efi" \ "::efi/boot/boot$efi_name.efi" grub-cpmodules "$outdir" "$platform" +cp /usr/share/grub/unicode.pf2 "$outdir/boot/grub/" exit 0 diff --git a/share/bootloaders/grub-pc/grub.cfg b/share/bootloaders/grub-pc/grub.cfg index 3430b63a0..a93ceb946 100644 --- a/share/bootloaders/grub-pc/grub.cfg +++ b/share/bootloaders/grub-pc/grub.cfg @@ -1,9 +1,26 @@ set default=0 +loadfont $prefix/unicode.pf2 +set gfxmode=auto +insmod all_video +insmod gfxterm +terminal_output gfxterm + +insmod png insmod tga -background_image ($root)/boot/grub/splash.tga -set color_normal=cyan/blue -set color_highlight=white/blue + +if [ -e /isolinux/splash.png ] ; then + background_image /isolinux/splash.png + set color_normal=light-gray/black + set color_highlight=white/black +else + background_image /boot/grub/splash.tga + set menu_color_normal=cyan/blue + set menu_color_highlight=white/blue +fi + +insmod play +play 960 440 1 0 4 440 1 LINUX_LIVE -- cgit v1.2.3