diff --git a/s390-tools-sles15sp6-01-parse-ipl-device-for-activation.patch b/s390-tools-sles15sp6-01-parse-ipl-device-for-activation.patch new file mode 100644 index 0000000..d24d338 --- /dev/null +++ b/s390-tools-sles15sp6-01-parse-ipl-device-for-activation.patch @@ -0,0 +1,100 @@ +From af44e01f471a3b64c8f33c5e4be359e3c83f56f2 Mon Sep 17 00:00:00 2001 +From: Thomas Blume +Date: Thu, 28 Mar 2024 13:32:46 +0100 +Subject: [PATCH] parse ipl device for activation + +ported from dracut modules +--- + zdev/dracut/95zdev/parse-dasd.sh | 13 +++++++-- + zdev/dracut/95zdev/parse-zfcp.sh | 50 ++++++++++++++++++++------------ + 2 files changed, 42 insertions(+), 21 deletions(-) + +diff --git a/zdev/dracut/95zdev/parse-dasd.sh b/zdev/dracut/95zdev/parse-dasd.sh +index a97801f..55a2d01 100644 +--- a/zdev/dracut/95zdev/parse-dasd.sh ++++ b/zdev/dracut/95zdev/parse-dasd.sh +@@ -27,9 +27,16 @@ zdev_vinfo() { + + zdev_parse_rd_dasd() { + local _zdev_dasd _zdev_dasd_list +- for _zdev_dasd in $(getargs rd.dasd -d 'rd_DASD='); do +- _zdev_dasd_list="${_zdev_dasd_list:+${_zdev_dasd_list},}$_zdev_dasd" +- done ++ # autodetect active bootdev from zipl device ++ if ! getargbool 0 'rd.dasd' \ ++ && [[ -f /sys/firmware/ipl/ipl_type ]] \ ++ && [[ $(< /sys/firmware/ipl/ipl_type) == "ccw" ]]; then ++ _zdev_dasd_list="$(< /sys/firmware/ipl/device)" ++ else ++ for _zdev_dasd in $(getargs rd.dasd -d 'rd_DASD='); do ++ _zdev_dasd_list="${_zdev_dasd_list:+${_zdev_dasd_list},}$_zdev_dasd" ++ done ++ fi + echo "$_zdev_dasd_list" + } + +diff --git a/zdev/dracut/95zdev/parse-zfcp.sh b/zdev/dracut/95zdev/parse-zfcp.sh +index 715aa00..4c2f990 100644 +--- a/zdev/dracut/95zdev/parse-zfcp.sh ++++ b/zdev/dracut/95zdev/parse-zfcp.sh +@@ -12,25 +12,39 @@ + + zdev_zfcp_base_args="--no-settle --yes --no-root-update --force" + +-for zdev_zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do ++# autodetect active bootdev from zipl device ++if ! getargbool 0 'rd.zfcp' \ ++ && [[ -f /sys/firmware/ipl/ipl_type ]] \ ++ && [[ $(< /sys/firmware/ipl/ipl_type) == "fcp" ]]; then + ( +- IFS_SAVED="$IFS" +- IFS="," # did not work in front of built-in set command below +- # shellcheck disable=SC2086 +- set -- $zdev_zfcp_arg +- IFS=":" args="$*" +- IFS="$IFS_SAVED" +- echo "rd.zfcp ${zdev_zfcp_arg} :" | zdev_vinfo +- if [ "$#" -eq 1 ]; then +- # shellcheck disable=SC2086 +- chzdev --enable --persistent $zdev_zfcp_base_args \ +- zfcp-host "$args" 2>&1 | zdev_vinfo +- else +- # shellcheck disable=SC2086 +- chzdev --enable --persistent $zdev_zfcp_base_args \ +- zfcp-lun "$args" 2>&1 | zdev_vinfo +- fi ++ read -r _wwpn < /sys/firmware/ipl/wwpn ++ read -r _lun < /sys/firmware/ipl/lun ++ read -r _ccw < /sys/firmware/ipl/device ++ ++ chzdev --enable --persistent zfcp-lun "$_ccw:$_wwpn:$_lun" 2>&1 | zdev_vinfo + ) +-done ++else ++ for zdev_zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do ++ ( ++ IFS_SAVED="$IFS" ++ IFS="," # did not work in front of built-in set command below ++ # shellcheck disable=SC2086 ++ set -- $zdev_zfcp_arg ++ IFS=":" args="$*" ++ IFS="$IFS_SAVED" ++ echo "rd.zfcp ${zdev_zfcp_arg} :" | zdev_vinfo ++ if [ "$#" -eq 1 ]; then ++ # shellcheck disable=SC2086 ++ chzdev --enable --persistent $zdev_zfcp_base_args \ ++ zfcp-host "$args" 2>&1 | zdev_vinfo ++ else ++ # shellcheck disable=SC2086 ++ chzdev --enable --persistent $zdev_zfcp_base_args \ ++ zfcp-lun "$args" 2>&1 | zdev_vinfo ++ fi ++ ) ++ done ++fi ++ + unset zdev_zfcp_arg + unset zdev_zfcp_base_args +-- +2.44.0 + diff --git a/s390-tools.changes b/s390-tools.changes index 653bb71..cf8cfa2 100644 --- a/s390-tools.changes +++ b/s390-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 2 05:32:45 UTC 2024 - Nikolay Gueorguiev + +- Apllied a patch(bsc#1220949,bsc#1221873) + * s390-tools-sles15sp6-01-parse-ipl-device-for-activation.patch + ------------------------------------------------------------------- Fri Mar 15 16:45:58 UTC 2024 - Nikolay Gueorguiev diff --git a/s390-tools.spec b/s390-tools.spec index 4420c69..b8d2b25 100644 --- a/s390-tools.spec +++ b/s390-tools.spec @@ -154,6 +154,7 @@ Patch911: s390-tools-sles15sp5-remove-no-pie-link-arguments.patch Patch912: s390-tools-ALP-zdev-live.patch Patch913: s390-tools-sles15sp6-kdump-initrd-59-zfcp-compat-rules.patch Patch914: s390-tools-sles15sp6-genprotimg-makefile.patch +Patch915: s390-tools-sles15sp6-01-parse-ipl-device-for-activation.patch ### BuildRequires: curl-devel