diff --git a/diskimage_builder/elements/zipl/README.rst b/diskimage_builder/elements/zipl/README.rst new file mode 100644 index 000000000..46c99f522 --- /dev/null +++ b/diskimage_builder/elements/zipl/README.rst @@ -0,0 +1,18 @@ +========== +zipl +========== + +Zipl is the bootloader for s390x. + +This element installs zipl on the base device holding the /boot directory on the system. +It's mandatory for building s390x images. It replaces the `bootloader` element +(which would install grub2 by default). + +This element has been tested with `ubuntu` and `ubuntu-minimal` distro. + +Arguments +========= + +* ``DIB_ZIPL_DEFAULT_CMDLINE`` sets the CMDLINE parameters that + are appended to the zipl.conf parameter configuration. It defaults to + 'LANG=en_US.UTF-8 console=ttyS0 console=ttyS1' diff --git a/diskimage_builder/elements/zipl/element-deps b/diskimage_builder/elements/zipl/element-deps new file mode 100644 index 000000000..7076aba94 --- /dev/null +++ b/diskimage_builder/elements/zipl/element-deps @@ -0,0 +1 @@ +package-installs diff --git a/diskimage_builder/elements/zipl/element-provides b/diskimage_builder/elements/zipl/element-provides new file mode 100644 index 000000000..54960172d --- /dev/null +++ b/diskimage_builder/elements/zipl/element-provides @@ -0,0 +1 @@ +bootloader diff --git a/diskimage_builder/elements/zipl/environment.d/10-zipl-default-cmdline b/diskimage_builder/elements/zipl/environment.d/10-zipl-default-cmdline new file mode 100644 index 000000000..ea1c15293 --- /dev/null +++ b/diskimage_builder/elements/zipl/environment.d/10-zipl-default-cmdline @@ -0,0 +1 @@ +export DIB_ZIPL_DEFAULT_CMDLINE=${DIB_ZIPL_DEFAULT_CMDLINE:-"LANG=en_US.UTF-8 console=ttyS0 console=ttyS1"} diff --git a/diskimage_builder/elements/zipl/finalise.d/50-zipl b/diskimage_builder/elements/zipl/finalise.d/50-zipl new file mode 100755 index 000000000..4f9499edf --- /dev/null +++ b/diskimage_builder/elements/zipl/finalise.d/50-zipl @@ -0,0 +1,70 @@ +#!/bin/bash +# Copyright (c) 2017 IBM Corp. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# +# See the License for the specific language governing permissions and +# limitations under the License. + +# Configure zipl. + +if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +# get the device containing the /boot directory +base_device=`df /boot --output=source | grep "/dev/*"` + +cat > /lib/s390-tools/zipl_helper.loop < /etc/zipl.conf <>"$KERNEL_CONF_FILE" diff --git a/doc/source/user_guide/building_an_image.rst b/doc/source/user_guide/building_an_image.rst index 7be649960..aaf634160 100644 --- a/doc/source/user_guide/building_an_image.rst +++ b/doc/source/user_guide/building_an_image.rst @@ -668,3 +668,11 @@ Typically ``ppc64el`` refers to a ``.deb`` based distribution architecture, and ``ppc64le`` refers to a ``.rpm`` based distribution. Regardless of the distribution the kernel architecture is always ``ppc64le``. + +Notes about s390x (z Systems) Architecture +++++++++++++++++++++++++++++++++++++++++++ + +Images for s390x can only be build on s390x hosts. Trying to build +it with the architecture override on other architecture will +cause the build to fail. +