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 29624158649 for ; Thu, 11 May 2023 14:47:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 96522E0D71; Thu, 11 May 2023 14:47:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CF7BFE0D6F for ; Thu, 11 May 2023 14:47:18 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C88D4340BBD for ; Thu, 11 May 2023 14:47:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A5C83A7C for ; Thu, 11 May 2023 14:47:14 +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: <1681156129.0d3d82f639bb98457df670b6e12455f670887d0a.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: 0d3d82f639bb98457df670b6e12455f670887d0a X-VCS-Branch: wip/mattst88 Date: Thu, 11 May 2023 14:47:14 +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: 53fa0c77-1807-40c6-9a4a-94435cdf2dbb X-Archives-Hash: 0c6ac84db8c95d5e64e85c17c1dfaf4f commit: 0d3d82f639bb98457df670b6e12455f670887d0a Author: Matt Turner gentoo org> AuthorDate: Sun Nov 20 00:02:56 2022 +0000 Commit: Matt Turner gentoo org> CommitDate: Mon Apr 10 19:48:49 2023 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=0d3d82f6 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. mattst88@bogsucker ~ $ uname -m ppc64le mattst88@bogsucker ~ $ linux32 uname -m ppcle mattst88@timberdoodle ~ $ uname -m ppc64 mattst88@timberdoodle ~ $ linux32 uname -m ppc mattst88@guppy ~ $ uname -m ia64 mattst88@catbus ~ $ uname -m sparc64 mattst88@catbus ~ $ linux32 uname -m sparc mattst88@jiji ~ $ uname -m aarch64 mattst88@jiji ~ $ linux32 uname -m armv8l mattst88@framework ~ % uname -m x86_64 mattst88@framework ~ % linux32 uname -m i686 mattst88@hake ~ $ uname -m parisc mattst88@lgentoo4 ~ $ uname -m s390x mattst88@lgentoo4 ~ $ linux32 uname -m s390 Signed-off-by: Matt Turner gentoo.org> targets/support/bootloader-setup.sh | 13 +++++++------ targets/support/create-iso.sh | 36 +++++++++++++++++++----------------- targets/support/netboot-final.sh | 8 ++++++-- targets/support/pre-kmerge.sh | 2 +- 4 files changed, 33 insertions(+), 26 deletions(-) diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index d6d5f96e..73854cb8 100755 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -78,10 +78,7 @@ case ${clst_hostarch} in ((bctr=${bctr}+1)) done ;; - arm) - # NO SOFTLEVEL SUPPORT YET - ;; - hppa) + parisc) # NO SOFTLEVEL SUPPORT YET mkdir -p $1/boot @@ -103,7 +100,7 @@ case ${clst_hostarch} in echo "--recoverykernel=boot/${x}" >> ${icfg} done ;; - amd64|arm64|ia64|ppc*|powerpc*|sparc*|x86|i?86) + aarch64*|ia64|ppc*|sparc*|i?86|x86_64) kern_subdir=/boot iacfg=$1/boot/grub/grub.cfg mkdir -p $1/boot/grub @@ -142,7 +139,7 @@ case ${clst_hostarch} in done memtest_grub $1 >> ${iacfg} ;; - mips) + mips*) # NO SOFTLEVEL SUPPORT YET # Mips is an interesting arch -- where most archs will @@ -202,5 +199,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 74c24a1d..7c644bae 100755 --- a/targets/support/create-iso.sh +++ b/targets/support/create-iso.sh @@ -10,15 +10,15 @@ case ${clst_hostarch} in cdmaker="xorriso" cdmakerpkg="dev-libs/libisoburn" ;; - mips) + mips*) cdmaker="sgibootcd" cdmakerpkg="sys-boot/sgibootcd" ;; - ppc*|powerpc*|sparc*) + ppc*|sparc*) cdmaker="grub-mkrescue" cdmakerpkg="dev-libs/libisoburn and sys-boot/grub:2" ;; - amd64|arm64|ia64|x86|i?86) + aarch64*|ia64|i?86|x86_64) 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" ;; - ppc*|powerpc*) + parisc) + clst_iso_volume_id="Gentoo Linux - HPPA" + ;; + ppc*) clst_iso_volume_id="Gentoo Linux - PowerPC" ;; - s390) + s390*) clst_iso_volume_id="Gentoo Linux - S390" ;; sh) @@ -79,7 +79,7 @@ then sparc*) clst_iso_volume_id="Gentoo Linux - SPARC" ;; - x86) + i?86) clst_iso_volume_id="Gentoo Linux - x86" ;; *) @@ -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) + parisc) 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|i?86) + aarch64*|ia64|ppc*|sparc*|i?86|x86_64) 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 fc0de880..fbf0569c 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) + parisc) # 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 ed825f5f..96be005e 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} == parisc ]]; then for i in ${clst_boot_kernel}; do case ${i} in *32)