From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 76219158020 for ; Tue, 22 Nov 2022 03:49:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A48B3E089A; Tue, 22 Nov 2022 03:49:38 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 866A0E089A for ; Tue, 22 Nov 2022 03:49:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 720AB340FD4 for ; Tue, 22 Nov 2022 03:49:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C44773A5 for ; Tue, 22 Nov 2022 03:49:35 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1669088914.26f1a66a46f8d170f267696805ed904dfbbcae91.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/bootloader-setup.sh targets/support/create-iso.sh targets/support/netboot-final.sh targets/support/pre-kmerge.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 26f1a66a46f8d170f267696805ed904dfbbcae91 X-VCS-Branch: wip/mattst88 Date: Tue, 22 Nov 2022 03:49:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2fe702aa-50f0-4bb2-adaf-3995f85b8862 X-Archives-Hash: 3360f9e62e6ca2c777862118c1533a4b commit: 26f1a66a46f8d170f267696805ed904dfbbcae91 Author: Matt Turner gentoo org> AuthorDate: Sun Nov 20 00:02:56 2022 +0000 Commit: Matt Turner gentoo org> CommitDate: Tue Nov 22 03:48:34 2022 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=26f1a66a targets: Fix CHOST vs `uname -m` confusion We've had difficulties keeping straight CHOST (e.g. "hppa") vs `uname -m` output in the past, and I suspect I've made it worse over time. Fix the issues I spotted, and add a catch-all for architectures we are missing support for, so if ISO/netboot/etc creation doesn't silently fail. Signed-off-by: Matt Turner gentoo.org> targets/support/bootloader-setup.sh | 13 +++++++------ targets/support/create-iso.sh | 30 ++++++++++++++++-------------- targets/support/netboot-final.sh | 8 ++++++-- targets/support/pre-kmerge.sh | 2 +- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index 08d25b59..6ca3e38a 100755 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -56,10 +56,7 @@ case ${clst_hostarch} in ((bctr=${bctr}+1)) done ;; - arm) - # NO SOFTLEVEL SUPPORT YET - ;; - hppa) + hppa*) # NO SOFTLEVEL SUPPORT YET mkdir -p $1/boot @@ -81,7 +78,7 @@ case ${clst_hostarch} in echo "--recoverykernel=boot/${x}" >> ${icfg} done ;; - amd64|arm64|ia64|ppc*|powerpc*|sparc*|x86) + aarch64*|amd64|ia64|ppc*|powerpc*|sparc*|x86) kern_subdir=/boot iacfg=$1/boot/grub/grub.cfg mkdir -p $1/boot/grub @@ -119,7 +116,7 @@ case ${clst_hostarch} in echo "" >> ${iacfg} done ;; - mips) + mips*) # NO SOFTLEVEL SUPPORT YET # Mips is an interesting arch -- where most archs will @@ -179,5 +176,9 @@ case ${clst_hostarch} in [ -e "${1}/sash64" ] && mv ${1}/sash64 ${scratch}/arcload [ -e "${1}/arc.cf" ] && mv ${1}/arc.cf ${scratch}/arcload ;; + *) + echo "Boot loader support for ${clst_hostarch} is unimplemented" + exit 1 + ;; esac exit $? diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh index 8eada6a7..8412f6fb 100755 --- a/targets/support/create-iso.sh +++ b/targets/support/create-iso.sh @@ -10,7 +10,7 @@ case ${clst_hostarch} in cdmaker="xorriso" cdmakerpkg="dev-libs/libisoburn" ;; - mips) + mips*) cdmaker="sgibootcd" cdmakerpkg="sys-boot/sgibootcd" ;; @@ -18,7 +18,7 @@ case ${clst_hostarch} in cdmaker="grub-mkrescue" cdmakerpkg="dev-libs/libisoburn and sys-boot/grub:2" ;; - amd64|arm64|ia64|x86) + aarch64*|amd64|ia64|x86) cdmaker="grub-mkrescue" # grub-mkrescue requires: # xorriso from libisoburn @@ -49,28 +49,28 @@ then amd64) clst_iso_volume_id="Gentoo Linux - AMD64" ;; - arm) + arm*) clst_iso_volume_id="Gentoo Linux - ARM" ;; - arm64) + aarch64*) clst_iso_volume_id="Gentoo Linux - ARM64" ;; - hppa) - clst_iso_volume_id="Gentoo Linux - HPPA" - ;; ia64) clst_iso_volume_id="Gentoo Linux - IA64" ;; m68k) clst_iso_volume_id="Gentoo Linux - M68K" ;; - mips) + mips*) clst_iso_volume_id="Gentoo Linux - MIPS" ;; + hppa*) + clst_iso_volume_id="Gentoo Linux - HPPA" + ;; ppc*|powerpc*) clst_iso_volume_id="Gentoo Linux - PowerPC" ;; - s390) + s390*) clst_iso_volume_id="Gentoo Linux - S390" ;; sh) @@ -126,16 +126,14 @@ case ${clst_hostarch} in echo ">> xorriso -as genisofs -alpha-boot boot/bootlx -R -l -J -V \"${clst_iso_volume_id}\" -o \"${1}\" \"${clst_target_path}\"" xorriso -as genisofs -alpha-boot boot/bootlx -R -l -J -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}" || die "Cannot make ISO image" ;; - arm) - ;; - hppa) + hppa*) echo ">> Running mkisofs to create iso image...." run_mkisofs -R -l -J -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"/ pushd "${clst_target_path}/" palo -f boot/palo.conf -C "${1}" popd ;; - mips) + mips*) if [[ ${clst_fstype} != squashfs ]]; then die "SGI LiveCD(s) only support the 'squashfs' fstype!" fi @@ -191,7 +189,7 @@ case ${clst_hostarch} in # o= output image (burnable to CD; readable by fdisk) /usr/bin/sgibootcd c=${cfg} o=${clst_iso} ;; - amd64|arm64|ia64|ppc*|powerpc*|sparc*|x86) + aarch64*|amd64|ia64|ppc*|powerpc*|sparc*|x86) isoroot_checksum extra_opts=("-joliet" "-iso-level" "3") @@ -202,5 +200,9 @@ case ${clst_hostarch} in echo ">> Running grub-mkrescue to create iso image...." grub-mkrescue "${extra_opts[@]}" -o "${1}" "${clst_target_path}" ;; + *) + echo "ISO support for ${clst_hostarch} is unimplemented" + exit 1 + ;; esac exit $? diff --git a/targets/support/netboot-final.sh b/targets/support/netboot-final.sh index 7a26e0f4..3071f698 100755 --- a/targets/support/netboot-final.sh +++ b/targets/support/netboot-final.sh @@ -20,7 +20,7 @@ rmdir ${clst_target_path}/boot # Any post-processing necessary for each architecture can be done here. This # may include things like sparc's elftoaout, x86's PXE boot, etc. case ${clst_hostarch} in - hppa) + hppa*) # Only one kernel should be there kname=${clst_boot_kernel[0]} rm -f ${clst_target_path}/${kname}-hppa.lif @@ -36,7 +36,7 @@ case ${clst_hostarch} in ;; sparc*) - if [ "${clst_subarch}" == "sparc" ]; then + if [[ ${clst_hostarch} == sparc* ]]; then piggyback=piggyback else piggyback=piggyback64 @@ -46,5 +46,9 @@ case ${clst_hostarch} in ${piggyback} ${clst_target_path}/${x}-a.out ${clst_target_path}/kernels/misc/System-${x}.map ${clst_target_path}/kernels/misc/${x}.igz done ;; + *) + echo "Netboot support for ${clst_hostarch} is unimplemented" + exit 1 + ;; esac exit $? diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh index 0dfc835e..4a14fe8d 100755 --- a/targets/support/pre-kmerge.sh +++ b/targets/support/pre-kmerge.sh @@ -4,7 +4,7 @@ RUN_DEFAULT_FUNCS="yes" source /tmp/chroot-functions.sh -if [[ ${clst_hostarch} == hppa ]]; then +if [[ ${clst_hostarch} == hppa* ]]; then for i in ${clst_boot_kernel}; do case ${i} in *32)