Merge branch 'master' into plymouth

Conflicts:
	arch/x86/modules_load
	arch/x86_64/modules_load
	defaults/modules_load
cleanup-cruft
Fabio Erculiani 12 years ago
commit 08cd7890bf

4
.gitignore vendored

@ -1,3 +1 @@
/genkernel.8
/genkernel-*.tar.bz2
/ChangeLog
/*.tar.*

@ -1,16 +1,13 @@
PACKAGE_VERSION = `/bin/fgrep GK_V= genkernel | sed "s/.*GK_V='\([^']\+\)'/\1/"`
distdir = genkernel-$(PACKAGE_VERSION)
VERSION ?=
distdir = genkernel-next-$(VERSION)
# Add off-Git/generated files here that need to be shipped with releases
EXTRA_DIST = genkernel.8 ChangeLog
EXTRA_DIST = genkernel.8
genkernel.8: doc/genkernel.8.txt doc/asciidoc.conf Makefile genkernel
a2x --conf-file=doc/asciidoc.conf --attribute="genkernelversion=$(PACKAGE_VERSION)" \
a2x --conf-file=doc/asciidoc.conf --attribute="genkernelversion=$(VERSION)" \
--format=manpage -D . "$<"
ChangeLog:
git log >$@
clean:
rm -f $(EXTRA_DIST)
@ -19,12 +16,10 @@ check-git-repository:
git diff --cached --quiet || { echo 'STOP, you have uncommitted changes in the index' ; false ; }
dist: check-git-repository $(EXTRA_DIST)
rm -Rf "$(distdir)" "$(distdir)".tar "$(distdir)".tar.bz2
mkdir "$(distdir)"
git ls-files -z | xargs -0 cp --no-dereference --parents --target-directory="$(distdir)" \
$(EXTRA_DIST)
tar cf "$(distdir)".tar "$(distdir)"
bzip2 -9v "$(distdir)".tar
rm -Rf "$(distdir)"
test -n "$(VERSION)" || { echo "VERSION not set" >&2; exit 1; }
git archive --prefix=$(distdir)/ --format=tar "v$(VERSION)" > $(distdir).tar
rm -f $(distdir).tar.xz
xz $(distdir).tar
scp $(distdir).tar.xz lxnay@dev.gentoo.org:~/public_html/genkernel-next/
.PHONY: clean check-git-repository dist

@ -28,7 +28,12 @@ MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd x
MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse"
# Crypto
MODULES_CRYPTO="sha256_generic cbc aes_generic aes_586 aesni-intel xts"
MODULES_CRYPTO="sha1_generic sha256_generic sha512_generic cbc aes_generic aes-x86_64 xts"
# Backward compatibility with previous releases
MODULES_CRYPT="${MODULES_CRYPTO}"
# Virtio support (KVM mainly)
MODULES_VIRTIO="virtio virtio_balloon virtio_console virtio_net virtio_blk virtio_pci virtio_ring"
# DRM (Plymouth support)
MODULES_PLYMOUTH="uvesafb"

@ -28,7 +28,12 @@ MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd x
MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse"
# Crypto
MODULES_CRYPTO="sha256_generic cbc aes_generic aes-x86_64 aesni-intel xts"
MODULES_CRYPTO="sha1_generic sha256_generic sha512_generic cbc aes_generic aes-x86_64 xts"
# Backward compatibility with previous releases
MODULES_CRYPT="${MODULES_CRYPTO}"
# Virtio support (KVM mainly)
MODULES_VIRTIO="virtio virtio_balloon virtio_console virtio_net virtio_blk virtio_pci virtio_ring"
# DRM (Plymouth support)
MODULES_PLYMOUTH="uvesafb"

@ -77,5 +77,5 @@ DEFAULT_NFSOPTIONS="ro,nolock,rsize=1024,wsize=1024"
# Only sections that are in by default or those that
# are not module groups need to be defined here...
HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan lvm dmraid mdadm fs net'
MY_HWOPTS='modules pata sata scsi usb firewire waitscan dmraid mdadm fs net iscsi crypto plymouth'
HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan lvm dmraid mdadm fs net virtio'
MY_HWOPTS='modules pata sata scsi usb firewire waitscan dmraid mdadm fs net iscsi crypto plymouth virtio'

@ -1,4 +1,4 @@
#!/bin/ash
#!/bin/sh
. /etc/initrd.defaults
@ -196,14 +196,14 @@ findmediamount() {
if [ -b "${x}" ]
then
skip=0
bsn=`basename "${x}"`
bsn=$(basename "${x}")
#
# If disk and it has at least one partition, skip.
# We use /sys/block/${bsn}/${bsn}[0-9]* to make sure that we
# don't skip device mapper devices. Even the craziest scenario
# deserves a fair chance.
#
for part in `ls /sys/block/${bsn}/${bsn}*[0-9]* 2>/dev/null`
for part in $(ls /sys/block/${bsn}/${bsn}*[0-9]* 2>/dev/null)
do
skip=1
break;
@ -282,7 +282,7 @@ bootstrapCD() {
bootstrapKey() {
# $1 = ROOT/SWAP
local KEYDEVS=`devicelist`
local KEYDEVS=$(devicelist)
eval local keyloc='"${CRYPT_'${1}'_KEY}"'
findmediamount "key" "${keyloc}" "CRYPT_${1}_KEYDEV" "/mnt/key" ${KEYDEVS}
@ -328,27 +328,26 @@ mount_sysfs() {
findnfsmount() {
if [ "${IP}" != '' ] || busybox udhcpc -n -T 15 -q
then
[ -e /rootpath ] && NFSROOT=`cat /rootpath`
[ -e /rootpath ] && NFSROOT=$(cat /rootpath)
if [ "${NFSROOT}" = '' ]
then
# Obtain NFSIP
OPTIONS=`busybox dmesg | grep rootserver | sed -e "s/,/ /g"`
OPTIONS=$(busybox dmesg | grep rootserver | sed -e "s/,/ /g")
for OPTION in $OPTIONS
do
if [ `echo $OPTION | sed -e "s/=/ /g" | cut -d " " -f 1` = 'rootserver' ]
if [ $(echo $OPTION | sed -e "s/=/ /g" | cut -d " " -f 1) = 'rootserver' ]
then
NFSIP=`echo $OPTION | sed -e "s/=/ /g" | cut -d " " -f 2`
NFSIP=$(echo $OPTION | sed -e "s/=/ /g" | cut -d " " -f 2)
fi
done
# Obtain NFSPATH
OPTIONS=`busybox dmesg | grep rootpath | sed -e "s/,/ /g"`
OPTIONS=$(busybox dmesg | grep rootpath | sed -e "s/,/ /g")
for OPTION in $OPTIONS
do
if [ `echo $OPTION | sed -e "s/=/ /g" | cut -d " " -f 1` = 'rootpath' ]
if [ $(echo $OPTION | sed -e "s/=/ /g" | cut -d " " -f 1) = 'rootpath' ]
then
NFSPATH=`echo $OPTION | sed -e "s/=/ /g" | cut -d " " -f 2`
NFSPATH=$(echo $OPTION | sed -e "s/=/ /g" | cut -d " " -f 2)
fi
done
@ -408,17 +407,17 @@ find_real_device() {
local retval=1
if [ "${retval}" -ne 0 ]; then
REAL_DEVICE=`findfs "${DEVICE}" 2>/dev/null`
REAL_DEVICE=$(findfs "${DEVICE}" 2>/dev/null)
retval=$?
fi
if [ "$retval" -ne 0 ]; then
REAL_DEVICE=`busybox findfs "${DEVICE}" 2>/dev/null`
REAL_DEVICE=$(busybox findfs "${DEVICE}" 2>/dev/null)
retval=$?
fi
if [ "${retval}" -ne 0 ]; then
REAL_DEVICE=`blkid -o device -l -t "${DEVICE}"`
REAL_DEVICE=$(blkid -o device -l -t "${DEVICE}")
retval=$?
fi
@ -433,11 +432,9 @@ find_real_device() {
check_loop() {
if [ "${LOOP}" = '' -o ! -e "${CDROOT_PATH}/${LOOP}" ]
then
bad_msg "Invalid loop location: ${LOOP}"
bad_msg 'Please export LOOP with a valid location, or reboot and pass a proper loop=...'
bad_msg 'kernel command line!'
run_shell
fi
}
@ -645,7 +642,7 @@ prompt_user(){
bad_msg '- type "q" to skip...'
echo -n "${2}(${oldvalue}) :: "
read ${1}
case `eval echo '$'${1}` in
case $(eval echo '$'${1}) in
'q')
eval ${1}'='${oldvalue}
warn_msg "Skipping step, this will likely cause a boot failure."
@ -677,7 +674,7 @@ cmdline_hwopts() {
MY_HWOPTS="${MY_HWOPTS} $x"
elif [ "${y}" = "no${x}" ]
then
MY_HWOPTS="`echo ${MY_HWOPTS} | sed -e \"s/${x}//g\" -`"
MY_HWOPTS="$(echo ${MY_HWOPTS} | sed -e \"s/${x}//g\" -)"
fi
if [ "$(echo ${y} | cut -b -7)" = "keymap=" ]
then
@ -688,8 +685,7 @@ cmdline_hwopts() {
# Shouldnt need to sort this as the following loop should figure out the
# duplicates and strip them out
#MY_HWOPTS=`echo ${MY_HWOPTS}| sort`
#MY_HWOPTS=$(echo ${MY_HWOPTS}| sort)
for x in ${MY_HWOPTS}
do
FOUND=0
@ -701,7 +697,7 @@ cmdline_hwopts() {
fi
done
TMP_HWOPTS="${TMP_HWOPTS} ${x}"
eval DO_`echo ${x} | sed 's/-//'`=1
eval DO_$(echo ${x} | sed 's/-//')=1
done
MY_HWOPTS=${TMP_HWOPTS}
@ -1005,7 +1001,7 @@ startiscsi() {
# $1 - root/swap
openLUKS() {
# please use 'tr' and this line, or remove it
# eval local TYPE=`uppercase $1`
# eval local TYPE=$(uppercase $1)
case $1 in
root)
@ -1155,9 +1151,7 @@ openLUKS() {
}
startLUKS() {
# if key is set but key device isn't, find it
[ -n "${CRYPT_ROOT_KEY}" ] && [ -z "${CRYPT_ROOT_KEYDEV}" ] \
&& sleep 6 && bootstrapKey "ROOT"
@ -1238,10 +1232,10 @@ setup_md_device() {
[ -z "$1" ] && device="${REAL_ROOT}" || device="$1"
[ -z "${device}" ] && return # LiveCD
if [ `echo ${device}|sed -e 's#\(luks:\)\?\(/dev/md\)[[:digit:]]\+#\2#'` = "/dev/md" ]
if [ $(echo ${device}|sed -e 's#\(luks:\)\?\(/dev/md\)[[:digit:]]\+#\2#') = "/dev/md" ]
then
good_msg 'Detected real_root as a md device. Setting up the device node...'
MD_NUMBER=`echo ${device}|sed -e 's#\(luks:\)\?/dev/md\([[:digit:]]\+\)#\2#'`
MD_NUMBER=$(echo ${device}|sed -e 's#\(luks:\)\?/dev/md\([[:digit:]]\+\)#\2#')
if [ ! -e /dev/md${MD_NUMBER} ]
then
mknod /dev/md${MD_NUMBER} b 9 ${MD_NUMBER} >/dev/null 2>&1

@ -254,13 +254,6 @@ do
aufs)
USE_AUFS_NORMAL=1
;;
*=*)
case "${x%%=*}" in
*.*)
echo "${x#*.}" >> "/etc/module_options/${x%%.*}.conf"
;;
esac
;;
esac
done
@ -539,7 +532,6 @@ do
prompt_user "REAL_ROOT" "root block device"
continue
fi
ROOT_DEV="${REAL_ROOT#*=}"
if [ "${ROOT_DEV}" != 'ZFS' ]
then
@ -571,9 +563,7 @@ do
ROOTFSTYPE=zfs
break
fi
done;
done
else
got_good_root=0
fi
@ -584,7 +574,6 @@ do
prompt_user "REAL_ROOT" "root block device"
got_good_root=0
fi
continue
;;
esac
@ -866,7 +855,7 @@ for fs in $fslist; do
dev=$(get_mount_device $fs)
[ -z "${dev}" ] && continue
# Resolve it like util-linux mount does
[ -L ${dev} ] && dev=`readlink ${dev}`
[ -L ${dev} ] && dev=$(readlink ${dev})
# In this case, it's probably part of the filesystem
# and not a mountpoint
[ -z "$dev" ] && continue

@ -28,7 +28,12 @@ MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd xhci-hcd u
MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse"
# Crypto
MODULES_CRYPTO="sha256_generic cbc aes_generic xts"
MODULES_CRYPTO="sha1_generic sha256_generic sha512_generic cbc aes_generic aes-x86_64 xts"
# Backward compatibility with previous releases
MODULES_CRYPT="${MODULES_CRYPTO}"
# Virtio support (KVM mainly)
MODULES_VIRTIO="virtio virtio_balloon virtio_console virtio_net virtio_blk virtio_pci virtio_ring"
# DRM (Plymouth support)
MODULES_PLYMOUTH="uvesafb"

@ -563,6 +563,7 @@ append_udev() {
"
udev_maybe_files="
/lib/udev/rules.d/99-systemd.rules
/etc/modprobe.d/blacklist.conf
"
is_maybe=0
for f in ${udev_files} -- ${udev_maybe_files}; do
@ -650,41 +651,6 @@ append_modules() {
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
@ -832,8 +798,6 @@ create_initramfs() {
append_data 'plymouth' "${PLYMOUTH}"
append_data 'modprobed'
if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
then
append_data 'firmware'
@ -940,7 +904,6 @@ create_initramfs() {
gzip) compress_ext='.gz' compress_cmd="${cmd_gzip} -f -9" ;;
lzop) compress_ext='.lzo' compress_cmd="${cmd_lzop} -f -9" ;;
esac
if [ -n "${compression}" ]; then
print_info 1 " >> Compressing cpio data (${compress_ext})..."
${compress_cmd} "${CPIO}" || gen_die "Compression (${compress_cmd}) failed"

@ -2,7 +2,7 @@
# $Id$
PATH="${PATH}:/sbin:/usr/sbin"
GK_V='3.4.45'
GK_V='9999'
# Set the default for TMPDIR. May be modified by genkernel.conf or the
# --tempdir command line option.

Loading…
Cancel
Save