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 ECBBD158020 for ; Thu, 1 Dec 2022 17:44:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25185E0718; Thu, 1 Dec 2022 17:44:46 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 0C081E0718 for ; Thu, 1 Dec 2022 17:44:46 +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 256D9340F23 for ; Thu, 1 Dec 2022 17:44:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7FF8B477 for ; Thu, 1 Dec 2022 17:44:43 +0000 (UTC) From: "Ben Kohler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ben Kohler" Message-ID: <1669916615.59b0932124c23e3088353d4992d5686b7d65ef82.bkohler@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: targets/livecd-stage2/, targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/livecd-stage2/controller.sh targets/support/bootloader-setup.sh X-VCS-Directories: targets/support/ targets/livecd-stage2/ X-VCS-Committer: bkohler X-VCS-Committer-Name: Ben Kohler X-VCS-Revision: 59b0932124c23e3088353d4992d5686b7d65ef82 X-VCS-Branch: master Date: Thu, 1 Dec 2022 17:44:43 +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: 4854021b-266c-489d-8514-e3134af7afe7 X-Archives-Hash: 6127fb7b941b3de9921a39798ecd0865 commit: 59b0932124c23e3088353d4992d5686b7d65ef82 Author: Ben Kohler gentoo org> AuthorDate: Thu Dec 1 17:43:35 2022 +0000 Commit: Ben Kohler gentoo org> CommitDate: Thu Dec 1 17:43:35 2022 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=59b09321 livecd-stage2: add memtest86+ detection for x86/amd64 When memtest86+ is detected, catalyst should now copy to the livecd and add it to grub menus. Signed-off-by: Ben Kohler gentoo.org> targets/livecd-stage2/controller.sh | 4 ++++ targets/support/bootloader-setup.sh | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/targets/livecd-stage2/controller.sh b/targets/livecd-stage2/controller.sh index 2b8858c0..9aba8167 100755 --- a/targets/livecd-stage2/controller.sh +++ b/targets/livecd-stage2/controller.sh @@ -93,6 +93,10 @@ case $1 in cp -f ${clst_sharedir}/livecd/files/README.txt $1 fi + if [ -e ${clst_chroot_path}/boot/memtest86plus/ ]; then + cp -rv ${clst_chroot_path}/boot/memtest86plus/* $1 + fi + case ${clst_livecd_type} in gentoo-release-livecd) mkdir -p $1/snapshots diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index 08d25b59..deff5609 100755 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -30,6 +30,28 @@ case ${clst_fstype} in ;; esac +# Optional memtest setups +memtest_grub() { + if [[ -e $1/memtest64.bios ]]; then + echo 'if [ "x$grub_platform" = xpc ]; then' + echo ' menuentry "Memtest86+ 64bit BIOS" {' + echo ' linux "/memtest64.bios"' + echo ' }' + echo 'fi' + fi + if [[ -e $1/memtest.efi64 ]]; then + echo 'if [ "x$grub_platform" = xefi ]; then' + echo ' menuentry "Memtest86+ 64bit UEFI" {' + echo ' chainloader "/memtest.efi64"' + echo ' }' + echo 'fi' + fi + if [[ -e $1/memtest32.bios ]]; then + echo 'menuentry "Memtest86+ 32bit BIOS" {' + echo ' linux "/memtest32.bios"' + echo '}' + fi +} default_append_line=(root=/dev/ram0 init=/linuxrc ${cmdline_opts[@]} cdroot) @@ -118,6 +140,7 @@ case ${clst_hostarch} in fi echo "" >> ${iacfg} done + memtest_grub $1 >> ${iacfg} ;; mips) # NO SOFTLEVEL SUPPORT YET