|
Harald Hoyer |
b94732 |
From 442abd16d2cfc6e006738a7373dc14445d22448f Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
b94732 |
From: Hannes Reinecke <hare@suse.de>
|
|
Harald Hoyer |
b94732 |
Date: Thu, 11 Dec 2014 15:45:57 +0100
|
|
Harald Hoyer |
b94732 |
Subject: [PATCH] 95iscsi: Autodetect iSCSI firmware
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
Some iSCSI initiator present firmware information in
|
|
Harald Hoyer |
b94732 |
/sys/firmware/ibft or /sys/firmware/iscsi_bootX
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
Whenever we detect one of those directories we should assume
|
|
Harald Hoyer |
b94732 |
that the iSCSI devices should be activated.
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
Also incorporates SUSE patches:
|
|
Harald Hoyer |
b94732 |
0049:
|
|
Harald Hoyer |
b94732 |
95iscsi: Use 'ip=ibft' for ibft autoconfiguration
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
For iBFT autoconfiguration we should be setting 'ip=ibft'
|
|
Harald Hoyer |
b94732 |
instead of rd.neednet. This should instruct dracut to only
|
|
Harald Hoyer |
b94732 |
enable the iBFT interfaces and leave the rest alone.
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
References: bnc#879038
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
0054:
|
|
Harald Hoyer |
b94732 |
95iscsi: update commandline printing
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
dracut has a separate callout 'cmdline' which should be used
|
|
Harald Hoyer |
b94732 |
for printing out the generated commandline.
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
Signed-off-by: Pavel Wieczorkiewicz <pwieczorkiewicz@suse.com>
|
|
Harald Hoyer |
b94732 |
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
Harald Hoyer |
b94732 |
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
Harald Hoyer |
b94732 |
---
|
|
Harald Hoyer |
b94732 |
modules.d/95iscsi/module-setup.sh | 26 ++++++++++++++++++++++++++
|
|
Harald Hoyer |
b94732 |
1 file changed, 26 insertions(+)
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
|
Harald Hoyer |
b94732 |
index 8b42d3e..5d2a39b 100755
|
|
Harald Hoyer |
b94732 |
--- a/modules.d/95iscsi/module-setup.sh
|
|
Harald Hoyer |
b94732 |
+++ b/modules.d/95iscsi/module-setup.sh
|
|
Harald Hoyer |
b94732 |
@@ -28,6 +28,21 @@ check() {
|
|
Harald Hoyer |
b94732 |
return 0
|
|
Harald Hoyer |
b94732 |
}
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
+install_ibft() {
|
|
Harald Hoyer |
b94732 |
+ # When iBFT / iscsi_boot is detected:
|
|
Harald Hoyer |
b94732 |
+ # - Use 'ip=ibft' to set up iBFT network interface
|
|
Harald Hoyer |
b94732 |
+ # - specify firmware booting cmdline parameter
|
|
Harald Hoyer |
b94732 |
+
|
|
Harald Hoyer |
b94732 |
+ for d in /sys/firmware/* ; do
|
|
Harald Hoyer |
b94732 |
+ if [ -d ${d}/initiator ] ; then
|
|
Harald Hoyer |
b94732 |
+ if [ ${d##*/} = "ibft" ] ; then
|
|
Harald Hoyer |
b94732 |
+ echo -n "ip=ibft "
|
|
Harald Hoyer |
b94732 |
+ fi
|
|
Harald Hoyer |
b94732 |
+ echo -n "rd.iscsi.firmware=1"
|
|
Harald Hoyer |
b94732 |
+ fi
|
|
Harald Hoyer |
b94732 |
+ done
|
|
Harald Hoyer |
b94732 |
+}
|
|
Harald Hoyer |
b94732 |
+
|
|
Harald Hoyer |
b94732 |
# called by dracut
|
|
Harald Hoyer |
b94732 |
depends() {
|
|
Harald Hoyer |
b94732 |
echo network rootfs-block
|
|
Harald Hoyer |
b94732 |
@@ -37,6 +52,12 @@ depends() {
|
|
Harald Hoyer |
b94732 |
installkernel() {
|
|
Harald Hoyer |
b94732 |
local _arch=$(uname -m)
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
+ # Detect iBFT and perform mandatory steps
|
|
Harald Hoyer |
b94732 |
+ if [[ $hostonly_cmdline == "yes" ]] ; then
|
|
Harald Hoyer |
b94732 |
+ install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf"
|
|
Harald Hoyer |
b94732 |
+ echo >> "${initdir}/etc/cmdline.d/95iscsi.conf"
|
|
Harald Hoyer |
b94732 |
+ fi
|
|
Harald Hoyer |
b94732 |
+
|
|
Harald Hoyer |
b94732 |
instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi
|
|
Harald Hoyer |
b94732 |
hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs
|
|
Harald Hoyer |
b94732 |
iscsi_module_filter() {
|
|
Harald Hoyer |
b94732 |
@@ -77,6 +98,11 @@ installkernel() {
|
|
Harald Hoyer |
b94732 |
}
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
# called by dracut
|
|
Harald Hoyer |
b94732 |
+cmdline() {
|
|
Harald Hoyer |
b94732 |
+ install_ibft
|
|
Harald Hoyer |
b94732 |
+}
|
|
Harald Hoyer |
b94732 |
+
|
|
Harald Hoyer |
b94732 |
+# called by dracut
|
|
Harald Hoyer |
b94732 |
install() {
|
|
Harald Hoyer |
b94732 |
inst_multiple umount iscsistart hostname iscsi-iname
|
|
Harald Hoyer |
b94732 |
inst_multiple -o iscsiuio
|