|
Lines 533-539
Link Here
|
| 533 |
NF == 0 { next } |
533 |
NF == 0 { next } |
| 534 |
$1 in seen { next } |
534 |
$1 in seen { next } |
| 535 |
{ seen[$1]=1 |
535 |
{ seen[$1]=1 |
| 536 |
print |
536 |
# drop module parameters here: modprobe in the initrd |
|
|
537 |
# will pick them up again. |
| 538 |
print $1 |
| 537 |
} |
539 |
} |
| 538 |
' |
540 |
' |
| 539 |
rm -f $temp |
541 |
rm -f $temp |
|
Lines 1170-1175
Link Here
|
| 1170 |
cp_bin $initrd_modprobe $tmp_mnt/sbin/modprobe 2>/dev/null \ |
1172 |
cp_bin $initrd_modprobe $tmp_mnt/sbin/modprobe 2>/dev/null \ |
| 1171 |
|| error 5 "no static modprobe" |
1173 |
|| error 5 "no static modprobe" |
| 1172 |
|
1174 |
|
|
|
1175 |
cp -r $root_dir/etc/modprobe.conf $root_dir/etc/modprobe.conf.local \ |
| 1176 |
$root_dir/etc/modprobe.d $tmp_mnt/etc |
| 1177 |
|
| 1173 |
# SELinux: Binary policy file and load_policy utility for loading it. |
1178 |
# SELinux: Binary policy file and load_policy utility for loading it. |
| 1174 |
if [ -n "$use_selinux" ] ; then |
1179 |
if [ -n "$use_selinux" ] ; then |
| 1175 |
if [ -f /etc/security/selinux/policy.15 -a \ |
1180 |
if [ -f /etc/security/selinux/policy.15 -a \ |
|
Lines 1787-1794
Link Here
|
| 1787 |
# Copy the modules to the initrd |
1792 |
# Copy the modules to the initrd |
| 1788 |
echo -ne "Driver modules:\t" |
1793 |
echo -ne "Driver modules:\t" |
| 1789 |
initrd_is_using_modules= |
1794 |
initrd_is_using_modules= |
| 1790 |
while read module params ; do |
1795 |
for module in $drv_modules; do |
| 1791 |
[ -z "$module" ] && continue |
|
|
| 1792 |
echo -n "${module#lib/modules/$kernel_version/} " |
1796 |
echo -n "${module#lib/modules/$kernel_version/} " |
| 1793 |
if [ ! -r $root_dir/$module ]; then |
1797 |
if [ ! -r $root_dir/$module ]; then |
| 1794 |
oops 9 "Module $module not found." |
1798 |
oops 9 "Module $module not found." |
|
Lines 1799-1804
Link Here
|
| 1799 |
return |
1803 |
return |
| 1800 |
fi |
1804 |
fi |
| 1801 |
|
1805 |
|
|
|
1806 |
cat_linuxrc <<-EOF |
| 1807 |
|params= |
| 1808 |
|for p in \$(cat /proc/cmdline) ; do |
| 1809 |
| case \$p in |
| 1810 |
| $module.*) |
| 1811 |
| params="\$params \${p#$module.}" |
| 1812 |
| ;; |
| 1813 |
| esac |
| 1814 |
|done |
| 1815 |
EOF |
| 1816 |
|
| 1802 |
case "$module" in |
1817 |
case "$module" in |
| 1803 |
*/dasd_mod.*) |
1818 |
*/dasd_mod.*) |
| 1804 |
# kernel cmdline dasd parameter is placed into the environment. |
1819 |
# kernel cmdline dasd parameter is placed into the environment. |
|
Lines 1815-1827
Link Here
|
| 1815 |
|for p in \$(cat /proc/cmdline) ; do |
1830 |
|for p in \$(cat /proc/cmdline) ; do |
| 1816 |
| case \$p in |
1831 |
| case \$p in |
| 1817 |
| dasd=*) |
1832 |
| dasd=*) |
| 1818 |
| dasd_params="\$p" |
1833 |
| params="\$params \$p" |
| 1819 |
| ;; |
1834 |
| ;; |
| 1820 |
| esac |
1835 |
| esac |
| 1821 |
|done |
1836 |
|done |
| 1822 |
|mp="/$module\${dasd_params:+ dasd=\"\$dasd_params\"}" |
|
|
| 1823 |
|echo "Loading \${mp#/lib/modules/$kernel_version/}" |
| 1824 |
|insmod \$mp |
| 1825 |
EOF |
1837 |
EOF |
| 1826 |
;; |
1838 |
;; |
| 1827 |
*/ide?core.*) |
1839 |
*/ide?core.*) |
|
Lines 1838-1846
Link Here
|
| 1838 |
| ;; |
1850 |
| ;; |
| 1839 |
| esac |
1851 |
| esac |
| 1840 |
|done |
1852 |
|done |
| 1841 |
|mp="/$module\${ide_params:+ options=\"\$ide_params\"}" |
1853 |
|if [ -n "\$ide_params" ]; then |
| 1842 |
|echo "Loading \${mp#/lib/modules/$kernel_version/}" |
1854 |
| params="\$params options=\"\$ide_params\"" |
| 1843 |
|insmod \$mp |
1855 |
|fi |
| 1844 |
EOF |
1856 |
EOF |
| 1845 |
;; |
1857 |
;; |
| 1846 |
*/scsi_mod*) |
1858 |
*/scsi_mod*) |
|
Lines 1854-1860
Link Here
|
| 1854 |
|for p in \$(cat /proc/cmdline) ; do |
1866 |
|for p in \$(cat /proc/cmdline) ; do |
| 1855 |
| case \$p in |
1867 |
| case \$p in |
| 1856 |
| scsi_mod.*) |
1868 |
| scsi_mod.*) |
| 1857 |
| extra_scsi_params="\$extra_scsi_params \${p#scsi_mod.}" |
1869 |
| params="\$params \${p#scsi_mod.}" |
| 1858 |
| ;; |
1870 |
| ;; |
| 1859 |
| scsi_reportlun2=1) |
1871 |
| scsi_reportlun2=1) |
| 1860 |
| echo "scsi_reportlun2 compat: Use scsi_mod.default_dev_flags=0x20000 instead" |
1872 |
| echo "scsi_reportlun2 compat: Use scsi_mod.default_dev_flags=0x20000 instead" |
|
Lines 1886-1914
Link Here
|
| 1886 |
| ;; |
1898 |
| ;; |
| 1887 |
| max_luns=*|max_report_luns=*|inq_timeout=*|dev_flags=*|default_dev_flags=*) |
1899 |
| max_luns=*|max_report_luns=*|inq_timeout=*|dev_flags=*|default_dev_flags=*) |
| 1888 |
| echo "scsi_mod compat: Please use prefix: scsi_mod.\$p" |
1900 |
| echo "scsi_mod compat: Please use prefix: scsi_mod.\$p" |
| 1889 |
| extra_scsi_params="\$extra_scsi_params \$p" |
1901 |
| params="\$params \$p" |
| 1890 |
| ;; |
1902 |
| ;; |
| 1891 |
| esac |
1903 |
| esac |
| 1892 |
|done |
1904 |
|done |
| 1893 |
|if [ \$devflags != 0 ]; then |
1905 |
|if [ \$devflags != 0 ]; then |
| 1894 |
| extra_scsi_params="default_dev_flags=\$devflags \$extra_scsi_params" |
1906 |
| params="default_dev_flags=\$devflags \$params" |
| 1895 |
|fi |
1907 |
|fi |
| 1896 |
|mp="/$module\${extra_scsi_params:+ $extra_scsi_params}" |
|
|
| 1897 |
|echo "Loading \${mp#/lib/modules/$kernel_version/}" |
| 1898 |
|insmod \$mp |
| 1899 |
EOF |
| 1900 |
;; |
| 1901 |
*) |
| 1902 |
mp="/$module${params:+ $params}" |
| 1903 |
cat_linuxrc <<-EOF |
| 1904 |
|echo "Loading ${mp#/lib/modules/$kernel_version/}" |
| 1905 |
|insmod $mp |
| 1906 |
EOF |
1908 |
EOF |
| 1907 |
;; |
1909 |
;; |
| 1908 |
esac |
1910 |
esac |
|
|
1911 |
module_basename=${module##*/} |
| 1912 |
cat_linuxrc <<-EOF |
| 1913 |
|echo "Loading ${module_basename%.ko}" |
| 1914 |
|modprobe ${module_basename%.ko} \$params |
| 1915 |
EOF |
| 1909 |
|
1916 |
|
| 1910 |
initrd_is_using_modules=1 |
1917 |
initrd_is_using_modules=1 |
| 1911 |
done < <(echo "$drv_modules") |
1918 |
done |
| 1912 |
echo |
1919 |
echo |
| 1913 |
|
1920 |
|
| 1914 |
if [ -z "$initrd_is_using_modules" ]; then |
1921 |
if [ -z "$initrd_is_using_modules" ]; then |
|
Lines 1925-1938
Link Here
|
| 1925 |
uld_modules="$(resolve_modules $kernel_version $uld_modules)" |
1932 |
uld_modules="$(resolve_modules $kernel_version $uld_modules)" |
| 1926 |
|
1933 |
|
| 1927 |
# Now copy the upper level driver modules |
1934 |
# Now copy the upper level driver modules |
| 1928 |
while read module params ; do |
1935 |
for module in $uld_modules; do |
| 1929 |
if [ ! -f $tmp_mnt/$module ]; then |
1936 |
if [ ! -f $tmp_mnt/$module ]; then |
| 1930 |
if ! ( cd ${root_dir:-/} ; cp -p --parents $module $tmp_mnt ) ; then |
1937 |
if ! ( cd ${root_dir:-/} ; cp -p --parents $module $tmp_mnt ) ; then |
| 1931 |
oops 6 "Failed to add module $module." |
1938 |
oops 6 "Failed to add module $module." |
| 1932 |
return |
1939 |
return |
| 1933 |
fi |
1940 |
fi |
| 1934 |
fi |
1941 |
fi |
| 1935 |
done < <(echo "$uld_modules") |
1942 |
done |
| 1936 |
|
1943 |
|
| 1937 |
if [ -n "$s390_dasd_disks" ]; then |
1944 |
if [ -n "$s390_dasd_disks" ]; then |
| 1938 |
# We only need to activate DASDs manually if it |
1945 |
# We only need to activate DASDs manually if it |
|
Lines 2283-2290
Link Here
|
| 2283 |
# Load fs modules _after_ resume |
2290 |
# Load fs modules _after_ resume |
| 2284 |
echo -ne "Filesystem modules:\t" |
2291 |
echo -ne "Filesystem modules:\t" |
| 2285 |
initrd_is_using_modules= |
2292 |
initrd_is_using_modules= |
| 2286 |
while read module params ; do |
2293 |
for module in $fs_modules; do |
| 2287 |
[ -z "$module" ] && continue |
|
|
| 2288 |
echo -n "${module#lib/modules/$kernel_version/} " |
2294 |
echo -n "${module#lib/modules/$kernel_version/} " |
| 2289 |
if [ ! -r $root_dir/$module ]; then |
2295 |
if [ ! -r $root_dir/$module ]; then |
| 2290 |
oops 9 "Module $module not found." |
2296 |
oops 9 "Module $module not found." |
|
Lines 2295-2307
Link Here
|
| 2295 |
return |
2301 |
return |
| 2296 |
fi |
2302 |
fi |
| 2297 |
|
2303 |
|
| 2298 |
mp="/$module${params:+ $params}" |
|
|
| 2299 |
cat_linuxrc <<-EOF |
2304 |
cat_linuxrc <<-EOF |
| 2300 |
|echo "Loading ${mp#/lib/modules/$kernel_version/}" |
2305 |
|echo "Loading ${module#/lib/modules/$kernel_version/}" |
| 2301 |
|insmod $mp |
2306 |
|modprobe $module |
| 2302 |
EOF |
2307 |
EOF |
| 2303 |
initrd_is_using_modules=1 |
2308 |
initrd_is_using_modules=1 |
| 2304 |
done < <(echo "$fs_modules") |
2309 |
done |
| 2305 |
echo |
2310 |
echo |
| 2306 |
|
2311 |
|
| 2307 |
# And run depmod to ensure proper loading |
2312 |
# And run depmod to ensure proper loading |