From 5c8533872970ef886b13d5b95d3c7f1ec31a314e Mon Sep 17 00:00:00 2001 From: Tim Yamin Date: Fri, 14 Apr 2006 14:42:43 +0000 Subject: [PATCH] ->3.3.11d. Fix #121616, #128805, #129887, #129910. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@378 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- gen_compile.sh | 9 ++++----- gen_initramfs.sh | 5 ++++- gen_initrd.sh | 17 ++++++++--------- generic/initrd.scripts | 3 ++- generic/linuxrc | 3 ++- genkernel | 2 +- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/gen_compile.sh b/gen_compile.sh index 9b8c02a..2f01f90 100644 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -333,6 +333,7 @@ compile_unionfs_modules() { cd "${UNIONFS_DIR}" print_info 1 'unionfs modules: >> Compiling...' echo "LINUXSRC=${KERNEL_DIR}" >> fistdev.mk + echo 'TOPINC=-I$(LINUXSRC)/include' >> fistdev.mk echo "MODDIR= /lib/modules/${KV}" >> fistdev.mk echo "KERNELVERSION=${KV}" >> fistdev.mk # Fix for hardened/selinux systems to have extened attributes @@ -346,13 +347,11 @@ compile_unionfs_modules() { if [ "${PAT}" -ge '6' ] then - # Setup the kernel sources to compile modules - cd ${KERNEL_DIR} - compile_generic "modules_prepare" kernel - cd "${TEMP}" cd "${UNIONFS_DIR}" - compile_generic unionfs.ko kernel + # Compile unionfs module within the unionfs + # environment not within the kernelsrc dir + make unionfs.ko else gen_die 'unionfs is only supported on 2.6 targets' fi diff --git a/gen_initramfs.sh b/gen_initramfs.sh index e376313..5b79fa7 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -208,6 +208,7 @@ create_lvm2_cpio(){ fi cd ${TEMP} mkdir -p "${TEMP}/initramfs-lvm2-temp/bin/" + mkdir -p "${TEMP}/initramfs-lvm2-temp/etc/lvm/" if [ -e '/sbin/lvm' ] && ldd /sbin/lvm|grep -q 'not a dynamic executable'; then print_info 1 ' LVM2: Adding support (using local static binaries)...' @@ -220,7 +221,9 @@ create_lvm2_cpio(){ gen_die "Could not extract lvm2 binary cache!"; mv ${TEMP}/initramfs-lvm2-temp/sbin/lvm.static ${TEMP}/initramfs-lvm2-temp/bin/lvm || gen_die 'LVM2 error: Could not move lvm.static to lvm!' - fi + fi + cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm2-temp/etc/lvm/lvm.conf" || + gen_die 'Could not copy over lvm.conf!' cd "${TEMP}/initramfs-lvm2-temp/" find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_CPIO_DIR}/initramfs-lvm2-${LVM2_VER}.cpio.gz rm -r "${TEMP}/initramfs-lvm2-temp/" diff --git a/gen_initrd.sh b/gen_initrd.sh index 4649c93..aac951b 100644 --- a/gen_initrd.sh +++ b/gen_initrd.sh @@ -157,10 +157,6 @@ create_base_initrd_sys() { print_info 1 'LVM2: Adding support (using local static binaries)...' cp /sbin/lvm "${TEMP}/initrd-temp/bin/lvm" || gen_die 'Could not copy over lvm!' - ln "${TEMP}/initrd-temp/bin/lvm" "${TEMP}/initrd-temp/bin/vgscan" || - gen_die 'Could not symlink lvm -> vgscan!' - ln "${TEMP}/initrd-temp/bin/lvm" "${TEMP}/initrd-temp/bin/vgchange" || - gen_die 'Could not symlink lvm -> vgchange!' else print_info 1 'LVM2: Adding support (compiling binaries)...' compile_lvm2 @@ -169,11 +165,14 @@ create_base_initrd_sys() { gen_die "Could not extract lvm2 binary cache!"; mv ${TEMP}/initrd-temp/bin/lvm.static ${TEMP}/initrd-temp/bin/lvm || gen_die 'LVM2 error: Could not move lvm.static to lvm!' - for i in vgchange vgscan; do - ln ${TEMP}/initrd-temp/bin/lvm ${TEMP}/initrd-temp/bin/$i || - gen_die "LVM2 error: Could not link ${i}!" - done - fi + fi + for i in vgchange vgscan; do + ln ${TEMP}/initrd-temp/bin/lvm ${TEMP}/initrd-temp/bin/$i || + gen_die "LVM2 error: Could not link ${i}!" + done + mkdir -p ${TEMP}/initrd-temp/etc/lvm + cp /etc/lvm/lvm.conf "${TEMP}/initrd-temp/etc/lvm/lvm.conf" || + gen_die 'Could not copy over lvm.conf!' fi # EVMS2 diff --git a/generic/initrd.scripts b/generic/initrd.scripts index 631431c..034e26f 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -404,7 +404,8 @@ setup_keymap() { DEVBIND=1 mount -o bind ${NEW_ROOT}/dev /dev fi - + [ ! -e /dev/tty0 ] && ln -s /dev/tty1 /dev/tty0 + chooseKeymap [ "${DEVBIND}" -eq '1' ] && umount /dev diff --git a/generic/linuxrc b/generic/linuxrc index 28d11c6..a3b65bf 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -399,7 +399,8 @@ do if [ "${REAL_ROOT}" = '/dev/nfs' ]; then findnfsmount else - mount -o rw ${REAL_ROOT} ${NEW_ROOT} + # mount ro so fsck doesn't barf later + mount -o ro ${REAL_ROOT} ${NEW_ROOT} fi # If mount is successful break out of the loop diff --git a/genkernel b/genkernel index aac8473..edbd01b 100755 --- a/genkernel +++ b/genkernel @@ -2,7 +2,7 @@ # Genkernel v3 PATH="/bin:/usr/bin:/sbin:/usr/sbin" -GK_V='3.3.11c' +GK_V='3.3.11d' TMPDIR='/var/tmp/genkernel' TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.