Skip to content

Commit

Permalink
Merge pull request #324 from grml/rm-i386
Browse files Browse the repository at this point in the history
Drop support for Debian's "i386" port
  • Loading branch information
zeha authored Mar 9, 2025
2 parents 0020ba3 + fc97d10 commit f9ed369
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 35 deletions.
30 changes: 7 additions & 23 deletions chroot-script
Original file line number Diff line number Diff line change
Expand Up @@ -308,32 +308,16 @@ get_kernel_version() {
return 0
fi

local KARCH

# shellcheck disable=SC2153
case "$ARCH" in
i386)
KARCH='686-pae'
;;
amd64)
KARCH='amd64'
;;
arm64)
KARCH='arm64'
;;
*)
echo "Only i386, amd64 and arm64 are currently supported" >&2
return 1
esac

local KPACKAGE
KPACKAGE=linux-image-"${KPREFIX}${KARCH}"
if package_exists "$KPACKAGE"; then
echo "${KPREFIX}${KARCH}"
local kpackage
local ksuffix
ksuffix="${KPREFIX}$(dpkg --print-architecture)"
kpackage=linux-image-"${ksuffix}"
if package_exists "${kpackage}"; then
echo "${ksuffix}"
return 0
fi

echo "Expected kernel package $KPACKAGE not found" >&2
echo "Automatically determined kernel package named ${kpackage} not found" >&2
return 1
}

Expand Down
1 change: 0 additions & 1 deletion config
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
# COMPONENTS='main contrib non-free'

# Set target architecture.
# Only useful when installing i386 while running an amd64 kernel.
# Default: current architecture. (From 'dpkg --print-architecture'.)
# ARCH='amd64'

Expand Down
13 changes: 5 additions & 8 deletions grml-debootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Bootstrap options:
--nodebootstrap Skip debootstrap, only do configuration to the target.
--grub <device> Target for grub installation. Usage example: /dev/sda
--efi <device> Target for EFI installation. Usage example: /dev/sda1
--arch <arch> Set target architecture, use for installing i386 on amd64.
--arch <arch> Set target architecture.
--filesystem <fs> Filesystem that should be used when target is a partition
or Virtual Machine (see --vmfile).
--force Do not prompt for user acknowledgement.
Expand Down Expand Up @@ -1127,13 +1127,10 @@ if [ -z "${ARCH:-}" ] ; then
fi
# }}}

# It is not possible to build amd64 on i686. {{{
CURRENT_ARCH="$(uname -m)"
if [ "$CURRENT_ARCH" != "x86_64" ] ; then
if [ "$ARCH" = "amd64" ] ; then
eerror "It is not possible to build amd64 on $CURRENT_ARCH. Consider installing and booting the 'linux-image-amd64' kernel or using '--arch i386' instead."
bailout 1
fi
# Only support certain architectures. {{{
if [[ "$ARCH" != "amd64" ]] && [[ "$ARCH" != "arm64" ]] ; then
eerror "Unsupported architecture: ${ARCH}. Only amd64, arm64 are supported by grml-debootstrap."
bailout 1
fi
# }}}

Expand Down
5 changes: 2 additions & 3 deletions grml-debootstrap.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ Options and environment variables
*--arch* _architecture_::

Set target architecture you want to install. Defaults to the architecture
you are currently running. If you're running an amd64 kernel and want to
deploy an i386 system use this option. Note: deploying amd64 from an i386
kernel does *not* work. Example: "_--arch i386_"
you are currently running.
Example: "_--arch amd64_"

*--backportrepos*::

Expand Down

0 comments on commit f9ed369

Please sign in to comment.