Mailinglist Archive: opensuse-commit (1187 mails)

< Previous Next >
commit mkinitrd
  • From: root@xxxxxxx (h_root)
  • Date: Tue, 4 Apr 2006 18:21:43 +0200 (CEST)
  • Message-id: <20060404162143.C222B8BDF9@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package mkinitrd
checked in at Tue Apr 4 18:21:43 CEST 2006.

--------
--- mkinitrd/mkinitrd.changes 2006-03-23 12:08:07.000000000 +0100
+++ mkinitrd/mkinitrd.changes 2006-04-04 15:44:51.000000000 +0200
@@ -1,0 +2,11 @@
+Tue Apr 4 15:43:05 CEST 2006 - garloff@xxxxxxx
+
+- Put DOMU_INITRD_MODULES into xen initrds and load them rather
+ than driver_modules in a Xen domU.
+
+-------------------------------------------------------------------
+Fri Mar 31 09:13:31 CEST 2006 - hare@xxxxxxx
+
+- Get splash sizes from framebuffer, too (#141098)
+
+-------------------------------------------------------------------

New:
----
Makefile

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mkinitrd.spec ++++++
--- /var/tmp/diff_new_pack.AeLaa4/_old 2006-04-04 18:21:32.000000000 +0200
+++ /var/tmp/diff_new_pack.AeLaa4/_new 2006-04-04 18:21:32.000000000 +0200
@@ -18,7 +18,7 @@
# bootsplash required only if creating splash initrd's.
Autoreqprov: on
Version: 1.2
-Release: 80
+Release: 82
Summary: Creates an Initial RAM Disk Image for Preloading Modules
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: mkinitrd
@@ -85,6 +85,11 @@
%doc %{_mandir}/man8/mkinitrd.8.gz

%changelog -n mkinitrd
+* Tue Apr 04 2006 - garloff@xxxxxxx
+- Put DOMU_INITRD_MODULES into xen initrds and load them rather
+ than driver_modules in a Xen domU.
+* Fri Mar 31 2006 - hare@xxxxxxx
+- Get splash sizes from framebuffer, too (#141098)
* Thu Mar 23 2006 - hare@xxxxxxx
- Always check for mounted /proc and /sys (#151879)
* Wed Mar 22 2006 - hare@xxxxxxx




++++++ mkinitrd ++++++
--- mkinitrd/mkinitrd 2006-03-23 12:08:04.000000000 +0100
+++ mkinitrd/mkinitrd 2006-04-04 15:44:51.000000000 +0200
@@ -23,7 +23,7 @@
# This file is kept in the following CVS repository:
#
# $Source: /suse/yast2/cvsroot/mkinitrd/mkinitrd,v $
-# $Revision: 1.270 $
+# $Revision: 1.272 $

usage() {
cat<<EOF
@@ -45,6 +45,9 @@
all kernels found in /boot.
-m "module list" Modules to include in initrd. Defaults to the
INITRD_MODULES variable in /etc/sysconfig/kernel.
+ -u "DomU module list" Modules to include in initrd. Defaults to
+ the DOMU_INITRD_MODULES variable in
+ /etc/sysconfig/kernel.
-f "feature list" Features to be enabled when generating initrd.
Available features are:
iscsi, md, mpath, lvm, lvm2, evms
@@ -132,6 +135,8 @@
initrd_images=
modules=
modules_set=
+domu_modules=
+domu_modules_set=
feature_list=
boot_dir=
splash="auto"
@@ -196,6 +201,9 @@
m) modules=$OPTARG
modules_set=1
;;
+ u) domu_modules=$OPTARG
+ domu_modules_set=1
+ ;;
b) boot_dir=$OPTARG
;;
d) rootdev=$OPTARG
@@ -345,6 +353,13 @@
eval splash_size_$size=1 ;;
esac
done
+ # Get current modes from fb
+ for fb in /sys/class/graphics/fb* ; do
+ if [ -d $fb ] ; then
+ size=$(sed -ne 's/,/x/p' $fb/virtual_size)
+ eval splash_size_$size=1
+ fi
+ done
splashsizes="$(for x in ${!splash_size_*}; do
echo ${x#splash_size_}
done)"
@@ -411,6 +426,20 @@
echo "$@" >&2
}

+is_xen_kernel() {
+ local kversion=$1
+ local cfg
+
+ for cfg in ${root_dir}/boot/config-$kversion $root_dir/lib/modules/$kversion/build/.config
+ do
+ test -r $cfg || continue
+ grep -q "^CONFIG_XEN=y\$" $cfg
+ return
+ done
+ test $kversion != "${kversion%-xen*}"
+ return
+}
+
# Check if module $1 is listed in $modules.
has_module() {
case " $modules " in
@@ -1117,7 +1146,7 @@
local need_mdadm
local need_mdconf
local -a features
- local fs_modules drv_modules uld_modules
+ local fs_modules drv_modules uld_modules xen_modules

tmp_mnt=$work_dir/mnt
tmp_mnt_small=${tmp_mnt}_small
@@ -1778,8 +1807,12 @@
resolved_modules="$(resolve_modules $kernel_version $modules)"
fi

+ if is_xen_kernel $kernel_version; then
+ xenu_modules="$(resolve_modules $kernel_version $domu_modules)"
+ fi
+
# Copy all modules into the initrd
- for module in $resolved_modules; do
+ for module in $resolved_modules $xenu_modules; do
if [ ! -r $root_dir/$module ]; then
oops 9 "Module $module not found."
continue
@@ -1818,6 +1851,8 @@
for module in $resolved_modules; do
if [ "$module" != "${module#*/kernel/fs/}" ]; then
fs_modules="$fs_modules $module"
+ elif is_xen_kernel $kernel_version && [ "$module" != "${module#*/kernel/drivers/xen/*/xen}" ]; then
+ xen_modules="$xen_modules $module"
else
drv_modules="$drv_modules $module"
fi
@@ -1827,6 +1862,16 @@

echo -ne "Driver modules:\t"
initrd_is_using_modules=
+
+ if is_xen_kernel $kernel_version; then
+ # NOTE: We use the same settings as the dom0 initrd, except
+ # for the different module list. So we share fsck, dm, ... support.
+ cat_linuxrc <<-EOF
+ |caps="\$(</proc/xen/capabilities)"
+ |if [ "\$caps" != "\${caps%control_d*}" ]; then
+ EOF
+ fi
+
for modpath in $drv_modules; do
module=${modpath##*/}
module=${module%.ko}
@@ -1943,10 +1988,42 @@

initrd_is_using_modules=1
done
- echo
+
+ if is_xen_kernel $kernel_version; then
+ cat_linuxrc <<-EOF
+ |else
+ EOF
+ echo -ne "\nXen domU modules:\t"
+
+ for modpath in $xenu_modules $xen_modules; do
+ module=${modpath##*/}
+ module=${module%.ko}
+ echo -n "${module} "
+ cat_linuxrc <<-EOF
+ |params=
+ |for p in \$(cat /proc/cmdline) ; do
+ | case \$p in
+ | $module.*)
+ | params="\$params \${p#$module.}"
+ | ;;
+ | esac
+ |done
+ |echo "Loading $module"
+ |modprobe $module \$params
+ EOF
+
+ initrd_is_using_modules=1
+ done
+
+ cat_linuxrc <<-EOF
+ |fi
+ EOF
+ fi

if [ -z "$initrd_is_using_modules" ]; then
echo "none"
+ else
+ echo
fi

if [ -n "$s390_dasd_disks" ]; then
@@ -2866,6 +2943,12 @@
modules="$INITRD_MODULES"
fi

+if [ -z "$domu_modules_set" ]; then
+ # get DOMU_INITRD_MODULES from system configuration
+ . $root_dir/etc/sysconfig/kernel
+ domu_modules="$DOMU_INITRD_MODULES"
+fi
+
###################################################################
# add modules required by features
if [ -n "$root_lvm" ] ; then
@@ -2956,7 +3039,7 @@
kernel_images=( $kernel_images )

boot_modules="$modules"
-echo -e "Module list:\t$boot_modules"
+echo -e "Module list:\t$boot_modules ($domu_modules)"
for ((i=0 ; $i<${#kernel_images[@]} ; i++)); do
echo
modules="$boot_modules"





++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...


< Previous Next >