Try to reuse /isolinux/splash.png in default grub configuration.

This commit is contained in:
Raphaël Hertzog 2016-11-22 18:17:53 +01:00
parent 2f061569ac
commit 674794a8f4
4 changed files with 26 additions and 16 deletions

1
debian/changelog vendored
View File

@ -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 <hertzog@debian.org> Tue, 05 Jan 2016 18:03:44 +0100

View File

@ -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

View File

@ -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

View File

@ -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