Accepting request 1093105 from home:ngueorguiev:branches:Base:System

- Upgrade to version 2.27.0 (jsc#PED-3275)
- Changes of existing tools:
  * s390-tools cross-compile and non-s390x support:
    - pkg-config is now mandatory for the build process
    - Add PKG_CONFIG Makefile variable to select pkg-config program;
      default pkg-config or $(CROSS_COMPILE)pkg-config if
      CROSS_COMPILE is set
    - Rename Makefile variable ARCH to HOST_ARCH. HOST_ARCH is the
      architecture that will run the produced (executable) objects
    - Add the Makefile variable BUILD_ARCH. BUILD_ARCH is the
      architecture of the build system. For each Makefile variable like
      CC, LINK, CPP, ... there is a suffixed version of it - e.g.
      CC_FOR_BUILD. This is useful for cross compiling, and this naming
      convention is very similar to the Meson convention (see
      https://mesonbuild.com/Reference-tables.html#environment-variables-per-machine).
    - Limit build targets for non-s390x architectures (pvattest)
  * dasdfmt: Fall back to full format if space release fails
  * dbginfo.sh: Add nstat for network and SNMP stats
  * dbginfo.sh: Rework crypto data collection
  * hyptop: Show thread util by default
  * zipl: Add support for list-directed IPL dump from ECKD DASD
- Bug Fixes:
  * lszcrypt: Fix argument parsing
  * zdev/dracut: Fix out-of-memory (OOM) situations in the kdump crashkernel environment
  * ziomon/ziorep_config: Fix for SCSI devices of type disk without block dev
  * pvextract-hdr: Fix parsing issues on little-endian systems
- Amended the .patches to fit the 2.27 version
- Removed obsolete patches (the fixes are included in this version)
  * s390-tools-sles15sp5-zipl-boot-disable-Warray-bounds-for-now.patch
  * s390-tools-sles15sp5-zkey-Support-EP11-host-library-version-4.patch
  * s390-tools-sles15sp5-01-zipl-boot-discard-.eh_frame-and-.interp-input-sectio.patch
  * s390-tools-sles15sp5-02-zipl-boot-declare-that-no-executable-stack-is-requir.patch
  * s390-tools-sles15sp5-03-zipl-boot-use-no-warn-rwx-segments-linker-flag.patch
  * s390-tools-sles15sp5-04-zipl-boot-disable-build-id.patch
  * s390-tools-sles15sp5-05-zipl-boot-simplify-objcopy-commands.patch
  * s390-tools-sles15sp5-06-zipl-move-STAGE2_MAX_SIZE-and-STAGE1B_LOAD_ADDR-to-l.patch
  * s390-tools-sles15sp5-07-zipl-boot-use-linker-scripts-for-all-bootloaders.patch
  * s390-tools-sles15sp5-08-genprotimg-boot-declare-that-no-executable-stack-is-.patch
  * s390-tools-sles15sp5-09-genprotimg-boot-use-no-warn-rwx-segments-linker-flag.patch
  * s390-tools-sles15sp5-10-genprotimg-boot-disable-build-id.patch
  * s390-tools-sles15sp5-11-genprotimg-boot-Makefile-simplify-objcopy-command.patch
  * s390-tools-sles15sp5-12-genprotimg-boot-improve-linker-scripts.patch
  * s390-tools-sles15sp5-13-genprotimg-boot-stage3b-add-size-check-to-the-linker.patch
  * s390-tools-sles15sp5-14-genprotimg-boot-stage3b_reloc.bin-add-linker-script.patch
  * s390-tools-sles15sp5-15-zipl-Embed-loader-data-directly-into-boot-object.patch
  * s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch
  * s390-tools-sles15sp5-01-ziomon-ziorep_config-fix-missing-SG-major-minor-for-.patch
  * s390-tools-sles15sp5-02-ziomon-ziorep_config-fix-for-SCSI-devices-of-type-di.patch
  * s390-tools-sles15sp5-fix-chown-commands-syntax.patch

OBS-URL: https://build.opensuse.org/request/show/1093105
OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=174
This commit is contained in:
Nikolay Gueorguiev 2023-06-14 11:34:58 +00:00 committed by Git OBS Bridge
parent 7c95b541d5
commit 089c94ca65
38 changed files with 373 additions and 1497 deletions

BIN
s390-tools-2.25.0.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
s390-tools-2.27.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,133 +1,133 @@
--- ---
zdev/dracut/96zdev-live/module-setup.sh | 32 +++++++++++++++++++++++++ zdev/dracut/96zdev-live/module-setup.sh | 32 +++++++++++++++++++++++++
zdev/dracut/96zdev-live/parse-zdev-live.sh | 36 +++++++++++++++++++++++++++++ zdev/dracut/96zdev-live/parse-zdev-live.sh | 36 +++++++++++++++++++++++++++++
zdev/dracut/96zdev-live/write-udev-live.sh | 11 ++++++++ zdev/dracut/96zdev-live/write-udev-live.sh | 11 ++++++++
zdev/dracut/Makefile | 15 ++++++++++-- zdev/dracut/Makefile | 15 ++++++++++--
4 files changed, 92 insertions(+), 2 deletions(-) 4 files changed, 92 insertions(+), 2 deletions(-)
--- /dev/null --- /dev/null
+++ b/zdev/dracut/96zdev-live/module-setup.sh +++ b/zdev/dracut/96zdev-live/module-setup.sh
@@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
+#!/bin/bash +#!/bin/bash
+ +
+# called by dracut +# called by dracut
+check() { +check() {
+ arch=${DRACUT_ARCH:-$(uname -m)} + arch=${DRACUT_ARCH:-$(uname -m)}
+ [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 + [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1
+ +
+ require_binaries chzdev || return 1 + require_binaries chzdev || return 1
+ +
+ [[ $hostonly ]] || return 0 + [[ $hostonly ]] || return 0
+ +
+ # or on request + # or on request
+ return 255 + return 255
+} +}
+ +
+# called by dracut +# called by dracut
+depends() { +depends() {
+ echo bash + echo bash
+ return 0 + return 0
+} +}
+ +
+# called by dracut +# called by dracut
+installkernel() { +installkernel() {
+ instmods ctcm lcs qeth qeth_l2 qeth_l3 dasd_diag_mod dasd_eckd_mod dasd_fba_mod + instmods ctcm lcs qeth qeth_l2 qeth_l3 dasd_diag_mod dasd_eckd_mod dasd_fba_mod
+} +}
+ +
+# called by dracut +# called by dracut
+install() { +install() {
+ inst_hook cmdline 41 "$moddir/parse-zdev-live.sh" + inst_hook cmdline 41 "$moddir/parse-zdev-live.sh"
+ inst_hook cleanup 41 "$moddir/write-udev-live.sh" + inst_hook cleanup 41 "$moddir/write-udev-live.sh"
+ inst_multiple chzdev + inst_multiple chzdev
+} +}
--- /dev/null --- /dev/null
+++ b/zdev/dracut/96zdev-live/parse-zdev-live.sh +++ b/zdev/dracut/96zdev-live/parse-zdev-live.sh
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+#!/bin/bash +#!/bin/bash
+# +#
+# 96zdev-live/parse-zdev-live.sh +# 96zdev-live/parse-zdev-live.sh
+# Parse the kernel command line for rd.zdev kernel parameters. These +# Parse the kernel command line for rd.zdev kernel parameters. These
+# parameters are evaluated and used to configure z Systems specific devices +# parameters are evaluated and used to configure z Systems specific devices
+# with chzdev(8), especially for use on live/installation type media. +# with chzdev(8), especially for use on live/installation type media.
+# Note: this is only active on no-hostonly initrds (by default). +# Note: this is only active on no-hostonly initrds (by default).
+# +#
+# Format: +# Format:
+# rd.zdev=TYPE,DEVICE[,SETTINGS] +# rd.zdev=TYPE,DEVICE[,SETTINGS]
+# +#
+# where +# where
+# +#
+# TYPE: all device types supported by chzdev(8), like qeth and dasd +# TYPE: all device types supported by chzdev(8), like qeth and dasd
+# DEVICE: device specification as supported by chzdev(8) '--enable', +# DEVICE: device specification as supported by chzdev(8) '--enable',
+# with the exception of specifying multiple devices, which +# with the exception of specifying multiple devices, which
+# need to be separated by commas. Channel group members +# need to be separated by commas. Channel group members
+# (or zFCP parameters) in turn are separated by colons. +# (or zFCP parameters) in turn are separated by colons.
+# SETTINGS: Settings are positional arguments of chzdev in the form +# SETTINGS: Settings are positional arguments of chzdev in the form
+# KEY=VALUE separated by commas. +# KEY=VALUE separated by commas.
+ +
+zdev_enable="--persistent --enable" +zdev_enable="--persistent --enable"
+zdev_base_args="--yes --no-root-update --no-settle" +zdev_base_args="--yes --no-root-update --no-settle"
+ +
+for zdevs in $(getargs rd.zdev) ; do +for zdevs in $(getargs rd.zdev) ; do
+ IFS=',' read -r -a zdev <<< "$zdevs" + IFS=',' read -r -a zdev <<< "$zdevs"
+ if [ -n "$zdev" ] && [ "$zdev" = "no-auto" -o "$zdev" = "auto" ] ; then + if [ -n "$zdev" ] && [ "$zdev" = "no-auto" -o "$zdev" = "auto" ] ; then
+ : # ignore, as it's handled by 95zdev + : # ignore, as it's handled by 95zdev
+ elif [ -z "$zdev" ] || [ -z "${zdev[1]}" ] ; then + elif [ -z "$zdev" ] || [ -z "${zdev[1]}" ] ; then
+ warn "Unsupported usage of rd.zdev=$zdevs" + warn "Unsupported usage of rd.zdev=$zdevs"
+ else + else
+ info "+ chzdev $zdev_enable [...] ${zdev[@]}" + info "+ chzdev $zdev_enable [...] ${zdev[@]}"
+ chzdev $zdev_enable $zdev_base_args "${zdev[@]}" + chzdev $zdev_enable $zdev_base_args "${zdev[@]}"
+ fi + fi
+done +done
+ +
--- /dev/null --- /dev/null
+++ b/zdev/dracut/96zdev-live/write-udev-live.sh +++ b/zdev/dracut/96zdev-live/write-udev-live.sh
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+#!/bin/sh +#!/bin/sh
+# +#
+# 96zdev-live/write-udev-live.sh +# 96zdev-live/write-udev-live.sh
+# Copy udeve rules generated by chzdev for device activation starting with 41 +# Copy udeve rules generated by chzdev for device activation starting with 41
+# to a *writable* /sysroot -- this is primarily useful for live/installation- +# to a *writable* /sysroot -- this is primarily useful for live/installation-
+# type media (and by default only active on no-hostonly initrds) +# type media (and by default only active on no-hostonly initrds)
+# +#
+ +
+if [ -w /sysroot/etc/udev/rules.d ]; then +if [ -w /sysroot/etc/udev/rules.d ]; then
+ cp -p /etc/udev/rules.d/41-* /sysroot/etc/udev/rules.d + cp -p /etc/udev/rules.d/41-* /sysroot/etc/udev/rules.d
+fi +fi
--- a/zdev/dracut/Makefile --- a/zdev/dracut/Makefile
+++ b/zdev/dracut/Makefile +++ b/zdev/dracut/Makefile
@@ -2,17 +2,23 @@ @@ -3,17 +3,23 @@
include ../../common.mak
ZDEVDIR := 95zdev
ZDEVDIR := 95zdev ZDEVKDUMPDIR := 95zdev-kdump
+ZDEVLIVEDIR := 96zdev-live +ZDEVLIVEDIR := 96zdev-live
# HAVE_DRACUT # HAVE_DRACUT
# #
-# This install time parameter determines whether the zdev dracut module is -# This install time parameter determines whether the zdev dracut module is
-# installed (HAVE_DRACUT=1) or not (default). When installed, the module -# installed (HAVE_DRACUT=1) or not (default). When installed, the module
+# This install time parameter determines whether the zdev dracut modules are +# This install time parameter determines whether the zdev dracut modules are
+# installed (HAVE_DRACUT=1) or not (default). When installed, the 95zdev module +# installed (HAVE_DRACUT=1) or not (default). When installed, the 95zdev module
# performs the following functions when dracut is run: # performs the following functions when dracut is run:
# #
# - copy the persistent root device configuration to the initial ram disk # - copy the persistent root device configuration to the initial ram disk
# - install a boot-time hook to apply firmware-provided configuration data # - install a boot-time hook to apply firmware-provided configuration data
# to the system # to the system
# #
+# The 96zdev-live module performs the following functions when dracut is run: +# The 96zdev-live module performs the following functions when dracut is run:
+# +#
+# - install a boot-time hook to apply command-line-provided configuration data +# - install a boot-time hook to apply command-line-provided configuration data
+# to a no-hostonly built initial ram disk for use in live/installation media +# to a no-hostonly built initial ram disk for use in live/installation media
+# +#
ifeq ($(HAVE_DRACUT),1) ifeq ($(HAVE_DRACUT),1)
install: install:
$(INSTALL) -m 755 -d $(DESTDIR)$(DRACUTMODDIR)/ $(INSTALL) -m 755 -d $(DESTDIR)$(DRACUTMODDIR)/
@@ -20,4 +26,9 @@ install: @@ -25,4 +31,9 @@
$(INSTALL) -m 755 $(ZDEVDIR)/module-setup.sh \ $(INSTALL) -m 755 -d $(DESTDIR)$(DRACUTMODDIR)/$(ZDEVKDUMPDIR)
$(ZDEVDIR)/parse-zdev.sh \ $(INSTALL) -m 755 $(ZDEVKDUMPDIR)/module-setup.sh \
$(DESTDIR)$(DRACUTMODDIR)/$(ZDEVDIR)/ $(DESTDIR)$(DRACUTMODDIR)/$(ZDEVKDUMPDIR)/
+ $(INSTALL) -m 755 -d $(DESTDIR)$(DRACUTMODDIR)/$(ZDEVLIVEDIR) + $(INSTALL) -m 755 -d $(DESTDIR)$(DRACUTMODDIR)/$(ZDEVLIVEDIR)
+ $(INSTALL) -m 755 $(ZDEVLIVEDIR)/module-setup.sh \ + $(INSTALL) -m 755 $(ZDEVLIVEDIR)/module-setup.sh \
+ $(ZDEVLIVEDIR)/parse-zdev-live.sh \ + $(ZDEVLIVEDIR)/parse-zdev-live.sh \
+ $(ZDEVLIVEDIR)/write-udev-live.sh \ + $(ZDEVLIVEDIR)/write-udev-live.sh \
+ $(DESTDIR)$(DRACUTMODDIR)/$(ZDEVLIVEDIR)/ + $(DESTDIR)$(DRACUTMODDIR)/$(ZDEVLIVEDIR)/
endif endif

View File

@ -1,5 +1,9 @@
--- a/etc/udev/rules.d/59-dasd.rules 2016-03-17 06:15:01.000000000 -0400 ---
+++ b/etc/udev/rules.d/59-dasd.rules 2016-03-23 17:36:26.000000000 -0400 etc/udev/rules.d/59-dasd.rules | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/etc/udev/rules.d/59-dasd.rules
+++ b/etc/udev/rules.d/59-dasd.rules
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
LABEL="dasd_block_end" LABEL="dasd_block_end"

View File

@ -12,11 +12,9 @@ so we should be suppressing the error message for these devices, too.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Hannes Reinecke <hare@suse.de>
--- ---
fdasd/fdasd.c | 13 ++++++++----- fdasd/fdasd.c | 4 +++-
1 file changed, 8 insertions(+), 5 deletions(-) 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fdasd/fdasd.c b/fdasd/fdasd.c
index 4503d3e..f04dc3d 100644
--- a/fdasd/fdasd.c --- a/fdasd/fdasd.c
+++ b/fdasd/fdasd.c +++ b/fdasd/fdasd.c
@@ -1231,10 +1231,12 @@ @@ -1231,10 +1231,12 @@

View File

@ -10,11 +10,9 @@ References: bnc#808042
Signed-off-by: Robert Milasan <rmilasan@suse.de> Signed-off-by: Robert Milasan <rmilasan@suse.de>
--- ---
etc/udev/rules.d/59-dasd.rules | 2 +- etc/udev/rules.d/59-dasd.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/udev/rules.d/59-dasd.rules b/etc/udev/rules.d/59-dasd.rules
index 2b1435c..a08cb7c 100644
--- a/etc/udev/rules.d/59-dasd.rules --- a/etc/udev/rules.d/59-dasd.rules
+++ b/etc/udev/rules.d/59-dasd.rules +++ b/etc/udev/rules.d/59-dasd.rules
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
@ -26,6 +24,3 @@ index 2b1435c..a08cb7c 100644
# by-id (hardware serial number) # by-id (hardware serial number)
KERNEL=="dasd*[!0-9]", ATTRS{status}=="online", IMPORT{program}="/sbin/dasdinfo -a -e -b $kernel" KERNEL=="dasd*[!0-9]", ATTRS{status}=="online", IMPORT{program}="/sbin/dasdinfo -a -e -b $kernel"
KERNEL=="dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" KERNEL=="dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
--
1.8.1.4

View File

@ -1,5 +1,9 @@
--- s390-tools-1.24.1/zipl/boot/menu.c 2013-12-18 11:11:45.000000000 -0500 ---
+++ s390-tools-1.24.1/zipl/boot/menu.c 2013-12-18 11:59:18.000000000 -0500 zipl/boot/menu.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/zipl/boot/menu.c
+++ b/zipl/boot/menu.c
@@ -168,8 +168,11 @@ @@ -168,8 +168,11 @@
/* print config list */ /* print config list */
menu_list(); menu_list();

View File

@ -1,5 +1,9 @@
--- a/etc/sysconfig/dumpconf 2020-10-15 09:56:15.000000000 -0400 ---
+++ b/etc/sysconfig/dumpconf 2020-10-27 18:47:23.267333389 -0400 etc/sysconfig/dumpconf | 162 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 114 insertions(+), 48 deletions(-)
--- a/etc/sysconfig/dumpconf
+++ b/etc/sysconfig/dumpconf
@@ -1,71 +1,137 @@ @@ -1,71 +1,137 @@
+## Path: System/Dumpconf +## Path: System/Dumpconf
+## Description: Configures the actions which should be performed after a kernel panic +## Description: Configures the actions which should be performed after a kernel panic
@ -27,13 +31,9 @@
+# * reipl: Re-IPL Linux using setting under /sys/firmware/reipl +# * reipl: Re-IPL Linux using setting under /sys/firmware/reipl
+# * dump_reipl: First dump Linux, then re-IPL Linux using setting under +# * dump_reipl: First dump Linux, then re-IPL Linux using setting under
+# /sys/firmware/reipl +# /sys/firmware/reipl
# +#
+ON_PANIC="stop" +ON_PANIC="stop"
+
-# For the actions "reipl" and "dump_reipl" the DELAY_MINUTES keyword may
-# be used to delay the activation of dumpconf.
-# Thus potential reipl loops caused by kernel panics
-# which persistently occur early in the boot process can be prevented.
+## Type: integer(0:300) +## Type: integer(0:300)
+## Default: 5 +## Default: 5
+## ServiceRestart: dumpconf +## ServiceRestart: dumpconf
@ -48,11 +48,43 @@
+# been defined the default action (STOP) is performed. +# been defined the default action (STOP) is performed.
+# +#
+DELAY_MINUTES="5" +DELAY_MINUTES="5"
+
+## Type: list(ccw,fcp,nvme)
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the type, ccw for DASD, fcp for zFCP, or nvme for NVMe Disk.
+#
+DUMP_TYPE=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the device id for a DASD or SCSI over zFCP dump device.
+#
+# For example (DASD and SCSI over zFCP have the same structure): DEVICE=0.0.4711
#
+DEVICE=""
-# For the actions "reipl" and "dump_reipl" the DELAY_MINUTES keyword may
-# be used to delay the activation of dumpconf.
-# Thus potential reipl loops caused by kernel panics
-# which persistently occur early in the boot process can be prevented.
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the WWPN for a zFCP dump device.
+#
+# For example: WWPN=0x5005076303004711
+#
+WWPN=""
-# Dump on CCW device (DASD) and re-IPL after dump is complete. -# Dump on CCW device (DASD) and re-IPL after dump is complete.
-# The re-IPL device, as specified under "/sys/firmware/reipl", is used. -# The re-IPL device, as specified under "/sys/firmware/reipl", is used.
-# The activation of dumpconf is delayed by 5 minutes. -# The activation of dumpconf is delayed by 5 minutes.
+## Type: list(ccw,fcp,nvme) +## Type: string
+## Default: "" +## Default: ""
+## ServiceRestart: dumpconf +## ServiceRestart: dumpconf
# #
@ -60,16 +92,21 @@
-# DUMP_TYPE=ccw -# DUMP_TYPE=ccw
-# DEVICE=0.0.4e13 -# DEVICE=0.0.4e13
-# DELAY_MINUTES=5 -# DELAY_MINUTES=5
+# Define the type, ccw for DASD, fcp for zFCP, or nvme for NVMe Disk. +# Define the LUN for a zFCP dump device.
+# +#
+DUMP_TYPE="" +# For example: LUN=0x4711000000000000
+#
+LUN=""
+## Type: string +## Type: integer(0:30)
+## Default: "" +## Default: "0"
+## ServiceRestart: dumpconf +## ServiceRestart: dumpconf
+#
+# Define the Boot program selector for a zFCP dump device.
# #
-# Dump on fcp device (SCSI Disk) -# Dump on fcp device (SCSI Disk)
+# Define the device id for a DASD or SCSI over zFCP dump device. +# A decimal value between 0 and 30 specifying the program to be loaded from
+# the FCP-I/O device.
# #
-# ON_PANIC=dump -# ON_PANIC=dump
-# DUMP_TYPE=fcp -# DUMP_TYPE=fcp
@ -78,16 +115,14 @@
-# LUN=0x4711000000000000 -# LUN=0x4711000000000000
-# BOOTPROG=0 -# BOOTPROG=0
-# BR_LBA=0 -# BR_LBA=0
+# For example (DASD and SCSI over zFCP have the same structure): DEVICE=0.0.4711 +BOOTPROG="0"
+#
+DEVICE=""
+## Type: string +## Type: string
+## Default: "" +## Default: "0"
+## ServiceRestart: dumpconf +## ServiceRestart: dumpconf
# #
-# Dump on nvme device (NVMe Disk) -# Dump on nvme device (NVMe Disk)
+# Define the WWPN for a zFCP dump device. +# Define the Boot record logical block address for a zFCP dump device.
# #
-# ON_PANIC=dump -# ON_PANIC=dump
-# DUMP_TYPE=nvme -# DUMP_TYPE=nvme
@ -95,55 +130,12 @@
-# NSID=0x00000001 -# NSID=0x00000001
-# BOOTPROG=3 -# BOOTPROG=3
-# BR_LBA=0 -# BR_LBA=0
+# For example: WWPN=0x5005076303004711
+#
+WWPN=""
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
#
-# Use VMDUMP
+# Define the LUN for a zFCP dump device.
#
-# ON_PANIC=vmcmd
-# VMCMD_1="MESSAGE * Starting VMDUMP"
-# VMCMD_2="VMDUMP"
-# VMCMD_3="IPL 4711"
+# For example: LUN=0x4711000000000000
+#
+LUN=""
+## Type: integer(0:30)
+## Default: "0"
+## ServiceRestart: dumpconf
#
-# Stop Linux (default)
+# Define the Boot program selector for a zFCP dump device.
#
-# ON_PANIC=stop
+# A decimal value between 0 and 30 specifying the program to be loaded from
+# the FCP-I/O device.
+#
+BOOTPROG="0"
+## Type: string
+## Default: "0"
+## ServiceRestart: dumpconf
#
-# Re-IPL Linux
-# The re-IPL device, as specified under "/sys/firmware/reipl", is used.
-# Since the DELAY_MINUTES keyword is omitted, there is no delay and
-# dumpconf becomes active immediately during system startup.
+# Define the Boot record logical block address for a zFCP dump device.
#
-# ON_PANIC=reipl
+# The hexadecimal digits designating the logical-block address of the boot record of the FCP-I/O device. +# The hexadecimal digits designating the logical-block address of the boot record of the FCP-I/O device.
+# It must be a value from 0-FFFFFFFF FFFFFFFF. For values longer than 8 hex characters at least one separator +# It must be a value from 0-FFFFFFFF FFFFFFFF. For values longer than 8 hex characters at least one separator
+# blank is required after the 8th character. +# blank is required after the 8th character.
+# +#
+BR_LBA="0" +BR_LBA="0"
+
+## Type: string +## Type: string
+## Default: "" +## Default: ""
+## ServiceRestart: dumpconf +## ServiceRestart: dumpconf
@ -151,11 +143,16 @@
+# Define the Function ID for NVMe dump device. +# Define the Function ID for NVMe dump device.
+# +#
+# The hexadecimal digits designating the Function ID for the NMVe disk. +# The hexadecimal digits designating the Function ID for the NMVe disk.
+# #
-# Use VMDUMP
+# For example: FID=0x00000300 +# For example: FID=0x00000300
+# #
-# ON_PANIC=vmcmd
-# VMCMD_1="MESSAGE * Starting VMDUMP"
-# VMCMD_2="VMDUMP"
-# VMCMD_3="IPL 4711"
+FID="" +FID=""
+
+## Type: string +## Type: string
+## Default: "" +## Default: ""
+## ServiceRestart: dumpconf +## ServiceRestart: dumpconf
@ -163,21 +160,28 @@
+# Define the Namespace ID for the NVMe dump device +# Define the Namespace ID for the NVMe dump device
+# +#
+# The hexadecimal digits designating the Namespace ID for the NMVe disk. +# The hexadecimal digits designating the Namespace ID for the NMVe disk.
+# #
-# Stop Linux (default)
+# For example: NSID=0x00000001 +# For example: NSID=0x00000001
+# #
-# ON_PANIC=stop
+NSID="" +NSID=""
+
+## Type: string +## Type: string
+## Default: "" +## Default: ""
+## ServiceRestart: dumpconf +## ServiceRestart: dumpconf
+# #
-# Re-IPL Linux
-# The re-IPL device, as specified under "/sys/firmware/reipl", is used.
-# Since the DELAY_MINUTES keyword is omitted, there is no delay and
-# dumpconf becomes active immediately during system startup.
+# VMCMD_<X> +# VMCMD_<X>
+# Specifies a CP command, <X> is a number from one to eight. You can +# Specifies a CP command, <X> is a number from one to eight. You can
+# specify up to eight CP commands that are executed in case of a kernel +# specify up to eight CP commands that are executed in case of a kernel
+# panic. Note that VM commands, device adresses, and VM guest names +# panic. Note that VM commands, device adresses, and VM guest names
+# must be uppercase. +# must be uppercase.
+# #
-# ON_PANIC=reipl
+VMCMD_1="" +VMCMD_1=""
+VMCMD_2="" +VMCMD_2=""
+VMCMD_3="" +VMCMD_3=""

View File

@ -37,7 +37,7 @@ Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
--- a/zdev/src/zdev-root-update.dracut --- a/zdev/src/zdev-root-update.dracut
+++ b/zdev/src/zdev-root-update.dracut +++ b/zdev/src/zdev-root-update.dracut
@@ -20,10 +20,4 @@ dracut -f || { @@ -20,10 +20,4 @@
exit 1 exit 1
} }

View File

@ -7,15 +7,13 @@ Allow the user to specify several devices as arguments to dasdfmt.
Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Hannes Reinecke <hare@suse.com>
--- ---
dasdfmt/dasdfmt.8 | 5 +- dasdfmt/dasdfmt.8 | 5 -
dasdfmt/dasdfmt.c | 175 ++++++++++++++++++++++++++++++------------------------ dasdfmt/dasdfmt.c | 197 +++++++++++++++++++++++++++++++-----------------------
2 files changed, 100 insertions(+), 80 deletions(-) 2 files changed, 119 insertions(+), 83 deletions(-)
diff --git a/dasdfmt/dasdfmt.8 b/dasdfmt/dasdfmt.8
index 99da9ed..e7fc501 100644
--- a/dasdfmt/dasdfmt.8 --- a/dasdfmt/dasdfmt.8
+++ b/dasdfmt/dasdfmt.8 +++ b/dasdfmt/dasdfmt.8
@@ -11,14 +11,15 @@ dasdfmt \- formatting of DASD (ECKD) disk drives. @@ -11,14 +11,15 @@
.br .br
[-r \fIcylinder\fR] [-b \fIblksize\fR] [-l \fIvolser\fR] [-d \fIlayout\fR] [-r \fIcylinder\fR] [-b \fIblksize\fR] [-l \fIvolser\fR] [-d \fIlayout\fR]
.br .br
@ -33,8 +31,8 @@ index 99da9ed..e7fc501 100644
.br .br
\fBWARNING\fR: Careless usage of \fBdasdfmt\fR can result in \fBWARNING\fR: Careless usage of \fBdasdfmt\fR can result in
--- s390-tools-2.15.1/dasdfmt/dasdfmt.c 2020-10-30 20:43:30.853044638 +0000 --- a/dasdfmt/dasdfmt.c
+++ s390-tools-2.15.1/dasdfmt/dasdfmt.c 2020-11-17 23:38:56.457778633 +0000 +++ b/dasdfmt/dasdfmt.c
@@ -25,6 +25,8 @@ @@ -25,6 +25,8 @@
#include "dasdfmt.h" #include "dasdfmt.h"
@ -189,14 +187,14 @@ index 99da9ed..e7fc501 100644
geo.sectors * blksize; geo.sectors * blksize;
@@ -1242,7 +1243,7 @@ @@ -1242,7 +1243,7 @@
if (!g.ese || g.no_discard) if (!g.ese || g.no_discard)
return; return 0;
- printf("Releasing space for the entire device...\n"); - printf("Releasing space for the entire device...\n");
+ printf("Releasing space for the entire %s device...\n", g.dev_path); + printf("Releasing space for the entire %s device...\n", g.dev_path);
err = dasd_release_space(g.dev_node, &r); err = dasd_release_space(g.dev_node, &r);
if (err) /*
error("Could not release space: %s", strerror(err)); * Warn or Error on failing RAS depending on QUICK mode set explicitly or automatically
@@ -1261,20 +1262,21 @@ @@ -1270,20 +1271,21 @@
int err; int err;
if (!(g.withoutprompt && g.verbosity < 1)) if (!(g.withoutprompt && g.verbosity < 1))
@ -223,7 +221,7 @@ index 99da9ed..e7fc501 100644
/* except track 0 from standard formatting procss */ /* except track 0 from standard formatting procss */
p->start_unit = 1; p->start_unit = 1;
@@ -1282,19 +1284,19 @@ @@ -1291,19 +1293,19 @@
process_tracks(cylinders, heads, p); process_tracks(cylinders, heads, p);
if (g.verbosity > 0) if (g.verbosity > 0)
@ -246,7 +244,7 @@ index 99da9ed..e7fc501 100644
disk_enable(); disk_enable();
} }
@@ -1306,18 +1308,18 @@ @@ -1315,18 +1317,18 @@
format_data_t *p) format_data_t *p)
{ {
if (!(g.withoutprompt && g.verbosity < 1)) if (!(g.withoutprompt && g.verbosity < 1))
@ -269,7 +267,7 @@ index 99da9ed..e7fc501 100644
if (g.verbosity > 0) if (g.verbosity > 0)
printf("Re-accessing the device...\n"); printf("Re-accessing the device...\n");
@@ -1426,16 +1428,16 @@ @@ -1435,16 +1437,16 @@
if (!g.withoutprompt) { if (!g.withoutprompt) {
printf("\n"); printf("\n");
if (mode != EXPAND) if (mode != EXPAND)
@ -290,7 +288,7 @@ index 99da9ed..e7fc501 100644
return; return;
} }
} }
@@ -1453,12 +1455,12 @@ @@ -1466,12 +1468,12 @@
break; break;
} }
@ -305,7 +303,7 @@ index 99da9ed..e7fc501 100644
err = dasd_reread_partition_table(g.dev_node, 5); err = dasd_reread_partition_table(g.dev_node, 5);
if (err != 0) { if (err != 0) {
ERRMSG("%s: error during rereading the partition " ERRMSG("%s: error during rereading the partition "
@@ -1472,7 +1473,7 @@ @@ -1485,7 +1487,7 @@
static void eval_format_mode(void) static void eval_format_mode(void)
{ {
if (!g.force && g.mode_specified && g.ese && mode == EXPAND) { if (!g.force && g.mode_specified && g.ese && mode == EXPAND) {
@ -314,15 +312,17 @@ index 99da9ed..e7fc501 100644
warnx("Format mode 'expand' is not feasible."); warnx("Format mode 'expand' is not feasible.");
error("Use --mode=full or --mode=quick to perform a clean format"); error("Use --mode=full or --mode=quick to perform a clean format");
} }
@@ -1495,20 +1496,70 @@ @@ -1508,20 +1510,70 @@
prog_name = p + 1; prog_name = p + 1;
} }
-int main(int argc, char *argv[])
+void process_dasd(volume_label_t *orig_vlabel, format_data_t format_params) +void process_dasd(volume_label_t *orig_vlabel, format_data_t format_params)
+{ {
+ volume_label_t vlabel; volume_label_t vlabel;
+ char old_volser[7]; char old_volser[7];
+ char str[ERR_LENGTH]; -
char str[ERR_LENGTH];
+ unsigned int cylinders, heads; int rc; + unsigned int cylinders, heads; int rc;
+ +
+ rc = dasd_get_info(g.dev_node, &g.dasd_info); + rc = dasd_get_info(g.dev_node, &g.dasd_info);
@ -371,12 +371,10 @@ index 99da9ed..e7fc501 100644
+ +
+} +}
+ +
int main(int argc, char *argv[]) +int main(int argc, char *argv[])
{ +{
volume_label_t vlabel; + volume_label_t vlabel;
- char old_volser[7]; +
- char str[ERR_LENGTH];
char buf[7]; char buf[7];
char *blksize_param_str = NULL; char *blksize_param_str = NULL;
@ -389,7 +387,7 @@ index 99da9ed..e7fc501 100644
/* Establish a handler for interrupt signals. */ /* Establish a handler for interrupt signals. */
signal(SIGTERM, program_interrupt_signal); signal(SIGTERM, program_interrupt_signal);
@@ -1644,6 +1695,9 @@ @@ -1657,6 +1709,9 @@
break; /* exit loop if finished */ break; /* exit loop if finished */
} }
@ -399,7 +397,7 @@ index 99da9ed..e7fc501 100644
CHECK_SPEC_MAX_ONCE(g.blksize_specified, "blocksize"); CHECK_SPEC_MAX_ONCE(g.blksize_specified, "blocksize");
CHECK_SPEC_MAX_ONCE(g.labelspec, "label"); CHECK_SPEC_MAX_ONCE(g.labelspec, "label");
CHECK_SPEC_MAX_ONCE(g.writenolabel, "omit-label-writing flag"); CHECK_SPEC_MAX_ONCE(g.writenolabel, "omit-label-writing flag");
@@ -1662,49 +1716,29 @@ @@ -1675,48 +1730,28 @@
if (g.print_hashmarks) if (g.print_hashmarks)
PARSE_PARAM_INTO(g.hashstep, hashstep_str, 10, "hashstep"); PARSE_PARAM_INTO(g.hashstep, hashstep_str, 10, "hashstep");
@ -411,7 +409,11 @@ index 99da9ed..e7fc501 100644
- -
- g.ese = dasd_sys_ese(g.dev_node); - g.ese = dasd_sys_ese(g.dev_node);
- eval_format_mode(); - eval_format_mode();
- + while (optind < argc) {
+ get_device_name(optind, argc, argv);
+ strncpy(g.dev_path_array[numdev], g.dev_path, strlen(g.dev_path));
+ strncpy(g.dev_node_array[numdev], g.dev_node, strlen(g.dev_node));
- /* Either let the user specify the blksize or get it from the kernel */ - /* Either let the user specify the blksize or get it from the kernel */
- if (!g.blksize_specified) { - if (!g.blksize_specified) {
- if (!(mode == FULL || - if (!(mode == FULL ||
@ -419,8 +421,10 @@ index 99da9ed..e7fc501 100644
- get_blocksize(&format_params.blksize); - get_blocksize(&format_params.blksize);
- else - else
- format_params = ask_user_for_blksize(format_params); - format_params = ask_user_for_blksize(format_params);
- } + optind++;
- + numdev++;
}
- if (g.keep_volser) { - if (g.keep_volser) {
- if (g.labelspec) - if (g.labelspec)
- error("The -k and -l options are mutually exclusive"); - error("The -k and -l options are mutually exclusive");
@ -432,9 +436,14 @@ index 99da9ed..e7fc501 100644
- else - else
- error("VOLSER not found on device %s", g.dev_path); - error("VOLSER not found on device %s", g.dev_path);
- } - }
- + if (!numdev)
+ error("%s: No device specified!\n",
+ prog_name);
- check_disk(); - check_disk();
- + if (numdev > 1 && g.labelspec)
+ error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes.");
- if (check_param(str, ERR_LENGTH, &format_params) < 0) - if (check_param(str, ERR_LENGTH, &format_params) < 0)
- error("%s", str); - error("%s", str);
- -
@ -445,29 +454,12 @@ index 99da9ed..e7fc501 100644
- check_disk_format(cylinders, heads, &format_params); - check_disk_format(cylinders, heads, &format_params);
- else - else
- do_format_dasd(&vlabel, &format_params, cylinders, heads); - do_format_dasd(&vlabel, &format_params, cylinders, heads);
+ while (optind < argc) {
+ get_device_name(optind, argc, argv);
+ strncpy(g.dev_path_array[numdev], g.dev_path, strlen(g.dev_path));
+ strncpy(g.dev_node_array[numdev], g.dev_node, strlen(g.dev_node));
+
+ optind++;
+ numdev++;
+ }
+
+ if (!numdev)
+ error("%s: No device specified!\n",
+ prog_name);
+
+ if (numdev > 1 && g.labelspec)
+ error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes.");
+
+ for (i = 0; i < numdev; i++) + for (i = 0; i < numdev; i++)
+ { + {
+ strncpy(g.dev_path, g.dev_path_array[i], strlen(g.dev_path_array[i])+1); + strncpy(g.dev_path, g.dev_path_array[i], strlen(g.dev_path_array[i])+1);
+ strncpy(g.dev_node, g.dev_node_array[i], strlen(g.dev_node_array[i])+1); + strncpy(g.dev_node, g.dev_node_array[i], strlen(g.dev_node_array[i])+1);
+ process_dasd(&vlabel, format_params); + process_dasd(&vlabel, format_params);
+ } + }
free(g.dev_path); free(g.dev_path);
free(g.dev_node); free(g.dev_node);

View File

@ -7,13 +7,10 @@ Allow dasdfmt to run in parallel when several devices are specified.
Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Hannes Reinecke <hare@suse.com>
--- ---
dasdfmt/dasdfmt.8 | 16 ++++++++++++++-- dasdfmt/dasdfmt.8 | 16 +++++++++++++-
dasdfmt/dasdfmt.c | 50 +++++++++++++++++++++++++++++++++++++++++++------- dasdfmt/dasdfmt.c | 58 ++++++++++++++++++++++++++++++++++++++++++------------
dasdfmt/dasdfmt.h | 1 + 2 files changed, 60 insertions(+), 14 deletions(-)
3 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/dasdfmt/dasdfmt.8 b/dasdfmt/dasdfmt.8
index e7fc501..07c674b 100644
--- a/dasdfmt/dasdfmt.8 --- a/dasdfmt/dasdfmt.8
+++ b/dasdfmt/dasdfmt.8 +++ b/dasdfmt/dasdfmt.8
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
@ -25,7 +22,7 @@ index e7fc501..07c674b 100644
.br .br
[-r \fIcylinder\fR] [-b \fIblksize\fR] [-l \fIvolser\fR] [-d \fIlayout\fR] [-r \fIcylinder\fR] [-b \fIblksize\fR] [-l \fIvolser\fR] [-d \fIlayout\fR]
.br .br
@@ -96,7 +96,7 @@ Do not use this option if you are using a 3270 console, @@ -96,7 +96,7 @@
running in background or redirecting the output to a file. running in background or redirecting the output to a file.
.TP .TP
@ -34,7 +31,7 @@ index e7fc501..07c674b 100644
Print one line for each formatted cylinder showing the number of the Print one line for each formatted cylinder showing the number of the
cylinder and percentage of formatting process. cylinder and percentage of formatting process.
Intended to be used by higher level interfaces. Intended to be used by higher level interfaces.
@@ -159,6 +159,18 @@ Specify blocksize to be used. \fIblksize\fR must be a positive integer @@ -164,6 +164,18 @@
and always be a power of two. The recommended blocksize is 4096 bytes. and always be a power of two. The recommended blocksize is 4096 bytes.
.TP .TP
@ -53,8 +50,8 @@ index e7fc501..07c674b 100644
\fB-l\fR \fIvolser\fR or \fB--label\fR=\fIvolser\fR \fB-l\fR \fIvolser\fR or \fB--label\fR=\fIvolser\fR
Specify the volume serial number or volume identifier to be written Specify the volume serial number or volume identifier to be written
to disk after formatting. If no label is specified, a sensible default to disk after formatting. If no label is specified, a sensible default
--- s390-tools-2.15.1/dasdfmt/dasdfmt.c 2020-12-04 23:22:51.418265761 +0100 --- a/dasdfmt/dasdfmt.c
+++ s390-tools-2.15.1/dasdfmt/dasdfmt.c 2020-12-04 23:29:26.165601000 +0100 +++ b/dasdfmt/dasdfmt.c
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
#include <sys/sysmacros.h> #include <sys/sysmacros.h>
#include <sys/time.h> #include <sys/time.h>
@ -63,7 +60,7 @@ index e7fc501..07c674b 100644
#include "lib/dasd_base.h" #include "lib/dasd_base.h"
#include "lib/dasd_sys.h" #include "lib/dasd_sys.h"
@@ -81,6 +82,7 @@ static struct dasdfmt_globals { @@ -81,6 +82,7 @@
int mode_specified; int mode_specified;
int ese; int ese;
int no_discard; int no_discard;
@ -71,7 +68,7 @@ index e7fc501..07c674b 100644
} g = { } g = {
.dasd_info = { 0 }, .dasd_info = { 0 },
}; };
@@ -105,6 +107,11 @@ static struct util_opt opt_vec[] = { @@ -105,6 +107,11 @@
.desc = "Perform complete format check on device", .desc = "Perform complete format check on device",
.flags = UTIL_OPT_FLAG_NOSHORT, .flags = UTIL_OPT_FLAG_NOSHORT,
}, },
@ -83,7 +80,7 @@ index e7fc501..07c674b 100644
UTIL_OPT_SECTION("FORMAT OPTIONS"), UTIL_OPT_SECTION("FORMAT OPTIONS"),
{ {
.option = { "blocksize", required_argument, NULL, 'b' }, .option = { "blocksize", required_argument, NULL, 'b' },
@@ -162,7 +169,7 @@ static struct util_opt opt_vec[] = { @@ -162,7 +169,7 @@
.desc = "Show a progressbar", .desc = "Show a progressbar",
}, },
{ {
@ -92,7 +89,7 @@ index e7fc501..07c674b 100644
.desc = "Show progress in percent", .desc = "Show progress in percent",
}, },
UTIL_OPT_SECTION("MISC"), UTIL_OPT_SECTION("MISC"),
@@ -311,7 +318,7 @@ static void draw_progress(int cyl, unsig @@ -311,7 +318,7 @@
} }
if (g.print_hashmarks && (cyl / g.hashstep - hashcount) != 0) { if (g.print_hashmarks && (cyl / g.hashstep - hashcount) != 0) {
@ -101,7 +98,7 @@ index e7fc501..07c674b 100644
fflush(stdout); fflush(stdout);
hashcount++; hashcount++;
} }
@@ -1560,7 +1567,11 @@ int main(int argc, char *argv[]) @@ -1573,7 +1580,11 @@
char *reqsize_param_str = NULL; char *reqsize_param_str = NULL;
char *hashstep_str = NULL; char *hashstep_str = NULL;
@ -114,7 +111,7 @@ index e7fc501..07c674b 100644
/* Establish a handler for interrupt signals. */ /* Establish a handler for interrupt signals. */
signal(SIGTERM, program_interrupt_signal); signal(SIGTERM, program_interrupt_signal);
@@ -1623,7 +1634,7 @@ int main(int argc, char *argv[]) @@ -1636,7 +1647,7 @@
g.print_hashmarks = 1; g.print_hashmarks = 1;
} }
break; break;
@ -123,7 +120,7 @@ index e7fc501..07c674b 100644
if (!(g.print_hashmarks || g.print_progressbar)) if (!(g.print_hashmarks || g.print_progressbar))
g.print_percentage = 1; g.print_percentage = 1;
break; break;
@@ -1682,6 +1693,9 @@ int main(int argc, char *argv[]) @@ -1695,6 +1706,9 @@
case OPT_NODISCARD: case OPT_NODISCARD:
g.no_discard = 1; g.no_discard = 1;
break; break;
@ -133,7 +130,7 @@ index e7fc501..07c674b 100644
case OPT_CHECK: case OPT_CHECK:
g.check = 1; g.check = 1;
break; break;
@@ -1733,15 +1747,35 @@ int main(int argc, char *argv[]) @@ -1746,15 +1760,35 @@
if (numdev > 1 && g.labelspec) if (numdev > 1 && g.labelspec)
error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes."); error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes.");

View File

@ -7,13 +7,10 @@ Implement an option '-Y' to suppress most output.
Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Hannes Reinecke <hare@suse.com>
--- ---
dasdfmt/dasdfmt.8 | 7 ++++++- dasdfmt/dasdfmt.8 | 7 ++++-
dasdfmt/dasdfmt.c | 27 ++++++++++++++++++++------- dasdfmt/dasdfmt.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++------
dasdfmt/dasdfmt.h | 1 + 2 files changed, 72 insertions(+), 8 deletions(-)
3 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/dasdfmt/dasdfmt.8 b/dasdfmt/dasdfmt.8
index 07c674b..3fd10a2 100644
--- a/dasdfmt/dasdfmt.8 --- a/dasdfmt/dasdfmt.8
+++ b/dasdfmt/dasdfmt.8 +++ b/dasdfmt/dasdfmt.8
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
@ -25,7 +22,7 @@ index 07c674b..3fd10a2 100644
.br .br
[-r \fIcylinder\fR] [-b \fIblksize\fR] [-l \fIvolser\fR] [-d \fIlayout\fR] [-r \fIcylinder\fR] [-b \fIblksize\fR] [-l \fIvolser\fR] [-d \fIlayout\fR]
.br .br
@@ -113,6 +113,11 @@ The value will be at least as big as the -r or --requestsize value. @@ -113,6 +113,11 @@
.br .br
.TP .TP
@ -37,11 +34,9 @@ index 07c674b..3fd10a2 100644
\fB-M\fR \fImode\fR or \fB--mode\fR=\fImode\fR \fB-M\fR \fImode\fR or \fB--mode\fR=\fImode\fR
Specify the \fImode\fR to be used to format the device. Valid modes are: Specify the \fImode\fR to be used to format the device. Valid modes are:
.RS .RS
diff --git a/dasdfmt/dasdfmt.c b/dasdfmt/dasdfmt.c
index 6dd28fa..5b6023a 100644
--- a/dasdfmt/dasdfmt.c --- a/dasdfmt/dasdfmt.c
+++ b/dasdfmt/dasdfmt.c +++ b/dasdfmt/dasdfmt.c
@@ -83,6 +83,7 @@ static struct dasdfmt_globals { @@ -83,6 +83,7 @@
int ese; int ese;
int no_discard; int no_discard;
int procnum; int procnum;
@ -49,7 +44,7 @@ index 6dd28fa..5b6023a 100644
} g = { } g = {
.dasd_info = { 0 }, .dasd_info = { 0 },
}; };
@@ -172,6 +173,10 @@ static struct util_opt opt_vec[] = { @@ -172,6 +173,10 @@
.option = { "percentage", no_argument, NULL, 'Q' }, .option = { "percentage", no_argument, NULL, 'Q' },
.desc = "Show progress in percent", .desc = "Show progress in percent",
}, },
@ -60,7 +55,7 @@ index 6dd28fa..5b6023a 100644
UTIL_OPT_SECTION("MISC"), UTIL_OPT_SECTION("MISC"),
{ {
.option = { "check_host_count", no_argument, NULL, 'C' }, .option = { "check_host_count", no_argument, NULL, 'C' },
@@ -318,7 +323,9 @@ static void draw_progress(int cyl, unsig @@ -318,7 +323,9 @@
} }
if (g.print_hashmarks && (cyl / g.hashstep - hashcount) != 0) { if (g.print_hashmarks && (cyl / g.hashstep - hashcount) != 0) {
@ -71,7 +66,7 @@ index 6dd28fa..5b6023a 100644
fflush(stdout); fflush(stdout);
hashcount++; hashcount++;
} }
@@ -392,7 +399,7 @@ static void evaluate_format_error(format @@ -392,7 +399,7 @@
unsigned int kl = 0; unsigned int kl = 0;
int blksize = cdata->expect.blksize; int blksize = cdata->expect.blksize;
@ -80,10 +75,10 @@ index 6dd28fa..5b6023a 100644
printf("\n"); printf("\n");
/* /*
@@ -780,8 +787,9 @@ static void check_hashmarks(void) @@ -780,8 +787,9 @@
g.hashstep = 10; g.hashstep = 10;
} }
- printf("Printing hashmark every %d cylinders.\n", - printf("Printing hashmark every %d cylinders.\n",
- g.hashstep); - g.hashstep);
+ if (!g.yast_mode) + if (!g.yast_mode)
@ -92,7 +87,7 @@ index 6dd28fa..5b6023a 100644
} }
} }
@@ -1462,17 +1470,19 @@ static void do_format_dasd(volume_label_ @@ -1475,17 +1483,19 @@
break; break;
} }
@ -115,7 +110,7 @@ index 6dd28fa..5b6023a 100644
printf("ok\n"); printf("ok\n");
} }
} }
@@ -1548,6 +1558,7 @@ void process_dasd(volume_label_t *orig_v @@ -1561,6 +1571,7 @@
error("%s", str); error("%s", str);
set_geo(&cylinders, &heads); set_geo(&cylinders, &heads);
@ -123,7 +118,7 @@ index 6dd28fa..5b6023a 100644
set_label(&vlabel, &format_params, cylinders); set_label(&vlabel, &format_params, cylinders);
if (g.check) if (g.check)
@@ -1557,6 +1568,29 @@ void process_dasd(volume_label_t *orig_v @@ -1570,6 +1581,29 @@
} }
@ -153,7 +148,7 @@ index 6dd28fa..5b6023a 100644
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
volume_label_t vlabel; volume_label_t vlabel;
@@ -1693,6 +1727,10 @@ int main(int argc, char *argv[]) @@ -1706,6 +1740,10 @@
case OPT_NODISCARD: case OPT_NODISCARD:
g.no_discard = 1; g.no_discard = 1;
break; break;
@ -164,7 +159,7 @@ index 6dd28fa..5b6023a 100644
case 'P': case 'P':
max_parallel = atoi(optarg); max_parallel = atoi(optarg);
break; break;
@@ -1728,6 +1766,21 @@ int main(int argc, char *argv[]) @@ -1741,6 +1779,21 @@
reqsize = DEFAULT_REQUESTSIZE; reqsize = DEFAULT_REQUESTSIZE;
} }
@ -186,7 +181,7 @@ index 6dd28fa..5b6023a 100644
if (g.print_hashmarks) if (g.print_hashmarks)
PARSE_PARAM_INTO(g.hashstep, hashstep_str, 10, "hashstep"); PARSE_PARAM_INTO(g.hashstep, hashstep_str, 10, "hashstep");
@@ -1747,6 +1800,12 @@ int main(int argc, char *argv[]) @@ -1760,6 +1813,12 @@
if (numdev > 1 && g.labelspec) if (numdev > 1 && g.labelspec)
error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes."); error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes.");
@ -199,6 +194,3 @@ index 6dd28fa..5b6023a 100644
for (numproc = 0; numproc < numdev; numproc++) { for (numproc = 0; numproc < numdev; numproc++) {
chpid = fork(); chpid = fork();
if (chpid == -1 ) if (chpid == -1 )
--
1.7.12.4

View File

@ -9,15 +9,13 @@ version of YaST we should accept this option, too.
Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Hannes Reinecke <hare@suse.com>
--- ---
dasdfmt/dasdfmt.8 | 6 +++++- dasdfmt/dasdfmt.8 | 6 +++++-
dasdfmt/dasdfmt.c | 8 ++++++++ dasdfmt/dasdfmt.c | 10 ++++++++++
2 files changed, 13 insertions(+), 1 deletion(-) 2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dasdfmt/dasdfmt.8 b/dasdfmt/dasdfmt.8
index 3fd10a2..7fdb4bd 100644
--- a/dasdfmt/dasdfmt.8 --- a/dasdfmt/dasdfmt.8
+++ b/dasdfmt/dasdfmt.8 +++ b/dasdfmt/dasdfmt.8
@@ -11,7 +11,7 @@ dasdfmt \- formatting of DASD (ECKD) disk drives. @@ -11,7 +11,7 @@
.br .br
[-r \fIcylinder\fR] [-b \fIblksize\fR] [-l \fIvolser\fR] [-d \fIlayout\fR] [-r \fIcylinder\fR] [-b \fIblksize\fR] [-l \fIvolser\fR] [-d \fIlayout\fR]
.br .br
@ -26,7 +24,7 @@ index 3fd10a2..7fdb4bd 100644
.SH DESCRIPTION .SH DESCRIPTION
\fBdasdfmt\fR formats one or several DASD (ECKD) disk drive to prepare it \fBdasdfmt\fR formats one or several DASD (ECKD) disk drive to prepare it
@@ -42,6 +42,10 @@ out, what it \fBwould\fR do. @@ -42,6 +42,10 @@
Increases verbosity. Increases verbosity.
.TP .TP
@ -37,8 +35,6 @@ index 3fd10a2..7fdb4bd 100644
\fB-y\fR \fB-y\fR
Start formatting without further user-confirmation. Start formatting without further user-confirmation.
diff --git a/dasdfmt/dasdfmt.c b/dasdfmt/dasdfmt.c
index 5b6023a..cdd80df 100644
--- a/dasdfmt/dasdfmt.c --- a/dasdfmt/dasdfmt.c
+++ b/dasdfmt/dasdfmt.c +++ b/dasdfmt/dasdfmt.c
@@ -113,6 +113,10 @@ @@ -113,6 +113,10 @@
@ -52,7 +48,7 @@ index 5b6023a..cdd80df 100644
UTIL_OPT_SECTION("FORMAT OPTIONS"), UTIL_OPT_SECTION("FORMAT OPTIONS"),
{ {
.option = { "blocksize", required_argument, NULL, 'b' }, .option = { "blocksize", required_argument, NULL, 'b' },
@@ -1649,6 +1653,12 @@ @@ -1662,6 +1666,12 @@
} }
g.layout_specified = 1; g.layout_specified = 1;
break; break;
@ -65,5 +61,3 @@ index 5b6023a..cdd80df 100644
case 'y': case 'y':
g.withoutprompt = 1; g.withoutprompt = 1;
break; break;
--
1.7.12.4

View File

@ -16,11 +16,9 @@ References: bsc#937340
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Hannes Reinecke <hare@suse.de>
--- ---
dasdfmt/dasdfmt.c | 21 ++++++++++++++++++--- dasdfmt/dasdfmt.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 3 deletions(-) 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/dasdfmt/dasdfmt.c b/dasdfmt/dasdfmt.c
index e1877ac..f03cbad 100644
--- a/dasdfmt/dasdfmt.c --- a/dasdfmt/dasdfmt.c
+++ b/dasdfmt/dasdfmt.c +++ b/dasdfmt/dasdfmt.c
@@ -621,7 +621,7 @@ @@ -621,7 +621,7 @@
@ -56,6 +54,3 @@ index e1877ac..f03cbad 100644
if (g.dasd_info.open_count > 1) if (g.dasd_info.open_count > 1)
error("Disk %s is in use!", g.dev_path); error("Disk %s is in use!", g.dev_path);
} }
--
1.8.4.5

View File

@ -1,19 +0,0 @@
---
ziomon/ziorep_config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/ziomon/ziorep_config
+++ b/ziomon/ziorep_config
@@ -123,11 +123,11 @@ sub get_device_data
} else {
$devices{$hctl}{dev} = glob_last("block\:sd*");
}
+ $devices{$hctl}{sg_mm} = get_line("generic", "dev");
$c_src = $devices{$hctl}{dev};
$devices{$hctl}{dev} =~ s/.*(sd[a-z0-9]+)\Z/$1/
unless(!$devices{$hctl}{dev});
$devices{$hctl}{mm} = get_line("dev");
- $devices{$hctl}{sg_mm} = get_line("generic", "dev");
$devices{$hctl}{mp_dev} = glob_last("holders", "dm*");
$devices{$hctl}{mp_dev} =~ s/.*\/(.+)\Z/$1/
unless (!$devices{$hctl}{mp_dev});

View File

@ -1,41 +0,0 @@
---
zipl/boot/stage2.lds.S | 7 ++++++-
zipl/boot/stage3.lds.S | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
--- a/zipl/boot/stage2.lds.S
+++ b/zipl/boot/stage2.lds.S
@@ -88,6 +88,11 @@ SECTIONS
}
__stack_end = .;
- .eh_frame : { *(.eh_frame) }
.note.gnu.build-id : { *(.note.gnu.build-id) }
+
+ /* Sections to be discarded */
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.interp)
+ }
}
--- a/zipl/boot/stage3.lds.S
+++ b/zipl/boot/stage3.lds.S
@@ -39,7 +39,6 @@ SECTIONS
__ex_table_start = .;
.ex_table : { *(.ex_table) }
__ex_table_stop = .;
- .eh_frame : { *(.eh_frame) }
__bss_start = .;
.bss : { *(.bss) }
@@ -75,4 +74,10 @@ SECTIONS
.notes : {
*(.note.*)
}
+
+ /* Sections to be discarded */
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.interp)
+ }
}

View File

@ -1,14 +0,0 @@
---
ziomon/ziorep_config | 1 +
1 file changed, 1 insertion(+)
--- a/ziomon/ziorep_config
+++ b/ziomon/ziorep_config
@@ -124,6 +124,7 @@ sub get_device_data
$devices{$hctl}{dev} = glob_last("block\:sd*");
}
$devices{$hctl}{sg_mm} = get_line("generic", "dev");
+ next if !defined $devices{$hctl}{dev};
$c_src = $devices{$hctl}{dev};
$devices{$hctl}{dev} =~ s/.*(sd[a-z0-9]+)\Z/$1/
unless(!$devices{$hctl}{dev});

View File

@ -1,47 +0,0 @@
---
zipl/boot/entry.S | 5 +++++
zipl/boot/head.S | 5 +++++
zipl/boot/stage2.lds.S | 1 +
zipl/boot/stage3.lds.S | 1 +
4 files changed, 12 insertions(+)
--- a/zipl/boot/entry.S
+++ b/zipl/boot/entry.S
@@ -18,3 +18,8 @@ pgm_check_handler:
basr %r14,%r14
lmg %r0,%r15,__LC_SAVE_AREA_SYNC
lpswe __LC_PGM_OLD_PSW(%r0)
+
+/* The code doesn't require an executable stack */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
--- a/zipl/boot/head.S
+++ b/zipl/boot/head.S
@@ -28,3 +28,8 @@ _start:
brasl %r14,initialize
.Lstack: .long 0x10000-160
.previous
+
+/* The code doesn't require an executable stack */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
--- a/zipl/boot/stage2.lds.S
+++ b/zipl/boot/stage2.lds.S
@@ -94,5 +94,6 @@ SECTIONS
/DISCARD/ : {
*(.eh_frame)
*(.interp)
+ *(.note.GNU-stack)
}
}
--- a/zipl/boot/stage3.lds.S
+++ b/zipl/boot/stage3.lds.S
@@ -79,5 +79,6 @@ SECTIONS
/DISCARD/ : {
*(.eh_frame)
*(.interp)
+ *(.note.GNU-stack)
}
}

View File

@ -1,39 +0,0 @@
---
common.mak | 14 ++++++++++++++
zipl/boot/Makefile | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
--- a/common.mak
+++ b/common.mak
@@ -146,6 +146,20 @@ then \
fi
#
+# Test for linker option
+#
+# $1: Linker option
+#
+# Returns the linker option if available and nothing otherwise
+#
+define test_linker_flag
+$(shell printf "int main(void) {return 0;}\n" | \
+ ( $(CC) "-Wl,$1" -o /dev/null -x c - ) >/dev/null 2>&1 && printf -- '-Wl,%s' "$1")
+endef
+
+NO_WARN_RWX_SEGMENTS_LDFLAGS := $(call test_linker_flag,"--no-warn-rwx-segments")
+
+#
# Support alternate install root
#
# INSTALLDIR: Finally install s390-tools to INSTALLDIR. This can be used
--- a/zipl/boot/Makefile
+++ b/zipl/boot/Makefile
@@ -75,7 +75,7 @@ stage3.exec: head.o stage3.o kdump3.o li
2) SFLAGS="-Wl,-T,stage2.lds";; \
3) SFLAGS="-Wl,-T,stage3.lds";; \
esac; \
- $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) -m64 -static -nostdlib $(filter %.o, $^) -o $@
+ $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -m64 -static -nostdlib $(filter %.o, $^) -o $@
%.bin: %.exec
$(OBJCOPY) -O binary \

View File

@ -1,43 +0,0 @@
---
zipl/boot/Makefile | 2 +-
zipl/boot/stage2.lds.S | 2 --
zipl/boot/stage3.lds.S | 6 ------
3 files changed, 1 insertion(+), 9 deletions(-)
--- a/zipl/boot/Makefile
+++ b/zipl/boot/Makefile
@@ -75,7 +75,7 @@ stage3.exec: head.o stage3.o kdump3.o li
2) SFLAGS="-Wl,-T,stage2.lds";; \
3) SFLAGS="-Wl,-T,stage3.lds";; \
esac; \
- $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -m64 -static -nostdlib $(filter %.o, $^) -o $@
+ $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
%.bin: %.exec
$(OBJCOPY) -O binary \
--- a/zipl/boot/stage2.lds.S
+++ b/zipl/boot/stage2.lds.S
@@ -88,8 +88,6 @@ SECTIONS
}
__stack_end = .;
- .note.gnu.build-id : { *(.note.gnu.build-id) }
-
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)
--- a/zipl/boot/stage3.lds.S
+++ b/zipl/boot/stage3.lds.S
@@ -69,12 +69,6 @@ SECTIONS
}
__stack_end = .;
- /* List this explicitly as otherwise .note.gnu.build-id will be
- * put at 0x0 */
- .notes : {
- *(.note.*)
- }
-
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)

View File

@ -1,45 +0,0 @@
---
zipl/boot/Makefile | 32 +-------------------------------
1 file changed, 1 insertion(+), 31 deletions(-)
--- a/zipl/boot/Makefile
+++ b/zipl/boot/Makefile
@@ -78,37 +78,7 @@ stage3.exec: head.o stage3.o kdump3.o li
$(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
%.bin: %.exec
- $(OBJCOPY) -O binary \
- --only-section=.stage2.head \
- --only-section=.text.dummy \
- --only-section=.text.start \
- --only-section=.text \
- --only-section=.ex_table \
- --only-section=.data \
- --only-section=.rodata.str1.2 \
- --only-section=.rodata.cst8 \
- --only-section=.rodata \
- --only-section=.stage2dump.tail \
- --only-section=.eckd2dump_mv.tail \
- --only-section=.fixup \
- $< $@
-
-stage3.bin: stage3.exec
- $(OBJCOPY) -O binary \
- --only-section=.stage2.head \
- --only-section=.text.dummy \
- --only-section=.text.start \
- --only-section=.text \
- --only-section=.ex_table \
- --only-section=.data \
- --only-section=.rodata.str1.2 \
- --only-section=.rodata.cst8 \
- --only-section=.rodata \
- --only-section=.stage2dump.tail \
- --only-section=.eckd2dump_mv.tail \
- --only-section=.fixup \
- --only-section=.sb.trailer \
- $< $@
+ $(OBJCOPY) -O binary $< $@
data.o: $(FILES)
$(LINK) $(NO_PIE_LDFLAGS) -static -nostdlib -Wl,--relocatable -Wl,--format,binary -o data.o $(FILES)

View File

@ -1,69 +0,0 @@
---
include/boot/loaders_layout.h | 3 +++
zipl/src/boot.c | 10 ++++------
2 files changed, 7 insertions(+), 6 deletions(-)
--- a/include/boot/loaders_layout.h
+++ b/include/boot/loaders_layout.h
@@ -14,12 +14,15 @@
#include "lib/zt_common.h"
#include "linux_layout.h"
+#define STAGE1B_LOAD_ADDRESS _AC(0xe000, UL)
+
#define STAGE2_DESC _AC(0x78, UL)
#define STAGE2_ENTRY _AC(0x2018, UL)
#define STAGE2_HEAP_ADDRESS _AC(0x6000, UL)
#define STAGE2_HEAP_SIZE _AC(0x3000, UL)
#define STAGE2_STACK_ADDRESS _AC(0xe400, UL)
#define STAGE2_STACK_SIZE _AC(0x1c00, UL)
+#define STAGE2_MAX_SIZE _AC(0x3000, UL)
#define STAGE3_ENTRY _AC(0xa000, UL)
--- a/zipl/src/boot.c
+++ b/zipl/src/boot.c
@@ -17,6 +17,7 @@
#include <fcntl.h>
#include <sys/stat.h>
#include "lib/util_libc.h"
+#include "boot/loaders_layout.h"
#include "stage3.h"
@@ -29,15 +30,13 @@
#define DATA_SIZE(x) ((size_t) (&_binary_##x##_bin_end - &_binary_##x##_bin_start))
#define DATA_ADDR(x) (&_binary_##x##_bin_start)
-#define STAGE2_MAX_SIZE 0x3000
-#define STAGE1B_LOAD_ADDR 0xe000
#define CCW_FLAG_CC 0x40
#define CCW_FLAG_SLI 0x20
#define FBA_BLK_SIZE 512
static struct boot_ccw0 tic_to_stage1b = {
.cmd = 0x08, /* tic */
- .address_lo = STAGE1B_LOAD_ADDR,
+ .address_lo = STAGE1B_LOAD_ADDRESS,
};
/* Check sizes of internal objects. Return 0 if everything is correct,
@@ -133,8 +132,7 @@ boot_init_fba_stage0(struct boot_fba_sta
for (i = 0; i < stage1b_count; i++) {
stage0->locdata[i].blocknr =
(uint32_t) stage1b_list[i].linear.block;
- stage0->locread[i].read.address_lo =
- STAGE1B_LOAD_ADDR + i * FBA_BLK_SIZE;
+ stage0->locread[i].read.address_lo = STAGE1B_LOAD_ADDRESS + i * FBA_BLK_SIZE;
}
/* Terminate CCW chain: Tic to stage 1b */
memcpy(&stage0->locread[i], &tic_to_stage1b, sizeof(tic_to_stage1b));
@@ -178,7 +176,7 @@ boot_init_eckd_stage1(struct boot_eckd_s
((stage1b_list[i].chs.cyl >> 12) & 0xfff0);
stage1->seek[i].sec = stage1b_list[i].chs.sec;
stage1->ssrt[i].read.address_lo =
- STAGE1B_LOAD_ADDR + i * stage1b_list[i].chs.size;
+ STAGE1B_LOAD_ADDRESS + i * stage1b_list[i].chs.size;
stage1->ssrt[i].read.flags = CCW_FLAG_CC | CCW_FLAG_SLI;
}
/* Terminate CCW chain: Tic to stage 1b */

View File

@ -1,123 +0,0 @@
---
include/boot/loaders_layout.h | 3 +++
zipl/boot/Makefile | 24 ++++++++++--------------
zipl/boot/stage0.lds.S | 18 ++++++++++++++++++
zipl/boot/stage1.lds.S | 18 ++++++++++++++++++
zipl/boot/stage1b.lds.S | 18 ++++++++++++++++++
5 files changed, 67 insertions(+), 14 deletions(-)
--- a/include/boot/loaders_layout.h
+++ b/include/boot/loaders_layout.h
@@ -14,6 +14,9 @@
#include "lib/zt_common.h"
#include "linux_layout.h"
+#define STAGE0_LOAD_ADDRESS _AC(0x0, UL)
+
+#define STAGE1_LOAD_ADDRESS _AC(0x18, UL)
#define STAGE1B_LOAD_ADDRESS _AC(0xe000, UL)
#define STAGE2_DESC _AC(0x78, UL)
--- a/zipl/boot/Makefile
+++ b/zipl/boot/Makefile
@@ -42,6 +42,15 @@ endif
%.lds: %.lds.S
$(CPP) -Wp,-MD,.$@.d,-MT,$@ $(INCLUDE_PARMS) -P -C -o $@ $<
+fba0.exec eckd0_ldl.exec eckd0_cdl.exec tape0.exec: \
+ stage0.lds
+
+eckd1.exec: \
+ stage1.lds
+
+eckd1b.exec fba1b.exec: \
+ stage1b.lds
+
eckd2dump_sv.exec: \
head.o stage2dump.o cio.o eckd2dump.o eckd2dump_sv.o \
libc.o ebcdic.o sclp.o entry.o stage2.lds
@@ -62,20 +71,7 @@ stage3.exec: head.o stage3.o kdump3.o li
sclp_stage3.o kdump.o entry.o stage3.lds
%.exec: %.o
- STAGE=$$( \
- echo $@ | awk ' \
- match($$0,/[0-9]+b*/){ \
- print substr($$0,RSTART,RLENGTH) \
- }' \
- ); \
- case $$STAGE in \
- 0) SFLAGS="-Wl,-Ttext,0";; \
- 1) SFLAGS="-Wl,-Ttext,0x18";; \
- 1b) SFLAGS="-Wl,-Ttext,0xE000";; \
- 2) SFLAGS="-Wl,-T,stage2.lds";; \
- 3) SFLAGS="-Wl,-T,stage3.lds";; \
- esac; \
- $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
+ $(LINK) -Wl,-T,$(filter %.lds,$^) $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
%.bin: %.exec
$(OBJCOPY) -O binary $< $@
--- /dev/null
+++ b/zipl/boot/stage0.lds.S
@@ -0,0 +1,18 @@
+#include "boot/loaders_layout.h"
+
+ENTRY(_start)
+
+SECTIONS
+{
+ . = STAGE0_LOAD_ADDRESS;
+ .text : {
+ *(.text .text.*)
+ }
+
+ /* Sections to be discarded */
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.interp)
+ *(.note.GNU-stack)
+ }
+}
--- /dev/null
+++ b/zipl/boot/stage1.lds.S
@@ -0,0 +1,18 @@
+#include "boot/loaders_layout.h"
+
+ENTRY(_start)
+
+SECTIONS
+{
+ . = STAGE1_LOAD_ADDRESS;
+ .text : {
+ *(.text .text.*)
+ }
+
+ /* Sections to be discarded */
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.interp)
+ *(.note.GNU-stack)
+ }
+}
--- /dev/null
+++ b/zipl/boot/stage1b.lds.S
@@ -0,0 +1,18 @@
+#include "boot/loaders_layout.h"
+
+ENTRY(_start)
+
+SECTIONS
+{
+ . = STAGE1B_LOAD_ADDRESS;
+ .text : {
+ *(.text .text.*)
+ }
+
+ /* Sections to be discarded */
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.interp)
+ *(.note.GNU-stack)
+ }
+}

View File

@ -1,59 +0,0 @@
---
genprotimg/boot/head.S | 5 +++++
genprotimg/boot/stage3a.lds.S | 1 +
genprotimg/boot/stage3a_init.S | 5 +++++
genprotimg/boot/stage3b.lds.S | 1 +
genprotimg/boot/stage3b_reloc.S | 5 +++++
5 files changed, 17 insertions(+)
--- a/genprotimg/boot/head.S
+++ b/genprotimg/boot/head.S
@@ -29,3 +29,8 @@ _start:
brasl %r14, initialize
.Lstack: .long STACK_ADDRESS + STACK_SIZE - STACK_FRAME_OVERHEAD
.previous
+
+/* The code doesn't require an executable stack */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
--- a/genprotimg/boot/stage3a.lds.S
+++ b/genprotimg/boot/stage3a.lds.S
@@ -99,5 +99,6 @@ SECTIONS
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)
+ *(.note.GNU-stack)
}
}
--- a/genprotimg/boot/stage3a_init.S
+++ b/genprotimg/boot/stage3a_init.S
@@ -26,3 +26,8 @@ _init:
br %r1
.Lstage3a_entry: .long STAGE3A_ENTRY
.previous
+
+/* The code doesn't require an executable stack */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
--- a/genprotimg/boot/stage3b.lds.S
+++ b/genprotimg/boot/stage3b.lds.S
@@ -83,5 +83,6 @@ SECTIONS
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)
+ *(.note.GNU-stack)
}
}
--- a/genprotimg/boot/stage3b_reloc.S
+++ b/genprotimg/boot/stage3b_reloc.S
@@ -53,3 +53,8 @@ stage3b_start:
.incbin "stage3b.bin"
stage3b_end:
.previous
+
+/* The code doesn't require an executable stack */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

View File

@ -1,15 +0,0 @@
---
genprotimg/boot/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/genprotimg/boot/Makefile
+++ b/genprotimg/boot/Makefile
@@ -79,7 +79,7 @@ stage3b_reloc.elf:
stage3b) SFLAGS="-Wl,-T,stage3b.lds";; \
stage3b_reloc) SFLAGS="-Wl,-estage3b_reloc_start,-Ttext,0";; \
esac; \
- $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) -m64 -static -nostdlib $(filter %.o, $^) -o $@
+ $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -m64 -static -nostdlib $(filter %.o, $^) -o $@
@chmod a-x $@
%.bin: %.elf

View File

@ -1,47 +0,0 @@
---
genprotimg/boot/Makefile | 2 +-
genprotimg/boot/stage3a.lds.S | 6 ------
genprotimg/boot/stage3b.lds.S | 6 ------
3 files changed, 1 insertion(+), 13 deletions(-)
--- a/genprotimg/boot/Makefile
+++ b/genprotimg/boot/Makefile
@@ -79,7 +79,7 @@ stage3b_reloc.elf:
stage3b) SFLAGS="-Wl,-T,stage3b.lds";; \
stage3b_reloc) SFLAGS="-Wl,-estage3b_reloc_start,-Ttext,0";; \
esac; \
- $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -m64 -static -nostdlib $(filter %.o, $^) -o $@
+ $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
@chmod a-x $@
%.bin: %.elf
--- a/genprotimg/boot/stage3a.lds.S
+++ b/genprotimg/boot/stage3a.lds.S
@@ -90,12 +90,6 @@ SECTIONS
ASSERT(ABSOLUTE(.) < 0x13000, "Data section doesn't conform to the described memory layout");
}
- /* List this explicitly as otherwise .note.gnu.build-id will be
- * put at 0x0 */
- .notes : {
- *(.note.*)
- }
-
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)
--- a/genprotimg/boot/stage3b.lds.S
+++ b/genprotimg/boot/stage3b.lds.S
@@ -74,12 +74,6 @@ SECTIONS
}
__stack_end = .;
- /* List this explicitly as otherwise .note.gnu.build-id will be
- * put at 0x0 */
- .notes : {
- *(.note.*)
- }
-
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)

View File

@ -1,23 +0,0 @@
---
genprotimg/boot/Makefile | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
--- a/genprotimg/boot/Makefile
+++ b/genprotimg/boot/Makefile
@@ -82,14 +82,8 @@ stage3b_reloc.elf:
$(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
@chmod a-x $@
-%.bin: %.elf
- $(OBJCOPY) -O binary \
- --only-section=.text* \
- --only-section=.ex_table* \
- --only-section=.fixup* \
- --only-section=.data* \
- --only-section=.rodata* \
- $< $@
+%.bin: %.elf
+ $(OBJCOPY) -O binary $< $@
@chmod a-x $@
clean:

View File

@ -1,92 +0,0 @@
---
genprotimg/boot/stage3a.lds.S | 11 +++++------
genprotimg/boot/stage3b.lds.S | 9 ++++-----
2 files changed, 9 insertions(+), 11 deletions(-)
--- a/genprotimg/boot/stage3a.lds.S
+++ b/genprotimg/boot/stage3a.lds.S
@@ -23,8 +23,6 @@ ENTRY(_init)
SECTIONS
{
- . = 0x0;
-
. = HEAP_ADDRESS;
__heap_start = .;
.heap : {
@@ -46,7 +44,7 @@ SECTIONS
. = STAGE3A_INIT_ENTRY;
__text_init_start = .;
.text : {
- stage3a_init.o(.text.init)
+ *(.text.init)
__text_init_stop = ABSOLUTE(.);
/* Text size of text_init must be smaller than 'PARMAREA - IMAGE_ENTRY',
* otherwise the text data could be overwritten by the original zipl stage3
@@ -56,8 +54,8 @@ SECTIONS
. = 0x1000;
ASSERT(ABSOLUTE(.) == STAGE3A_ENTRY,
"Text section doesn't conform to the described memory layout");
- head.o(.text.start)
- *(.text)
+ *(.text.start)
+ *(.text .text.*)
}
.ex_table ALIGN(16) : {
@@ -74,7 +72,7 @@ SECTIONS
.rodata ALIGN(16) : {
*(.rodata)
- *(.rodata.*)
+ *(.rodata*)
}
.data ALIGN(16) : {
@@ -93,6 +91,7 @@ SECTIONS
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)
+ *(.interp)
*(.note.GNU-stack)
}
}
--- a/genprotimg/boot/stage3b.lds.S
+++ b/genprotimg/boot/stage3b.lds.S
@@ -21,8 +21,6 @@ ENTRY(_start)
SECTIONS
{
- . = 0x0;
-
. = HEAP_ADDRESS;
__heap_start = .;
.heap : {
@@ -34,8 +32,8 @@ SECTIONS
. = STAGE3B_ENTRY;
.text : {
- head.o(.text.start)
- *(.text)
+ *(.text.start)
+ *(.text .text.*)
}
.ex_table ALIGN(16) : {
@@ -52,7 +50,7 @@ SECTIONS
.rodata ALIGN(16) : {
*(.rodata)
- *(.rodata.*)
+ *(.rodata*)
}
.data ALIGN(16) : {
@@ -77,6 +75,7 @@ SECTIONS
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)
+ *(.interp)
*(.note.GNU-stack)
}
}

View File

@ -1,15 +0,0 @@
---
genprotimg/boot/stage3b.lds.S | 2 ++
1 file changed, 2 insertions(+)
--- a/genprotimg/boot/stage3b.lds.S
+++ b/genprotimg/boot/stage3b.lds.S
@@ -72,6 +72,8 @@ SECTIONS
}
__stack_end = .;
+ ASSERT(. <= IMAGE_ENTRY, "stage3b size must be smaller than 0x10000 bytes")
+
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)

View File

@ -1,65 +0,0 @@
---
genprotimg/boot/Makefile | 14 ++++----------
genprotimg/boot/stage3b_reloc.S | 4 ++--
genprotimg/boot/stage3b_reloc.lds.S | 19 +++++++++++++++++++
3 files changed, 25 insertions(+), 12 deletions(-)
--- a/genprotimg/boot/Makefile
+++ b/genprotimg/boot/Makefile
@@ -69,17 +69,11 @@ endif
stage3b_reloc.o: stage3b.bin
-stage3a.elf: head.o stage3a_init.o stage3a.o stage3a.lds $(ZIPL_OBJS)
-stage3b.elf: head.o stage3b.o stage3b.lds $(ZIPL_OBJS)
-stage3b_reloc.elf:
+stage3a.elf: head.o stage3a_init.o $(ZIPL_OBJS)
+stage3b.elf: head.o $(ZIPL_OBJS)
-%.elf: %.o
- case $* in \
- stage3a) SFLAGS="-Wl,-T,stage3a.lds";; \
- stage3b) SFLAGS="-Wl,-T,stage3b.lds";; \
- stage3b_reloc) SFLAGS="-Wl,-estage3b_reloc_start,-Ttext,0";; \
- esac; \
- $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
+%.elf: %.lds %.o
+ $(LINK) $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,-T,$< -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
@chmod a-x $@
%.bin: %.elf
--- a/genprotimg/boot/stage3b_reloc.S
+++ b/genprotimg/boot/stage3b_reloc.S
@@ -22,8 +22,8 @@
.org 0x0
.section .text.start
-.globl stage3b_reloc_start
-stage3b_reloc_start:
+.globl _start
+_start:
/* Might be called after a diag308 so better set
* architecture and addressing mode
*/
--- /dev/null
+++ b/genprotimg/boot/stage3b_reloc.lds.S
@@ -0,0 +1,19 @@
+OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
+OUTPUT_ARCH(s390:64-bit)
+
+ENTRY(_start)
+
+SECTIONS
+{
+ .text : {
+ *(.text.start)
+ *(.text .text.*)
+ }
+
+ /* Sections to be discarded */
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.interp)
+ *(.note.GNU-stack)
+ }
+}

View File

@ -1,162 +0,0 @@
---
.gitignore | 1 +
common.mak | 4 ++--
zipl/boot/Makefile | 16 ++++++----------
zipl/src/Makefile | 14 +++++---------
zipl/src/boot.c | 41 ++++++++++++++++++++++++++++++++++++++---
5 files changed, 52 insertions(+), 24 deletions(-)
--- a/.gitignore
+++ b/.gitignore
@@ -110,6 +110,7 @@ ziomon/ziorep_traffic
ziomon/ziorep_utilization
zipl/boot/*.bin
zipl/boot/*.exec
+zipl/boot/.loaders
zipl/boot/data.h
zipl/src/chreipl_helper.device-mapper
zdev/src/zdev_id
--- a/common.mak
+++ b/common.mak
@@ -410,8 +410,8 @@ $(rootdir)/libpv/libpv.a: $(rootdir)/lib
$(MAKE) -C $(rootdir)/libpv libpv.a
.PHONY: $(rootdir)/libpv
-$(rootdir)/zipl/boot/data.o:
- $(MAKE) -C $(rootdir)/zipl/boot/ data.o
+$(rootdir)/zipl/boot/.loaders:
+ $(MAKE) -C $(rootdir)/zipl/boot/ .loaders
install_dirs:
for dir in $(INSTDIRS); do \
--- a/zipl/boot/Makefile
+++ b/zipl/boot/Makefile
@@ -20,7 +20,10 @@ FILES = fba0.bin fba1b.bin fba2.bin \
tape0.bin \
eckd2dump_sv.bin tape2dump.bin fba2dump.bin eckd2dump_mv.bin
-all: data.o data.h tape0.bin stage3.bin
+all: .loaders tape0.bin stage3.bin
+
+.loaders: $(FILES)
+ touch .loaders
# Prevent make from using some default rules...
%: %.S
@@ -76,16 +79,9 @@ stage3.exec: head.o stage3.o kdump3.o li
%.bin: %.exec
$(OBJCOPY) -O binary $< $@
-data.o: $(FILES)
- $(LINK) $(NO_PIE_LDFLAGS) -static -nostdlib -Wl,--relocatable -Wl,--format,binary -o data.o $(FILES)
-
-data.h: data.o
- rm -f data.h
- $(NM) data.o | while read ADDR TYPE SYMBOL ; do \
- echo "extern char $$SYMBOL;" >>data.h; done
clean:
- rm -f -- *.o *.exec *.bin $(FILES) data.o data.h tape0.bin *.xxx *.yyy \
- stage3.bin *.lds .*.lds.d
+ rm -f -- *.o *.exec *.bin $(FILES) tape0.bin *.xxx *.yyy \
+ stage3.bin *.lds .*.lds.d .loaders
.PHONY: all clean
--- a/zipl/src/Makefile
+++ b/zipl/src/Makefile
@@ -4,14 +4,14 @@ include ../../common.mak
ALL_CPPFLAGS += -I../include -I../boot \
-DZFCPDUMP_IMAGE="STRINGIFY($(ZFCPDUMP_DIR)/$(ZFCPDUMP_IMAGE))" \
-DZFCPDUMP_INITRD="STRINGIFY($(ZFCPDUMP_DIR)/$(ZFCPDUMP_INITRD))" \
- -D_FILE_OFFSET_BITS=64 $(NO_PIE_CFLAGS)
+ -D_FILE_OFFSET_BITS=64 $(NO_PIE_CFLAGS) -DBUILD_PATH="../boot"
ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS)
libs = $(rootdir)/libutil/libutil.a \
$(rootdir)/libvtoc/libvtoc.a \
objects = misc.o error.o scan.o job.o boot.o bootmap.o fs-map.o disk.o \
- bootmap_header.o envblk.o install.o zipl.o $(rootdir)/zipl/boot/data.o
+ bootmap_header.o envblk.o install.o zipl.o
zipl_helpers = $(basename $(wildcard zipl_helper.*.c))
chreipl_helpers = $(subst zipl_,chreipl_, $(zipl_helpers))
@@ -19,6 +19,7 @@ zipl_stage3 = ../boot/stage3.bin
all: zipl zipl-editenv $(chreipl_helpers) $(zipl_stage3)
+boot.o: ../boot/.loaders
zipl: $(objects) $(libs)
zipl_helper.device-mapper: $(rootdir)/libdasd/libdasd.a \
@@ -47,13 +48,8 @@ clean:
# Additional manual dependencies
-.boot.o.d boot.o: ../boot/data.h
-
-../boot/data.h:
- $(MAKE) -C ../boot data.h
-
-../boot/data.o:
- $(MAKE) -C ../boot data.o
+../boot/.loaders:
+ $(MAKE) -C ../boot .loaders
../boot/stage3.bin:
$(MAKE) -C ../boot stage3.bin
--- a/zipl/src/boot.c
+++ b/zipl/src/boot.c
@@ -21,14 +21,49 @@
#include "stage3.h"
-#include "../boot/data.h"
#include "boot.h"
#include "bootmap.h"
#include "error.h"
#include "misc.h"
-#define DATA_SIZE(x) ((size_t) (&_binary_##x##_bin_end - &_binary_##x##_bin_start))
-#define DATA_ADDR(x) (&_binary_##x##_bin_start)
+/* Import a binary file */
+/* clang-format off */
+#define DATA_NAME(SYM, SUFFIX) _binary_##SYM##_bin##SUFFIX
+#define DATA_SIZE(SYM) ((size_t)(&DATA_NAME(SYM, _end) - &DATA_NAME(SYM, _start)))
+#define DATA_ADDR(SYM) (&DATA_NAME(SYM, _start))
+#define BIN_FILE_PATH(FILE_NAME) STRINGIFY(BUILD_PATH) "/" STRINGIFY(FILE_NAME) ".bin"
+#define IMPORT_DATA(SYM) \
+ extern const uint8_t DATA_NAME(SYM, _start); \
+ extern const uint8_t DATA_NAME(SYM, _end); \
+ asm(".section \".rodata\", \"a\", @progbits\n" \
+ ".balign 4\n" \
+ ".global " STRINGIFY(DATA_NAME(SYM, _start)) "\n" \
+ STRINGIFY(DATA_NAME(SYM, _start)) ":\n" \
+ ".incbin \"" BIN_FILE_PATH(SYM) "\"\n" \
+ ".global " STRINGIFY(DATA_NAME(SYM, _end)) "\n" \
+ STRINGIFY(DATA_NAME(SYM, _end)) ":\n" \
+ ".balign 4\n" \
+ ".previous\n")
+/* clang-format on */
+
+/* Stage 0 Loader */
+IMPORT_DATA(eckd0_cdl);
+IMPORT_DATA(eckd0_ldl);
+IMPORT_DATA(fba0);
+IMPORT_DATA(tape0);
+/* Stage 1 Loader */
+IMPORT_DATA(eckd1);
+/* Stage 1b Loader */
+IMPORT_DATA(eckd1b);
+IMPORT_DATA(fba1b);
+/* Stage 2 Loader */
+IMPORT_DATA(eckd2);
+IMPORT_DATA(fba2);
+/* Stage 2 Dump Loader */
+IMPORT_DATA(eckd2dump_mv);
+IMPORT_DATA(eckd2dump_sv);
+IMPORT_DATA(fba2dump);
+IMPORT_DATA(tape2dump);
#define CCW_FLAG_CC 0x40
#define CCW_FLAG_SLI 0x20

View File

@ -1,120 +0,0 @@
--- s390-tools-2.25.0/ap_tools/Makefile 2022-11-09 11:11:48.000000000 -0500
+++ s390-tools-2.25.0/ap_tools/Makefile 2022-12-01 15:33:30.953373912 -0500
@@ -26,9 +26,9 @@
install: all
@if [ ! -d $(DESTDIR)$(MDEVCTL_CALLOUTS) ]; then \
mkdir -p $(DESTDIR)$(MDEVCTL_CALLOUTS); \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(MDEVCTL_DIR); \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(MDEVCTL_SCRIPTS); \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(MDEVCTL_CALLOUTS); \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(MDEVCTL_DIR); \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(MDEVCTL_SCRIPTS); \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(MDEVCTL_CALLOUTS); \
chmod 755 $(DESTDIR)$(MDEVCTL_DIR); \
chmod 755 $(DESTDIR)$(MDEVCTL_SCRIPTS); \
chmod 755 $(DESTDIR)$(MDEVCTL_CALLOUTS); \
@@ -37,9 +37,9 @@
$(DESTDIR)$(MDEVCTL_CALLOUTS)
@if [ ! -d $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS) ]; then \
mkdir -p $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS); \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(MDEVCTL_DEP_DIR); \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(MDEVCTL_DEP_SCRIPTS); \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS); \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(MDEVCTL_DEP_DIR); \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(MDEVCTL_DEP_SCRIPTS); \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS); \
chmod 755 $(DESTDIR)$(MDEVCTL_DEP_DIR); \
chmod 755 $(DESTDIR)$(MDEVCTL_DEP_SCRIPTS); \
chmod 755 $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS); \
--- s390-tools-2.25.0/hmcdrvfs/Makefile2022-11-09 11:11:48.000000000 -0500
+++ s390-tools-2.25.0/hmcdrvfs/Makefile 2022-12-01 15:33:42.825238489 -0500
@@ -52,7 +52,7 @@
cat $$i | \
sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(USRSBINDIR)/$$i; \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(USRSBINDIR)/$$i; \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(USRSBINDIR)/$$i; \
chmod 755 $(DESTDIR)$(USRSBINDIR)/$$i; \
done
--- s390-tools-2.25.0/hsci/Makefile 2022-11-09 11:11:48.000000000 -0500
+++ s390-tools-2.25.0/hsci/Makefile 2022-12-01 15:33:53.029122092 -0500
@@ -5,7 +5,7 @@
install: hsci
$(SED) -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
< hsci >$(DESTDIR)$(BINDIR)/hsci; \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(BINDIR)/hsci; \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(BINDIR)/hsci; \
chmod 755 $(DESTDIR)$(BINDIR)/hsci; \
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man8
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 hsci.8 \
--- s390-tools-2.25.0/ip_watcher/Makefile 2022-11-09 11:11:48.000000000 -0500
+++ s390-tools-2.25.0/ip_watcher/Makefile 2022-12-01 15:34:09.116938576 -0500
@@ -12,7 +12,7 @@
install: ip_watcher.pl xcec-bridge start_hsnc.sh
$(SED) -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
< start_hsnc.sh >$(DESTDIR)$(USRSBINDIR)/start_hsnc.sh; \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(USRSBINDIR)/start_hsnc.sh; \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(USRSBINDIR)/start_hsnc.sh; \
chmod 755 $(DESTDIR)$(USRSBINDIR)/start_hsnc.sh; \
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 ip_watcher.pl \
$(DESTDIR)$(USRSBINDIR)
--- s390-tools-2.25.0/netboot/Makefile 2022-11-09 11:11:48.000000000 -0500
+++ s390-tools-2.25.0/netboot/Makefile 2022-12-01 15:34:28.212720750 -0500
@@ -15,13 +15,13 @@
install-scripts: $(SCRIPTS)
@if [ ! -d $(DESTDIR)$(NETBOOT_SAMPLEDIR) ]; then \
mkdir -p $(DESTDIR)$(NETBOOT_SAMPLEDIR); \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(NETBOOT_SAMPLEDIR); \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(NETBOOT_SAMPLEDIR); \
chmod 755 $(DESTDIR)$(NETBOOT_SAMPLEDIR); \
fi; \
for i in $^; do \
$(SED) -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
< $$i >$(DESTDIR)$(NETBOOT_SAMPLEDIR)/$$i; \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(NETBOOT_SAMPLEDIR)/$$i; \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(NETBOOT_SAMPLEDIR)/$$i; \
chmod 755 $(DESTDIR)$(NETBOOT_SAMPLEDIR)/$$i; \
done
--- s390-tools-2.25.0/qethconf/Makefile 2022-11-09 11:11:48.000000000 -0500
+++ s390-tools-2.25.0/qethconf/Makefile 2022-12-01 15:34:39.356593630 -0500
@@ -5,7 +5,7 @@
install: qethconf
$(SED) -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
< qethconf >$(DESTDIR)$(BINDIR)/qethconf; \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(BINDIR)/qethconf; \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(BINDIR)/qethconf; \
chmod 755 $(DESTDIR)$(BINDIR)/qethconf; \
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man8
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 qethconf.8 \
--- s390-tools-2.25.0/zconf/Makefile 2022-11-09 11:11:48.000000000 -0500
+++ s390-tools-2.25.0/zconf/Makefile 2022-12-01 15:36:10.583552975 -0500
@@ -25,7 +25,7 @@
cat $$i | \
sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(BINDIR)/$$i; \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(BINDIR)/$$i; \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(BINDIR)/$$i; \
chmod 755 $(DESTDIR)$(BINDIR)/$$i; \
done
@@ -34,15 +34,15 @@
cat $$i | \
sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(USRSBINDIR)/$$i; \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(USRSBINDIR)/$$i; \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(USRSBINDIR)/$$i; \
chmod 755 $(DESTDIR)$(USRSBINDIR)/$$i; \
done
install-manpages: $(MANPAGES)
@if [ ! -d $(DESTDIR)$(MANDIR) ]; then \
mkdir -p $(DESTDIR)$(MANDIR)/man8; \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(MANDIR); \
- chown $(OWNER).$(GROUP) $(DESTDIR)$(MANDIR)/man8; \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(MANDIR); \
+ chown $(OWNER):$(GROUP) $(DESTDIR)$(MANDIR)/man8; \
chmod 755 $(DESTDIR)$(MANDIR); \
chmod 755 $(DESTDIR)$(MANDIR)/man8; \
fi; \

View File

@ -1,64 +0,0 @@
---
zconf/zcrypt/lszcrypt.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/zconf/zcrypt/lszcrypt.c
+++ b/zconf/zcrypt/lszcrypt.c
@@ -838,12 +838,12 @@ static void show_devices_all(void)
/*
* Show devices specified on commandline
*/
-static void show_devices_argv(char *argv[])
+static void show_devices_argv(int argc, char **argv)
{
+ int id, dom, argidx, devidx, n, dev_cnt, sub_cnt;
struct util_rec *rec = util_rec_new_wide("-");
- struct dirent **dev_vec, **subdev_vec;
char *ap, *grp_dev, *path, *card, *sub_dev;
- int id, dom, i, n, dev_cnt, sub_cnt;
+ struct dirent **dev_vec, **subdev_vec;
/* check if ap driver is available */
ap = util_path_sysfs("bus/ap");
@@ -855,10 +855,10 @@ static void show_devices_argv(char *argv
define_rec_verbose(rec);
util_rec_print_hdr(rec);
- for (i = 0; argv[i] != NULL; i++) {
+ for (argidx = 0; argidx < argc; argidx++) {
id = -1;
dom = -1;
- if (sscanf(argv[i], "%x.%x", &id, &dom) >= 1) {
+ if (sscanf(argv[argidx], "%x.%x", &id, &dom) >= 1) {
/* at least the id field was valid */
if (id >= 0 && dom >= 0) { /* single subdevice */
util_asprintf(&sub_dev, "%02x.%04x", id, dom);
@@ -874,7 +874,7 @@ static void show_devices_argv(char *argv
}
continue;
}
- if (sscanf(argv[i]+1, "%x", &dom) == 1) {
+ if (sscanf(argv[argidx] + 1, "%x", &dom) == 1) {
/* list specific domains of all adapters */
path = util_path_sysfs("devices/ap/");
dev_cnt = util_scandir(&dev_vec, alphasort, path,
@@ -882,9 +882,9 @@ static void show_devices_argv(char *argv
if (dev_cnt < 1)
errx(EXIT_FAILURE, "No crypto card devices found.");
free(path);
- for (i = 0; i < dev_cnt; i++) {
+ for (devidx = 0; devidx < dev_cnt; devidx++) {
path = util_path_sysfs("devices/ap/%s",
- dev_vec[i]->d_name);
+ dev_vec[devidx]->d_name);
sub_cnt = util_scandir(&subdev_vec, alphasort,
path,
"[0-9a-fA-F]+.%04x",
@@ -1008,6 +1008,6 @@ int main(int argc, char **argv)
if (optind == argc)
show_devices_all();
else
- show_devices_argv(&argv[optind]);
+ show_devices_argv((argc - optind), &argv[optind]);
return EXIT_SUCCESS;
}

View File

@ -1,6 +1,10 @@
--- s390-tools-2.24.0/common.mak 2022-11-09 11:11:48.000000000 -0500 ---
+++ s390-tools-2.24.0/common.mak 2022-11-28 09:46:19.055653319 -0500 common.mak | 4 ++--
@@ -254,8 +254,8 @@ 1 file changed, 2 insertions(+), 2 deletions(-)
--- a/common.mak
+++ b/common.mak
@@ -328,8 +328,8 @@
LDFLAGS CPPFLAGS ALL_CFLAGS ALL_CXXFLAGS ALL_LDFLAGS ALL_CPPFLAGS LDFLAGS CPPFLAGS ALL_CFLAGS ALL_CXXFLAGS ALL_LDFLAGS ALL_CPPFLAGS
ifneq ($(shell $(CC_SILENT) -dumpspecs 2>/dev/null | grep -e '[^f]no-pie'),) ifneq ($(shell $(CC_SILENT) -dumpspecs 2>/dev/null | grep -e '[^f]no-pie'),)

View File

@ -1,16 +0,0 @@
This work around fixes a gcc-12 false positive by disabling `Warray-bounds`.
It is similar in intent as the previous
s390-tools-sles15sp4-genprotimg-boot-disable-Warray-bounds-for-now.patch
--- s390-tools-2.24.0/zipl/boot/Makefile 2022-11-09 17:11:48.000000000 +0100
+++ s390-tools-2.24.0/zipl/boot/Makefile 2022-12-02 23:16:30.513062000 +0100
@@ -10,7 +10,8 @@
-fno-delete-null-pointer-checks -fno-stack-protector \
-fexec-charset=IBM1047 -m64 -mpacked-stack \
-mstack-size=4096 -mstack-guard=128 -msoft-float \
- -W -Wall -Wformat-security -fno-sanitize=all
+ -W -Wall -Wformat-security -fno-sanitize=all \
+ -Wno-array-bounds
ALL_LDFLAGS += -fno-sanitize=all
FILES = fba0.bin fba1b.bin fba2.bin \

View File

@ -1,15 +0,0 @@
---
zkey/ep11.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/zkey/ep11.c
+++ b/zkey/ep11.c
@@ -35,7 +35,7 @@
* Definitions for the EP11 library
*/
#define EP11_LIBRARY_NAME "libep11.so"
-#define EP11_LIBRARY_VERSION 3
+#define EP11_LIBRARY_VERSION 4
#define EP11_WEB_PAGE "http://www.ibm.com/security/cryptocards"
/**

View File

@ -1,3 +1,56 @@
-------------------------------------------------------------------
Wed Jun 14 11:24:27 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
- Upgrade to version 2.27.0 (jsc#PED-3275)
- Changes of existing tools:
* s390-tools cross-compile and non-s390x support:
- pkg-config is now mandatory for the build process
- Add PKG_CONFIG Makefile variable to select pkg-config program;
default pkg-config or $(CROSS_COMPILE)pkg-config if
CROSS_COMPILE is set
- Rename Makefile variable ARCH to HOST_ARCH. HOST_ARCH is the
architecture that will run the produced (executable) objects
- Add the Makefile variable BUILD_ARCH. BUILD_ARCH is the
architecture of the build system. For each Makefile variable like
CC, LINK, CPP, ... there is a suffixed version of it - e.g.
CC_FOR_BUILD. This is useful for cross compiling, and this naming
convention is very similar to the Meson convention (see
https://mesonbuild.com/Reference-tables.html#environment-variables-per-machine).
- Limit build targets for non-s390x architectures (pvattest)
* dasdfmt: Fall back to full format if space release fails
* dbginfo.sh: Add nstat for network and SNMP stats
* dbginfo.sh: Rework crypto data collection
* hyptop: Show thread util by default
* zipl: Add support for list-directed IPL dump from ECKD DASD
- Bug Fixes:
* lszcrypt: Fix argument parsing
* zdev/dracut: Fix out-of-memory (OOM) situations in the kdump crashkernel environment
* ziomon/ziorep_config: Fix for SCSI devices of type disk without block dev
* pvextract-hdr: Fix parsing issues on little-endian systems
- Amended the .patches to fit the 2.27 version
- Removed obsolete patches (the fixes are included in this version)
* s390-tools-sles15sp5-zipl-boot-disable-Warray-bounds-for-now.patch
* s390-tools-sles15sp5-zkey-Support-EP11-host-library-version-4.patch
* s390-tools-sles15sp5-01-zipl-boot-discard-.eh_frame-and-.interp-input-sectio.patch
* s390-tools-sles15sp5-02-zipl-boot-declare-that-no-executable-stack-is-requir.patch
* s390-tools-sles15sp5-03-zipl-boot-use-no-warn-rwx-segments-linker-flag.patch
* s390-tools-sles15sp5-04-zipl-boot-disable-build-id.patch
* s390-tools-sles15sp5-05-zipl-boot-simplify-objcopy-commands.patch
* s390-tools-sles15sp5-06-zipl-move-STAGE2_MAX_SIZE-and-STAGE1B_LOAD_ADDR-to-l.patch
* s390-tools-sles15sp5-07-zipl-boot-use-linker-scripts-for-all-bootloaders.patch
* s390-tools-sles15sp5-08-genprotimg-boot-declare-that-no-executable-stack-is-.patch
* s390-tools-sles15sp5-09-genprotimg-boot-use-no-warn-rwx-segments-linker-flag.patch
* s390-tools-sles15sp5-10-genprotimg-boot-disable-build-id.patch
* s390-tools-sles15sp5-11-genprotimg-boot-Makefile-simplify-objcopy-command.patch
* s390-tools-sles15sp5-12-genprotimg-boot-improve-linker-scripts.patch
* s390-tools-sles15sp5-13-genprotimg-boot-stage3b-add-size-check-to-the-linker.patch
* s390-tools-sles15sp5-14-genprotimg-boot-stage3b_reloc.bin-add-linker-script.patch
* s390-tools-sles15sp5-15-zipl-Embed-loader-data-directly-into-boot-object.patch
* s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch
* s390-tools-sles15sp5-01-ziomon-ziorep_config-fix-missing-SG-major-minor-for-.patch
* s390-tools-sles15sp5-02-ziomon-ziorep_config-fix-for-SCSI-devices-of-type-di.patch
* s390-tools-sles15sp5-fix-chown-commands-syntax.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 4 08:32:36 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com> Thu May 4 08:32:36 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>

View File

@ -33,7 +33,7 @@
%endif %endif
Name: s390-tools Name: s390-tools
Version: 2.25.0 Version: 2.27.0
Release: 0 Release: 0
Summary: S/390 tools like zipl and dasdfmt Summary: S/390 tools like zipl and dasdfmt
License: MIT License: MIT
@ -129,8 +129,7 @@ Source99: zfcp_host_configure.8
### ###
# IBM patches # IBM patches
Patch001: s390-tools-sles15sp5-zipl-boot-disable-Warray-bounds-for-now.patch ###
Patch002: s390-tools-sles15sp5-zkey-Support-EP11-host-library-version-4.patch
# SUSE patches # SUSE patches
Patch900: s390-tools-sles12-zipl_boot_msg.patch Patch900: s390-tools-sles12-zipl_boot_msg.patch
Patch901: s390-tools-sles15-sysconfig-compatible-dumpconf.patch Patch901: s390-tools-sles15-sysconfig-compatible-dumpconf.patch
@ -148,32 +147,9 @@ Patch908: s390-tools-sles15sp3-dasdfmt-retry-BIODASDINFO-if-device-is-busy
Patch909: s390-tools-sles12-fdasd-skip-partition-check-and-BLKRRPART-ioctl.patch Patch909: s390-tools-sles12-fdasd-skip-partition-check-and-BLKRRPART-ioctl.patch
Patch910: s390-tools-sles15sp1-11-zdev-Do-not-call-zipl-on-initrd-update.patch Patch910: s390-tools-sles15sp1-11-zdev-Do-not-call-zipl-on-initrd-update.patch
Patch911: s390-tools-sles15sp5-remove-no-pie-link-arguments.patch Patch911: s390-tools-sles15sp5-remove-no-pie-link-arguments.patch
# Bug 1208527, and bug 1206173
Patch912: s390-tools-sles15sp5-01-zipl-boot-discard-.eh_frame-and-.interp-input-sectio.patch
Patch913: s390-tools-sles15sp5-02-zipl-boot-declare-that-no-executable-stack-is-requir.patch
Patch914: s390-tools-sles15sp5-03-zipl-boot-use-no-warn-rwx-segments-linker-flag.patch
Patch915: s390-tools-sles15sp5-04-zipl-boot-disable-build-id.patch
Patch916: s390-tools-sles15sp5-05-zipl-boot-simplify-objcopy-commands.patch
Patch917: s390-tools-sles15sp5-06-zipl-move-STAGE2_MAX_SIZE-and-STAGE1B_LOAD_ADDR-to-l.patch
Patch918: s390-tools-sles15sp5-07-zipl-boot-use-linker-scripts-for-all-bootloaders.patch
Patch919: s390-tools-sles15sp5-08-genprotimg-boot-declare-that-no-executable-stack-is-.patch
Patch920: s390-tools-sles15sp5-09-genprotimg-boot-use-no-warn-rwx-segments-linker-flag.patch
Patch921: s390-tools-sles15sp5-10-genprotimg-boot-disable-build-id.patch
Patch922: s390-tools-sles15sp5-11-genprotimg-boot-Makefile-simplify-objcopy-command.patch
Patch923: s390-tools-sles15sp5-12-genprotimg-boot-improve-linker-scripts.patch
Patch924: s390-tools-sles15sp5-13-genprotimg-boot-stage3b-add-size-check-to-the-linker.patch
Patch925: s390-tools-sles15sp5-14-genprotimg-boot-stage3b_reloc.bin-add-linker-script.patch
Patch926: s390-tools-sles15sp5-15-zipl-Embed-loader-data-directly-into-boot-object.patch
# Bug 1209196
Patch927: s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch
# #
Patch928: s390-tools-ALP-zdev-live.patch Patch999: s390-tools-ALP-zdev-live.patch
# Bug 1211008
Patch929: s390-tools-sles15sp5-01-ziomon-ziorep_config-fix-missing-SG-major-minor-for-.patch
Patch930: s390-tools-sles15sp5-02-ziomon-ziorep_config-fix-for-SCSI-devices-of-type-di.patch
# #
Patch999: s390-tools-sles15sp5-fix-chown-commands-syntax.patch
BuildRequires: curl-devel BuildRequires: curl-devel
BuildRequires: dracut BuildRequires: dracut
@ -680,6 +656,7 @@ done
%dir %{_datadir}/s390-tools/netboot %dir %{_datadir}/s390-tools/netboot
%dir %{_datadir}/s390-tools/genprotimg %dir %{_datadir}/s390-tools/genprotimg
%dir %{_prefix}/lib/dracut/modules.d/95zdev %dir %{_prefix}/lib/dracut/modules.d/95zdev
%dir %{_prefix}/lib/dracut/modules.d/95zdev-kdump
%dir %{_prefix}/lib/dracut/modules.d/96zdev-live %dir %{_prefix}/lib/dracut/modules.d/96zdev-live
%dir %{_prefix}/lib/dracut/modules.d/99ngdump %dir %{_prefix}/lib/dracut/modules.d/99ngdump
%dir /boot/zipl %dir /boot/zipl