archlinux-s390x/scripts/deploy-and-build-systemd-zvm.sh

52 lines
1.5 KiB
Bash
Raw Normal View History

2025-06-02 16:58:16 -04:00
#!/bin/bash
# Build systemd on z/VM using scp to transfer files
2025-06-05 07:03:58 -04:00
# SPDX-License-Identifier: GPL-2.0-only
2025-06-02 16:58:16 -04:00
2025-06-05 07:03:58 -04:00
# Source utilities
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/common.sh"
source "$SCRIPT_DIR/zvm-utils.sh"
2025-06-02 16:58:16 -04:00
2025-06-05 07:03:58 -04:00
# Initialize z/VM environment
init_zvm
2025-06-02 16:58:16 -04:00
2025-06-05 07:03:58 -04:00
# Build systemd using the z/VM utilities
build_on_zvm "systemd" "scripts/build-systemd-zvm.sh" "systemd-minimal-s390x.tar.gz" 1800
2025-06-02 16:58:16 -04:00
2025-06-05 07:03:58 -04:00
# Extract and organize systemd
print_section "Extracting systemd components"
2025-06-02 16:58:16 -04:00
rm -rf output/systemd-root
mkdir -p output/systemd-root
tar xzf output/systemd-minimal-s390x.tar.gz -C output/systemd-root
2025-06-05 07:03:58 -04:00
# Report results
total_size=$(du -sh output/systemd-root 2>/dev/null | cut -f1)
log_success "Systemd built and extracted successfully!"
log_info "Size: $total_size"
log_info "Location: output/systemd-root/"
2025-06-02 16:58:16 -04:00
# Show key files
2025-06-05 07:03:58 -04:00
print_section "Key systemd components"
if [ -f output/systemd-root/usr/lib/systemd/systemd ]; then
ls -lh output/systemd-root/usr/lib/systemd/systemd
else
log_warning "systemd binary not found"
fi
if [ -f output/systemd-root/usr/lib/systemd/systemd-journald ]; then
ls -lh output/systemd-root/usr/lib/systemd/systemd-journald
else
log_warning "systemd-journald not found"
fi
if [ -f output/systemd-root/usr/lib/systemd/systemd-udevd ]; then
ls -lh output/systemd-root/usr/lib/systemd/systemd-udevd
else
log_warning "systemd-udevd not found"
fi
if [ -f output/systemd-root/usr/bin/systemctl ]; then
ls -lh output/systemd-root/usr/bin/systemctl
else
log_warning "systemctl not found"
fi