[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Gfxboot theme for booting



Hi guys! :-)

My name is Juanje Ojeda and I'm working on Spanish distribution called Guadalinex. The distribution is actually based on Ubuntu, but we prefer to use Live-helper than the Ubuntu generation system, so we are making some improvements to support things we need.

The other day my coworker Roberto sent a patch for one bug (#515974) that was blocking us. But we're still working on couple of things.

We hope you find some of those useful and if you prefer any way we give to you our patches or features, just let us know.

Well, the last feature we needed and Roberto has implemented (trying to doing similar to the rest of the code and being as less intrusive we could) was a gfxboot support.

We need graphical splash and menu, because it's what our users are expecting.

Roberto added some variables and a new 'stage' that will run after 'syslinux' stage (which is kind of predepend for gfxboot). The files needed to enable the graphical boot will be extracted from a theme already installed in the generation system.

Actually you can put the files on:
/usr/share/gfxboot-theme-${LH_GFXBOOT_THEME}

or

/usr/share/gfxboot-theme-${LH_DISTRIBUTION}

and it'll work.

We hope you like it and if you have any though, advise or comment we love to read it :-)

I attach the patch file.

Thanks for your time :-)
diff --git a/helpers/lh_binary b/helpers/lh_binary
index 470cae0..d6ad4c3 100755
--- a/helpers/lh_binary
+++ b/helpers/lh_binary
@@ -55,6 +55,7 @@ lh_binary_debian-installer ${*}
 lh_binary_memtest ${*}
 lh_binary_grub ${*}
 lh_binary_syslinux ${*}
+lh_binary_enable_gfxboot ${*}
 lh_binary_yaboot ${*}
 lh_binary_silo ${*}
 lh_binary_disk ${*}
diff --git a/helpers/lh_binary_enable_gfxboot b/helpers/lh_binary_enable_gfxboot
new file mode 100755
index 0000000..3040414
--- /dev/null
+++ b/helpers/lh_binary_enable_gfxboot
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# lh_binary_enable_gfxboot(1) - enables gfxboot on syslinux
+# Copyright (C) 2009 Roberto C. Morano <rcmorano@emergya.es>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+set -e
+
+# Including common functions
+. "${LH_BASE:-/usr/share/live-helper}"/functions.sh
+
+# Setting static variables
+DESCRIPTION="$(Echo 'enables gfxboot from an installed theme into binary')"
+HELP=""
+USAGE="${PROGRAM} [--force]"
+
+Arguments "${@}"
+
+# Reading configuration files
+Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
+Set_defaults
+
+if [ "${LH_GFXBOOT}" != "enabled" ]
+then
+	exit 0
+fi
+
+Echo_message "Begin gfxboot installation..."
+
+# Requiring stage file
+Require_stagefile .stage/config .stage/bootstrap .stage/binary_syslinux
+
+# Checking stage file
+Check_stagefile .stage/binary_gfxboot
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+# Restoring cache
+Restore_cache cache/packages_binary
+
+# Setting up some vars
+
+# Override "distro" gfxboot theme
+if [ ! -z ${LH_GFXBOOT_THEME} ]
+then
+	GFXBOOT_THEME="/usr/share/gfxboot-theme-${LH_GFXBOOT_THEME}"
+else
+	GFXBOOT_THEME="/usr/share/gfxboot-theme-${LH_DISTRIBUTION}"
+fi
+GFXBOOT_TGZ="$GFXBOOT_THEME/bootlogo.tar.gz"
+GFXBOOT_LANG="$GFXBOOT_THEME/lang"
+
+# Install gfxboot theme into binary
+
+if [ -e $GFXBOOT_TGZ ]
+then
+	tar zxf $GFXBOOT_TGZ -C binary/isolinux/
+else
+	Echo_error "gfxboot-theme-$GFXBOOT_THEME not installed"
+	exit 1
+fi
+
+if [ -e $GFXBOOT_LANG ]
+then
+	cp -a $GFXBOOT_LANG binary/isolinux/
+fi
+
+if [ ! -z ${LH_GFXBOOT_CFG} ]
+then
+	cp ${LH_GFXBOOT_CFG} binary/isolinux/
+fi
+
+if [ ! -z ${LH_GFXBOOT_SPLASH} ]
+then
+	cp ${LH_GFXBOOT_SPLASH} binary/isolinux/
+fi
+
+# Saving cache
+Save_cache cache/packages_binary
+
+# Removing depends
+Remove_package
+
+# Creating stage file
+Create_stagefile .stage/binary_gfxboot
diff --git a/helpers/lh_config b/helpers/lh_config
index 6e6a330..bf1f37d 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -1179,6 +1179,22 @@ LH_SYSLINUX_MENU_LIVE_FAILSAFE_ENTRY="${LH_SYSLINUX_MENU_LIVE_FAILSAFE_ENTRY}"
 # (Default: ${LH_SYSLINUX_MENU_MEMTEST_ENTRY})
 LH_SYSLINUX_MENU_MEMTEST_ENTRY="${LH_SYSLINUX_MENU_MEMTEST_ENTRY}"
 
+# \$LH_GFXBOOT: enable gfxboot installation for syslinux
+# (Default: disabled)
+LH_GFXBOOT="${LH_GFXBOOT}"
+
+# \$LH_GFXBOOT_CFG: set custom gfxboot configuration file
+# (Default: empty)
+LH_GFXBOOT_CFG="${LH_GFXBOOT_CFG}"
+
+# \$LH_GFXBOOT_THEME: set gfxboot theme to use (overrides distribution)
+# (Default: empty)
+LH_GFXBOOT_THEME="${LH_GFXBOOT_THEME}"
+
+# \$LH_GFXBOOT_SPLASH: set gfxboot splash to use (pcx format)
+# (Default: empty)
+LH_GFXBOOT_SPLASH="${LH_GFXBOOT_SPLASH}"
+
 # \$LH_USERNAME: set username
 # (Default: ${LH_USERNAME})
 LH_USERNAME="${LH_USERNAME}"

Reply to: