[arch-projects] [mkinitcpio][PATCH 0/3] patch resends
Patches 1 and 2 are a rework of early patches that address concerns Thomas had. The third patch is a change similar to patch 2 which loads all earlymodules= at once, instead of looping. I don't notice any difference in runtime for early userspace with the binary depmod files, but this definitely has an impact. dave
We can condense this logic into a loop as well, which cuts back on repetative code. Signed-off-by: Dave Reisner <d@falconindy.com> --- mkinitcpio | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mkinitcpio b/mkinitcpio index 0ebf7c9..c6428bb 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -275,9 +275,9 @@ if [ "${HAS_MODULES}" = "y" ]; then install -m 644 -D "${BASEDIR}${mod}" "${TMPDIR}${mod}" done /sbin/depmod -b ${TMPDIR} ${KERNELVERSION} - add_file "${TMPDIR}/lib/modules/${KERNELVERSION}/modules.dep" "/lib/modules/${KERNELVERSION}/modules.dep" - add_file "${TMPDIR}/lib/modules/${KERNELVERSION}/modules.alias" "/lib/modules/${KERNELVERSION}/modules.alias" - add_file "${TMPDIR}/lib/modules/${KERNELVERSION}/modules.symbols" "/lib/modules/${KERNELVERSION}/modules.symbols" + for dmfile in modules.{dep,alias,symbols}.bin; do + add_file "${TMPDIR}/lib/modules/${KERNELVERSION}/$dmfile" "/lib/modules/${KERNELVERSION}/$dmfile" + done fi status=0 -- 1.7.5.4
This is no longer supported, as m-i-t supports modprobe.blacklist= syntax on the kernel cmdline. We load all modules from the config at once with --all and --use-blacklist flags in order to honor the cmdline blacklisting. Signed-off-by: Dave Reisner <d@falconindy.com> --- init | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/init b/init index a99940a..f63cbaf 100644 --- a/init +++ b/init @@ -45,12 +45,6 @@ if [ -n "${disablehooks}" ]; then done fi -if [ -n "${disablemodules}" ]; then - for d in $(echo "${disablemodules}" | sed 's|,| |g'); do - eval "mod_${d}=disabled" - done -fi - if [ -n "${earlymodules}" ]; then for m in $(echo "${earlymodules}" | sed 's|,| |g'); do /sbin/modprobe -q ${m} > /dev/null 2>&1 @@ -59,13 +53,7 @@ fi . /config -for m in ${MODULES}; do - TST="" - eval "TST=\$mod_${m}" - if [ "${TST}" != "disabled" ]; then - /sbin/modprobe -q ${m} > /dev/null 2>&1 - fi -done +/sbin/modprobe -qab $MODULES # If rootdelay is empty or not a non-negative integer, set it to 10 if [ -z "${rootdelay}" ] || ! [ "${rootdelay}" -ge 0 ]; then -- 1.7.5.4
Signed-off-by: Dave Reisner <d@falconindy.com> --- init | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/init b/init index f63cbaf..1f6bc4e 100644 --- a/init +++ b/init @@ -46,9 +46,7 @@ if [ -n "${disablehooks}" ]; then fi if [ -n "${earlymodules}" ]; then - for m in $(echo "${earlymodules}" | sed 's|,| |g'); do - /sbin/modprobe -q ${m} > /dev/null 2>&1 - done + /sbin/modprobe -qab ${earlymodules//,/ } fi . /config -- 1.7.5.4
participants (1)
-
Dave Reisner