ref: 9f33719a3e25c2e1d3472c982bd6830dd6d2f209
parent: 59204d36985de5ba2444d5f3e0d50a119287ec51
author: Tuan Hoang <tmhoang@linux.ibm.com>
date: Fri Aug 21 12:58:03 CDT 2020
mkinitfs: add zFCP SCSI device as root disk on s390x Similar to DASD and QETH devices. Example of kernel argument for 2 device paths: zfcp=0.0.1905:0x50050763070845e3:0x4082400400000000,0.0.1945:0x50050763071845e3:0x4082400400000000 Each device path is separated by a comma (,). Adapter bus ID and WWPNs and LUNs are separated by a colon (:). Since Alpine has the advantage of using root=UUID= for root disk, device order and device naming don't matter.
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,7 @@
features.d/zfs.modules \
features.d/qeth.modules \
features.d/dasd_mod.modules \
+ features.d/zfcp.modules \
features.d/dhcp.files \
features.d/https.files
MAN_FILES := mkinitfs.1 mkinitfs-bootparam.7 nlplug-findfs.1
@@ -82,7 +83,7 @@
DEFAULT_FEATURES ?= ata base cdrom ext4 keymap kms mmc raid scsi usb virtio
ifeq ($(shell uname -m), s390x)
-DEFAULT_FEATURES += qeth dasd_mod
+DEFAULT_FEATURES += qeth dasd_mod zfcp
endif
--- /dev/null
+++ b/features.d/zfcp.modules
@@ -1,0 +1,1 @@
+kernel/drivers/s390/scsi/zfcp*
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -334,7 +334,7 @@
cryptdiscards cryptkey debug_init dma init init_args keep_apk_new modules ovl_dev
pkgs quiet root_size root usbdelay ip alpine_repo apkovl alpine_start splash
blacklist overlaytmpfs rootfstype rootflags nbd resume s390x_net dasd ssh_key
- BOOTIF"
+ BOOTIF zfcp"
for opt; do
case "$opt" in
@@ -399,6 +399,13 @@
do_networking=true
else
do_networking=false
+fi
+
+if [ -n "$KOPT_zfcp" ]; then
+ modprobe zfcp
+ for _zfcp in $(echo "$KOPT_zfcp" | tr ',' ' ' | tr [A-Z] [a-z]); do
+ echo 1 > /sys/bus/ccw/devices/"${_zfcp%%:*}"/online
+ done
fi
if [ -n "$KOPT_dasd" ]; then
--- a/mkinitfs-bootparam.7.in
+++ b/mkinitfs-bootparam.7.in
@@ -44,6 +44,9 @@
\fBdasd\fR
Enable DASD devices on S/390x architectures.
.TP
+\fBzfcp\fR
+Enable zFCP SCSI devices on S/390x architectures.
+.TP
\fBdebug_init\fR
Print debug information during boot.
.TP