Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 79476 Details for
Bug 122421
genkernel initrd luks support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for genkernel to allow initrd to use luks encrypted devices
genkernel-luks-patch.diff (text/plain), 10.83 KB, created by
Cláudio Valente
on 2006-02-10 17:00:51 UTC
(
hide
)
Description:
patch for genkernel to allow initrd to use luks encrypted devices
Filename:
MIME Type:
Creator:
Cláudio Valente
Created:
2006-02-10 17:00:51 UTC
Size:
10.83 KB
patch
obsolete
>Common subdirectories: genkernel-3.3.10/alpha and genkernel-3.3.10-patched/alpha >diff -U 20 genkernel-3.3.10/gen_cmdline.sh genkernel-3.3.10-patched/gen_cmdline.sh >--- genkernel-3.3.10/gen_cmdline.sh 2005-12-18 15:29:26.000000000 +0000 >+++ genkernel-3.3.10-patched/gen_cmdline.sh 2006-02-11 00:56:03.000000000 +0000 >@@ -56,40 +56,41 @@ > echo " --utils-as=<assembler> Assembler to use for utils" > echo " --utils-ld=<linker> Linker to use for utils" > echo " --utils-make=<makeprog> GNU Make to use for utils" > echo " --makeopts=<makeopts> Make options such as -j2, etc..." > echo " --mountboot Mount /boot automatically" > echo " --no-mountboot Don't mount /boot automatically" > echo " Initialization" > echo " --bootsplash=<theme> Force bootsplash using <theme>" > echo " --gensplash=<theme> Force gensplash using <theme>" > echo " --gensplash-res=<res> Select gensplash resolutions" > echo " --do-keymap-auto Forces keymap selection at boot" > echo " --evms2 Include EVMS2 support" > echo " --> 'emerge evms' in the host operating system first" > echo " --lvm2 Include LVM2 support" > # echo " --unionfs Include UNIONFS support" > echo " --dmraid Include DMRAID support" > echo " --bladecenter Enables extra pauses for IBM Bladecenter CD boots" > echo " --bootloader=grub Add new kernel to GRUB configuration" > echo " --linuxrc=<file> Specifies a user created linuxrc" > echo " --disklabel Include disk label and uuid support in your initrd" >+ echo " --luks Include LUKS support" > echo " Internals" > echo " --arch-override=<arch> Force to arch instead of autodetect" > echo " --cachedir=<dir> Override the default cache location" > echo " --tempdir=<dir> Location of Genkernel's temporary directory" > echo " --postclear Clear all tmp files and caches after genkernel has run" > echo " Output Settings" > echo " --kernname=<...> Tag the kernel and initrd with a name:" > echo " If not defined the option defaults to 'genkernel'" > echo " --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:" > echo " No modules outside of the initrd will be" > echo " included..." > echo " --modulespackage=<tbz2> File to output a .tar.bz2'd modules after the callbacks have run" > echo " --kerncache=<tbz2> File to output a .tar.bz2'd kernel," > echo " contents of /lib/modules/ and the kernel config" > echo " NOTE: This is created before the callbacks are run!" > echo " --no-kernel-sources This option is only valid if kerncache is defined" > echo " If there is a valid kerncache no checks will be made" > echo " against a kernel source tree" > echo " --initramfs-overlay=<dir>" > echo " Directory structure to include in the initramfs," >@@ -421,40 +422,44 @@ > print_info 2 "CMD_NO_KERNEL_SOURCES: $CMD_NO_KERNEL_SOURCES" > ;; > --initramfs-overlay=*) > 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" > ;; > --genzimage) > KERNEL_MAKE_DIRECTIVE_2='zImage.initrd' > KERNEL_BINARY_2='arch/ppc/boot/images/zImage.initrd.chrp' > GENERATE_Z_IMAGE=1 > print_info 2 "GENERATE_Z_IMAGE: $GENERATE_Z_IMAGE" > ;; > --disklabel) > CMD_DISKLABEL=1 > print_info 2 "CMD_DISKLABEL: $CMD_DISKLABEL" > ;; >+ --luks) >+ CMD_LUKS=1 >+ print_info 2 "CMD_LUKS: $CMD_LUKS" >+ ;; > all) > BUILD_KERNEL=1 > BUILD_MODULES=1 > BUILD_INITRD=1 > ;; > initrd) > BUILD_INITRD=1 > ;; > kernel) > BUILD_KERNEL=1 > BUILD_MODULES=1 > BUILD_INITRD=0 > ;; > bzImage) > BUILD_KERNEL=1 > BUILD_MODULES=0 > BUILD_INITRD=1 > CMD_NOINITRDMODULES=1 > print_info 2 "CMD_NOINITRDMODULES: $CMD_NOINITRDMODULES" > ;; >diff -U 20 genkernel-3.3.10/gen_determineargs.sh genkernel-3.3.10-patched/gen_determineargs.sh >--- genkernel-3.3.10/gen_determineargs.sh 2005-12-18 15:29:26.000000000 +0000 >+++ genkernel-3.3.10-patched/gen_determineargs.sh 2006-02-11 00:29:15.000000000 +0000 >@@ -43,40 +43,47 @@ > UTS_RELEASE=`grep UTS_RELEASE ${KERNEL_DIR}/include/linux/version.h | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'` > LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"` > KV=${VER}.${PAT}.${SUB}${EXV}${LOV} > else > LCV=`grep ^CONFIG_LOCALVERSION= ${KERNEL_DIR}/.config | sed -r -e "s/.*=\"(.*)\"/\1/"` > KV=${VER}.${PAT}.${SUB}${EXV}${LCV} > fi > else > KERN_24=1 > KV=${VER}.${PAT}.${SUB}${EXV} > fi > > fi > > if isTrue "${CMD_DISKLABEL}" > then > DISKLABEL=1 > else > DISKLABEL=0 > fi >+ >+ if isTrue "${CMD_LUKS}" >+ then >+ LUKS=1 >+ else >+ LUKS=0 >+ fi > } > > determine_real_args() { > if [ "${CMD_DEBUGFILE}" != '' ] > then > DEBUGFILE="${CMD_DEBUGFILE}" > fi > > if [ "${CMD_MAKEOPTS}" != '' ] > then > MAKEOPTS="${CMD_MAKEOPTS}" > fi > > if [ "${CMD_KERNELDIR}" != '' ] > then > KERNEL_DIR=${CMD_KERNELDIR} > else > KERNEL_DIR=${DEFAULT_KERNEL_SOURCE} > fi > >diff -U 20 genkernel-3.3.10/gen_initramfs.sh genkernel-3.3.10-patched/gen_initramfs.sh >--- genkernel-3.3.10/gen_initramfs.sh 2005-12-18 15:29:28.000000000 +0000 >+++ genkernel-3.3.10-patched/gen_initramfs.sh 2006-02-10 19:25:22.000000000 +0000 >@@ -406,47 +406,59 @@ > echo -n "${group} " >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" > done > echo '"' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" > > if [ -f "${GK_SHARE}/${ARCH}/modprobe" ] > then > cp "${GK_SHARE}/${ARCH}/modprobe" "${TEMP}/initramfs-aux-temp/sbin/modprobe" > else > cp "${GK_SHARE}/generic/modprobe" "${TEMP}/initramfs-aux-temp/sbin/modprobe" > fi > if isTrue $CMD_DOKEYMAPAUTO > then > echo 'MY_HWOPTS="${MY_HWOPTS} keymap"' >> ${TEMP}/initramfs-aux-temp/etc/initrd.defaults > fi > mkdir -p "${TEMP}/initramfs-aux-temp/lib/keymaps" > /bin/tar -C "${TEMP}/initramfs-aux-temp/lib/keymaps" -zxf "${GK_SHARE}/generic/keymaps.tar.gz" > if isTrue $CMD_BLADECENTER > then > echo 'MY_HWOPTS="${MY_HWOPTS} bladecenter"' >> ${TEMP}/initramfs-aux-temp/etc/initrd.defaults > fi >+ >+ #LUKS support by cvalente >+ if isTrue ${LUKS} >+ then >+ print_info "Including LUKS support" >+ [ -e /bin/cryptsetup-static ] || gen_die "LUKS support requires static cryptsetup at /bin/cryptsetup-static" >+ rm -f ${TEMP}/initramfs-aux-temp/sbin/cryptsetup >+ cp /bin/cryptsetup-static ${TEMP}/initramfs-aux-temp/sbin/cryptsetup >+ else >+ print_info "Not including LUKS support" >+ fi > > cd ${TEMP}/initramfs-aux-temp/sbin && ln -s ../init init > cd ${TEMP} > chmod +x "${TEMP}/initramfs-aux-temp/init" > chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.scripts" > chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" > chmod +x "${TEMP}/initramfs-aux-temp/sbin/modprobe" >+ chmod +x "${TEMP}/initramfs-aux-temp/sbin/cryptsetup" > cd "${TEMP}/initramfs-aux-temp/" > find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_CPIO_DIR}/initramfs-aux.cpio.gz > rm -r "${TEMP}/initramfs-aux-temp/" > } > > merge_initramfs_cpio_archives(){ > cd "${CACHE_CPIO_DIR}" > MERGE_LIST="initramfs-base-layout.cpio.gz initramfs-aux.cpio.gz" > if [ ! -e "${CACHE_CPIO_DIR}/initramfs-base-layout.cpio.gz" ] > then > gen_die "${CACHE_CPIO_DIR}/initramfs-base-layout.cpio.gz is missing." > fi > if [ ! -e "${CACHE_CPIO_DIR}/initramfs-aux.cpio.gz" ] > then > gen_die "${CACHE_CPIO_DIR}/initramfs-aux.cpio.gz is missing." > fi > > if [ "${BUSYBOX}" -eq '1' -a -e ${CACHE_CPIO_DIR}/initramfs-busybox-${BUSYBOX_VER}.cpio.gz ] > then > MERGE_LIST="${MERGE_LIST} initramfs-busybox-${BUSYBOX_VER}.cpio.gz" >diff -U 20 genkernel-3.3.10/gen_initrd.sh genkernel-3.3.10-patched/gen_initrd.sh >--- genkernel-3.3.10/gen_initrd.sh 2005-12-18 15:29:28.000000000 +0000 >+++ genkernel-3.3.10-patched/gen_initrd.sh 2006-02-10 18:42:57.000000000 +0000 >@@ -195,40 +195,52 @@ > cp -a /lib/evms/* "${TEMP}/initrd-temp/lib/evms" || gen_die 'Could not copy files for EVMS2!' > cp -a /etc/evms.conf "${TEMP}/initrd-temp/etc" || gen_die 'Could not copy files for EVMS2!' > cp /sbin/evms_activate "${TEMP}/initrd-temp/sbin/evms_activate" || gen_die 'Could not copy over evms_activate!' > # Fix EVMS2 complaining that it cant find the swap utilities. > # These are not required in the initrd > for swap_libs in "${TEMP}/initrd-temp/lib/evms/*/swap*.so" > do > rm ${swap_libs} > done > fi > fi > > for i in '[' ash basename cat chroot clear cp dirname echo env false find \ > grep gunzip gzip ln ls loadkmap losetup lsmod mkdir mknod more mount mv \ > pivot_root ps awk pwd rm rmdir rmmod sed sh sleep tar test touch true umount uname \ > xargs yes zcat chmod chown cut kill killall; do > rm -f ${TEMP}/initrd-temp/bin/$i > /dev/null > ln ${TEMP}/initrd-temp/bin/busybox ${TEMP}/initrd-temp/bin/$i || > gen_die "Busybox error: could not link ${i}!" > done >+ >+ if [ isTrue "${LUKS}" ] >+ then >+ print_info "Including LUKS support" >+ local luks_file="/bin/cryptsetup-static" >+ local luks_ifile="sbin/cryptsetup-static" >+ [ -e $luks_file ] || gen_die "LUKS support requires static cryptsetup at $luks_file" >+ rm -f ${TEMP}/initrd-temp/$luks_ifile >+ cp $luks_file ${TEMP}/initrd-temp/$luks_ifile >+ else >+ print_info "Not including LUKS support" >+ fi > } > > print_list() > { > local x > for x in ${*} > do > echo ${x} > done > } > > create_initrd_modules() { > local group > local group_modules > > if [ "${PAT}" -gt "4" ] > then > MOD_EXT=".ko" > else > MOD_EXT=".o" >Common subdirectories: genkernel-3.3.10/generic and genkernel-3.3.10-patched/generic >Only in genkernel-3.3.10: genkernel.conf >Common subdirectories: genkernel-3.3.10/ia64 and genkernel-3.3.10-patched/ia64 >Common subdirectories: genkernel-3.3.10/mips and genkernel-3.3.10-patched/mips >Common subdirectories: genkernel-3.3.10/parisc and genkernel-3.3.10-patched/parisc >Common subdirectories: genkernel-3.3.10/parisc64 and genkernel-3.3.10-patched/parisc64 >Common subdirectories: genkernel-3.3.10/pkg and genkernel-3.3.10-patched/pkg >Common subdirectories: genkernel-3.3.10/ppc and genkernel-3.3.10-patched/ppc >Common subdirectories: genkernel-3.3.10/ppc64 and genkernel-3.3.10-patched/ppc64 >Common subdirectories: genkernel-3.3.10/sparc and genkernel-3.3.10-patched/sparc >Common subdirectories: genkernel-3.3.10/sparc64 and genkernel-3.3.10-patched/sparc64 >Common subdirectories: genkernel-3.3.10/um and genkernel-3.3.10-patched/um >Common subdirectories: genkernel-3.3.10/x86 and genkernel-3.3.10-patched/x86 >Common subdirectories: genkernel-3.3.10/x86_64 and genkernel-3.3.10-patched/x86_64 >Common subdirectories: genkernel-3.3.10/xen0 and genkernel-3.3.10-patched/xen0 >Common subdirectories: genkernel-3.3.10/xenU and genkernel-3.3.10-patched/xenU
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 122421
:
79476
|
79580
|
79704
|
82798