Merge branch 'master' into cleanup-cruft

Conflicts:
	gen_initramfs.sh
cleanup-cruft
Fabio Erculiani 12 years ago
commit 734ab6d239

4
.gitignore vendored

@ -1,3 +1 @@
/genkernel.8
/genkernel-*.tar.bz2
/ChangeLog
/*.tar.*

@ -1,16 +1,13 @@
PACKAGE_VERSION = `/bin/fgrep GK_V= genkernel | sed "s/.*GK_V='\([^']\+\)'/\1/"`
distdir = genkernel-$(PACKAGE_VERSION)
VERSION ?=
distdir = genkernel-next-$(VERSION)
# Add off-Git/generated files here that need to be shipped with releases
EXTRA_DIST = genkernel.8 ChangeLog
EXTRA_DIST = genkernel.8
genkernel.8: doc/genkernel.8.txt doc/asciidoc.conf Makefile genkernel
a2x --conf-file=doc/asciidoc.conf --attribute="genkernelversion=$(PACKAGE_VERSION)" \
a2x --conf-file=doc/asciidoc.conf --attribute="genkernelversion=$(VERSION)" \
--format=manpage -D . "$<"
ChangeLog:
git log >$@
clean:
rm -f $(EXTRA_DIST)
@ -19,12 +16,10 @@ check-git-repository:
git diff --cached --quiet || { echo 'STOP, you have uncommitted changes in the index' ; false ; }
dist: check-git-repository $(EXTRA_DIST)
rm -Rf "$(distdir)" "$(distdir)".tar "$(distdir)".tar.bz2
mkdir "$(distdir)"
git ls-files -z | xargs -0 cp --no-dereference --parents --target-directory="$(distdir)" \
$(EXTRA_DIST)
tar cf "$(distdir)".tar "$(distdir)"
bzip2 -9v "$(distdir)".tar
rm -Rf "$(distdir)"
test -n "$(VERSION)" || { echo "VERSION not set" >&2; exit 1; }
git archive --prefix=$(distdir)/ --format=tar "v$(VERSION)" > $(distdir).tar
rm -f $(distdir).tar.xz
xz $(distdir).tar
scp $(distdir).tar.xz lxnay@dev.gentoo.org:~/public_html/genkernel-next/
.PHONY: clean check-git-repository dist

@ -29,4 +29,12 @@ MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd x
MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse"
# Crypto
MODULES_CRYPTO="sha256_generic cbc aes_generic aes_586 aesni-intel xts"
MODULES_CRYPTO="sha1_generic sha256_generic sha512_generic cbc aes_generic aes-x86_64 xts"
# Backward compatibility with previous releases
MODULES_CRYPT="${MODULES_CRYPTO}"
# Virtio support (KVM mainly)
MODULES_VIRTIO="virtio virtio_balloon virtio_console virtio_net virtio_blk virtio_pci virtio_ring"
# DRM (Plymouth support)
MODULES_PLYMOUTH="radeon nouveau uvesafb"

@ -28,4 +28,12 @@ MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd x
MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse"
# Crypto
MODULES_CRYPTO="sha256_generic cbc aes_generic aes-x86_64 aesni-intel xts"
MODULES_CRYPTO="sha1_generic sha256_generic sha512_generic cbc aes_generic aes-x86_64 xts"
# Backward compatibility with previous releases
MODULES_CRYPT="${MODULES_CRYPTO}"
# Virtio support (KVM mainly)
MODULES_VIRTIO="virtio virtio_balloon virtio_console virtio_net virtio_blk virtio_pci virtio_ring"
# DRM (Plymouth support)
MODULES_PLYMOUTH="radeon nouveau uvesafb"

@ -57,6 +57,9 @@ KSUFF='.ko'
UDEVD='/sbin/udevd'
MDEVD='/sbin/mdev'
INITRD_SPLASH='/etc/initrd.splash'
PLYMOUTHD_BIN='/sbin/plymouthd'
PLYMOUTH_BIN='/bin/plymouth'
REAL_ROOT=''
CONSOLE='/dev/console'
NEW_ROOT='/newroot'
@ -74,5 +77,5 @@ DEFAULT_NFSOPTIONS="ro,nolock,rsize=1024,wsize=1024"
# Only sections that are in by default or those that
# are not module groups need to be defined here...
HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan lvm dmraid mdadm fs net'
MY_HWOPTS='modules pata sata scsi usb firewire waitscan dmraid mdadm fs net iscsi crypto'
HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan lvm dmraid mdadm fs net virtio'
MY_HWOPTS='modules pata sata scsi usb firewire waitscan dmraid mdadm fs net iscsi crypto plymouth virtio'

@ -2,6 +2,113 @@
. /etc/initrd.defaults
splash() {
return 0
}
[ -e "${INITRD_SPLASH}" ] && . "${INITRD_SPLASH}"
is_fbsplash() {
if [ -e "${INITRD_SPLASH}" ] && [ "${FBSPLASH}" = '1' ]
then
return 0
fi
return 1
}
is_plymouth() {
if [ "${PLYMOUTH}" = '1' ] && [ "${QUIET}" = '1' ] \
&& [ -e "${PLYMOUTHD_BIN}" ]
then
return 0
fi
return 1
}
is_plymouth_started() {
[ -n "${PLYMOUTH_FAILURE}" ] && return 1
is_plymouth && "${PLYMOUTH_BIN}" --ping 2>/dev/null && return 0
return 1
}
splashcmd() {
# plymouth support
local cmd="${1}"
shift
case "${cmd}" in
init)
is_fbsplash && splash init
is_plymouth && plymouth_init
;;
verbose)
is_fbsplash && splash verbose
plymouth_hide
;;
quiet)
# no fbsplash support
plymouth_show
;;
set_msg)
is_fbsplash && splash set_msg "${1}"
plymouth_message "${1}"
;;
hasroot)
# no fbsplash support
plymouth_newroot "${1}"
;;
esac
}
plymouth_init() {
good_msg "Enabling Plymouth"
mkdir -p /run/plymouth || return 1
# Make sure that udev is done loading tty and drm
if is_udev
then
udevadm trigger --action=add --attr-match=class=0x030000 \
>/dev/null 2>&1
udevadm trigger --action=add --subsystem-match=graphics \
--subsystem-match=drm --subsystem-match=tty \
>/dev/null 2>&1
udevadm settle
fi
local consoledev=
local other=
read consoledev other < /sys/class/tty/console/active
consoledev=${consoledev:-tty0}
"${PLYMOUTHD_BIN}" --attach-to-session --pid-file /run/plymouth/pid \
|| {
bad_msg "Plymouth load error";
PLYMOUTH_FAILURE=1
return 1;
}
plymouth_show
good_msg "Plymouth enabled"
}
plymouth_hide() {
is_plymouth_started && "${PLYMOUTH_BIN}" --hide-splash
}
plymouth_show() {
is_plymouth_started && "${PLYMOUTH_BIN}" --show-splash
}
plymouth_message() {
is_plymouth_started && "${PLYMOUTH_BIN}" --update="${1}"
}
plymouth_newroot() {
is_plymouth_started && "${PLYMOUTH_BIN}" --newroot="${1}"
}
modules_load() {
for module in $*
do
@ -408,7 +515,7 @@ bad_msg() {
msg_string="${msg_string:-...}"
if [ "$2" != 1 ]
then
splash 'verbose' > /dev/null &
splashcmd verbose
echo -e "${BAD}!!${NORMAL}${BOLD} ${msg_string} ${NORMAL}"
fi
}
@ -419,19 +526,101 @@ warn_msg() {
[ "$2" != 1 ] && echo -e "${WARN}**${NORMAL}${BOLD} ${msg_string} ${NORMAL}"
}
crypt_filter() {
if [ "${CRYPT_SILENT}" = '1' ]
# Courtesy of dracut. Licensed under GPL-2.
# Taken from: dracut/modules.d/90crypt/crypt-lib.sh
# ask_for_password
#
# Wraps around plymouth ask-for-password and adds fallback to tty password ask
# if plymouth is not present.
#
# --cmd command
# Command to execute. Required.
# --prompt prompt
# Password prompt. Note that function already adds ':' at the end.
# Recommended.
# --tries n
# How many times repeat command on its failure. Default is 3.
# --ply-[cmd|prompt|tries]
# Command/prompt/tries specific for plymouth password ask only.
# --tty-[cmd|prompt|tries]
# Command/prompt/tries specific for tty password ask only.
# --tty-echo-off
# Turn off input echo before tty command is executed and turn on after.
# It's useful when password is read from stdin.
ask_for_password() {
local cmd; local prompt; local tries=3
local ply_cmd; local ply_prompt; local ply_tries=3
local tty_cmd; local tty_prompt; local tty_tries=3
local ret
while [ $# -gt 0 ]; do
case "$1" in
--cmd) ply_cmd="$2"; tty_cmd="$2" shift;;
--ply-cmd) ply_cmd="$2"; shift;;
--tty-cmd) tty_cmd="$2"; shift;;
--prompt) ply_prompt="$2"; tty_prompt="$2" shift;;
--ply-prompt) ply_prompt="$2"; shift;;
--tty-prompt) tty_prompt="$2"; shift;;
--tries) ply_tries="$2"; tty_tries="$2"; shift;;
--ply-tries) ply_tries="$2"; shift;;
--tty-tries) tty_tries="$2"; shift;;
--tty-echo-off) tty_echo_off=yes;;
esac
shift
done
{ flock -s 9;
# Prompt for password with plymouth, if installed and running.
if is_plymouth_started
then
eval $1 >/dev/null 2>/dev/null
"${PLYMOUTH_BIN}" ask-for-password \
--prompt="$ply_prompt" \
--number-of-tries=$ply_tries \
--command="$ply_cmd"
ret=$?
else
splash 'verbose' > /dev/null &
eval $1
res=$?
if [ ${res} -eq 0 ]
splashcmd verbose
if [ "$tty_echo_off" = yes ]; then
stty_orig="$(stty -g)"
stty -echo
fi
local i=1
while [ $i -le $tty_tries ]; do
[ -n "$tty_prompt" ] && \
printf "$tty_prompt [$i/$tty_tries]:" >&2
eval "$tty_cmd" && ret=0 && break
ret=$?
i=$(($i+1))
[ -n "$tty_prompt" ] && printf '\n' >&2
done
[ "$tty_echo_off" = yes ] && stty $stty_orig
# no need for: splashcmd quiet
# since fbsplash does not support it
if [ $ret -ne 0 ] && is_fbsplash
then
splash set_msg 'Disk unlocked.'
splashcmd set_msg 'Disk unlocked.'
fi
return ${res}
fi
} 9>/.console_lock
[ $ret -ne 0 ] && bad_msg "Wrong password"
return $ret
}
crypt_exec() {
if [ "${CRYPT_SILENT}" = '1' ]
then
eval ${1} >/dev/null 2>/dev/null
else
ask_for_password --ply-tries 5 \
--ply-cmd "${1}" \
--ply-prompt "Encryption password (${LUKS_DEVICE}): " \
--tty-tries 5 \
--tty-cmd "${1}" || return 1
return 0
fi
}
@ -448,6 +637,7 @@ prompt_user(){
bad_msg "Please file a bug report with this message" && exit 1
[ -n "${3}" ] && local explnt=" or : ${3}" || local explnt="."
splashcmd verbose
bad_msg "Could not find the ${2} in ${oldvalue}${explnt}"
bad_msg "Please specify another value or:"
bad_msg "- press Enter for the same"
@ -470,6 +660,7 @@ prompt_user(){
eval ${1}'='${oldvalue}
;;
esac
splashcmd quiet
}
cmdline_hwopts() {
@ -558,7 +749,7 @@ chooseKeymap() {
good_msg "Loading keymaps"
if [ -z "${keymap}" ]
then
splash 'verbose' > /dev/null &
splashcmd verbose
cat /lib/keymaps/keymapList
read -t 10 -p '<< Load keymap (Enter for default): ' keymap
case ${keymap} in
@ -613,12 +804,12 @@ chooseKeymap() {
loadkmap < /lib/keymaps/${keymap}.map
mkdir -p /etc/sysconfig
echo "XKEYBOARD=${keymap}" > /etc/sysconfig/keyboard
splash set_msg "Set keymap to ${keymap}"
splashcmd set_msg "Set keymap to ${keymap}"
elif [ -z "${keymap}" ]
then
good_msg
good_msg "Keeping default keymap"
splash set_msg "Keeping default keymap"
splashcmd set_msg "Keeping default keymap"
else
bad_msg "Sorry, but keymap ''${keymap}'' is invalid!"
unset keymap
@ -853,7 +1044,7 @@ openLUKS() {
LUKS_DEVICE=$(find_real_device "${LUKS_DEVICE}")
setup_md_device ${LUKS_DEVICE}
cryptsetup isLuks ${LUKS_DEVICE}
/sbin/cryptsetup isLuks ${LUKS_DEVICE}
if [ $? -ne 0 ]
then
bad_msg "The LUKS device ${LUKS_DEVICE} does not contain a LUKS header" ${CRYPT_SILENT}
@ -939,14 +1130,14 @@ openLUKS() {
fi
fi
# At this point, keyfile or not, we're ready!
crypt_filter "${gpg_cmd}cryptsetup ${cryptsetup_options} luksOpen ${LUKS_DEVICE} ${LUKS_NAME}"
crypt_filter_ret=$?
crypt_exec "${gpg_cmd}/sbin/cryptsetup ${cryptsetup_options} luksOpen ${LUKS_DEVICE} ${LUKS_NAME}"
crypt_exec_ret=$?
[ -e /dev/tty.org ] \
&& rm -f /dev/tty \
&& mv /dev/tty.org /dev/tty
if [ ${crypt_filter_ret} -eq 0 ]
if [ ${crypt_exec_ret} -eq 0 ]
then
good_msg "LUKS device ${LUKS_DEVICE} opened" ${CRYPT_SILENT}
break
@ -1061,8 +1252,10 @@ setup_md_device() {
}
do_rundebugshell() {
splashcmd verbose
good_msg 'Type "exit" to continue with normal bootup.'
[ -x /bin/sh ] && /bin/sh || /bin/ash
splashcmd quiet
}
rundebugshell() {

@ -3,12 +3,6 @@
. /etc/initrd.defaults
. /etc/initrd.scripts
splash() {
return 0
}
[ -e /etc/initrd.splash ] && . /etc/initrd.splash
# Clean input/output
exec >${CONSOLE} <${CONSOLE} 2>&1
@ -23,6 +17,7 @@ fi
mount -t proc -o noexec,nosuid,nodev proc /proc >/dev/null 2>&1
mount -o remount,rw / >/dev/null 2>&1
mount -t tmpfs -o rw,nosuid,nodev,relatime,mode=755 none /run 2>&1
mount -t tmpfs none /dev/shm 2>&1
# Set up symlinks
/bin/busybox --install -s
@ -153,6 +148,12 @@ do
CONSOLE=${x#*=}
CONSOLE=$(basename ${CONSOLE})
;;
splash)
PLYMOUTH=1
;;
splash=*)
FBSPLASH=1
;;
# /dev/md
lvmraid=*)
RAID_DEVICES="${x#*=}"
@ -301,8 +302,6 @@ then
fi
fi
splash 'init'
cmdline_hwopts
# Mount devfs
@ -317,11 +316,26 @@ then
good_msg 'Activating udev'
echo "${UDEVD}" > /proc/sys/kernel/hotplug
echo "" > /sys/kernel/uevent_helper
else
"${UDEVD}" --daemon --resolve-names=never && \
udevadm trigger --action=add && \
udevadm settle || bad_msg "udevd failed to run"
elif is_mdev
then
good_msg 'Activating mdev'
# Serialize hotplug events
touch /dev/mdev.seq
echo "${MDEVD}" > /proc/sys/kernel/hotplug
# Ensure that device nodes are properly configured
"${MDEVD}" -s || bad_msg "mdev -s failed"
else
bad_msg "Cannot find either udev or mdev"
fi
if is_udev
then
# if udev, we can load the splash earlier
# In the plymouth case, udev will load KMS automatically
splashcmd init
fi
# Load modules listed in MY_HWOPTS if /lib/modules exists for the running kernel
@ -345,18 +359,10 @@ else
good_msg 'Skipping module load; no modules in the ramdisk!'
fi
if is_udev
# If we're mdev, we better wait for all the modules to be loaded.
if is_mdev
then
# Initialize udev
"${UDEVD}" --daemon --resolve-names=never && \
udevadm trigger --action=add && \
udevadm settle || bad_msg "udevd failed to run"
elif is_mdev
then
# Ensure that device nodes are properly configured
"${MDEVD}" -s || bad_msg "mdev -s failed"
else
bad_msg "Cannot find either udev or mdev"
splashcmd init
fi
# Apply scan delay if specified
@ -873,6 +879,8 @@ for fs in $fslist; do
fi
done
splashcmd hasroot "${NEW_ROOT}"
# Execute script on the cdrom just before boot to update things if necessary
cdupdate
@ -924,7 +932,7 @@ rundebugshell "before entering switch_root"
exec /sbin/switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}"
# If we get here, something bad has happened
splash 'verbose'
splashcmd verbose
bad_msg "A fatal error has occured since ${REAL_INIT:-/sbin/init} did not"
bad_msg "boot correctly. Trying to open a shell..."

@ -28,4 +28,12 @@ MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd u
MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse"
# Crypto
MODULES_CRYPTO="sha256_generic cbc aes_generic xts"
MODULES_CRYPTO="sha1_generic sha256_generic sha512_generic cbc aes_generic aes-x86_64 xts"
# Backward compatibility with previous releases
MODULES_CRYPT="${MODULES_CRYPTO}"
# Virtio support (KVM mainly)
MODULES_VIRTIO="virtio virtio_balloon virtio_console virtio_net virtio_blk virtio_pci virtio_ring"
# DRM (Plymouth support)
MODULES_PLYMOUTH="radeon nouveau uvesafb"

@ -235,6 +235,13 @@ INITIALIZATION
<theme> rather than the default theme specified in your splash
configuration. If *--no-splash* is specified, then splash is disabled.
*--*[*no-*]*plymouth*::
Installs, or not, plymouth into the initramfs. If "splash" will be
passed at boot, plymouth will be activated.
*--plymouth-theme*=<theme>::
Embeds the given plymouth theme into the initramfs.
*--do-keymap-auto*::
Force keymap selection at boot.

@ -40,6 +40,8 @@ longusage() {
echo " --no-mrproper Do not run make mrproper before compilation"
echo " --splash Install framebuffer splash support into initramfs"
echo " --no-splash Do not install framebuffer splash"
echo " --plymouth Install plymouth"
echo " --no-plymouth DO not install plymouth"
echo " --install Install the kernel after building"
echo " --no-install Do not install the kernel after building"
echo " --symlink Manage symlinks in /boot for installed images"
@ -81,6 +83,7 @@ longusage() {
echo " --splash-res=<res> Select splash theme resolutions to install"
echo " --splash=<theme> Enable framebuffer splash using <theme>"
echo " --splash-res=<res> Select splash theme resolutions to install"
echo " --plymouth-theme=<theme> Embed the given plymouth theme"
echo " --do-keymap-auto Forces keymap selection at boot"
echo " --keymap Enables keymap selection support"
echo " --no-keymap Disables keymap selection support"
@ -415,6 +418,17 @@ parse_cmdline() {
SPLASH_RES=`parse_opt "$*"`
print_info 2 "SPLASH_RES: ${SPLASH_RES}"
;;
--plymouth)
CMD_PLYMOUTH=1
PLYMOUTH_THEME='text'
print_info 2 "CMD_PLYMOUTH: ${CMD_PLYMOUTH}"
;;
--plymouth-theme=*)
CMD_PLYMOUTH=1
PLYMOUTH_THEME=`parse_opt "$*"`
print_info 2 "CMD_PLYMOUTH: ${CMD_PLYMOUTH}"
print_info 2 "PLYMOUTH_THEME: ${PLYMOUTH_THEME}"
;;
--install|--no-install)
CMD_INSTALL=`parse_optbool "$*"`
print_info 2 "CMD_INSTALL: ${CMD_INSTALL}"

@ -92,6 +92,7 @@ determine_real_args() {
set_config_with_override STRING MODPROBEDIR CMD_MODPROBEDIR "/etc/modprobe.d"
set_config_with_override BOOL SPLASH CMD_SPLASH
set_config_with_override BOOL PLYMOUTH CMD_PLYMOUTH
set_config_with_override BOOL POSTCLEAR CMD_POSTCLEAR
set_config_with_override BOOL MRPROPER CMD_MRPROPER
set_config_with_override BOOL MENUCONFIG CMD_MENUCONFIG

@ -63,7 +63,7 @@ append_base_layout() {
rm -rf "${TEMP}/initramfs-base-temp" > /dev/null
fi
mkdir -p ${TEMP}/initramfs-base-temp/dev
mkdir -p ${TEMP}/initramfs-base-temp/dev/shm
mkdir -p ${TEMP}/initramfs-base-temp/bin
mkdir -p ${TEMP}/initramfs-base-temp/etc
mkdir -p ${TEMP}/initramfs-base-temp/usr
@ -80,7 +80,10 @@ append_base_layout() {
mkdir -p ${TEMP}/initramfs-base-temp/sbin
mkdir -p ${TEMP}/initramfs-base-temp/usr/bin
mkdir -p ${TEMP}/initramfs-base-temp/usr/sbin
mkdir -p ${TEMP}/initramfs-base-temp/usr/share
mkdir -p ${TEMP}/initramfs-base-temp/usr/lib
ln -s lib ${TEMP}/initramfs-base-temp/lib64
ln -s lib ${TEMP}/initramfs-base-temp/usr/lib64
echo "/dev/ram0 / ext2 defaults 0 0" > ${TEMP}/initramfs-base-temp/etc/fstab
echo "proc /proc proc defaults 0 0" >> ${TEMP}/initramfs-base-temp/etc/fstab
@ -120,7 +123,8 @@ append_busybox() {
chmod +x "${TEMP}/initramfs-busybox-temp/usr/share/udhcpc/default.script"
# Set up a few default symlinks
local default_applets="[ ash sh mount uname echo cut cat"
local default_applets="[ ash sh mount uname ls echo cut cat flock stty"
default_applets+=" readlink"
for i in ${BUSYBOX_APPLETS:-${default_applets}}; do
rm -f ${TEMP}/initramfs-busybox-temp/bin/$i
ln -s busybox ${TEMP}/initramfs-busybox-temp/bin/$i ||
@ -382,6 +386,83 @@ append_splash(){
fi
}
append_plymouth() {
[ -z "${PLYMOUTH_THEME}" ] && \
PLYMOUTH_THEME=$(plymouth-set-default-theme)
[ -z "${PLYMOUTH_THEME}" ] && PLYMOUTH_THEME=text
if [ -d "${TEMP}/initramfs-ply-temp" ]
then
rm -r "${TEMP}/initramfs-ply-temp"
fi
mkdir -p "${TEMP}/initramfs-ply-temp/usr/share/plymouth/themes"
mkdir -p "${TEMP}/initramfs-ply-temp/etc/plymouth"
mkdir -p "${TEMP}/initramfs-ply-temp/"{bin,sbin}
cd "${TEMP}/initramfs-ply-temp"
local theme_dir="/usr/share/plymouth/themes"
local t=
local p=
local ply="${theme_dir}/${PLYMOUTH_THEME}/${PLYMOUTH_THEME}.plymouth"
local plugin=$(grep "^ModuleName=" "${ply}" | cut -d= -f2-)
local plugin_binary=
if [ -n "${plugin}" ]
then
plugin_binary="$(plymouth --get-splash-plugin-path)/${plugin}.so"
fi
print_info 1 " >> Installing plymouth [ using the ${PLYMOUTH_THEME} theme and plugin: \"${plugin}\" ]..."
for t in text details ${PLYMOUTH_THEME}; do
cp -R "${theme_dir}/${t}" \
"${TEMP}/initramfs-ply-temp${theme_dir}/" || \
gen_die "cannot copy ${theme_dir}/details"
done
cp /usr/share/plymouth/{bizcom.png,plymouthd.defaults} \
"${TEMP}/initramfs-ply-temp/usr/share/plymouth/" || \
gen_die "cannot copy bizcom.png and plymouthd.defaults"
# Do both config setup
echo -en "[Daemon]\nTheme=${PLYMOUTH_THEME}\n" > \
"${TEMP}/initramfs-ply-temp/etc/plymouth/plymouthd.conf" || \
gen_die "Cannot create /etc/plymouth/plymouthd.conf"
ln -sf "${PLYMOUTH_THEME}/${PLYMOUTH_THEME}.plymouth" \
"${TEMP}/initramfs-ply-temp${theme_dir}/default.plymouth" || \
gen_die "cannot setup the default plymouth theme"
local libs=(
"/lib*/libply-splash-core.so.*"
"/usr/lib*/libply-splash-graphics.so.*"
"/usr/lib*/plymouth/text.so"
"/usr/lib*/plymouth/details.so"
"/usr/lib*/plymouth/renderers/frame-buffer.so"
"/usr/lib*/plymouth/renderers/drm.so"
"${plugin_binary}"
)
# lib64 must take the precedence or all the cpio archive
# symlinks will be fubared
local slib= lib= final_lib= final_libs=()
for slib in "${libs[@]}"; do
lib=( ${slib} )
final_lib="${lib[0]}"
final_libs+=( "${final_lib}" )
done
copy_binaries "${TEMP}/initramfs-ply-temp" \
/sbin/plymouthd /bin/plymouth \
"${final_libs[@]}" || gen_die "cannot copy plymouth"
log_future_cpio_content
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \
|| gen_die "appending plymouth to cpio"
cd "${TEMP}"
rm -r "${TEMP}/initramfs-ply-temp/"
}
append_overlay(){
cd ${INITRAMFS_OVERLAY}
log_future_cpio_content
@ -458,7 +539,7 @@ append_gpg() {
mkdir -p "${TEMP}/initramfs-gpg-temp/sbin/"
print_info 1 "Including GPG support"
copy_binaries /sbin/gpg
copy_binaries "${TEMP}/initramfs-gpg-temp" /sbin/gpg
cd "${TEMP}/initramfs-gpg-temp/"
log_future_cpio_content
@ -714,6 +795,8 @@ create_initramfs() {
append_data 'splash' "${SPLASH}"
append_data 'plymouth' "${PLYMOUTH}"
if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
then
append_data 'firmware'

@ -2,7 +2,7 @@
# $Id$
PATH="${PATH}:/sbin:/usr/sbin"
GK_V='3.4.45'
GK_V='9999'
# Set the default for TMPDIR. May be modified by genkernel.conf or the
# --tempdir command line option.

@ -111,6 +111,12 @@ DISKLABEL="yes"
# This supersedes the "SPLASH_THEME" option of /etc/conf.d/splash (in early space).
#SPLASH_THEME="gentoo"
# Installs, or not, plymouth into the initramfs. If "splash" will be
# passed at boot, plymouth will be activated.
# PLYMOUTH="yes"
# Embeds the given plymouth theme into the initramfs.
# PLYMOUTH_THEME="text"
# =========Keymap Settings=========
#

Loading…
Cancel
Save