summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-09-23 14:58:03 -1000
committerChris Lumens <clumens@redhat.com>2009-09-24 10:06:27 -0400
commitadbfcfb7602dee546786504b757f4eabc0653a3c (patch)
tree8a23a60e218e9f75a559aa91ed7bf9742ee55308 /scripts
parent5fbc399747bf79a00ea3d0a4c06d558b04873db0 (diff)
downloadanaconda-adbfcfb7602dee546786504b757f4eabc0653a3c.tar.gz
anaconda-adbfcfb7602dee546786504b757f4eabc0653a3c.tar.xz
anaconda-adbfcfb7602dee546786504b757f4eabc0653a3c.zip
Simplify s390x module list generation.
Only pull in kernel modules in kernel/drivers/s390 as well as libiscsi_tcp. The mk-images script takes care of dependency resolution and regenerating the modules.dep file.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mk-images.s39053
1 files changed, 3 insertions, 50 deletions
diff --git a/scripts/mk-images.s390 b/scripts/mk-images.s390
index 308afcfba..50d0f8d66 100644
--- a/scripts/mk-images.s390
+++ b/scripts/mk-images.s390
@@ -23,60 +23,13 @@ getAllS390ModuleNames() {
find ${s390dir} -type f -name "*.ko" | while read line ; do
echo "$(basename ${line} .ko)"
done | sort | uniq | tr '\n' ' '
+ else
+ echo "*** ERROR: ${s390dir} is missing, this tree probably won't have a working initrd.img" >&2
fi
}
-collectModuleNames() {
- grep -v "^#" ${KERNELROOT}/lib/modules/${version}/modules.${1} | \
- cut -d ' ' -f 1 | sort | uniq | \
- sed -e 's|\.ko$||g' | \
- tr '\n' ' '
-}
-
-expandModuleDeps() {
- MODS="$*"
- DEPS=
-
- DEPSFILE="$(mktemp ${TMPDIR:-/tmp}/moduledeps.XXXXXX)"
- echo "${MODS}" | tr ' ' '\n' > "${DEPSFILE}"
-
- cd ${KERNELROOT}
-
- while [ true ]; do
- beforeCount="$(wc -l "${DEPSFILE}" | cut -d ' ' -f 1)"
-
- while read module ; do
- modulePath="$(find ${KERNELROOT}/lib/modules/${version} -name "${module}.ko")"
- if [ -z "${modulePath}" ]; then
- echo "ERROR: Missing ${module}.ko on s390" >&2
- continue
- fi
-
- deps="$(modinfo -F depends ${modulePath})"
-
- if [ ! -z "${deps}" ]; then
- echo "${deps}" | tr ',' '\n' >> ${DEPSFILE}
- fi
- done < "${DEPSFILE}"
-
- sort "${DEPSFILE}" | uniq > "${DEPSFILE}.new"
- mv "${DEPSFILE}.new" "${DEPSFILE}"
- afterCount="$(wc -l "${DEPSFILE}" | cut -d ' ' -f 1)"
-
- if [ ${beforeCount} -eq ${afterCount} ]; then
- break
- fi
- done
-
- cat "${DEPSFILE}" | tr '\n' ' '
- rm -f "${DEPSFILE}"
-}
-
S390BASEMODS="$(getAllS390ModuleNames)"
-S390CCWMODS="$(collectModuleNames ccwmap)"
-S390BLOCKMODS="$(collectModuleNames block)"
-S390NETMODS="$(collectModuleNames networking)"
-S390MODS="$(expandModuleDeps $S390BASEMODS $S390CCWMODS $S390BLOCKMODS $S390NETMODS)"
+S390MODS="$S390BASEMODS libiscsi_tcp"
makeBootImages() {
makeinitrd --initrdto $TOPDESTPATH/images/initrd.img \