From b8433eb99605717e0ae4e8c13e7a126b0375a3f9 Mon Sep 17 00:00:00 2001 From: PhobosK Date: Sun, 1 Feb 2015 22:30:33 +0200 Subject: [PATCH] [ADDED] Uvesafb support with v86d helper binary [ADDED] Uvesafb support with v86d helper binary [FIXED] Missing log/debug output when adding e2fsprogs support in initramfs --- doc/genkernel.8.txt | 4 ++++ gen_cmdline.sh | 6 ++++++ gen_determineargs.sh | 1 + gen_initramfs.sh | 30 ++++++++++++++++++++++++++++++ genkernel.conf | 3 +++ 5 files changed, 44 insertions(+) diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt index 2d6b9886..95ad1bed 100644 --- a/doc/genkernel.8.txt +++ b/doc/genkernel.8.txt @@ -245,6 +245,10 @@ INITIALIZATION *--plymouth-theme*=:: Embeds the given plymouth theme into the initramfs. +*--*[*no-*]*uvesafb*:: + Installs, or not, the v86d helper binary into the initramfs for uvesafb + support. Needs the presence of the v86d binary in /sbin folder. + *--do-keymap-auto*:: Force keymap selection at boot. diff --git a/gen_cmdline.sh b/gen_cmdline.sh index c0c0d25d..bc944b0b 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -86,6 +86,8 @@ longusage() { echo " --splash= Enable framebuffer splash using " echo " --splash-res= Select splash theme resolutions to install" echo " --plymouth-theme= Embed the given plymouth theme" + echo " --uvesafb Include uvesafb v86d helper support" + echo " --no-uvesafb Exclude uvesafb v86d helper support" echo " --do-keymap-auto Forces keymap selection at boot" echo " --keymap Enables keymap selection support" echo " --no-keymap Disables keymap selection support" @@ -445,6 +447,10 @@ parse_cmdline() { print_info 2 "CMD_PLYMOUTH: ${CMD_PLYMOUTH}" print_info 2 "PLYMOUTH_THEME: ${PLYMOUTH_THEME}" ;; + --uvesafb|--no-uvesafb) + CMD_UVESAFB=`parse_optbool "$*"` + print_info 2 "CMD_UVESAFB: ${CMD_UVESAFB}" + ;; --install|--no-install) CMD_INSTALL=`parse_optbool "$*"` print_info 2 "CMD_INSTALL: ${CMD_INSTALL}" diff --git a/gen_determineargs.sh b/gen_determineargs.sh index dea0d0f2..bdf17ecb 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -94,6 +94,7 @@ determine_real_args() { set_config_with_override BOOL SPLASH CMD_SPLASH set_config_with_override BOOL PLYMOUTH CMD_PLYMOUTH + set_config_with_override BOOL UVESAFB CMD_UVESAFB "no" set_config_with_override BOOL POSTCLEAR CMD_POSTCLEAR set_config_with_override BOOL MRPROPER CMD_MRPROPER set_config_with_override BOOL MENUCONFIG CMD_MENUCONFIG diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 57db45b6..69b298c2 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -178,6 +178,7 @@ append_e2fsprogs(){ cd "${TEMP}"/initramfs-e2fsprogs-temp \ || gen_die "cd '${TEMP}/initramfs-e2fsprogs-temp' failed" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" rm -rf "${TEMP}"/initramfs-e2fsprogs-temp > /dev/null } @@ -514,6 +515,33 @@ append_plymouth() { rm -r "${TEMP}/initramfs-ply-temp/" } +append_uvesafb(){ + if [ -x "/sbin/v86d" ] + then + if [ -d "${TEMP}/initramfs-uvesafb-temp" ] + then + rm -rf "${TEMP}/initramfs-uvesafb-temp" > /dev/null + fi + + mkdir -p ${TEMP}/initramfs-uvesafb-temp/dev + mkdir -p ${TEMP}/initramfs-uvesafb-temp/root + + cd ${TEMP}/initramfs-uvesafb-temp/dev || gen_die "cannot cd to dev" + mknod -m 600 mem c 1 1 || gen_die "cannot mknod" + + copy_binaries "${TEMP}/initramfs-uvesafb-temp/" /sbin/v86d + + cd "${TEMP}/initramfs-uvesafb-temp/" + log_future_cpio_content + find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ + || gen_die "compressing uvesafb cpio" + cd "${TEMP}" + rm -rf "${TEMP}/initramfs-uvesafb-temp" > /dev/null + else + gen_die "uvesafb support cannot be included: No /sbin/v86d file found. Please emerge sys-apps/v86d[x86emu]." + fi +} + append_overlay(){ cd ${INITRAMFS_OVERLAY} log_future_cpio_content @@ -1006,6 +1034,8 @@ create_initramfs() { append_data 'plymouth' "${PLYMOUTH}" isTrue "${PLYMOUTH}" && append_data 'drm' + append_data 'uvesafb' "${UVESAFB}" + if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ] then append_data 'firmware' diff --git a/genkernel.conf b/genkernel.conf index 898f4f99..bbe0a359 100644 --- a/genkernel.conf +++ b/genkernel.conf @@ -110,6 +110,9 @@ USECOLOR="yes" # Add new kernel to grub? #BOOTLOADER="grub" +# Enable support for uvesafb. Default is "no" +#UVESAFB="yes" + # Enable splashutils in early space (initrd). Default is "no". #SPLASH="yes"