diff --git a/dist/sources/tlinux_cciss_link_compat.modules b/dist/sources/tlinux_cciss_link_compat.modules new file mode 100644 index 000000000..442be6a0c --- /dev/null +++ b/dist/sources/tlinux_cciss_link_compat.modules @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ -b /dev/sda -a ! -b /dev/cciss/c0d0 ]; then + mkdir -p /dev/cciss + set -- 0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p + while [ $# -ge 2 ]; do + c=/dev/cciss/c0d$1; shift + s=/dev/sd$1; shift + ln -s ${s} ${c} + ln -s ${s}1 ${c}p1 + ln -s ${s}2 ${c}p2 + ln -s ${s}3 ${c}p3 + ln -s ${s}4 ${c}p4 + done +fi + diff --git a/dist/templates/kernel.template.spec b/dist/templates/kernel.template.spec index 51b9061c8..a904518b8 100644 --- a/dist/templates/kernel.template.spec +++ b/dist/templates/kernel.template.spec @@ -193,6 +193,8 @@ Source30: check-kabi # Start from Source2000 to Source2999, for userspace tools Source2000: cpupower.service Source2001: cpupower.config +# TK4 Legacy CCISS naming rule +Source2002: tlinux_cciss_link_compat.modules ### TK4 Legacy MLNX OFED Source3000: MLNX_OFED_SRC-5.1-2.5.8.0.46.tgz @@ -923,6 +925,11 @@ InstTools() { install -m755 slabinfo %{buildroot}%{_bindir}/slabinfo install -m755 page_owner_sort %{buildroot}%{_bindir}/page_owner_sort popd + +%ifarch x86_64 + mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/modules + install -m755 %{SOURCE2002} %{buildroot}%{_sysconfdir}/sysconfig/modules +%endif # with_tools } @@ -1195,6 +1202,13 @@ fi %ghost /lib/modules/%{kernel_unamer}/modules.symbols.bin %files modules -f modules.list +%ifarch x86_64 +# TK4 Legacy CCISS naming rule +# +# This might be duplicated with tlinux_cciss_link.modules from the old kernel-tlinux package, +# but that's fine since the script itself checks if it's neccessary to re-apply the workaround +%{_sysconfdir}/sysconfig/modules/tlinux_cciss_link_compat.modules +%endif %defattr(-,root,root) %files devel