mirror of
https://salsa.debian.org/cloud-team/debian-cloud-images.git
synced 2026-01-11 20:07:11 +00:00
Add minimal support for s390x
This commit is contained in:
parent
9c7573949e
commit
bd424a5384
15 changed files with 222 additions and 17 deletions
|
|
@ -1726,6 +1726,10 @@
|
|||
"job": "generic forky riscv64 build",
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
"job": "generic forky s390x build",
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
"job": "genericcloud forky amd64 build",
|
||||
"optional": false
|
||||
|
|
@ -1749,6 +1753,10 @@
|
|||
{
|
||||
"job": "nocloud forky riscv64 build",
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
"job": "nocloud forky s390x build",
|
||||
"optional": false
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
|
|
@ -1942,6 +1950,19 @@
|
|||
"CLOUD_VENDOR": "generic"
|
||||
}
|
||||
},
|
||||
"generic forky s390x build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
{
|
||||
"if": "$PIPELINE_RELEASE_FORKY"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"CLOUD_ARCH": "s390x",
|
||||
"CLOUD_RELEASE": "forky",
|
||||
"CLOUD_VENDOR": "generic"
|
||||
}
|
||||
},
|
||||
"generic sid amd64 build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
|
|
@ -1994,6 +2015,19 @@
|
|||
"CLOUD_VENDOR": "generic"
|
||||
}
|
||||
},
|
||||
"generic sid s390x build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
{
|
||||
"if": "$PIPELINE_RELEASE_SID"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"CLOUD_ARCH": "s390x",
|
||||
"CLOUD_RELEASE": "sid",
|
||||
"CLOUD_VENDOR": "generic"
|
||||
}
|
||||
},
|
||||
"generic trixie amd64 build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
|
|
@ -2475,6 +2509,19 @@
|
|||
"CLOUD_VENDOR": "nocloud"
|
||||
}
|
||||
},
|
||||
"nocloud forky s390x build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
{
|
||||
"if": "$PIPELINE_RELEASE_FORKY"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"CLOUD_ARCH": "s390x",
|
||||
"CLOUD_RELEASE": "forky",
|
||||
"CLOUD_VENDOR": "nocloud"
|
||||
}
|
||||
},
|
||||
"nocloud sid amd64 build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
|
|
@ -2527,6 +2574,19 @@
|
|||
"CLOUD_VENDOR": "nocloud"
|
||||
}
|
||||
},
|
||||
"nocloud sid s390x build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
{
|
||||
"if": "$PIPELINE_RELEASE_SID"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"CLOUD_ARCH": "s390x",
|
||||
"CLOUD_RELEASE": "sid",
|
||||
"CLOUD_VENDOR": "nocloud"
|
||||
}
|
||||
},
|
||||
"nocloud trixie amd64 build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
|
|
@ -2669,6 +2729,10 @@
|
|||
"job": "generic sid riscv64 build",
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
"job": "generic sid s390x build",
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
"job": "genericcloud sid amd64 build",
|
||||
"optional": false
|
||||
|
|
@ -2692,6 +2756,10 @@
|
|||
{
|
||||
"job": "nocloud sid riscv64 build",
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
"job": "nocloud sid s390x build",
|
||||
"optional": false
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
|
|
|
|||
|
|
@ -676,6 +676,19 @@
|
|||
"CLOUD_VENDOR": "generic"
|
||||
}
|
||||
},
|
||||
"generic forky s390x build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
{
|
||||
"when": "manual"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"CLOUD_ARCH": "s390x",
|
||||
"CLOUD_RELEASE": "forky",
|
||||
"CLOUD_VENDOR": "generic"
|
||||
}
|
||||
},
|
||||
"generic sid amd64 build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
|
|
@ -728,6 +741,19 @@
|
|||
"CLOUD_VENDOR": "generic"
|
||||
}
|
||||
},
|
||||
"generic sid s390x build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
{
|
||||
"when": "manual"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"CLOUD_ARCH": "s390x",
|
||||
"CLOUD_RELEASE": "sid",
|
||||
"CLOUD_VENDOR": "generic"
|
||||
}
|
||||
},
|
||||
"generic trixie amd64 build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
|
|
@ -1209,6 +1235,19 @@
|
|||
"CLOUD_VENDOR": "nocloud"
|
||||
}
|
||||
},
|
||||
"nocloud forky s390x build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
{
|
||||
"when": "manual"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"CLOUD_ARCH": "s390x",
|
||||
"CLOUD_RELEASE": "forky",
|
||||
"CLOUD_VENDOR": "nocloud"
|
||||
}
|
||||
},
|
||||
"nocloud sid amd64 build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
|
|
@ -1261,6 +1300,19 @@
|
|||
"CLOUD_VENDOR": "nocloud"
|
||||
}
|
||||
},
|
||||
"nocloud sid s390x build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
{
|
||||
"when": "manual"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"CLOUD_ARCH": "s390x",
|
||||
"CLOUD_RELEASE": "sid",
|
||||
"CLOUD_VENDOR": "nocloud"
|
||||
}
|
||||
},
|
||||
"nocloud trixie amd64 build": {
|
||||
"extends": ".build",
|
||||
"rules": [
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -7,7 +7,7 @@ help:
|
|||
@echo " make image_<DIST>_<CLOUD>_<ARCH>"
|
||||
@echo " WHERE <DIST> is bullseye, bookworm, trixie, sid"
|
||||
@echo " And <CLOUD> is azure, ec2, gce, generic, genericcloud, nocloud"
|
||||
@echo " And <ARCH> is amd64, arm64, ppc64el"
|
||||
@echo " And <ARCH> is amd64, arm64, ppc64el, riscv64, s390x"
|
||||
@echo "Set DESTDIR= to write images to given directory."
|
||||
|
||||
image_%:
|
||||
|
|
|
|||
1
config_space/14/class/S390X.var
Normal file
1
config_space/14/class/S390X.var
Normal file
|
|
@ -0,0 +1 @@
|
|||
DEBOOTSTRAP_ARCH=s390x
|
||||
1
config_space/14/files/etc/fstab/SYSTEM_BOOT+S390X
Normal file
1
config_space/14/files/etc/fstab/SYSTEM_BOOT+S390X
Normal file
|
|
@ -0,0 +1 @@
|
|||
PARTUUID={%PARTUUID_ROOT%} / ext4 rw,discard,errors=remount-ro,x-systemd.growfs 0 1
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
do_symlinks = yes
|
||||
link_in_boot = yes
|
||||
21
config_space/14/files/etc/zipl.conf/SYSTEM_BOOT+S390X
Normal file
21
config_space/14/files/etc/zipl.conf/SYSTEM_BOOT+S390X
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[defaultboot]
|
||||
defaultmenu = menu
|
||||
|
||||
[linux]
|
||||
target = /boot
|
||||
image = /boot/vmlinuz
|
||||
parameters = "root=PARTUUID={%PARTUUID_ROOT%} console=ttyS0"
|
||||
|
||||
[old]
|
||||
target = /boot
|
||||
image = /boot/vmlinuz.old
|
||||
parameters = "root=PARTUUID={%PARTUUID_ROOT%} console=ttyS0"
|
||||
|
||||
:menu
|
||||
target = /boot
|
||||
1 = linux
|
||||
2 = old
|
||||
default = 1
|
||||
prompt = 1
|
||||
timeout = 0
|
||||
secure = auto
|
||||
30
config_space/14/hooks/partition.S390X
Executable file
30
config_space/14/hooks/partition.S390X
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
touch $LOGDIR/skip.partition
|
||||
|
||||
set -- $disklist
|
||||
device=/dev/$1
|
||||
device_root="${device}p1"
|
||||
|
||||
wait_for_device() {
|
||||
for s in $(seq 10); do
|
||||
if [ -e "$1" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
sfdisk "$device" << EOF
|
||||
label: gpt
|
||||
unit: sectors
|
||||
|
||||
# Linux
|
||||
p1 : start=8192, type="Linux root (S390X)", uuid=${PARTUUID_ROOT}
|
||||
EOF
|
||||
|
||||
partprobe "$device"
|
||||
|
||||
wait_for_device "$device_root"
|
||||
mkfs.ext4 -U "$FSUUID_ROOT" "$device_root"
|
||||
tune2fs -c 0 -i 0 "$device_root"
|
||||
5
config_space/14/package_config/SYSTEM_BOOT+S390X
Normal file
5
config_space/14/package_config/SYSTEM_BOOT+S390X
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
PACKAGES install-norec LINUX_VERSION_BASE LINUX_VERSION_BACKPORTS
|
||||
linux-image-s390x
|
||||
|
||||
PACKAGES install-norec
|
||||
s390-tools
|
||||
17
config_space/14/scripts/SYSTEM_BOOT+S390X/20-zipl
Executable file
17
config_space/14/scripts/SYSTEM_BOOT+S390X/20-zipl
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
set -euE
|
||||
|
||||
if ifclass BUILD_IMAGE; then
|
||||
set -- $disklist
|
||||
DEVICE="/dev/${1}"
|
||||
|
||||
$ROOTCMD zipl -V \
|
||||
--target /boot \
|
||||
--targetbase "$DEVICE" \
|
||||
--targettype SCSI \
|
||||
--targetblocksize 512 \
|
||||
--targetoffset 8192 \
|
||||
--image /boot/vmlinuz \
|
||||
--ramdisk /boot/initrd.img \
|
||||
--parameters "root=PARTUUID=${PARTUUID_ROOT} console=ttyS0"
|
||||
fi
|
||||
|
|
@ -33,6 +33,8 @@ elif ifclass PPC64EL; then
|
|||
elif ifclass RISCV64; then
|
||||
mkdir -p "$FAI_ROOT"/boot/efi
|
||||
grub_install riscv64-efi
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ifclass BUILD_IMAGE; then
|
||||
|
|
|
|||
|
|
@ -15,22 +15,27 @@ class_exclude = {
|
|||
}
|
||||
|
||||
class_arch = {
|
||||
'AMD64': 'amd64',
|
||||
'ARM64': 'arm64',
|
||||
'AZURE': 'amd64 arm64',
|
||||
'EC2': 'amd64 arm64',
|
||||
'GCE': 'amd64 arm64',
|
||||
'PPC64EL': 'ppc64el',
|
||||
'RISCV64': 'riscv64',
|
||||
'AMD64': {'amd64'},
|
||||
'ARM64': {'arm64'},
|
||||
'AZURE': {'amd64', 'arm64'},
|
||||
'EC2': {'amd64', 'arm64'},
|
||||
'GCE': {'amd64', 'arm64'},
|
||||
'PPC64EL': {'ppc64el'},
|
||||
'RISCV64': {'riscv64'},
|
||||
'S390X': {'s390x'},
|
||||
}
|
||||
|
||||
packages = set()
|
||||
|
||||
for i in pathlib.Path('../config_space/sid/package_config').glob('*'):
|
||||
if '.' in i.name or i.name in class_exclude:
|
||||
classes = set(i.name.split('+'))
|
||||
|
||||
if '.' in i.name or classes & class_exclude:
|
||||
continue
|
||||
|
||||
arch = class_arch.get(i.name)
|
||||
arches = set()
|
||||
for c in classes:
|
||||
arches |= class_arch.get(c, set())
|
||||
|
||||
with i.open() as f:
|
||||
for line in f.readlines():
|
||||
|
|
@ -57,8 +62,8 @@ for i in pathlib.Path('../config_space/sid/package_config').glob('*'):
|
|||
# https://piuparts.debian.org/sid/fail/debian-cloud-images-packages_0.0.5.log
|
||||
if package == 'init':
|
||||
continue
|
||||
if arch:
|
||||
packages.add(f'{package} [{arch}]')
|
||||
if arches:
|
||||
packages.add(f'{package} [{" ".join(sorted(arches))}]')
|
||||
else:
|
||||
packages.add(package)
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Vcs-Git: https://salsa.debian.org/cloud-team/debian-cloud-images.git [package]
|
|||
Homepage: https://salsa.debian.org/cloud-team/debian-cloud-images
|
||||
|
||||
Package: debian-cloud-images-packages
|
||||
Architecture: amd64 arm64 ppc64el
|
||||
Architecture: amd64 arm64 ppc64el riscv64 s390x
|
||||
Depends:
|
||||
${debian-cloud-images-packages:Depends},
|
||||
${misc:Depends},
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
debian-cloud-images-packages:Depends=amazon-ec2-utils [amd64 arm64], apparmor, apt-listchanges, apt-utils, awscli [amd64 arm64], azure-vm-utils [amd64 arm64], bash-completion, bind9-host, ca-certificates, chrony, cloud-guest-utils, cloud-guest-utils [amd64 arm64], cloud-init, cloud-init [amd64 arm64], cloud-initramfs-growroot, curl, dosfstools [amd64], dosfstools [arm64], dosfstools [riscv64], ethtool, grub-cloud-amd64 [amd64], grub-cloud-arm64 [arm64], grub-efi-arm64 [arm64], grub-efi-arm64-signed [arm64], grub-efi-riscv64 [riscv64], grub-ieee1275 [ppc64el], hyperv-daemons [amd64 arm64], iptables, iputils-ping, less, libnss-myhostname, libnss-resolve, libpam-systemd, linux-image-amd64 [amd64], linux-image-arm64 [arm64], linux-image-cloud-amd64 [amd64], linux-image-cloud-arm64 [arm64], linux-image-powerpc64le [ppc64el], linux-image-riscv64 [riscv64], linux-sysctl-defaults, man-db, manpages, nano, netbase, netplan.io, openssh-server, pciutils, polkitd, psmisc, python3-passlib [amd64 arm64], reportbug, screen, shim-signed [arm64], socat, ssh-import-id, sudo, systemd-resolved, tcpdump, traceroute, unattended-upgrades, uuid-runtime, vim, vim-tiny, waagent [amd64 arm64], whiptail, xz-utils, zstd
|
||||
debian-cloud-images-packages:Depends=amazon-ec2-utils [amd64 arm64], apparmor, apt-listchanges, apt-utils, awscli [amd64 arm64], azure-vm-utils [amd64 arm64], bash-completion, bind9-host, ca-certificates, chrony, cloud-guest-utils, cloud-guest-utils [amd64 arm64], cloud-init, cloud-init [amd64 arm64], cloud-initramfs-growroot, curl, dosfstools [amd64], dosfstools [arm64], dosfstools [riscv64], ethtool, grub-cloud-amd64 [amd64], grub-cloud-arm64 [arm64], grub-efi-arm64 [arm64], grub-efi-arm64-signed [arm64], grub-efi-riscv64 [riscv64], grub-ieee1275 [ppc64el], hyperv-daemons [amd64 arm64], iptables, iputils-ping, less, libnss-myhostname, libnss-resolve, libpam-systemd, linux-image-amd64 [amd64], linux-image-arm64 [arm64], linux-image-cloud-amd64 [amd64], linux-image-cloud-arm64 [arm64], linux-image-powerpc64le [ppc64el], linux-image-riscv64 [riscv64], linux-image-s390x [s390x], linux-sysctl-defaults, man-db, manpages, nano, netbase, netplan.io, openssh-server, pciutils, polkitd, psmisc, python3-passlib [amd64 arm64], reportbug, s390-tools [s390x], screen, shim-signed [arm64], socat, ssh-import-id, sudo, systemd-resolved, tcpdump, traceroute, unattended-upgrades, uuid-runtime, vim, vim-tiny, waagent [amd64 arm64], whiptail, xz-utils, zstd
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ archs:
|
|||
- name: riscv64
|
||||
faiClasses: [RISCV64]
|
||||
ociArch: riscv64
|
||||
- name: s390x
|
||||
faiClasses: [S390X]
|
||||
ociArch: s390x
|
||||
|
||||
releases:
|
||||
- name: bullseye
|
||||
|
|
@ -68,8 +71,6 @@ releases:
|
|||
id: '14'
|
||||
baseid: '14'
|
||||
faiClasses: [FORKY, LINUX_VERSION_BASE, EXTRAS]
|
||||
matches:
|
||||
- matchArches: [amd64, arm64, ppc64el, riscv64]
|
||||
- name: sid
|
||||
basename: sid
|
||||
id: sid
|
||||
|
|
@ -105,7 +106,7 @@ vendors:
|
|||
faiClasses: [SYSTEM_BOOT, CLOUD, GENERIC, LINUX_VARIANT_CLOUD, TIME_SYSTEMD]
|
||||
size: 3
|
||||
matches:
|
||||
- matchArches: [amd64, arm64]
|
||||
- matchArches: [amd64, arm64]
|
||||
- name: nocloud
|
||||
faiClasses: [SYSTEM_BOOT, NOCLOUD, LINUX_VARIANT_BASE, TIME_SYSTEMD]
|
||||
size: 3
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue