From 65a891fa35661e8e4372f2954d5e2908a63b5cee Mon Sep 17 00:00:00 2001 From: Vasily Gorbik Date: Mon, 9 Feb 2026 00:35:32 +0100 Subject: [PATCH] ipl_tools/chreipl: Make --bootparms work for ECKD re-IPL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit chreipl accepts --bootparms for list-directed IPL, but for ECKD re-IPL the value was never committed to sysfs, so the requested boot parameters did not take effect. Write the boot parameters to the firmware scp_data attribute when configuring an ECKD re-IPL target. Also validate that the ECKD re-IPL sysfs interface exists and enforce the maximum supported boot parameter length up front. Fixes: 7c24855ba112 ("ipl_tools: add support for list-directed IPL from ECKD DASD") Reviewed-by: Jan Polensky Signed-off-by: Vasily Gorbik Signed-off-by: Jan Höppner --- ipl_tools/cmd_chreipl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ipl_tools/cmd_chreipl.c b/ipl_tools/cmd_chreipl.c index 30a8ae14..e05c2ab3 100644 --- a/ipl_tools/cmd_chreipl.c +++ b/ipl_tools/cmd_chreipl.c @@ -835,6 +835,12 @@ static void chreipl_eckd(void) ERR_EXIT("Could not find DASD ECKD device \"%s\"", l.busid); } + check_exists("reipl/eckd/device", "\"eckd\" re-IPL target"); + if (l.bootparms_set && strlen(l.bootparms) > BOOTPARMS_FCP_MAX) { + ERR_EXIT("Maximum boot parameter length exceeded (%zu/%u)", + strlen(l.bootparms), BOOTPARMS_FCP_MAX); + } + if (l.reipl_clear >= 0) { check_exists("reipl/eckd/clear", "ECKD re-IPL clear attribute"); write_str(l.reipl_clear ? "1" : "0", "reipl/eckd/clear"); @@ -848,6 +854,8 @@ static void chreipl_eckd(void) write_str(l.bootprog, "reipl/eckd/bootprog"); write_str(l.busid, "reipl/eckd/device"); write_str_optional(l.loadparm, "reipl/eckd/loadparm", l.loadparm_set, "loadparm"); + write_str_optional(l.bootparms, "reipl/eckd/scp_data", l.bootparms_set, + "boot parameters"); write_str("eckd", "reipl/reipl_type"); print_eckd(0, "eckd"); }