nounionfs)
USE_UNIONFS_NORMAL=0
;;
- ## for "module.param[=val]" we creating
- ## /etc/modprobe.d/module.param.conf: "options module param[=val]"
- ## /etc/cmdline/module.param:"param[=val]"
- ## first for CONFIG_MODPROBE_SMALL=n, next for script modprobe
*=*)
case "${x%%=*}" in
*.*)
- y="${x%%[=/]*}"
- echo "options ${x%%.*} ${x#*.}" >"/etc/modprobe.d/$y.conf"
- echo "${x#*.}" >"/etc/cmdline/$y"
+ echo "${x#*.}" >> "/etc/module_options/${x%%.*}.conf"
;;
esac
;;
- *.*)
- echo "options ${x%%.*} ${x#*.}" >"/etc/modprobe.d/${x%%/*}.conf"
- echo "${x#*.}" >"/etc/cmdline/${x%%/*}"
- ;;
esac
done
done
# placing options into x
x="${real_path##*/}"
- x="`cat "/etc/cmdline/${x%.ko*}".* 2>/dev/null`"
+ x="`cat "/etc/module_options/${x%.ko*}".* 2>/dev/null`"
${INSMOD} ${real_path} ${x} > /dev/null 2>&1
ret=$?
if [ ${ret} -eq 0 ]
*--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.
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"
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
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
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}"`
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
append_data 'splash' "${SPLASH}"
+ append_data 'modprobed'
+
if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
then
append_data 'firmware'