Documentation/bpf/s390.rst

Source file repositories/reference/linux-study-clean/Documentation/bpf/s390.rst

File Facts

System
Linux kernel
Corpus path
Documentation/bpf/s390.rst
Extension
.rst
Size
5753 bytes
Lines
206
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

===================
Testing BPF on s390
===================

1. Introduction
***************

IBM Z are mainframe computers, which are descendants of IBM System/360 from
year 1964. They are supported by the Linux kernel under the name "s390". This
document describes how to test BPF in an s390 QEMU guest.

2. One-time setup
*****************

The following is required to build and run the test suite:

  * s390 GCC
  * s390 development headers and libraries
  * Clang with BPF support
  * QEMU with s390 support
  * Disk image with s390 rootfs

Debian supports installing compiler and libraries for s390 out of the box.
Users of other distros may use debootstrap in order to set up a Debian chroot::

  sudo debootstrap \
    --variant=minbase \
    --include=sudo \
    testing \
    ./s390-toolchain
  sudo mount --rbind /dev ./s390-toolchain/dev
  sudo mount --rbind /proc ./s390-toolchain/proc
  sudo mount --rbind /sys ./s390-toolchain/sys
  sudo chroot ./s390-toolchain

Once on Debian, the build prerequisites can be installed as follows::

  sudo dpkg --add-architecture s390x
  sudo apt-get update
  sudo apt-get install \
    bc \
    bison \
    cmake \
    debootstrap \
    dwarves \
    flex \
    g++ \
    gcc \
    g++-s390x-linux-gnu \
    gcc-s390x-linux-gnu \
    gdb-multiarch \
    git \
    make \
    python3 \
    qemu-system-misc \
    qemu-utils \
    rsync \
    libcap-dev:s390x \
    libelf-dev:s390x \
    libncurses-dev

Latest Clang targeting BPF can be installed as follows::

  git clone https://github.com/llvm/llvm-project.git
  ln -s ../../clang llvm-project/llvm/tools/
  mkdir llvm-project-build
  cd llvm-project-build
  cmake \
    -DLLVM_TARGETS_TO_BUILD=BPF \
    -DCMAKE_BUILD_TYPE=Release \

Annotation

Implementation Notes