Architecture checking is not required any more

The qemu-static binary on the host runs the foreign binaries
This commit is contained in:
Roland Clobus 2024-04-28 21:59:14 +02:00 committed by Luca Boccassi
parent f290d31960
commit a5bd0ed8ce
8 changed files with 0 additions and 107 deletions

View File

@ -1,81 +0,0 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
Check_architectures ()
{
local ARCHITECTURE
for ARCHITECTURE in "${@}"; do
if [ "${ARCHITECTURE}" = "${LB_ARCHITECTURE}" ]; then
return
fi
if [ "${ARCHITECTURE}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURE}" ]; then
if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURE} was not found" "${0}"
continue
fi
if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable" "${0}"
continue
fi
return
fi
done
Echo_warning "skipping %s, foreign architecture(s)." "${0}"
exit 0
}
Check_crossarchitectures ()
{
local HOST
if command -v dpkg >/dev/null; then
HOST="$(dpkg --print-architecture)"
else
HOST="$(uname -m)"
fi
local CROSS
case "${HOST}" in
amd64|i386|x86_64)
CROSS="amd64 i386"
;;
arm64)
CROSS="arm64 armhf armel"
;;
powerpc|ppc64)
CROSS="powerpc ppc64"
;;
*)
CROSS="${HOST}"
;;
esac
if [ "${LB_ARCHITECTURE}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURE}" ]; then
if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURE} was not found" "${0}"
exit 0
fi
if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable" "${0}"
exit 0
fi
return
fi
Check_architectures ${CROSS}
}

View File

@ -42,10 +42,6 @@ Check_stagefile
# Acquire lock file # Acquire lock file
Acquire_lockfile Acquire_lockfile
# Check architecture
Check_architectures amd64 i386 arm64 armhf
Check_crossarchitectures
# Checking depends # Checking depends
case "${LB_ARCHITECTURE}" in case "${LB_ARCHITECTURE}" in
amd64|i386) amd64|i386)

View File

@ -40,10 +40,6 @@ Check_stagefile
# Acquire lock file # Acquire lock file
Acquire_lockfile Acquire_lockfile
# Check architecture
Check_architectures amd64 i386
Check_crossarchitectures
# Checking depends # Checking depends
Check_package chroot /usr/sbin/grub grub-legacy Check_package chroot /usr/sbin/grub grub-legacy

View File

@ -42,10 +42,6 @@ Check_stagefile
# Acquire lock file # Acquire lock file
Acquire_lockfile Acquire_lockfile
# Check architecture
Check_architectures amd64 i386
Check_crossarchitectures
# Checking depends # Checking depends
Check_package chroot /usr/bin/grub-mkimage grub-common Check_package chroot /usr/bin/grub-mkimage grub-common
Check_package chroot /usr/lib/grub/i386-pc/vga.mod grub-pc-bin Check_package chroot /usr/lib/grub/i386-pc/vga.mod grub-pc-bin

View File

@ -38,10 +38,6 @@ Check_stagefile
# Acquire lock file # Acquire lock file
Acquire_lockfile Acquire_lockfile
# Check architecture
Check_architectures amd64 i386 arm64
Check_crossarchitectures
_TARGET="binary/boot/grub" _TARGET="binary/boot/grub"
# Local functions # Local functions

View File

@ -36,10 +36,6 @@ Check_stagefile
# Acquire lock file # Acquire lock file
Acquire_lockfile Acquire_lockfile
# Check architecture
Check_architectures amd64 i386
Check_crossarchitectures
case "${LB_INITRAMFS}" in case "${LB_INITRAMFS}" in
live-boot) live-boot)
_INITRAMFS="live" _INITRAMFS="live"

View File

@ -24,9 +24,6 @@ Init_config_data "${@}"
_ACTION="${1}" _ACTION="${1}"
shift shift
# Check architecture
Check_crossarchitectures
if ! In_list "bootstrap" ${LB_CACHE_STAGES}; then if ! In_list "bootstrap" ${LB_CACHE_STAGES}; then
exit 0 exit 0
fi fi

View File

@ -27,9 +27,6 @@ then
exit 1 exit 1
fi fi
# Check architecture
Check_crossarchitectures
Echo_message "Begin bootstrapping system..." Echo_message "Begin bootstrapping system..."
Check_package host /usr/sbin/debootstrap debootstrap Check_package host /usr/sbin/debootstrap debootstrap