Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 240377 Details for
Bug 330127
[TRACKER][PATCH] sys-kernel/genkernel: Integrate with Dracut
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
dracut-integration.patch
dracut-integration.patch (text/plain), 20.67 KB, created by
Amadeusz Żołnowski (RETIRED)
on 2010-07-27 22:00:07 UTC
(
hide
)
Description:
dracut-integration.patch
Filename:
MIME Type:
Creator:
Amadeusz Żołnowski (RETIRED)
Created:
2010-07-27 22:00:07 UTC
Size:
20.67 KB
patch
obsolete
>diff --git a/gen_cmdline.sh b/gen_cmdline.sh >index bb0d8fd..7f022ac 100755 >--- a/gen_cmdline.sh >+++ b/gen_cmdline.sh >@@ -14,6 +14,7 @@ longusage() { > echo > echo "Available Options: " > echo " Configuration settings" >+ echo " --local Local mode; source modules from current directory" > echo " --config=<file> genkernel configuration file to use" > echo " Debug settings" > echo " --loglevel=<0-5> Debug Verbosity Level" >@@ -41,7 +42,6 @@ longusage() { > echo " --symlink Manage symlinks in /boot for installed images" > echo " --no-symlink Do not manage symlinks" > echo " --no-ramdisk-modules Don't copy any modules to the ramdisk" >- echo " --all-ramdisk-modules Copy all kernel modules to the ramdisk" > echo " --callback=<...> Run the specified arguments after the" > echo " kernel and modules have been compiled" > echo " --static Build a static (monolithic kernel)." >@@ -65,39 +65,64 @@ longusage() { > echo " autodetect." > echo " --makeopts=<makeopts> Make options such as -j2, etc..." > echo " --mountboot Mount BOOTDIR automatically if mountable" >- echo " --no-mountboot Don't mount BOOTDIR automatically" >+ echo " --no-mountboot Don't mount BOOTDIR automatically" > echo " --bootdir=<dir> Set the location of the boot-directory, default is /boot" > echo " Initialization" >- echo " --gensplash=<theme> Enable framebuffer splash using <theme>" >- echo " --gensplash-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 " --bootloader=grub Add new kernel to GRUB configuration" >+ echo " --dmraid Include DMRAID support" >+ echo " --iscsi Include iSCSI support" >+ echo " --luks Include LUKS support" >+ echo " --> 'emerge cryptsetup-luks' with USE=-dynamic" >+ echo " --lvm Include LVM support" >+ echo " --mdadm Copy /etc/mdadm.conf to initramfs" >+ echo " (obsolete with Dracut; use --mdraid)" >+ echo " --multipath Include Multipath support" >+ echo " --splash Enable framebuffer splash (splashutils);" >+ echo " set up in /etc/conf.d/splash" >+ echo " Internal engine" >+ echo " --all-ramdisk-modules Copy all kernel modules to the ramdisk" > echo " --do-keymap-auto Forces keymap selection at boot" > echo " --no-keymap Disables keymap selection support" >+ echo " --splash=<theme> Enable framebuffer splash using <theme>" >+ echo " --splash-res=<res> Select splash theme resolutions to install" > echo " --evms Include EVMS support" > echo " --> 'emerge evms' in the host operating system" > echo " first" >- echo " --evms2 Include EVMS support" >- echo " --> 'emerge evms' in the host operating system" >- echo " first" >- echo " --lvm Include LVM support" >- echo " --lvm2 Include LVM support" >- echo " --mdadm Copy /etc/mdadm.conf to initramfs" >- echo " --dmraid Include DMRAID support" >- echo " --multipath Include Multipath support" >- echo " --iscsi Include iSCSI support" > echo " --slowusb Enables extra pauses for slow USB CD boots" >- echo " --bootloader=grub Add new kernel to GRUB configuration" >+ echo " --no-busybox Do not include busybox in the initramfs." >+ echo " --unionfs Include EXPERIMENTAL support for unionfs" >+ echo " --netboot Create a self-contained env in the initramfs" >+ echo " --real-root=<foo> Specify a default for real_root=" > echo " --linuxrc=<file> Specifies a user created linuxrc" > echo " --busybox-config=<file> Specifies a user created busybox config" > echo " --disklabel Include disk label and uuid support in your" > echo " ramdisk" >- echo " --luks Include LUKS support" >- echo " --> 'emerge cryptsetup-luks' with USE=-dynamic" >- echo " --no-busybox Do not include busybox in the initramfs." >- echo " --unionfs Include support for unionfs" >- echo " --netboot Create a self-contained env in the initramfs" >- echo " --real-root=<foo> Specify a default for real_root=" >+ echo " Dracut engine" >+ echo " --no-dracut Build system using old internal engine" >+ echo " (will be removed in the future)" >+ echo " --dracut-dir=<dir> Directory of Dracut sources; if given Dracut" >+ echo " is run in local mode (see description of '-l'" >+ echo " in 'man 8 dracut'); script changes current" >+ echo " directory to <dir>, so don't use relative" >+ echo " paths then" >+ echo " --auto Rely on Dracut system check instead of" >+ echo " specifying modules by hand" >+ echo " --generic Build generic initramfs instead of" >+ echo " default hostonly. Notice that generic => huge" >+ echo " --mdraid Include RAID support via mdadm" >+ echo " --plymouth Enable EXPERIMENTAL Plymouth splash; set up" >+ echo " configuration in /etc/plymouth/plymouthd.conf" >+ echo " requires >=plymouth-0.8.3 to be installed" >+ echo " --gen2splash Use old good Gentoo Splash (splashutils);" >+ echo " set up in /etc/conf.d/splash" >+ echo " --extra-modules=<modules list>" >+ echo " Additional Dracut modules;" >+ echo " see /usr/share/dracut/modules.d for possible" >+ echo " values; separate modules by space, e.g.:" >+ echo " --extra-modules=\"lvm crypt nfs\"" >+ echo " --extra-options=<options>" >+ echo " Pass extra options to dracut;" >+ echo " see 'man 8 dracut'" > echo " Internals" > echo " --arch-override=<arch> Force to arch instead of autodetect" > echo " --cachedir=<dir> Override the default cache location" >@@ -215,25 +240,6 @@ parse_cmdline() { > CMD_BOOTDIR=`parse_opt "$*"` > print_info 2 "CMD_BOOTDIR: ${CMD_BOOTDIR}" > ;; >- --do-keymap-auto) >- CMD_DOKEYMAPAUTO=1 >- CMD_KEYMAP=1 >- print_info 2 "CMD_DOKEYMAPAUTO: ${CMD_DOKEYMAPAUTO}" >- ;; >- --no-keymap) >- CMD_KEYMAP=0 >- print_info 2 "CMD_KEYMAP: ${CMD_KEYMAP}" >- ;; >- --evms) >- CMD_EVMS=1 >- print_info 2 "CMD_EVMS: ${CMD_EVMS}" >- ;; >- --evms2) >- CMD_EVMS=1 >- print_info 2 "CMD_EVMS: ${CMD_EVMS}" >- echo >- print_warning 1 "Please use --evms, as --evms2 is deprecated." >- ;; > --lvm) > CMD_LVM=1 > print_info 2 "CMD_LVM: ${CMD_LVM}" >@@ -245,28 +251,15 @@ parse_cmdline() { > print_warning 1 "Please use --lvm, as --lvm2 is deprecated." > ;; > --mdadm) >- CMD_MDADM=1 >- print_info 2 "CMD_MDADM: $CMD_MDADM" >- ;; >- --no-busybox) >- CMD_BUSYBOX=0 >- print_info 2 "CMD_BUSYBOX: ${CMD_BUSYBOX}" >- ;; >- --unionfs) >- CMD_UNIONFS=1 >- print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}" >- ;; >- --netboot) >- CMD_NETBOOT=1 >- print_info 2 "CMD_NETBOOT: ${CMD_NETBOOT}" >- ;; >- --real-root=*) >- CMD_REAL_ROOT=`parse_opt "$*"` >- print_info 2 "CMD_REAL_ROOT: ${CMD_REAL_ROOT}" >- ;; >- --slowusb) >- CMD_SLOWUSB=1 >- print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}" >+ if ! [[ "${CMD_DRACUT}" = '0' ]] && ! [[ $* =~ --no-dracut ]]; then >+ CMD_MDRAID=1 >+ print_info 2 "CMD_MDRAID: $CMD_MDRAID" >+ echo >+ print_warning 1 "Please use --mdraid, as --mdadm is obsolete." >+ else >+ CMD_MDADM=1 >+ print_info 2 "CMD_MDADM: $CMD_MDADM" >+ fi > ;; > --dmraid) > if [ ! -e /usr/include/libdevmapper.h ] >@@ -377,9 +370,17 @@ parse_cmdline() { > print_info 2 "SPLASH_THEME: ${SPLASH_THEME}" > ;; > --splash) >- CMD_SPLASH=1 >- SPLASH_THEME='default' >- print_info 2 "CMD_SPLASH: ${CMD_SPLASH}" >+ if ! [[ "${CMD_DRACUT}" = '0' ]] && ! [[ $* =~ --no-dracut ]]; then >+ CMD_GEN2SPLASH=1 >+ print_info 2 "CMD_GEN2SPLASH: ${CMD_GEN2SPLASH}" >+ echo >+ print_warning 1 "Please use --gen2splash, as --splash is obsolete." >+ print_warning 1 "Set up splash in /etc/conf.d/splash" >+ else >+ CMD_SPLASH=1 >+ SPLASH_THEME='default' >+ print_info 2 "CMD_SPLASH: ${CMD_SPLASH}" >+ fi > ;; > --no-splash) > CMD_SPLASH=0 >@@ -407,10 +408,6 @@ parse_cmdline() { > CMD_NORAMDISKMODULES=1 > print_info 2 "CMD_NORAMDISKMODULES: ${CMD_NORAMDISKMODULES}" > ;; >- --all-ramdisk-modules) >- CMD_ALLRAMDISKMODULES=1 >- print_info 2 "CMD_ALLRAMDISKMODULES: ${CMD_ALLRAMDISKMODULES}" >- ;; > --callback=*) > CMD_CALLBACK=`parse_opt "$*"` > print_info 2 "CMD_CALLBACK: ${CMD_CALLBACK}/$*" >@@ -424,11 +421,11 @@ parse_cmdline() { > TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$ > print_info 2 "TMPDIR: ${TMPDIR}" > print_info 2 "TEMP: ${TEMP}" >- ;; >+ ;; > --postclear) > CMD_POSTCLEAR=1 > print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}" >- ;; >+ ;; > --arch-override=*) > CMD_ARCHOVERRIDE=`parse_opt "$*"` > print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}" >@@ -497,14 +494,6 @@ parse_cmdline() { > CMD_INITRAMFS_OVERLAY=`parse_opt "$*"` > print_info 2 "CMD_INITRAMFS_OVERLAY: ${CMD_INITRAMFS_OVERLAY}" > ;; >- --linuxrc=*) >- CMD_LINUXRC=`parse_opt "$*"` >- print_info 2 "CMD_LINUXRC: ${CMD_LINUXRC}" >- ;; >- --busybox-config=*) >- CMD_BUSYBOX_CONFIG=`parse_opt "$*"` >- print_info 2 "CMD_BUSYBOX_CONFIG: ${CMD_BUSYBOX_CONFIG}" >- ;; > --genzimage) > KERNEL_MAKE_DIRECTIVE_2='zImage.initrd' > KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd' >@@ -512,13 +501,16 @@ parse_cmdline() { > # ENABLE_PEGASOS_HACKS="yes" > # print_info 2 "ENABLE_PEGASOS_HACKS: ${ENABLE_PEGASOS_HACKS}" > ;; >- --disklabel) >- CMD_DISKLABEL=1 >- print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}" >- ;; > --luks) >- CMD_LUKS=1 >- print_info 2 "CMD_LUKS: ${CMD_LUKS}" >+ if ! [[ "${CMD_DRACUT}" = '0' ]] && ! [[ $* =~ --no-dracut ]]; then >+ CMD_CRYPT=1 >+ print_info 2 "CMD_CRYPT: ${CMD_CRYPT}" >+ echo >+ print_warning 1 "Please use --crypt, as --luks is obsolete." >+ else >+ CMD_LUKS=1 >+ print_info 2 "CMD_LUKS: ${CMD_LUKS}" >+ fi > ;; > --firmware) > CMD_FIRMWARE=1 >@@ -541,6 +533,108 @@ parse_cmdline() { > --config=*) > print_info 2 "CMD_GK_CONFIG: `parse_opt "$*"`" > ;; >+ --local) >+ ;; >+ >+ # Internal engine >+ --no-busybox) >+ CMD_BUSYBOX=0 >+ print_info 2 "CMD_BUSYBOX: ${CMD_BUSYBOX}" >+ ;; >+ --unionfs) >+ CMD_UNIONFS=1 >+ print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}" >+ ;; >+ --netboot) >+ CMD_NETBOOT=1 >+ print_info 2 "CMD_NETBOOT: ${CMD_NETBOOT}" >+ ;; >+ --real-root=*) >+ CMD_REAL_ROOT=`parse_opt "$*"` >+ print_info 2 "CMD_REAL_ROOT: ${CMD_REAL_ROOT}" >+ ;; >+ --slowusb) >+ CMD_SLOWUSB=1 >+ print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}" >+ ;; >+ --do-keymap-auto) >+ CMD_DOKEYMAPAUTO=1 >+ CMD_KEYMAP=1 >+ print_info 2 "CMD_DOKEYMAPAUTO: ${CMD_DOKEYMAPAUTO}" >+ ;; >+ --no-keymap) >+ CMD_KEYMAP=0 >+ print_info 2 "CMD_KEYMAP: ${CMD_KEYMAP}" >+ ;; >+ --evms) >+ CMD_EVMS=1 >+ print_info 2 "CMD_EVMS: ${CMD_EVMS}" >+ ;; >+ --evms2) >+ CMD_EVMS=1 >+ print_info 2 "CMD_EVMS: ${CMD_EVMS}" >+ echo >+ print_warning 1 "Please use --evms, as --evms2 is deprecated." >+ ;; >+ --disklabel) >+ CMD_DISKLABEL=1 >+ print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}" >+ ;; >+ --all-ramdisk-modules) >+ CMD_ALLRAMDISKMODULES=1 >+ print_info 2 "CMD_ALLRAMDISKMODULES: ${CMD_ALLRAMDISKMODULES}" >+ ;; >+ --linuxrc=*) >+ CMD_LINUXRC=`parse_opt "$*"` >+ print_info 2 "CMD_LINUXRC: ${CMD_LINUXRC}" >+ ;; >+ --busybox-config=*) >+ CMD_BUSYBOX_CONFIG=`parse_opt "$*"` >+ print_info 2 "CMD_BUSYBOX_CONFIG: ${CMD_BUSYBOX_CONFIG}" >+ ;; >+ >+ # Dracut engine >+ --no-dracut) >+ CMD_DRACUT=0 >+ print_info 2 "CMD_DRACUT: ${CMD_DRACUT}" >+ ;; >+ --dracut-dir=*) >+ CMD_DRACUT_DIR=`parse_opt "$*"` >+ print_info 2 "CMD_DRACUT_DIR: ${CMD_DRACUT_DIR}" >+ ;; >+ --auto) >+ CMD_AUTO=1 >+ print_info 2 "CMD_AUTO: ${CMD_AUTO}" >+ ;; >+ --generic) >+ CMD_GENERIC=1 >+ print_info 2 "CMD_GENERIC: ${CMD_GENERIC}" >+ ;; >+ --mdraid) >+ CMD_MDRAID=1 >+ print_info 2 "CMD_MDRAID: ${CMD_MDRAID}" >+ ;; >+ --crypt) >+ CMD_CRYPT=1 >+ print_info 2 "CMD_CRYPT: ${CMD_CRYPT}" >+ ;; >+ --plymouth) >+ CMD_PLYMOUTH=1 >+ print_info 2 "CMD_PLYMOUTH: ${CMD_PLYMOUTH}" >+ ;; >+ --gen2splash) >+ CMD_GEN2SPLASH=1 >+ print_info 2 "CMD_GEN2SPLASH: ${CMD_GEN2SPLASH}" >+ ;; >+ --extra-modules=*) >+ CMD_EXTRA_MODULES=`parse_opt "$*"` >+ print_info 2 "CMD_EXTRA_MODULES: ${CMD_EXTRA_MODULES}" >+ ;; >+ --extra-options=*) >+ CMD_EXTRA_OPTIONS=`parse_opt "$*"` >+ print_info 2 "CMD_EXTRA_OPTIONS: ${CMD_EXTRA_OPTIONS}" >+ ;; >+ > all) > BUILD_KERNEL=1 > BUILD_MODULES=1 >diff --git a/gen_determineargs.sh b/gen_determineargs.sh >index d911f07..71c5534 100755 >--- a/gen_determineargs.sh >+++ b/gen_determineargs.sh >@@ -97,7 +97,7 @@ determine_real_args() { > set_config_with_override 1 MOUNTBOOT CMD_MOUNTBOOT > set_config_with_override 1 BUILD_STATIC CMD_STATIC > set_config_with_override 1 SAVE_CONFIG CMD_SAVE_CONFIG >- set_config_with_override 1 SYMLINK CMD_SYMLINK >+ set_config_with_override 1 SYMLINK CMD_SYMLINK > set_config_with_override 2 INSTALL_MOD_PATH CMD_INSTALL_MOD_PATH > set_config_with_override 1 OLDCONFIG CMD_OLDCONFIG > set_config_with_override 1 LVM CMD_LVM >@@ -120,6 +120,16 @@ determine_real_args() { > set_config_with_override 1 KEYMAP CMD_KEYMAP "yes" > set_config_with_override 1 DOKEYMAPAUTO CMD_DOKEYMAPAUTO > set_config_with_override 2 BUSYBOX_CONFIG CMD_BUSYBOX_CONFIG >+ set_config_with_override 1 AUTO CMD_AUTO >+ set_config_with_override 1 GENERIC CMD_GENERIC >+ set_config_with_override 1 DRACUT CMD_DRACUT "yes" >+ set_config_with_override 2 DRACUT_DIR CMD_DRACUT_DIR >+ set_config_with_override 1 MDRAID CMD_MDRAID >+ set_config_with_override 1 CRYPT CMD_CRYPT >+ set_config_with_override 1 PLYMOUTH CMD_PLYMOUTH >+ set_config_with_override 1 GEN2SPLASH CMD_GEN2SPLASH >+ set_config_with_override 2 EXTRA_MODULES CMD_EXTRA_MODULES >+ set_config_with_override 2 EXTRA_OPTIONS CMD_EXTRA_OPTIONS > > BOOTDIR=`arch_replace "${BOOTDIR}"` > BOOTDIR=${BOOTDIR%/} # Remove any trailing slash >@@ -133,7 +143,7 @@ determine_real_args() { > BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"` > FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"` > UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"` >- >+ > DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"` > BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"` > BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"` >diff --git a/gen_dracut.sh b/gen_dracut.sh >new file mode 100755 >index 0000000..0255aa2 >--- /dev/null >+++ b/gen_dracut.sh >@@ -0,0 +1,87 @@ >+#!/bin/bash >+# $Id$ >+ >+BASIC_MODULES=dash\ i18n\ kernel-modules\ resume\ rootfs-block\ terminfo >+BASIC_MODULES+=\ udev-rules\ uswsusp\ base >+MODULES=lvm\ dmraid\ iscsi\ mdraid\ crypt\ multipath\ plymouth\ gen2splash >+ >+dracut_modules() { >+ local a=() >+ >+ isTrue "${PLYMOUTH}" && isTrue "${GEN2SPLASH}" && gen_die 'Gentoo Splash and Plymouth selected! You cannot choose both splash engines.' >+ isTrue "${EVMS}" && gen_die 'EVMS is no longer supported. If you *really* need it, file a bug report and we bring it back to life.' >+ isTrue "${UNIONFS}" && gen_die 'UnionFS not yet supported.' >+ >+ for var in ${MODULES} >+ do >+ var="${var^^}" >+ isTrue "${!var}" && a+=(${var,,}) >+ done >+ >+ a+=(${EXTRA_MODULES}) >+ >+ if ! isTrue "${AUTO}" >+ then >+ local basic >+ isTrue "${NORAMDISKMODULES}" && >+ basic="${BASIC_MODULES/ kernel-modules / }" \ >+ || basic="${BASIC_MODULES}" >+ echo -n "-m '${basic}'" >+ fi >+ >+ [[ ${a[*]} ]] && echo -n " -a '${a[*]}'" >+} >+ >+create_initramfs() { >+ local tmprd="${TMPDIR}/initramfs-${KV}" opts='-f' add_files=() >+ >+ print_info 1 'initramfs: >> Initializing Dracut...' >+ >+ if isTrue "${GENERIC}" >+ then >+ print_info 1 ' >> Will build generic (read: huge) initramfs' >+ else >+ opts+=\ -H >+ fi >+ >+ if isTrue "${NORAMDISKMODULES}" >+ then >+ print_info 1 ' >> Not copying kernel modules and firmware...' >+ opts+=\ --no-kernel >+ else >+ isTrue "${FIRMWARE}" && opts+=" --fwdir ${FIRMWARE_DIR}" >+ [[ ${FIRMWARE_FILES} ]] && add_files+=(${FIRMWARE_FILES}) >+ fi >+ >+ [[ ${DRACUT_DIR} ]] && opts="-l ${opts}" >+ [[ ${INITRAMFS_OVERLAY} ]] && opts+=" ${INITRAMFS_OVERLAY} /" >+ [[ ${add_files[*]} ]] && opts+=" -I '${add_files[*]}'" >+ opts+=" ${EXTRA_OPTIONS}" >+ opts+=" $(dracut_modules)" >+ >+ print_info 1 " >> dracut ${opts} '${tmprd}' '${KV}'" >+ if [[ ${DRACUT_DIR} ]]; then >+ cd "${DRACUT_DIR}" >+ eval ./dracut ${opts} -v \'${tmprd}\' \'${KV}\' >+ cd - >/dev/null >+ else >+ eval dracut ${opts} \'${tmprd}\' \'${KV}\' >+ fi >+ >+ if isTrue "${INTEGRATED_INITRAMFS}" >+ then >+ mv ${tmprd} ${tmprd}.cpio.gz >+ sed -i '/^.*CONFIG_INITRAMFS_SOURCE=.*$/d' ${KERNEL_DIR}/.config >+ echo -e "CONFIG_INITRAMFS_SOURCE=\"${tmprd}.cpio.gz\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0" \ >+ >> ${KERNEL_DIR}/.config >+ fi >+ >+ if ! isTrue "${CMD_NOINSTALL}" >+ then >+ if ! isTrue "${INTEGRATED_INITRAMFS}" >+ then >+ copy_image_with_preserve initramfs "${tmprd}" \ >+ "initramfs-${KNAME}-${ARCH}-${KV}" >+ fi >+ fi >+} >diff --git a/genkernel b/genkernel >index 23cb667..f4d0b5b 100755 >--- a/genkernel >+++ b/genkernel >@@ -23,6 +23,10 @@ parse_opt() { > esac > } > >+case "$*" in >+ *--local*) GK_LOCAL_MODE=1 ;; >+esac >+ > # We don't know where our config is, so we check for it, and default to using > # /etc/genkernel.conf if nobody has specified one. > case "$*" in >@@ -32,7 +36,9 @@ case "$*" in > esac > > # Pull in our configuration >+[ "${GK_LOCAL_MODE}" = 1 ] && CMD_GK_CONFIG=./genkernel.conf > source ${CMD_GK_CONFIG:-/etc/genkernel.conf} || small_die "Could not read /etc/genkernel.conf" >+[ "${GK_LOCAL_MODE}" = 1 ] && GK_SHARE=. > > # Start sourcing other scripts > source ${GK_SHARE}/gen_funcs.sh || small_die "Could not read ${GK_SHARE}/gen_funcs.sh" >@@ -41,7 +47,12 @@ source ${GK_SHARE}/gen_arch.sh || gen_die "Could not read ${GK_SHARE}/gen_arch.s > source ${GK_SHARE}/gen_determineargs.sh || gen_die "Could not read ${GK_SHARE}/gen_determineargs.sh" > source ${GK_SHARE}/gen_compile.sh || gen_die "Could not read ${GK_SHARE}/gen_compile.sh" > source ${GK_SHARE}/gen_configkernel.sh || gen_die "Could not read ${GK_SHARE}/gen_configkernel.sh" >-source ${GK_SHARE}/gen_initramfs.sh || gen_die "Could not read ${GK_SHARE}/gen_initramfs.sh" >+if isTrue "${DRACUT}" >+then >+ source ${GK_SHARE}/gen_initramfs.sh || gen_die "Could not read ${GK_SHARE}/gen_initramfs.sh" >+else >+ source ${GK_SHARE}/gen_dracut.sh || gen_die "Could not read ${GK_SHARE}/gen_dracut.sh" >+fi > source ${GK_SHARE}/gen_moddeps.sh || gen_die "Could not read ${GK_SHARE}/gen_moddeps.sh" > source ${GK_SHARE}/gen_package.sh || gen_die "Could not read ${GK_SHARE}/gen_package.sh" > source ${GK_SHARE}/gen_bootloader.sh || gen_die "Could not read ${GK_SHARE}/gen_bootloader.sh" >@@ -94,7 +105,8 @@ fi > > clear_log > NORMAL=${GOOD} print_info 1 "Gentoo Linux Genkernel; Version ${GK_V}${NORMAL}" >-print_info 1 "Running with options: ${Options}" >+[ "${GK_LOCAL_MODE}" = 1 ] && localmsg=' in local mode' >+print_info 1 "Running${localmsg} with options: ${Options}" > echo > > # Set ${ARCH} >@@ -122,9 +134,11 @@ set_kernel_arch > > [ ! -f "${TEMP}" ] && mkdir -p "${TEMP}" > >-setup_cache_dir >- >-check_distfiles >+if ! isTrue "${DRACUT}" >+then >+ setup_cache_dir >+ check_distfiles >+fi > > dump_debugcache > >@@ -279,17 +293,20 @@ fi > > if [ "${BUILD_RAMDISK}" -eq '1' ] > then >- [ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs >- >- if [ "${BUSYBOX}" -eq '1' ] >+ if ! isTrue "${DRACUT}" > then >- # Compile Busybox >- compile_busybox >- fi >+ [ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs > >- if isTrue "${UNIONFS}" >- then >- compile_unionfs_fuse >+ if [ "${BUSYBOX}" -eq '1' ] >+ then >+ # Compile Busybox >+ compile_busybox >+ fi >+ >+ if isTrue "${UNIONFS}" >+ then >+ compile_unionfs_fuse >+ fi > fi > > # Compile initramfs >diff --git a/genkernel.conf b/genkernel.conf >index a71ce69..949474c 100644 >--- a/genkernel.conf >+++ b/genkernel.conf >@@ -53,17 +53,9 @@ USECOLOR="yes" > # compile static LVM binaries if static ones do not exist. > # LVM="no" > >-# Add in EVMS support from static binaries if they exist on the system: you >-# should run "emerge evms" first. >-# EVMS="no" >- > # Add DMRAID support. > # DMRAID="no" > >-# Include (or suppresses the inclusion of) busybox in the initrd or initramfs. >-# If included, busybox is rebuilt if the cached copy is out of date. >-# BUSYBOX="yes" >- > # Copy /etc/mdadm.conf to initramfs. > # MDADM="no" > >@@ -80,11 +72,29 @@ USECOLOR="yes" > # Specify specific firmware files to include. This overrides FIRMWARE_DIR > # FIRMWARE_FILES="" > >+# Add new kernel to grub? >+# BOOTLOADER="grub" >+ >+# ==============Internal engine=============== >+# > # Enable disklabel support (copies blkid to initrd) > DISKLABEL="yes" > >-# Add new kernel to grub? >-# BOOTLOADER="grub" >+# Include (or suppresses the inclusion of) busybox in the initrd or initramfs. >+# If included, busybox is rebuilt if the cached copy is out of date. >+# BUSYBOX="yes" >+ >+# Add in EVMS support from static binaries if they exist on the system: you >+# should run "emerge evms" first. >+# EVMS="no" >+ >+# ===============Dracut engine================ >+ >+# Build system using Dracut [yes] or old internal engine [no]. "yes" is default. >+# DRACUT="yes" >+ >+# Include RAID support via mdadm >+# MDRAID="no" > > # =========Low Level Compile Settings========= > #
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 330127
:
240377
|
242125