diff options
author | Richard Yao <ryao@cs.stonybrook.edu> | 2012-08-04 02:05:32 -0400 |
---|---|---|
committer | Richard Yao <ryao@cs.stonybrook.edu> | 2012-08-04 02:05:32 -0400 |
commit | 8db1ccb03296ac7487a2cb7e3c168b277b37d36d (patch) | |
tree | 7cae6e755b551237bcffce8566f7f8cda2fc7400 | |
parent | Linux 3.5 renames usbhid to hid-generic (diff) | |
parent | Bump version to 3.4.40 (diff) | |
download | genkernel-8db1ccb03296ac7487a2cb7e3c168b277b37d36d.tar.gz genkernel-8db1ccb03296ac7487a2cb7e3c168b277b37d36d.tar.bz2 genkernel-8db1ccb03296ac7487a2cb7e3c168b277b37d36d.zip |
Merge branch 'upstream' into beta
Import genkernel 3.4.40 changes
Conflicts:
arch/alpha/modules_load
arch/arm/modules_load
arch/ia64/modules_load
arch/mips/modules_load
arch/parisc/modules_load
arch/parisc64/modules_load
arch/ppc/modules_load
arch/ppc64/modules_load
arch/sparc/modules_load
arch/sparc64/modules_load
arch/um/modules_load
arch/x86/modules_load
arch/x86_64/modules_load
defaults/modules_load
gen_configkernel.sh
gen_funcs.sh
gen_initramfs.sh
gen_package.sh
genkernel
Signed-off-by: Richard Yao <ryao@funtoo.org>
38 files changed, 635 insertions, 167 deletions
@@ -5,6 +5,129 @@ # Distributed under the GPL v2 # $Id$ + 27 Jul 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts, + genkernel: + Bump version to 3.4.40 + + 24 Jul 2012; Robin H. Johnson <robbat2@gentoo.org> defaults/initrd.scripts: + Flip awk return values. + + 24 Jul 2012; Robin H. Johnson <robbat2@gentoo.org> defaults/initrd.scripts: + Minor thinko in devpts check. + + 24 Jul 2012; Robin H. Johnson <robbat2@gentoo.org> defaults/initrd.scripts: + Prior commit to only mount devtmpfs and devpts if they were not already + mounted made assumptions about the device names they were mounted as. Check + the filesystem column of /proc/mounts instead. + + 21 Jul 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump version to 3.4.39 + + 17 Jul 2012; Robin H. Johnson <robbat2@gentoo.org> arch/x86_64/kernel-config: + Bug #399703: amd64 default kernel config did not have EFI support. + + 15 July 2012; Robin H. Johnson <robbat2@gentoo.org> doc/genkernel.8.txt, + Document the isoboot option, as designed for GRUB2 usage 3 years ago. + + 09 Jul 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump version to 3.4.38 + + 09 Jul 2012; Sebastian Pipping <sping@gentoo.org> gen_compile.sh: + Fix linking of unionfs-fuse 0.24 + + 09 Jul 2012; Sebastian Pipping <sping@gentoo.org> + patches/fuse/2.8.6/fuse-2.8.6-glibc-2.14.patch: + Allow compilation of FUSE 2.8.6 with glibc 2.14 (bug #425080) + + 09 Jul 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts: + Restore previous handling of real_root due to report of regressions (bug + #419965) + + 08 Jul 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump version to 3.4.37 + + 08 Jul 2012; Sebastian Pipping <sping@gentoo.org> gen_initramfs.sh, + genkernel: + Always report used kernel config file + + 08 Jul 2012; Sebastian Pipping <sping@gentoo.org> gen_configkernel.sh, + gen_initramfs.sh: + Catch case with no initramfs compression supported by kernel (bug #423847) + + 08 Jul 2012; Sebastian Pipping <sping@gentoo.org> gen_configkernel.sh, + gen_initramfs.sh: + Fix detection of initramfs compression with bzip2 as best candidate + + 08 Jul 2012; Sebastian Pipping <sping@gentoo.org> arch/x86/modules_load, + arch/x86_64/modules_load, defaults/modules_load: + Add xts to MODULES_CRYPTO (bug #425028) + + 01 Jul 2012; Sebastian Pipping <sping@gentoo.org> gen_configkernel.sh, + gen_package.sh: + Support --kernel-config=/proc/config.gz (bug #421027) + + 08 Jul 2012; Kenny Cheng <kenny97821419@gmail.com> defaults/linuxrc: + Add /run to support openrc >=0.10 (bug #425180) + + 11 Jun 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump version to 3.4.36 + + 11 Jun 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts: + Respect real_root for plain dm-crypt without LVM (bug #419965) + + 10 Jun 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump version to 3.4.35 + + 10 Jun 2012; Sebastian Pipping <sping@gentoo.org> + +patches/busybox/1.20.1/1.18.1-openvt.diff, + +patches/busybox/1.20.1/busybox-1.7.4-signal-hack.patch, + +patches/busybox/1.20.1/busybox-1.20.1-mdstart.patch: + Support busybox 1.20.1 (bug #419511) + + 04 Jun 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump version to 3.4.34 + + 02 Jun 2012; Sebastian Pipping <sping@gentoo.org> defaults/linuxrc: + Support bind mounts from /etc/initramfs.mounts (bug #418463) + + 02 Jun 2012; Sebastian Pipping <sping@gentoo.org> arch/x86/modules_load, + arch/x86_64/modules_load, defaults/modules_load: + Make sure that cbc.ko and aes*.ko needed for cbc-essiv:sha256 (=default) disk + encryption are included with the initramfs (bug #416973) + + 28 May 2012; Sebastian Pipping <sping@gentoo.org> gen_funcs.sh: + Fix an e2fsprogs compilation leftover (bug #417095), reported by Juergen Rose + + 17 May 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump to 3.4.33.1 + + 17 May 2012; Sebastian Pipping <sping@gentoo.org> defaults/linuxrc: + Fix call to blkid as "blkid -l -t UUID=foo" (without -o device) does not seem + to work well with blkid of util-linux + + 17 May 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump version to 3.4.33 + + 17 May 2012; Sebastian Pipping <sping@gentoo.org> + -patches/e2fsprogs/1.42/e2fsprogs-1.41.12-getpagesize.patch, gen_compile.sh, + gen_initramfs.sh, genkernel, genkernel.conf: + Use blkid from system's util-linux rather than compiling e2fsprogs ourselves + + 14 May 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump version to 3.4.32 + + 14 May 2012; Sebastian Pipping <sping@gentoo.org> gen_initramfs.sh: + Stop removing lvm/dmsetup from the initramfs (bug #415697), reported by + I.zaufi, bug introduced in 9f36ecc125bf2c20bd28c0ad513577a858140a77 affects + genkernel >=3.4.30 + + 12 May 2012; Sebastian Pipping <sping@gentoo.org> arch/x86/kernel-config, + arch/x86_64/kernel-config, defaults/kernel-config: + Set CONFIG_DEVTMPFS=y on x86, x86_64, default for udev + + 12 May 2012; Sebastian Pipping <sping@gentoo.org> genkernel: + Bump version to 3.4.31 + 18 Apr 2012; Robin H. Johnson <robbat2@gentoo.org> gen_initramfs.sh: lddtree call must be outside the for loop. @@ -11,9 +11,14 @@ Phases: - source global scripts - +Testing things: + $ cd genkernel + $ sudo GK_SHARE="$PWD" ./genkernel initramfs --no-install --no-postclear --loglevel=2 + Rolling a release: - Bump the version in the main genkernel file. -- echangelog commit the bump +- echangelog "Bump version to ${PV}" +- git commit -a -m "Bump version to ${PV}" - git tag -a -m "Tag release v${PV}" v${PV} - git push ${REMOTE} master --tags - make dist diff --git a/arch/alpha/modules_load b/arch/alpha/modules_load index 5cdd01b4..173488f1 100644 --- a/arch/alpha/modules_load +++ b/arch/alpha/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/arm/modules_load b/arch/arm/modules_load index f259bb59..4364eb7f 100644 --- a/arch/arm/modules_load +++ b/arch/arm/modules_load @@ -18,7 +18,7 @@ MODULES_NET="e1000 tg3" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/ia64/modules_load b/arch/ia64/modules_load index 35d9c6bb..49ef3c22 100644 --- a/arch/ia64/modules_load +++ b/arch/ia64/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/mips/modules_load b/arch/mips/modules_load index 5cdd01b4..173488f1 100644 --- a/arch/mips/modules_load +++ b/arch/mips/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/parisc/modules_load b/arch/parisc/modules_load index 5cdd01b4..173488f1 100644 --- a/arch/parisc/modules_load +++ b/arch/parisc/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/parisc64/modules_load b/arch/parisc64/modules_load index 35d9c6bb..49ef3c22 100644 --- a/arch/parisc64/modules_load +++ b/arch/parisc64/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/ppc/modules_load b/arch/ppc/modules_load index 5cdd01b4..173488f1 100644 --- a/arch/ppc/modules_load +++ b/arch/ppc/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/ppc64/modules_load b/arch/ppc64/modules_load index 35d9c6bb..49ef3c22 100644 --- a/arch/ppc64/modules_load +++ b/arch/ppc64/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/sparc/modules_load b/arch/sparc/modules_load index 5cdd01b4..173488f1 100644 --- a/arch/sparc/modules_load +++ b/arch/sparc/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/sparc64/modules_load b/arch/sparc64/modules_load index 35d9c6bb..49ef3c22 100644 --- a/arch/sparc64/modules_load +++ b/arch/sparc64/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/um/modules_load b/arch/um/modules_load index 265be08e..23aecac7 100644 --- a/arch/um/modules_load +++ b/arch/um/modules_load @@ -21,7 +21,7 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" diff --git a/arch/x86/kernel-config b/arch/x86/kernel-config index df9e34f5..8b5adad0 100644 --- a/arch/x86/kernel-config +++ b/arch/x86/kernel-config @@ -946,6 +946,7 @@ CONFIG_RFKILL_LEDS=y # Generic Driver Options # CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m diff --git a/arch/x86/modules_load b/arch/x86/modules_load index 3438b9b7..5ad8d181 100644 --- a/arch/x86/modules_load +++ b/arch/x86/modules_load @@ -22,10 +22,10 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" # Crypto -MODULES_CRYPTO="sha256_generic" +MODULES_CRYPTO="sha256_generic cbc aes_generic aes_586 aesni-intel xts" diff --git a/arch/x86_64/kernel-config b/arch/x86_64/kernel-config index b6c9d8dc..ae006a93 100644 --- a/arch/x86_64/kernel-config +++ b/arch/x86_64/kernel-config @@ -346,7 +346,7 @@ CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 CONFIG_X86_PAT=y CONFIG_ARCH_USES_PG_UNCACHED=y -# CONFIG_EFI is not set +CONFIG_EFI=y CONFIG_SECCOMP=y # CONFIG_CC_STACKPROTECTOR is not set CONFIG_HZ_100=y @@ -986,7 +986,7 @@ CONFIG_NET_9P=m # Generic Driver Options # CONFIG_UEVENT_HELPER_PATH="/sbin/udevadm" -# CONFIG_DEVTMPFS is not set +CONFIG_DEVTMPFS=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m @@ -2323,6 +2323,7 @@ CONFIG_FB_SYS_FOPS=m # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set CONFIG_FB_VESA=y +CONFIG_FB_EFI=y # CONFIG_FB_N411 is not set # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set @@ -2983,6 +2984,7 @@ CONFIG_ACPI_TOSHIBA=m # # CONFIG_EDD is not set CONFIG_FIRMWARE_MEMMAP=y +CONFIG_EFI_VARS=m CONFIG_DELL_RBU=m CONFIG_DCDBAS=m CONFIG_DMIID=y diff --git a/arch/x86_64/modules_load b/arch/x86_64/modules_load index c35f4b6b..ade95013 100644 --- a/arch/x86_64/modules_load +++ b/arch/x86_64/modules_load @@ -21,10 +21,10 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" # Crypto -MODULES_CRYPTO="sha256_generic" +MODULES_CRYPTO="sha256_generic cbc aes_generic aes-x86_64 aesni-intel xts" diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index e7348347..e53fb78f 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -305,6 +305,11 @@ run_shell() { /bin/ash } +fs_type_in_use() { + fs_type=$1 + cut -d ' ' -f 3 < /proc/mounts | fgrep -q "${fs_type}" +} + mount_devfs () { # Use devtmpfs if enabled in kernel, # else tmpfs. Always run mdev just in case @@ -314,12 +319,16 @@ mount_devfs () { fi # Options copied from /etc/init.d/udev-mount, should probably be kept in sync - mount -t $devfs -o "exec,nosuid,mode=0755,size=10M" udev /dev \ - || bad_msg "Failed to mount /dev as ${devfs}" + if ! fs_type_in_use devtmpfs; then + mount -t $devfs -o "exec,nosuid,mode=0755,size=10M" udev /dev \ + || bad_msg "Failed to mount /dev as ${devfs}" + fi # http://git.busybox.net/busybox/plain/docs/mdev.txt - mkdir -m 0755 /dev/pts - mount -t devpts -o gid=5,mode=0620 devpts /dev/pts || bad_msg "Failed to mount /dev/pts" + if ! fs_type_in_use devpts; then + mkdir -m 0755 /dev/pts + mount -t devpts -o gid=5,mode=0620 devpts /dev/pts || bad_msg "Failed to mount /dev/pts" + fi } test_success() { @@ -411,13 +420,6 @@ prompt_user(){ esac } -setup_hotplug() { - if [ "${KV_2_6_OR_GREATER}" ] - then - echo /sbin/mdev > /proc/sys/kernel/hotplug - fi -} - setup_slowusb() { # This function removes unset DO_slowusb if there is no usb-storage attached. # If noslowusb is set, skip this function @@ -613,7 +615,12 @@ startVolumes() { if [ "${USE_MDADM}" = '1' ] then - /sbin/mdadm --assemble --scan + if [ -e '/sbin/mdadm' ] + then + /sbin/mdadm --assemble --scan + else + bad_msg "mdadm not found: skipping mdadm raid assembly!" + fi fi if [ "${USE_DMRAID_NORMAL}" = '1' ] @@ -663,7 +670,43 @@ startVolumes() { if [ "${USE_ZFS}" = '1' ] then - /sbin/zpool import -N -a ${ZPOOL_FORCE} + if [ -z "${ZFS_POOL}" ] + then + good_msg "Importing ZFS pools" + + /sbin/zpool import -N -a "${ZPOOL_FORCE}" + + if [ "$?" = '0' ] + then + good_msg "Importing ZFS pools succeeded" + else + bad_msg "Imported ZFS pools failed" + fi + else + + if [ "$(zpool list -H -o name ${ZFS_POOL} 2>&1)" = "$ZFS_POOL" ] + then + good_msg "ZFS pool ${ZFS_POOL} already imported." + + if [ -n "${CRYPT_ROOT}" -o -n "${CRYPT_SWAP}" ] + then + good_msg "LUKS detected. Reimporting ${ZFS_POOL}" + /sbin/zpool export -f "${ZFS_POOL}" + /sbin/zpool import -N "${ZPOOL_FORCE}" "${ZFS_POOL}" + fi + else + good_msg "Importing ZFS pool ${ZFS_POOL}" + + /sbin/zpool import -N "${ZPOOL_FORCE}" "${ZFS_POOL}" + + if [ "$?" = '0' ] + then + good_msg "Importing ${ZFS_POOL} succeeded" + else + bad_msg "Importing ${ZFS_POOL} failed" + fi + fi + fi fi } @@ -781,7 +824,7 @@ openLUKS() { fi if [ "${retval}" -ne 0 ]; then - REAL_LUKS=`blkid -l -t "${LUKS_DEVICE}" | cut -d ":" -f 1 2>/dev/null` + REAL_LUKS=`blkid -o device -l -t "${LUKS_DEVICE}"` retval=$? fi diff --git a/defaults/kernel-config b/defaults/kernel-config index b4f28998..065d146c 100644 --- a/defaults/kernel-config +++ b/defaults/kernel-config @@ -946,6 +946,7 @@ CONFIG_RFKILL_LEDS=y # Generic Driver Options # CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m diff --git a/defaults/linuxrc b/defaults/linuxrc index d3ced517..4fdc3329 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -39,6 +39,7 @@ FAKE_ROOT='' REAL_ROOTFLAGS='' ROOTFSTYPE='auto' CRYPT_SILENT=0 +mkdir -p /etc/cmdline /etc/modprobe.d for x in ${CMDLINE} do case "${x}" in @@ -243,6 +244,13 @@ do nounionfs) USE_UNIONFS_NORMAL=0 ;; + *=*) + case "${x%%=*}" in + *.*) + echo "${x#*.}" >> "/etc/module_options/${x%%.*}.conf" + ;; + esac + ;; esac done @@ -253,7 +261,12 @@ fi # Set variables based on the value of REAL_ROOT case "${REAL_ROOT}" in - ZFS*) + ZFS=*) + ZFS_POOL=${REAL_ROOT#*=} + ZFS_POOL=${ZFS_POOL%%/*} + USE_ZFS=1 + ;; + ZFS) USE_ZFS=1 ;; esac @@ -261,12 +274,15 @@ esac # Verify that it is safe to use ZFS if [ "USE_ZFS" = "1" ] then - if [ -x /sbin/zfs ] + if [ -x /sbin/zfs -a -x /sbin/zpool ] then MY_HWOPTS="${MY_HWOPTS} zfs" else - bad_msg 'zfs binary not found: aborting use of zfs!' USE_ZFS=0 + + [ -x /sbin/zfs ] || bad_msg '/sbin/zfs not found!' + [ -x /sbin/zpool ] || bad_msg '/sbin/zpool not found!' + bad_msg 'Aborting use of zfs!' fi fi @@ -280,14 +296,16 @@ mount_devfs # Mount sysfs mount_sysfs -# Setup hotplugging for firmware loading -setup_hotplug - -# Start mdev +# Initialize mdev if [ "${KV_2_6_OR_GREATER}" ] then good_msg 'Activating mdev' - ( cd /sys && mdev -s ) || bad_msg "Failed to receive dynamic updates from mdev" + + # Serialize hotplug events + touch /dev/mdev.seq + + # Setup hotplugging for firmware loading + echo /sbin/mdev > /proc/sys/kernel/hotplug fi # Load modules listed in MY_HWOPTS if /lib/modules exists for the running kernel @@ -311,6 +329,12 @@ else good_msg 'Skipping module load; no modules in the ramdisk!' fi +# Ensure that device nodes are properly configured +if [ "${KV_2_6_OR_GREATER}" ] +then + mdev -s || bad_msg "mdev -s failed" +fi + # Apply scan delay if specified sdelay @@ -365,7 +389,7 @@ then fi if [ ${retval} -ne 0 ]; then - RESUME_DEV=$(blkid -l -t "${REAL_RESUME}" | cut -d ":" -f 1 2>/dev/null) + RESUME_DEV=$(blkid -o device -l -t "${REAL_RESUME}") retval=$? fi @@ -473,7 +497,7 @@ do fi if [ ${retval} -ne 0 ]; then - ROOT_DEV=$(blkid -l -t "${REAL_ROOT}" | cut -d ":" -f 1 2>/dev/null) + ROOT_DEV=$(blkid -o device -l -t "${REAL_ROOT}") retval=$? fi @@ -487,16 +511,24 @@ do fi ;; ZFS*) + if [ "${USE_ZFS}" = '0' ]; then + prompt_user "REAL_ROOT" "root block device" + continue + fi + ROOT_DEV="${REAL_ROOT#*=}" if [ "${ROOT_DEV}" != 'ZFS' ] then - zfs get type ${ROOT_DEV} > /dev/null - - if [ "$?" = '0' ] + if [ "$(zfs get type -o value -H ${ROOT_DEV})" = 'filesystem' ] then got_good_root=1; REAL_ROOT=${ROOT_DEV} ROOTFSTYPE=zfs + else + bad_msg "${ROOT_DEV} is not a filesystem" + prompt_user "REAL_ROOT" "root block device" + got_good_root=0 + continue fi else BOOTFS=$(/sbin/zpool list -H -o bootfs) @@ -518,6 +550,8 @@ do done; + else + got_good_root=0 fi fi @@ -564,7 +598,12 @@ do if [ "${ROOTFSTYPE}" = 'zfs' ] then - MOUNT_STATE=rw + if [ "zfs get -H -o value mountpoint ${REAL_ROOT}" = 'legacy' ] + then + MOUNT_STATE=rw + else + MOUNT_STATE=rw,zfsutil + fi else MOUNT_STATE=ro fi @@ -792,7 +831,7 @@ then fi done - mkdir initramfs proc tmp sys 2>/dev/null + mkdir initramfs proc tmp sys run 2>/dev/null chmod 1777 tmp fi @@ -838,8 +877,13 @@ for fs in $fslist; do # and not a mountpoint [ -z "$dev" ] && continue fstype=$(get_mount_fstype $fs) - # ro must be trailing, and the options will always contain at least 'defaults' - opts="$(get_mount_options $fs | strip_mount_options),ro" + if get_mount_options $fs | fgrep -q bind ; then + opts='bind' + dev=${NEW_ROOT}${dev} + else + # ro must be trailing, and the options will always contain at least 'defaults' + opts="$(get_mount_options $fs | strip_mount_options),ro" + fi mnt=${NEW_ROOT}${fs} cmd="mount -t $fstype -o $opts $dev $mnt" good_msg "Mounting $dev as ${fs}: $cmd" @@ -862,7 +906,7 @@ verbose_kmsg echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}" cd "${CHROOT}" -mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null +mkdir "${CHROOT}/proc" "${CHROOT}/sys" "${CHROOT}/run" 2>/dev/null echo -ne "${BOLD}.${NORMAL}" # If devtmpfs is mounted, try move it to the new root diff --git a/defaults/modprobe b/defaults/modprobe index ba2d890f..6bbe7e41 100755 --- a/defaults/modprobe +++ b/defaults/modprobe @@ -110,7 +110,10 @@ modprobe2() { filler=1 fi done - ${INSMOD} ${real_path} > /dev/null 2>&1 + # placing options into x + x="${real_path##*/}" + x="`cat "/etc/module_options/${x%.ko*}".* 2>/dev/null`" + ${INSMOD} ${real_path} ${x} > /dev/null 2>&1 ret=$? if [ ${ret} -eq 0 ] then diff --git a/defaults/modules_load b/defaults/modules_load index ec294ac3..19521df0 100644 --- a/defaults/modules_load +++ b/defaults/modules_load @@ -21,10 +21,10 @@ MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" # Hardware (Pluggable) MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" -MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid hid-generic sl811-hcd" +MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd usbhid hid-generic sl811-hcd" # Filesystems MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse" # Crypto -MODULES_CRYPTO="sha256_generic" +MODULES_CRYPTO="sha256_generic cbc aes_generic xts" diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt index 5686f5a9..708c880f 100644 --- a/doc/genkernel.8.txt +++ b/doc/genkernel.8.txt @@ -233,6 +233,9 @@ LOW-LEVEL COMPILATION OPTIONS *--bootdir*=<dir>:: Set the location of the boot-directory, default is '/boot'. +*--modprobedir*=<dir>:: + Set the location of the modprobe.d-directory, default is '/etc/modprobe.d'. + *--makeopts*=<makeopts>:: GNU Make options such as -j2, etc. @@ -582,7 +585,8 @@ which the ramdisk scripts would recognize. TO BE DOCUMENTED *isoboot*=<...>:: - TO BE DOCUMENTED + Loop-mount an ISO file from the boot device to get the filesystem image. + Useful with chain-loading environments and USB keys. NETBOOTING diff --git a/gen_bootloader.sh b/gen_bootloader.sh index 99a4960f..2d017660 100755 --- a/gen_bootloader.sh +++ b/gen_bootloader.sh @@ -32,7 +32,7 @@ set_bootloader_grub_read_device_map() { } set_bootloader_grub2() { - local GRUB_CONF + local GRUB_CONF for candidate in \ "${BOOTDIR}/grub2/grub.cfg" \ "${BOOTDIR}/grub/grub.cfg" \ @@ -46,11 +46,12 @@ set_bootloader_grub2() { if [[ -z "${GRUB_CONF}" ]]; then print_error 1 "Error! Grub2 configuration file does not exist, please ensure grub2 is correctly setup first." return 0 - fi + fi - print_info 1 "You can customize Grub2 parameters in /etc/default/grub." - print_info 1 "Running grub2-mkconfig to create ${GRUB_CONF}..." - grub2-mkconfig -o "${GRUB_CONF}" + print_info 1 "You can customize Grub2 parameters in /etc/default/grub." + print_info 1 "Running grub2-mkconfig to create ${GRUB_CONF}..." + grub2-mkconfig -o "${GRUB_CONF}" + [ "${BUILD_RAMDISK}" -ne 0 ] && sed -i 's/ro single/ro debug/' "${GRUB_CONF}" } set_bootloader_grub() { diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 1aa101da..4527f006 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -77,6 +77,7 @@ longusage() { echo " --mountboot Mount BOOTDIR automatically if mountable" echo " --no-mountboot Don't mount BOOTDIR automatically" echo " --bootdir=<dir> Set the location of the boot-directory, default is /boot" + echo " --modprobedir=<dir> Set the location of the modprobe.d-directory, default is /etc/modprobe.d" echo " Initialization" echo " --splash=<theme> Enable framebuffer splash using <theme>" echo " --splash-res=<res> Select splash theme resolutions to install" @@ -260,6 +261,10 @@ parse_cmdline() { CMD_BOOTDIR=`parse_opt "$*"` print_info 2 "CMD_BOOTDIR: ${CMD_BOOTDIR}" ;; + --modprobedir=*) + CMD_MODPROBEDIR=`parse_opt "$*"` + print_info 2 "CMD_MODPROBEDIR: ${CMD_MODPROBEDIR}" + ;; --do-keymap-auto) CMD_DOKEYMAPAUTO=1 CMD_KEYMAP=1 diff --git a/gen_compile.sh b/gen_compile.sh index 3c79d0c8..0dffc9bc 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -503,40 +503,6 @@ compile_device_mapper() { compile_lvm } -compile_e2fsprogs() { - if [ -f "${BLKID_BINCACHE}" ] - then - print_info 1 "blkid: >> Using cache" - else - [ ! -f "${E2FSPROGS_SRCTAR}" ] && - gen_die "Could not find e2fsprogs source tarball: ${E2FSPROGS_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" - cd "${TEMP}" - rm -rf "${E2FSPROGS_DIR}" - tar -zxpf "${E2FSPROGS_SRCTAR}" - [ ! -d "${E2FSPROGS_DIR}" ] && - gen_die "e2fsprogs directory ${E2FSPROGS_DIR} invalid" - cd "${E2FSPROGS_DIR}" - apply_patches e2fsprogs ${E2FSPROGS_VER} - print_info 1 'e2fsprogs: >> Configuring...' - LDFLAGS=-static ./configure >> ${LOGFILE} 2>&1 || - gen_die 'Configuring e2fsprogs failed!' - print_info 1 'e2fsprogs: >> Compiling...' - MAKE=${UTILS_MAKE} MAKEOPTS="${MAKEOPTS} -j1" compile_generic "" "" - print_info 1 'blkid: >> Copying to cache...' - [ -f "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ] || - gen_die 'Blkid executable does not exist!' - ${UTILS_CROSS_COMPILE}strip "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" || - gen_die 'Could not strip blkid binary!' - bzip2 "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" || - gen_die 'bzip2 compression of blkid failed!' - mv "${TEMP}/${E2FSPROGS_DIR}/misc/blkid.bz2" "${BLKID_BINCACHE}" || - gen_die 'Could not copy the blkid binary to the package directory, does the directory exist?' - - cd "${TEMP}" - rm -rf "${E2FSPROGS_DIR}" > /dev/null - fi -} - compile_fuse() { if [ ! -f "${FUSE_BINCACHE}" ] then @@ -550,7 +516,7 @@ compile_fuse() { cd "${FUSE_DIR}" apply_patches fuse ${FUSE_VER} print_info 1 'fuse: >> Configuring...' - ./configure --disable-kernel-module --disable-example >> ${LOGFILE} 2>&1 || + ./configure --disable-example >> ${LOGFILE} 2>&1 || gen_die 'Configuring fuse failed!' print_info 1 'fuse: >> Compiling...' MAKE=${UTILS_MAKE} compile_generic "" "" @@ -588,7 +554,7 @@ compile_unionfs_fuse() { apply_patches unionfs-fuse ${UNIONFS_FUSE_VER} print_info 1 'unionfs-fuse: >> Compiling...' sed -i "/^\(CFLAGS\|CPPFLAGS\)/s:^\\(.*\\)$:\\1 -static -I${TEMP}/${FUSE_DIR}/include -L${TEMP}/${FUSE_DIR}/lib/.libs:" Makefile src/Makefile - sed -i "/^LIB = /s:^LIB = \(.*\)$:LIB = -static -L${TEMP}/${FUSE_DIR}/lib/.libs \1 -ldl -lrt:" Makefile src/Makefile + sed -i "/^LIB = /s:^LIB = \(.*\)$:LIB = -static -L${TEMP}/${FUSE_DIR}/lib/.libs \1 -ldl -lpthread -lrt:" Makefile src/Makefile MAKE=${UTILS_MAKE} compile_generic "" "" print_info 1 'unionfs-fuse: >> Copying to cache...' [ -f "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" ] || diff --git a/gen_configkernel.sh b/gen_configkernel.sh index c0af3b56..60ba5362 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -56,7 +56,13 @@ config_kernel() { # or we might remove configurations someone is trying to test. if isTrue "${MRPROPER}" || [ ! -f "${BUILD_DST}/.config" ] then - cp "${KERNEL_CONFIG}" "${BUILD_DST}/.config" || gen_die 'Could not copy configuration file!' + local message='Could not copy configuration file!' + if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then + # Support --kernel-config=/proc/config.gz, mainly + zcat "${KERNEL_CONFIG}" > "${KERNEL_DIR}/.config" || gen_die "${message}" + else + cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die "${message}" + fi fi if isTrue "${OLDCONFIG}" diff --git a/gen_determineargs.sh b/gen_determineargs.sh index a3451e37..83ce8ab6 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -87,6 +87,7 @@ determine_real_args() { set_config_with_override STRING KERNEL_CROSS_COMPILE CMD_KERNEL_CROSS_COMPILE set_config_with_override STRING UTILS_CROSS_COMPILE CMD_UTILS_CROSS_COMPILE set_config_with_override STRING BOOTDIR CMD_BOOTDIR "/boot" + set_config_with_override STRING MODPROBEDIR CMD_MODPROBEDIR "/etc/modprobe.d" set_config_with_override BOOL SPLASH CMD_SPLASH set_config_with_override BOOL POSTCLEAR CMD_POSTCLEAR @@ -133,6 +134,7 @@ determine_real_args() { BOOTDIR=`arch_replace "${BOOTDIR}"` BOOTDIR=${BOOTDIR%/} # Remove any trailing slash + MODPROBEDIR=${MODPROBEDIR%/} # Remove any trailing slash CACHE_DIR=`arch_replace "${CACHE_DIR}"` BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"` diff --git a/gen_funcs.sh b/gen_funcs.sh index 05c97a3e..770c6d8a 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -495,7 +495,7 @@ set_config_with_override() { } check_distfiles() { - for i in $BUSYBOX_SRCTAR $MULTIPATH_SRCTAR $DMRAID_SRCTAR $E2FSPROGS_SRCTAR $ISCSI_SRCTAR $GPG_SRCTAR + for i in $BUSYBOX_SRCTAR $MULTIPATH_SRCTAR $LVM_SRCTAR $DMRAID_SRCTAR $ISCSI_SRCTAR $GPG_SRCTAR do if [ ! -f "${i}" ] then diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 0bd326c0..6ad07f38 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -42,6 +42,15 @@ copy_binaries() { || gen_die "Binary ${f} or some of its library dependencies could not be copied" } +log_future_cpio_content() { + if [[ "${LOGLEVEL}" -gt 1 ]]; then + echo ================================================================= + echo "About to add these files from '${PWD}' to cpio archive:" + find . | xargs ls -ald + echo ================================================================= + fi +} + append_base_layout() { if [ -d "${TEMP}/initramfs-base-temp" ] then @@ -81,6 +90,7 @@ append_base_layout() { date -u '+%Y%m%d-%H%M%S' > ${TEMP}/initramfs-base-temp/etc/build_date cd "${TEMP}/initramfs-base-temp/" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing baselayout cpio" cd "${TEMP}" @@ -110,6 +120,7 @@ append_busybox() { done cd "${TEMP}/initramfs-busybox-temp/" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing busybox cpio" cd "${TEMP}" @@ -122,11 +133,14 @@ append_blkid(){ rm -r "${TEMP}/initramfs-blkid-temp/" fi cd ${TEMP} - mkdir -p "${TEMP}/initramfs-blkid-temp/sbin/" - [ "${DISKLABEL}" = '1' ] && { /bin/bzip2 -dc "${BLKID_BINCACHE}" > "${TEMP}/initramfs-blkid-temp/sbin/blkid" || - gen_die "Could not extract blkid binary cache!"; } - chmod a+x "${TEMP}/initramfs-blkid-temp/sbin/blkid" + mkdir -p "${TEMP}/initramfs-blkid-temp/" + + if [[ "${DISKLABEL}" = "1" ]]; then + copy_binaries "${TEMP}"/initramfs-blkid-temp/ /sbin/blkid + fi + cd "${TEMP}/initramfs-blkid-temp/" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing blkid cpio" cd "${TEMP}" @@ -158,6 +172,7 @@ append_unionfs_fuse() { gen_die 'Could not extract unionfs-fuse binary cache!' chmod a+x "${TEMP}/initramfs-unionfs-fuse-temp/sbin/unionfs" cd "${TEMP}/initramfs-unionfs-fuse-temp/" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing unionfs fuse cpio" cd "${TEMP}" @@ -178,6 +193,7 @@ append_unionfs_fuse() { # cp -f /etc/suspend.conf "${TEMP}/initramfs-suspend-temp/etc" || # gen_die 'Could not copy /etc/suspend.conf' # cd "${TEMP}/initramfs-suspend-temp/" +# log_future_cpio_content # find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ # || gen_die "compressing suspend cpio" # rm -r "${TEMP}/initramfs-suspend-temp/" @@ -205,6 +221,7 @@ append_multipath(){ cp /etc/scsi_id.config "${TEMP}/initramfs-multipath-temp/etc/" || gen_die 'could not copy scsi_id.config' fi cd "${TEMP}/initramfs-multipath-temp" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing multipath cpio" cd "${TEMP}" @@ -229,6 +246,7 @@ append_dmraid(){ ln -sf raid456.kp raid45.ko cd "${TEMP}/initramfs-dmraid-temp/" fi + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing dmraid cpio" cd "${TEMP}" @@ -248,6 +266,7 @@ append_iscsi(){ gen_die "Could not extract iscsi binary cache!" chmod a+x "${TEMP}/initramfs-iscsi-temp/bin/iscsistart" cd "${TEMP}/initramfs-iscsi-temp/" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing iscsi cpio" cd "${TEMP}" @@ -271,14 +290,33 @@ append_lvm(){ print_info 1 ' LVM: Adding support (using local static binary /sbin/lvm)...' cp /sbin/lvm "${TEMP}/initramfs-lvm-temp/bin/lvm" || gen_die 'Could not copy over lvm!' else - gen_die "Couldn't find /sbin/lvm or /sbin/lvm.static" - fi - if [ -x /etc/lvm/lvm.conf ] - then - cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm-temp/etc/lvm/" || gen_die 'Could not copy over lvm.conf!' + print_info 1 ' LVM: Adding support (compiling binaries)...' + compile_lvm + /bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/initramfs-lvm-temp" || + gen_die "Could not extract lvm binary cache!"; + mv ${TEMP}/initramfs-lvm-temp/sbin/lvm.static ${TEMP}/initramfs-lvm-temp/bin/lvm || + gen_die 'LVM error: Could not move lvm.static to lvm!' + # See bug 382555 + mv ${TEMP}/initramfs-lvm-temp/sbin/dmsetup.static ${TEMP}/initramfs-lvm-temp/bin/dmsetup || + gen_die 'LVM error: Could not move dmsetup.static to dmsetup!' + rm -rf ${TEMP}/initramfs-lvm-temp/{lib,share,man,include,sbin/{lvm,dmsetup}} + fi + if [ -x /sbin/lvm -o -x /bin/lvm ] + then +# lvm dumpconfig 2>&1 > /dev/null || gen_die 'Could not copy over lvm.conf!' +# ret=$? +# if [ ${ret} != 0 ] +# then + cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm-temp/etc/lvm/" || + gen_die 'Could not copy over lvm.conf!' +# else +# gen_die 'Could not copy over lvm.conf!' +# fi fi cd "${TEMP}/initramfs-lvm-temp/" - find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" || gen_die "compressing lvm cpio" + log_future_cpio_content + find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ + || gen_die "compressing lvm cpio" cd "${TEMP}" rm -r "${TEMP}/initramfs-lvm-temp/" } @@ -316,7 +354,9 @@ append_mdadm(){ fi fi cd "${TEMP}/initramfs-mdadm-temp/" - find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" || gen_die "compressing mdadm cpio" + log_future_cpio_content + find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ + || gen_die "compressing mdadm cpio" cd "${TEMP}" rm -rf "${TEMP}/initramfs-mdadm-temp" > /dev/null } @@ -340,6 +380,7 @@ append_zfs(){ copy_binaries "${TEMP}/initramfs-zfs-temp" /sbin/{mount.zfs,zfs,zpool} cd "${TEMP}/initramfs-zfs-temp/" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing zfs cpio" cd "${TEMP}" @@ -367,6 +408,7 @@ append_splash(){ cp -f "/usr/share/splashutils/initrd.splash" "${TEMP}/initramfs-splash-temp/etc" fi cd "${TEMP}/initramfs-splash-temp/" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing splash cpio" cd "${TEMP}" @@ -378,6 +420,7 @@ append_splash(){ append_overlay(){ cd ${INITRAMFS_OVERLAY} + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing overlay cpio" } @@ -405,6 +448,7 @@ append_luks() { copy_binaries "${TEMP}/initramfs-luks-temp/" /sbin/cryptsetup fi + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "appending cryptsetup to cpio" @@ -435,6 +479,7 @@ append_firmware() { else cp -a "${FIRMWARE_SRC}"/* ${TEMP}/initramfs-firmware-temp/lib/firmware/ fi + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "appending firmware to cpio" cd "${TEMP}" @@ -456,6 +501,7 @@ append_gpg() { gen_die 'Could not extract gpg binary cache!' chmod a+x "${TEMP}/initramfs-gpg-temp/sbin/gpg" cd "${TEMP}/initramfs-gpg-temp/" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" rm -rf "${TEMP}/initramfs-gpg-temp" > /dev/null } @@ -508,12 +554,48 @@ append_modules() { print_list ${!group_modules} > "${TEMP}/initramfs-modules-${KV}-temp/etc/modules/${group}" done cd "${TEMP}/initramfs-modules-${KV}-temp/" + log_future_cpio_content find . | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing modules cpio" cd "${TEMP}" rm -r "${TEMP}/initramfs-modules-${KV}-temp/" } +append_modprobed() { + local TDIR="${TEMP}/initramfs-modprobe.d-temp" + if [ -d "${TDIR}" ] + then + rm -r "${TDIR}" + fi + + mkdir -p "${TDIR}/etc/module_options/" + + # Load module parameters + for dir in $(find "${MODPROBEDIR}"/*) + do + while read x + do + case "${x}" in + options*) + module_name="$(echo "$x" | cut -d ' ' -f 2)" + [ "${module_name}" != "$(echo)" ] || continue + module_options="$(echo "$x" | cut -d ' ' -f 3-)" + [ "${module_options}" != "$(echo)" ] || continue + echo "${module_options}" >> "${TDIR}/etc/module_options/${module_name}.conf" + ;; + esac + done < "${dir}" + done + + cd "${TDIR}" + log_future_cpio_content + find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ + || gen_die "compressing modprobe.d cpio" + + cd "${TEMP}" + rm -rf "${TDIR}" > /dev/null +} + # check for static linked file with objdump is_static() { LANG="C" LC_ALL="C" objdump -T $1 2>&1 | grep "not a dynamic object" > /dev/null @@ -612,6 +694,7 @@ append_auxilary() { fi cd "${TEMP}/initramfs-aux-temp/" + log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing auxilary cpio" cd "${TEMP}" @@ -665,7 +748,9 @@ create_initramfs() { append_data 'splash' "${SPLASH}" - if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_SRC}" ] + append_data 'modprobed' + + if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ] then append_data 'firmware' fi @@ -690,6 +775,13 @@ create_initramfs() { else if isTrue "${COMPRESS_INITRD}" then + if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then + # Support --kernel-config=/proc/config.gz, mainly + local CONFGREP=zgrep + else + local CONFGREP=grep + fi + cmd_xz=$(type -p xz) cmd_lzma=$(type -p lzma) cmd_bzip2=$(type -p bzip2) @@ -708,17 +800,18 @@ create_initramfs() { for tuple in \ 'CONFIG_RD_XZ cmd_xz xz' \ 'CONFIG_RD_LZMA cmd_lzma lzma' \ - 'CONFIG_RD_BZIP2 cmd_bzip2 bzip' \ + 'CONFIG_RD_BZIP2 cmd_bzip2 bzip2' \ 'CONFIG_RD_GZIP cmd_gzip gzip' \ 'CONFIG_RD_LZO cmd_lzop lzop'; do set -- ${tuple} kernel_option=$1 cmd_variable_name=$2 - if grep -sq "^${kernel_option}=y" ${BUILD_DST}/.config && test -n "${!cmd_variable_name}" ; then + if ${CONFGREP} -q "^${kernel_option}=y" "${KERNEL_CONFIG}" && test -n "${!cmd_variable_name}" ; then compression=$3 [[ ${COMPRESS_INITRD_TYPE} == best ]] && break fi done + [[ -z "${compression}" ]] && gen_die "None of the initramfs we tried are supported by your kernel (config file \"${KERNEL_CONFIG}\"), strange!?" ;; *) gen_die "Compression '${COMPRESS_INITRD_TYPE}' unknown" diff --git a/gen_package.sh b/gen_package.sh index 04854c22..c80d630b 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -77,9 +77,15 @@ gen_kerncache() cd "${BUILD_DST}" cp "${tmp_kernel_binary}" "${TEMP}/kerncache/kernel-${ARCH}-${KV}" || gen_die 'Could not the copy kernel for the kernel package!' - cp "${BUILD_DST}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}" - cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" - cp "${BUILD_DST}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}" + cp "${KERNEL_DIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}" + + if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then + # Support --kernel-config=/proc/config.gz, mainly + zcat "${KERNEL_CONFIG}" > "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" + else + cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" + fi + cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}" if isTrue "${GENZIMAGE}" then cp "${tmp_kernel_binary2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package" @@ -180,7 +186,16 @@ gen_kerncache_is_valid() else test1=$(grep -v "^#" ${TEMP}/config-${ARCH}-${KV} | md5sum | cut -d " " -f 1) fi - test2=$(grep -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1) + + if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then + # Support --kernel-config=/proc/config.gz, mainly + local CONFGREP=zgrep + else + local CONFGREP=grep + fi + test2=$("${CONFGREP}" -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1) + + if [ "${test1}" == "${test2}" ] then echo @@ -2,7 +2,7 @@ # $Id$ PATH="${PATH}:/sbin:/usr/sbin" -GK_V='3.4.30-funtoo' +GK_V='3.4.40-funtoo' # Set the default for TMPDIR. May be modified by genkernel.conf or the # --tempdir command line option. @@ -117,6 +117,7 @@ done # get the real arguments for usage... determine_real_args +determine_config_file set_kernel_arch @@ -129,6 +130,7 @@ check_distfiles dump_debugcache NORMAL=${BOLD} print_info 1 "Linux Kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..." +print_info 1 ".. with config file ${KERNEL_CONFIG}" # Check BOOTDIR is mounted if ! isTrue ${CMD_INSTALL} @@ -279,8 +281,6 @@ fi if [ "${BUILD_RAMDISK}" = '1' ] then - [ "${DISKLABEL}" = '1' ] && compile_e2fsprogs - if [ "${BUSYBOX}" = '1' ] then # Compile Busybox @@ -351,13 +351,27 @@ then [ "${DMRAID}" = '1' ] && print_warning 1 'add "dodmraid" for dmraid support' [ "${MDADM}" = '1' ] && print_warning 1 'add "domdadm" for RAID support' [ "${DMRAID}" = '1' ] && print_warning 1 ' or "dodmraid=<additional options>"' - [ "${ZFS}" = '1' ] && print_warning 1 'add "dozfs" for ZFS support' - [ "${ZFS}" = '1' ] && print_warning 1 ' and either "real_root=ZFS" to use bootfs autodetection or "real_root=ZFS=<dataset>" to force booting from a specific dataset' + [ "${ZFS}" = '1' ] && print_warning 1 'add "dozfs" for ZFS volume management support' + [ "${ZFS}" = '1' ] && print_warning 1 'add either "real_root=ZFS" (bootfs autodetection) or "real_root=ZFS=<dataset>" to boot from a ZFS dataset' [ "${ISCSI}" = '1' ] && print_warning 1 'add at least "iscsi_initiatorname=<initiator name> iscsi_target=<target name> and iscsi_address=<target ip>" for iscsi support' if [ `grep 'CONFIG_EXT[0-9]_FS=' "${BUILD_DST}"/.config | wc -l` -ge 2 ]; then print_warning 1 'With support for several ext* filesystems around it may be needed to' print_warning 1 'add "rootfstype=ext3" or "rootfstype=ext4"' fi + + if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then + # Support --kernel-config=/proc/config.gz, mainly + CONFGREP=zgrep + else + CONFGREP=grep + fi + + if [ `${CONFGREP} 'CONFIG_EXT[0-9]_FS=' "${KERNEL_CONFIG}" | wc -l` -ge 2 ]; then + print_warning 1 'With support for several ext* filesystems available, it may be needed to' + print_warning 1 'add "rootfstype=ext3" or "rootfstype=ext4" to the list of boot parameters.' + fi + + unset CONFGREP fi [ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR} diff --git a/genkernel.conf b/genkernel.conf index c86c9f0b..a2e4989e 100644 --- a/genkernel.conf +++ b/genkernel.conf @@ -216,11 +216,6 @@ ISCSI_DIR="open-iscsi-${ISCSI_VER}" ISCSI_SRCTAR="${DISTDIR}/open-iscsi-${ISCSI_VER}.tar.gz" ISCSI_BINCACHE="%%CACHE%%/iscsi-${ISCSI_VER}-%%ARCH%%.bz2" -E2FSPROGS_VER="VERSION_E2FSPROGS" -E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}" -E2FSPROGS_SRCTAR="${DISTDIR}/e2fsprogs-${E2FSPROGS_VER}.tar.gz" -BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2" - FUSE_VER="VERSION_FUSE" FUSE_DIR="fuse-${FUSE_VER}" FUSE_SRCTAR="${DISTDIR}/fuse-${FUSE_VER}.tar.gz" diff --git a/patches/busybox/1.20.1/1.18.1-openvt.diff b/patches/busybox/1.20.1/1.18.1-openvt.diff new file mode 100644 index 00000000..b8a9f8ac --- /dev/null +++ b/patches/busybox/1.20.1/1.18.1-openvt.diff @@ -0,0 +1,19 @@ +Based on: + +> Allow a slightly wider range of valid vt numbers. Forward-ported from Gentoo +> Busybox 1.1.3. + +> The previous spin of this patch on 1.1.3 had a 'wait(NULL);' right before +> return EXIT_SUCCESS. I don't think it's needed anymore, so I left it out. + +--- a/console-tools/openvt.c 2010-11-22 22:24:58.000000000 +0200 ++++ b/console-tools/openvt.c 2010-11-29 15:32:18.000000000 +0200 +@@ -124,7 +124,7 @@ int openvt_main(int argc UNUSED_PARAM, c + + if (flags & OPT_c) { + /* Check for illegal vt number: < 1 or > 63 */ +- vtno = xatou_range(str_c, 1, 63); ++ vtno = xatou_range(str_c, 0, 63); + } else { + vtno = find_free_vtno(); + } diff --git a/patches/busybox/1.20.1/busybox-1.20.1-mdstart.patch b/patches/busybox/1.20.1/busybox-1.20.1-mdstart.patch new file mode 100644 index 00000000..5ca3ecab --- /dev/null +++ b/patches/busybox/1.20.1/busybox-1.20.1-mdstart.patch @@ -0,0 +1,130 @@ +From d1f76c9546758611bcadd6ad10fc0c4c1ceb14ee Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Sun, 10 Jun 2012 19:05:38 +0200 +Subject: [PATCH] Port mdstart patch from busybox 1.19.3 to 1.20.1 + +--- + include/applets.src.h | 1 + + util-linux/Config.src | 7 ++++++ + util-linux/Kbuild.src | 1 + + util-linux/mdStart.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 75 insertions(+) + create mode 100644 util-linux/mdStart.c + +diff --git a/include/applets.src.h b/include/applets.src.h +index 252a060..0b199bc 100644 +--- a/include/applets.src.h ++++ b/include/applets.src.h +@@ -239,6 +239,7 @@ IF_MAKEMIME(APPLET(makemime, BB_DIR_BIN, BB_SUID_DROP)) + IF_MAN(APPLET(man, BB_DIR_SBIN, BB_SUID_DROP)) + IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP)) + IF_MD5SUM(APPLET_NOEXEC(md5sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, md5sum)) ++IF_MDSTART(APPLET(mdstart, BB_DIR_SBIN, BB_SUID_DROP)) + IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP)) + IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, BB_DIR_BIN, BB_SUID_DROP, mkdir)) + IF_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat)) +diff --git a/util-linux/Config.src b/util-linux/Config.src +index 57a52ce..e07fe2b 100644 +--- a/util-linux/Config.src ++++ b/util-linux/Config.src +@@ -404,6 +404,13 @@ config LSUSB + + This version uses sysfs (/sys/bus/usb/devices) only. + ++config MDSTART ++ bool "mdstart" ++ default n ++ help ++ Allows you to autostart /dev/md devices if using an initramfs to ++ boot. ++ + config MKSWAP + bool "mkswap" + default y +diff --git a/util-linux/Kbuild.src b/util-linux/Kbuild.src +index 468fc6b..0bc9a9b 100644 +--- a/util-linux/Kbuild.src ++++ b/util-linux/Kbuild.src +@@ -24,6 +24,7 @@ lib-$(CONFIG_HWCLOCK) += hwclock.o + lib-$(CONFIG_IPCRM) += ipcrm.o + lib-$(CONFIG_IPCS) += ipcs.o + lib-$(CONFIG_LOSETUP) += losetup.o ++lib-$(CONFIG_MDSTART) += mdStart.o + lib-$(CONFIG_LSPCI) += lspci.o + lib-$(CONFIG_LSUSB) += lsusb.o + lib-$(CONFIG_MKFS_EXT2) += mkfs_ext2.o +diff --git a/util-linux/mdStart.c b/util-linux/mdStart.c +new file mode 100644 +index 0000000..0c55bab +--- /dev/null ++++ b/util-linux/mdStart.c +@@ -0,0 +1,66 @@ ++/* ++ * Linux 2.6(+) RAID Autostarter ++ * ++ * Copyright (C) 2005 by Tim Yamin <plasmaroo@gentoo.org> <plasm@roo.me.uk> ++ * Copyright (C) 2012 by Sebastian Pipping <sebastian@pipping.org> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++//usage:#define mdstart_trivial_usage ++//usage: "[PARTITION] MD-NODE [[PARTITION] MD-NODE ...]" ++//usage: ++//usage:#define mdstart_full_usage "\n\n" ++//usage: "Run the RAID_AUTORUN ioctl on the given MD number" ++ ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <fcntl.h> ++#include <sys/ioctl.h> ++#include <linux/major.h> ++#include <linux/raid/md_u.h> ++ ++extern int ++mdstart_main(int argc, char *argv[]) ++{ ++ int i, fd, part = 0, retval = 0; ++ ++ if(argc < 2) ++ { ++ bb_show_usage(); ++ } ++ ++ for(i = 1; i < argc; i++) ++ { ++ if(sscanf(argv[i], "%d", &part) == 1) ++ continue; ++ ++ fd = open(argv[i], 0, 0); ++ if (fd >= 0) ++ { ++ ioctl(fd, RAID_AUTORUN, part); ++ close(fd); ++ } else ++ { ++ printf("Error: Failed to open %s!\n", argv[i]); ++ retval=1; ++ } ++ ++ part = 0; ++ } ++ ++ return retval; ++} +-- +1.7.10.2 + diff --git a/patches/busybox/1.20.1/busybox-1.7.4-signal-hack.patch b/patches/busybox/1.20.1/busybox-1.7.4-signal-hack.patch new file mode 100644 index 00000000..ba118305 --- /dev/null +++ b/patches/busybox/1.20.1/busybox-1.7.4-signal-hack.patch @@ -0,0 +1,28 @@ +workaround while we get it fixed upstream + +http://bugs.gentoo.org/201114 + +--- libbb/u_signal_names.c ++++ libbb/u_signal_names.c +@@ -66,7 +66,7 @@ + #ifdef SIGTERM + [SIGTERM ] = "TERM", + #endif +-#ifdef SIGSTKFLT ++#if defined(SIGSTKFLT) && SIGSTKFLT < 32 + [SIGSTKFLT] = "STKFLT", + #endif + #ifdef SIGCHLD +@@ -90,10 +90,10 @ + #ifdef SIGURG + [SIGURG ] = "URG", + #endif +-#ifdef SIGXCPU ++#if defined(SIGXCPU) && SIGXCPU < 32 + [SIGXCPU ] = "XCPU", + #endif +-#ifdef SIGXFSZ ++#if defined(SIGXFSZ) && SIGXFSZ < 32 + [SIGXFSZ ] = "XFSZ", + #endif + #ifdef SIGVTALRM diff --git a/patches/e2fsprogs/1.42/e2fsprogs-1.41.12-getpagesize.patch b/patches/e2fsprogs/1.42/e2fsprogs-1.41.12-getpagesize.patch deleted file mode 100644 index 5b042d36..00000000 --- a/patches/e2fsprogs/1.42/e2fsprogs-1.41.12-getpagesize.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 81c81f5421cb9b85e793c591595a0a4d6ee04e99 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Sat, 4 Dec 2010 17:10:53 -0500 -Subject: [PATCH] libext2fs: change getpagesize to sysconf - -Newer versions of glibc no longer export the getpagesize() prototype when -using recent versions of POSIX (_XOPEN_SOURCE). So building tdb.c gives -use implicit function declaration warnings. Fix the issue by using the -portable sysconf() function which returns the same answer. - -Signed-off-by: Mike Frysinger <vapier@gentoo.org> ---- - lib/ext2fs/tdb.c | 6 +----- - 1 files changed, 1 insertions(+), 5 deletions(-) - -diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c -index 0c82a24..43c5d44 100644 ---- a/lib/ext2fs/tdb.c -+++ b/lib/ext2fs/tdb.c -@@ -111,10 +111,6 @@ typedef int bool; - #define u32 unsigned - #endif - --#ifndef HAVE_GETPAGESIZE --#define getpagesize() 0x2000 --#endif -- - typedef u32 tdb_len_t; - typedef u32 tdb_off_t; - -@@ -3838,7 +3834,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, - tdb->hash_fn = hash_fn ? hash_fn : default_tdb_hash; - - /* cache the page size */ -- tdb->page_size = getpagesize(); -+ tdb->page_size = sysconf(_SC_PAGESIZE); - if (tdb->page_size <= 0) { - tdb->page_size = 0x2000; - } --- -1.7.3.1 - diff --git a/patches/fuse/2.8.6/fuse-2.8.6-glibc-2.14.patch b/patches/fuse/2.8.6/fuse-2.8.6-glibc-2.14.patch new file mode 100644 index 00000000..93713cd7 --- /dev/null +++ b/patches/fuse/2.8.6/fuse-2.8.6-glibc-2.14.patch @@ -0,0 +1,10 @@ +--- util/fusermount.c 2012-07-10 00:18:25.228755618 +0200 ++++ util/fusermount.c 2012-07-10 00:17:47.574226365 +0200 +@@ -9,6 +9,7 @@ + + #include <config.h> + ++#define _GNU_SOURCE /* for clone */ + #include "mount_util.h" + #include <stdio.h> + #include <stdlib.h> |