public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/
@ 2015-12-12 23:32 Mike Frysinger
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2015-12-12 23:32 UTC (permalink / raw
  To: gentoo-commits

commit:     eeb88b23cd80c5926eb8d31a06a5661709f09df1
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 12 23:32:15 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Dec 12 23:32:15 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eeb88b23

sys-apps/memtest+: fix parallel build errors #557890

 sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch | 16 ++++++++++++++++
 sys-apps/memtest86+/memtest86+-5.01-r1.ebuild            |  1 +
 2 files changed, 17 insertions(+)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch
new file mode 100644
index 0000000..876edcf
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch
@@ -0,0 +1,16 @@
+don't run the clean target when building all as we run into parallel races:
+ - memtest kicks off building of a bunch of .o files
+ - clean runs in parallel which runs `rm` and deletes some of the new .o
+ - memtest goes to link and fails because objects are missing
+
+--- a/Makefile
++++ b/Makefile
+@@ -19,7 +19,7 @@
+       smp.o vmem.o random.o
+       
+ 
+-all: clean memtest.bin memtest 
++all: memtest.bin memtest
+ 
+ # Link it statically once so I know I don't have undefined
+ # symbols and then link it dynamically so I have full

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
index f18f5b0..6186228 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
@@ -29,6 +29,7 @@ src_prepare() {
 	epatch "${FILESDIR}"/${P}-no-scp.patch
 	epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
 	epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
+	epatch "${FILESDIR}"/${P}-no-clean.patch #557890
 
 	if use serial ; then
 		sed -i \


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/
@ 2016-07-10  2:48 NP Hardass
  0 siblings, 0 replies; 8+ messages in thread
From: NP Hardass @ 2016-07-10  2:48 UTC (permalink / raw
  To: gentoo-commits

commit:     0eb2ba9f9d96fad560ae3bbfcaed940c43d7fb4f
Author:     NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Sat May 14 22:40:28 2016 +0000
Commit:     NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Sun Jul 10 02:48:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0eb2ba9f

sys-apps/memtest86+: Update 39_memtest86+ to support grub submenus

Package-Manager: portage-2.2.28

 sys-apps/memtest86+/files/39_memtest86+            | 59 ++++++++++++++++++----
 ...6+-4.20-r2.ebuild => memtest86+-4.20-r3.ebuild} |  2 +-
 ...6+-5.01-r1.ebuild => memtest86+-5.01-r2.ebuild} |  2 +-
 3 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/sys-apps/memtest86+/files/39_memtest86+ b/sys-apps/memtest86+/files/39_memtest86+
index 14f27a2..10e1964 100644
--- a/sys-apps/memtest86+/files/39_memtest86+
+++ b/sys-apps/memtest86+/files/39_memtest86+
@@ -4,30 +4,67 @@
 
 memtest=/boot/memtest86plus/memtest
 
+memtestbsd=/boot/memtest86plus/memtest.netbsd
+
+if [ -f "${memtest}" ] && [ -f "${memtestbsd}" ]; then
+	multiple_memtest=true
+fi
+
+submenu_indentation=""
+if [ "x${multiple_memtest}" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
+	submenu_indentation="${grub_tab}"
+	cat <<EOF
+submenu 'Memtest86+' {
+EOF
+fi
+
+
 if [ -f "${memtest}" ]; then
+
+	gettext_printf "Found memtest image: %s\n" "${memtest}" >&2
+
 	device="$("${grub_probe}" --target=device "${memtest}")"
 	path="$(make_system_path_relative_to_its_root "${memtest}")"
 	cat <<EOF
-menuentry "Memtest86+" {
+${submenu_indentation}menuentry 'Memtest86+' {
 EOF
-	prepare_grub_to_access_device "${device}" | grub_add_tab
+
+	if [ "x${submenu_indentation}" != "x" ]; then
+		prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+	else
+		prepare_grub_to_access_device "${device}" | grub_add_tab
+	fi
+
 	cat <<EOF
-	linux16 "${path}"
-}
+	${submenu_indentation}linux16 "${path}"
+${submenu_indentation}}
 EOF
 fi
 
-memtest=/boot/memtest86plus/memtest.netbsd
+if [ -f "${memtestbsd}" ]; then
 
-if [ -f "${memtest}" ]; then
-	device="$("${grub_probe}" --target=device "${memtest}")"
-	path="$(make_system_path_relative_to_its_root "${memtest}")"
+	gettext_printf "Found memtest image: %s\n" "${memtestbsd}" >&2
+
+	device="$("${grub_probe}" --target=device "${memtestbsd}")"
+	path="$(make_system_path_relative_to_its_root "${memtestbsd}")"
 	cat <<EOF
-menuentry "Memtest86+ (netbsd)" {
+${submenu_indentation}menuentry 'Memtest86+ (netbsd)' {
 EOF
-	prepare_grub_to_access_device "${device}" | grub_add_tab
+
+	if [ "x${submenu_indentation}" != "x" ]; then
+		prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+	else
+		prepare_grub_to_access_device "${device}" | grub_add_tab
+	fi
+
+	cat <<EOF
+	${submenu_indentation}knetbsd "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ "x${multiple_memtest}" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
 	cat <<EOF
-	knetbsd "${path}"
 }
 EOF
 fi

diff --git a/sys-apps/memtest86+/memtest86+-4.20-r2.ebuild b/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild
similarity index 97%
rename from sys-apps/memtest86+/memtest86+-4.20-r2.ebuild
rename to sys-apps/memtest86+/memtest86+-4.20-r3.ebuild
index 06dac9c..07f4158 100644
--- a/sys-apps/memtest86+/memtest86+-4.20-r2.ebuild
+++ b/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
similarity index 98%
rename from sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
rename to sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
index 6186228..7d3372c 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/
@ 2016-11-26  0:09 Mike Frysinger
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2016-11-26  0:09 UTC (permalink / raw
  To: gentoo-commits

commit:     580f0a573f324bac4862ebd2030234b27e9a1d59
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 26 00:09:15 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Nov 26 00:09:28 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=580f0a57

sys-apps/memtest86+: fix build w/out 32-bit glibc #592638

 .../files/memtest86+-5.01-no-C-headers.patch       | 47 ++++++++++++++++++++++
 sys-apps/memtest86+/memtest86+-5.01-r2.ebuild      |  1 +
 2 files changed, 48 insertions(+)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch
new file mode 100644
index 00000000..bbb2228
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch
@@ -0,0 +1,47 @@
+avoid using C library headers as it'd mean we'd need 32-bit glibc files available
+
+https://bugs.gentoo.org/592638
+
+--- a/dmi.c
++++ b/dmi.c
+@@ -10,7 +10,7 @@
+ 
+ 
+ #include "test.h"
+-#include <stdint.h>
++#include "stdint.h"
+ 
+ 
+ #define round_up(x,y) (((x) + (y) - 1) & ~((y)-1))
+--- a/test.c
++++ b/test.c
+@@ -14,7 +14,28 @@
+ #include "stdint.h"
+ #include "cpuid.h"
+ #include "smp.h"
+-#include <sys/io.h>
++
++static inline unsigned char
++inb_p (unsigned short int __port)
++{
++  unsigned char _v;
++
++  __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
++  return _v;
++}
++
++static inline void
++outb (unsigned char __value, unsigned short int __port)
++{
++  __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
++}
++
++static inline void
++outb_p (unsigned char __value, unsigned short int __port)
++{
++  __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
++			"Nd" (__port));
++}
+ 
+ extern struct cpu_ident cpu_id;
+ extern volatile int    mstr_cpu;

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
index 7d3372c..831cf32 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
@@ -30,6 +30,7 @@ src_prepare() {
 	epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
 	epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
 	epatch "${FILESDIR}"/${P}-no-clean.patch #557890
+	epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638
 
 	if use serial ; then
 		sed -i \


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/
@ 2017-03-14 23:54 Mike Frysinger
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2017-03-14 23:54 UTC (permalink / raw
  To: gentoo-commits

commit:     08eded4644881cf6de9a4acd78f047ed86d27276
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 14 23:52:49 2017 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Mar 14 23:54:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08eded46

sys-apps/memtest86+: rename installed files to match upstream #382757

We move back to using:
- memtest.bin: bootable image
- memtest: bare metal ELF

We drop the "memtest.netbsd" file since it was never related to NetBSD.
It was simply an ELF file (renamed from "memtest").  It used that name
simply because we used grub's netbsd boot logic to load it (since it
supports booting ELF files).

 sys-apps/memtest86+/files/39_memtest86+-r1    | 69 ++++++++++++++++++++
 sys-apps/memtest86+/memtest86+-5.01-r3.ebuild | 90 +++++++++++++++++++++++++++
 2 files changed, 159 insertions(+)

diff --git a/sys-apps/memtest86+/files/39_memtest86+-r1 b/sys-apps/memtest86+/files/39_memtest86+-r1
new file mode 100644
index 00000000000..20422b74d65
--- /dev/null
+++ b/sys-apps/memtest86+/files/39_memtest86+-r1
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+. /usr/share/grub/grub-mkconfig_lib
+
+memtest=/boot/memtest86plus/memtest.bin
+
+memtestelf=/boot/memtest86plus/memtest
+
+if [ -f "${memtest}" ] && [ -f "${memtestelf}" ]; then
+	multiple_memtest=true
+fi
+
+submenu_indentation=""
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+	submenu_indentation="${grub_tab}"
+	cat <<EOF
+submenu 'Memtest86+' {
+EOF
+fi
+
+if [ -f "${memtest}" ]; then
+	gettext_printf "Found memtest image: %s\n" "${memtest}" >&2
+
+	device="$("${grub_probe}" --target=device "${memtest}")"
+	path="$(make_system_path_relative_to_its_root "${memtest}")"
+	cat <<EOF
+${submenu_indentation}menuentry 'Memtest86+' {
+EOF
+
+	if [ -n "{submenu_indentation}" ]; then
+		prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+	else
+		prepare_grub_to_access_device "${device}" | grub_add_tab
+	fi
+
+	cat <<EOF
+	${submenu_indentation}linux16 "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ -f "${memtestelf}" ]; then
+	gettext_printf "Found memtest image: %s\n" "${memtestelf}" >&2
+
+	device="$("${grub_probe}" --target=device "${memtestelf}")"
+	path="$(make_system_path_relative_to_its_root "${memtestelf}")"
+	cat <<EOF
+${submenu_indentation}menuentry 'Memtest86+ (ELF)' {
+EOF
+
+	if [ -n "${submenu_indentation}" ]; then
+		prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+	else
+		prepare_grub_to_access_device "${device}" | grub_add_tab
+	fi
+
+	# We use knetbsd as a lazy way of booting an ELF.
+	# It's not actually related to NetBSD at all.
+	cat <<EOF
+	${submenu_indentation}knetbsd "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+	cat <<EOF
+}
+EOF
+fi

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r3.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r3.ebuild
new file mode 100644
index 00000000000..36d52d85693
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.01-r3.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="floppy iso serial"
+
+BOOTDIR="/boot/memtest86plus"
+QA_PRESTRIPPED="${BOOTDIR}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR}/memtest"
+
+RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )"
+DEPEND="iso? ( app-cdr/cdrtools )"
+
+src_prepare() {
+	sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+	epatch "${FILESDIR}/${P}-gcc-473.patch" \
+		   "${FILESDIR}/${P}-hardcoded_cc.patch"
+	epatch "${FILESDIR}"/${P}-no-scp.patch
+	epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
+	epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
+	epatch "${FILESDIR}"/${P}-no-clean.patch #557890
+	epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638
+	epatch "${FILESDIR}"/${P}-test-random-cflags.patch #590974
+
+	sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+	if use serial ; then
+		sed -i \
+			-e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+			config.h \
+			|| die "sed failed"
+	fi
+}
+
+src_configure() {
+	tc-ld-disable-gold #580212
+	tc-export AS CC LD
+}
+
+src_compile() {
+	emake
+	if use iso ; then
+		./makeiso.sh || die
+	fi
+}
+
+src_test() { :; }
+
+src_install() {
+	insinto "${BOOTDIR}"
+	use iso && newins mt*.iso memtest.iso
+	doins memtest memtest.bin
+
+	exeinto /etc/grub.d
+	doexe "${FILESDIR}"/39_memtest86+
+
+	dodoc README README.build-process FAQ changelog
+
+	if use floppy ; then
+		dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+		doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+	fi
+}
+
+pkg_postinst() {
+	mount-boot_pkg_postinst
+	elog
+	elog "memtest has been installed in ${BOOTDIR}/"
+	elog "You may wish to update your bootloader configs"
+	elog "by adding these lines:"
+	elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+	elog "   as /etc/grub.d/39_${PN}"
+	elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+	elog "    > title=${PN}"
+	elog "    > root (hd?,?)"
+	elog "    > kernel ${BOOTDIR}/memtest.bin"
+	elog " - For lilo:"
+	elog "    > image  = ${BOOTDIR}/memtest.bin"
+	elog "    > label  = ${PN}"
+	elog
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/
@ 2021-08-13 13:22 Lars Wendler
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Wendler @ 2021-08-13 13:22 UTC (permalink / raw
  To: gentoo-commits

commit:     c08f36620da95e3f707a57b068bcd4ef5cb8e6e6
Author:     PPed72 <paolo.pedroni <AT> iol <DOT> it>
AuthorDate: Thu Nov 19 17:09:50 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Aug 13 13:22:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c08f3662

sys-apps/memtest86+: version bump to 5.31b

Closes: https://bugs.gentoo.org/728766
Signed-off-by: Paolo Pedroni <paolo.pedroni <AT> iol.it>
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Closes: https://github.com/gentoo/gentoo/pull/18324
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/memtest86+/Manifest                       |   1 +
 .../files/memtest86+-5.31b-gcc-473.patch           |  13 +++
 .../files/memtest86+-5.31b-hardcoded_cc.patch      |  16 +++
 .../files/memtest86+-5.31b-no-clean.patch          |  19 ++++
 .../files/memtest86+-5.31b-objcopy.patch           |  21 ++++
 .../memtest86+-5.31b-test-random-cflags.patch      |  17 +++
 sys-apps/memtest86+/memtest86+-5.31b.ebuild        | 114 +++++++++++++++++++++
 7 files changed, 201 insertions(+)

diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest
index 95326fdd945..48b2ddc7961 100644
--- a/sys-apps/memtest86+/Manifest
+++ b/sys-apps/memtest86+/Manifest
@@ -1 +1,2 @@
 DIST memtest86+-5.01.tar.gz 214877 BLAKE2B ef63eaabaf6d3d27b85c73618c692dd61cce52f3670a57958d181623888bdc3aa538855da9a82ec2ab70b180938e3df99f0b06f606b2d6f64e8aabbe781b3050 SHA512 d872db35ef733ec8f49094251f2bf6b98cc80eb06d04044be3aecf28d534f24ba293a08b9979b112dbd07cf27368148939a33a32c7010fc9581a3a5b150c94d7
+DIST memtest86+-5.31b.tar.gz 227779 BLAKE2B 14aced912bb84115278a3aff7650a3571918b823335aaf7d09880ef10374c320f64878765d93d2ee5a75e2b33ef6c9c4886a9a168955bd77c668f06f5c86a6ca SHA512 ad5891fd0c430ce7a5d0cde2d10dee20b66ad8060d47c3e70e038461d9cde3a78dfc13442b5b09da7c662741945a670353c72dbc08fd5ee8bae82256001a9541

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch
new file mode 100644
index 00000000000..76c0761512b
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch
@@ -0,0 +1,13 @@
+http://forum.canardpc.com/threads/110950-fix-controller-loop-error
+
+--- a/Makefile
++++ b/Makefile
+@@ -12,7 +12,7 @@ FDISK=/dev/fd0
+ AS=as -32
+ CC=gcc
+ 
+-CFLAGS= -Wall -Werror -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
++CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+  -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
+ 
+ SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch
new file mode 100644
index 00000000000..4ee174478b7
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -9,11 +9,10 @@
+ #
+ FDISK=/dev/fd0
+ 
+-AS=as -32
+-CC=gcc
+-
+ CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+  -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
++CPPFLAGS= -m32
++ASFLAGS= -32
+ 
+ SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g
+ 

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch
new file mode 100644
index 00000000000..dbb560e506b
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch
@@ -0,0 +1,19 @@
+http://forum.canardpc.com/threads/110954-PATCH-fix-parallel-build-issues
+
+
+don't run the clean target when building all as we run into parallel races:
+ - memtest kicks off building of a bunch of .o files
+ - clean runs in parallel which runs `rm` and deletes some of the new .o
+ - memtest goes to link and fails because objects are missing
+
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,7 @@
+ 
+ SELF_TEST_OBJS = test.o self_test.o cpuid.o random.o
+ 
+-all: clean memtest.bin memtest
++all: memtest.bin memtest
+ 
+ run_self_test : self_test
+ 	./self_test && touch run_self_test

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch
new file mode 100644
index 00000000000..9398c4163a4
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch
@@ -0,0 +1,21 @@
+Allow 'objcopy' override with user's OBJCOPY.
+
+--- a/Makefile
++++ b/Makefile
+@@ -8,6 +8,7 @@
+ # Path for the floppy disk device
+ #
+ FDISK=/dev/fd0
++OBJCOPY=objcopy
+ 
+ CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+  -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
+@@ -36,7 +37,7 @@
+ 	$(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
+ 
+ memtest_shared.bin: memtest_shared
+-	objcopy -O binary $< memtest_shared.bin
++	$(OBJCOPY) -O binary $< memtest_shared.bin
+ 
+ memtest: memtest_shared.bin memtest.lds
+ 	$(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch
new file mode 100644
index 00000000000..f3faf1392b3
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch
@@ -0,0 +1,17 @@
+make sure we re-use the existing CFLAGS settings so that we get all the right
+flags (like -fno-stack-protector).  just append the few changes we want (the
+optimization levels).
+
+https://bugs.gentoo.org/590974
+
+--- a/Makefile
++++ b/Makefile
+@@ -65,7 +65,7 @@
+ 	$(CC) -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector   -c -o memsize.o memsize.c
+ 
+ random.o: random.c
+-	$(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c
++random.o: CFLAGS += -O3 -fno-PIC
+ 
+ clean:
+ 	rm -f *.o *.s *.iso memtest.bin memtest memtest_shared \

diff --git a/sys-apps/memtest86+/memtest86+-5.31b.ebuild b/sys-apps/memtest86+/memtest86+-5.31b.ebuild
new file mode 100644
index 00000000000..5e14a51127a
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.31b.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+boot floppy iso serial"
+
+BOOTDIR="/boot/memtest86plus"
+QA_PRESTRIPPED="${BOOTDIR}/memtest /usr/share/${PN}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR}/memtest /usr/share/${PN}/memtest"
+
+RDEPEND="floppy? ( sys-fs/mtools )"
+DEPEND="iso? ( app-cdr/cdrtools )"
+
+PATCHES=(
+	"${FILESDIR}/${P}-gcc-473.patch"
+	"${FILESDIR}/${P}-hardcoded_cc.patch"
+	"${FILESDIR}/${P}-no-clean.patch" #557890
+	"${FILESDIR}/${P}-objcopy.patch"
+	"${FILESDIR}/${P}-test-random-cflags.patch" #590974
+)
+
+pkg_pretend() {
+	use boot && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+	sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+	sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+
+	if use serial ; then
+		sed -i \
+			-e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+			config.h \
+			|| die "sed failed"
+	fi
+	default
+}
+
+src_configure() {
+	tc-ld-disable-gold #580212
+	tc-export AS CC LD
+}
+
+src_compile() {
+	emake OBJCOPY="$(tc-getOBJCOPY)"
+	if use iso ; then
+		./makeiso.sh || die
+	fi
+}
+
+src_test() { :; }
+
+src_install() {
+	if use boot; then
+		insinto "${BOOTDIR}"
+		doins memtest memtest.bin
+	fi
+
+	insinto /usr/share/${PN}
+	use iso && newins mt*.iso memtest.iso
+	doins memtest memtest.bin
+
+	exeinto /etc/grub.d
+	newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
+
+	dodoc README README.build-process FAQ changelog
+
+	if use floppy ; then
+		dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+		doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+	fi
+}
+
+pkg_preinst() {
+	use boot && mount-boot_pkg_preinst
+}
+
+pkg_postinst() {
+	if use boot; then
+		mount-boot_pkg_postinst
+
+		elog "memtest86+ has been installed in ${BOOTDIR}/"
+		elog "You may wish to update your bootloader configs by adding these lines:"
+		elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+		elog "   as /etc/grub.d/39_${PN}"
+		elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+		elog "    > title=${PN}"
+		elog "    > root (hd?,?)"
+		elog "    > kernel ${BOOTDIR}/memtest.bin"
+		elog " - For lilo:"
+		elog "    > image  = ${BOOTDIR}/memtest.bin"
+		elog "    > label  = ${PN}"
+		elog ""
+		elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'."
+	fi
+}
+
+pkg_prerm() {
+	use boot && mount-boot_pkg_prerm
+}
+
+pkg_postrm() {
+	use boot && mount-boot_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/
@ 2022-02-19 13:14 Ben Kohler
  0 siblings, 0 replies; 8+ messages in thread
From: Ben Kohler @ 2022-02-19 13:14 UTC (permalink / raw
  To: gentoo-commits

commit:     2f7d6a63dfed0ce91010bc92f32163591b218894
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 19 13:00:52 2022 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Sat Feb 19 13:14:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f7d6a63

sys-apps/memtest86+: drop old

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 sys-apps/memtest86+/Manifest                       |   1 -
 sys-apps/memtest86+/files/39_memtest86+            |  67 ------------
 .../memtest86+/files/memtest86+-5.01-gcc-473.patch |  33 ------
 .../files/memtest86+-5.01-hardcoded_cc.patch       |  16 ---
 .../files/memtest86+-5.01-io-extern-inline.patch   |  31 ------
 .../files/memtest86+-5.01-no-C-headers.patch       |  49 ---------
 .../files/memtest86+-5.01-no-clean.patch           |  19 ----
 .../memtest86+/files/memtest86+-5.01-no-scp.patch  |  14 ---
 .../memtest86+/files/memtest86+-5.01-objcopy.patch |  20 ----
 .../files/memtest86+-5.01-reboot-def.patch         |  15 ---
 .../files/memtest86+-5.01-test-random-cflags.patch |  21 ----
 sys-apps/memtest86+/memtest86+-5.01-r5.ebuild      | 115 ---------------------
 12 files changed, 401 deletions(-)

diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest
index 48b2ddc7961f..a3c17016ab5d 100644
--- a/sys-apps/memtest86+/Manifest
+++ b/sys-apps/memtest86+/Manifest
@@ -1,2 +1 @@
-DIST memtest86+-5.01.tar.gz 214877 BLAKE2B ef63eaabaf6d3d27b85c73618c692dd61cce52f3670a57958d181623888bdc3aa538855da9a82ec2ab70b180938e3df99f0b06f606b2d6f64e8aabbe781b3050 SHA512 d872db35ef733ec8f49094251f2bf6b98cc80eb06d04044be3aecf28d534f24ba293a08b9979b112dbd07cf27368148939a33a32c7010fc9581a3a5b150c94d7
 DIST memtest86+-5.31b.tar.gz 227779 BLAKE2B 14aced912bb84115278a3aff7650a3571918b823335aaf7d09880ef10374c320f64878765d93d2ee5a75e2b33ef6c9c4886a9a168955bd77c668f06f5c86a6ca SHA512 ad5891fd0c430ce7a5d0cde2d10dee20b66ad8060d47c3e70e038461d9cde3a78dfc13442b5b09da7c662741945a670353c72dbc08fd5ee8bae82256001a9541

diff --git a/sys-apps/memtest86+/files/39_memtest86+ b/sys-apps/memtest86+/files/39_memtest86+
deleted file mode 100644
index 9c9067a5e736..000000000000
--- a/sys-apps/memtest86+/files/39_memtest86+
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-. /usr/share/grub/grub-mkconfig_lib
-
-memtest=/boot/memtest86plus/memtest
-
-memtestbsd=/boot/memtest86plus/memtest.netbsd
-
-if [ -f "${memtest}" ] && [ -f "${memtestbsd}" ]; then
-	multiple_memtest=true
-fi
-
-submenu_indentation=""
-if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
-	submenu_indentation="${grub_tab}"
-	cat <<EOF
-submenu 'Memtest86+' {
-EOF
-fi
-
-if [ -f "${memtest}" ]; then
-	gettext_printf "Found memtest image: %s\n" "${memtest}" >&2
-
-	device="$("${grub_probe}" --target=device "${memtest}")"
-	path="$(make_system_path_relative_to_its_root "${memtest}")"
-	cat <<EOF
-${submenu_indentation}menuentry 'Memtest86+' {
-EOF
-
-	if [ -n "{submenu_indentation}" ]; then
-		prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
-	else
-		prepare_grub_to_access_device "${device}" | grub_add_tab
-	fi
-
-	cat <<EOF
-	${submenu_indentation}linux16 "${path}"
-${submenu_indentation}}
-EOF
-fi
-
-if [ -f "${memtestbsd}" ]; then
-	gettext_printf "Found memtest image: %s\n" "${memtestbsd}" >&2
-
-	device="$("${grub_probe}" --target=device "${memtestbsd}")"
-	path="$(make_system_path_relative_to_its_root "${memtestbsd}")"
-	cat <<EOF
-${submenu_indentation}menuentry 'Memtest86+ (netbsd)' {
-EOF
-
-	if [ -n "${submenu_indentation}" ]; then
-		prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
-	else
-		prepare_grub_to_access_device "${device}" | grub_add_tab
-	fi
-
-	cat <<EOF
-	${submenu_indentation}knetbsd "${path}"
-${submenu_indentation}}
-EOF
-fi
-
-if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
-	cat <<EOF
-}
-EOF
-fi

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
deleted file mode 100644
index af011d67c705..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-http://forum.canardpc.com/threads/110950-fix-controller-loop-error
-
---- memtest86+-5.01/controller.c
-+++ memtest86+-5.01/controller.c
-@@ -292,7 +292,7 @@ static void setup_nhm(void)
- 
- 	/* First, locate the PCI bus where the MCH is located */
- 
--	for(i = 0; i < sizeof(possible_nhm_bus); i++) {
-+	for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
- 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
- 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
- 		vid &= 0xFFFF;
-@@ -327,7 +327,7 @@ static void setup_nhm32(void)
- 	ctrl.mode = ECC_NONE;
- 
- 	/* First, locate the PCI bus where the MCH is located */
--	for(i = 0; i < sizeof(possible_nhm_bus); i++) {
-+	for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
- 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
- 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
- 		vid &= 0xFFFF;
---- memtest86+-5.01/Makefile
-+++ memtest86+-5.01/Makefile
-@@ -12,7 +12,7 @@ FDISK=/dev/fd0
- AS=as -32
- CC=gcc
- 
--CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
-+CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
- 	-ffreestanding -fPIC $(SMP_FL) -fno-stack-protector 
- 	
- OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch
deleted file mode 100644
index 21b51c5b7fff..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/Makefile.orig	2015-02-01 01:08:33.000000000 +0300
-+++ b/Makefile	2015-02-01 01:10:17.624757244 +0300
-@@ -9,11 +9,10 @@
- #
- FDISK=/dev/fd0
- 
--AS=as -32
--CC=gcc
--
- CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
- 	-ffreestanding -fPIC $(SMP_FL) -fno-stack-protector 
-+CPPFLAGS= -m32
-+ASFLAGS= -32
- 	
- OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
-       config.o cpuid.o linuxbios.o pci.o memsize.o spd.o error.o dmi.o controller.o \

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
deleted file mode 100644
index 682dd5d01a1e..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-http://forum.canardpc.com/threads/110951-fix-build-with-newer-gcc-versions
-
-the meaning of extern inline changed between standards.  use static inline
-for these tiny I/O functions everywhere to keep things simple.
-
---- a/io.h
-+++ b/io.h
-@@ -31,6 +31,6 @@
-  */
- 
- #define __OUT1(s,x) \
--extern inline void __out##s(unsigned x value, unsigned short port) {
-+static inline void __out##s(unsigned x value, unsigned short port) {
- 
- #define __OUT2(s,s1,s2) \
-@@ -43,6 +43,6 @@
- __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; }
- 
- #define __IN1(s) \
--extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
-+static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
- 
- #define __IN2(s,s1,s2) \
-@@ -55,6 +55,6 @@
- __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; }
- 
- #define __OUTS(s) \
--extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
-+static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
- { __asm__ __volatile__ ("cld ; rep ; outs" #s \
- : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch
deleted file mode 100644
index ce7f906a19d5..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-http://forum.canardpc.com/threads/110955-PATCH-don-t-pull-in-system-headers
-
-avoid using C library headers as it'd mean we'd need 32-bit glibc files available
-
-https://bugs.gentoo.org/592638
-
---- a/dmi.c
-+++ b/dmi.c
-@@ -10,7 +10,7 @@
- 
- 
- #include "test.h"
--#include <stdint.h>
-+#include "stdint.h"
- 
- 
- #define round_up(x,y) (((x) + (y) - 1) & ~((y)-1))
---- a/test.c
-+++ b/test.c
-@@ -14,7 +14,28 @@
- #include "stdint.h"
- #include "cpuid.h"
- #include "smp.h"
--#include <sys/io.h>
-+
-+static inline unsigned char
-+inb_p (unsigned short int __port)
-+{
-+  unsigned char _v;
-+
-+  __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
-+  return _v;
-+}
-+
-+static inline void
-+outb (unsigned char __value, unsigned short int __port)
-+{
-+  __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
-+}
-+
-+static inline void
-+outb_p (unsigned char __value, unsigned short int __port)
-+{
-+  __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
-+			"Nd" (__port));
-+}
- 
- extern struct cpu_ident cpu_id;
- extern volatile int    mstr_cpu;

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch
deleted file mode 100644
index e9cbf10399c3..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-http://forum.canardpc.com/threads/110954-PATCH-fix-parallel-build-issues
-
-
-don't run the clean target when building all as we run into parallel races:
- - memtest kicks off building of a bunch of .o files
- - clean runs in parallel which runs `rm` and deletes some of the new .o
- - memtest goes to link and fails because objects are missing
-
---- a/Makefile
-+++ b/Makefile
-@@ -19,7 +19,7 @@
-       smp.o vmem.o random.o
-       
- 
--all: clean memtest.bin memtest 
-+all: memtest.bin memtest
- 
- # Link it statically once so I know I don't have undefined
- # symbols and then link it dynamically so I have full

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch
deleted file mode 100644
index 8d830e297ec2..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-http://forum.canardpc.com/threads/110953-PATCH-don-t-try-to-scp-after-building
-
-this makes no sense in a sane build world
-
---- a/Makefile
-+++ b/Makefile
-@@ -21,7 +21,6 @@
-       
- 
- all: clean memtest.bin memtest 
--		 scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus
- 
- # Link it statically once so I know I don't have undefined
- # symbols and then link it dynamically so I have full

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-objcopy.patch b/sys-apps/memtest86+/files/memtest86+-5.01-objcopy.patch
deleted file mode 100644
index 5effe20027a9..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.01-objcopy.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Allow 'objcopy' override with user's OBJCOPY.
---- a/Makefile
-+++ b/Makefile
-@@ -8,6 +8,7 @@
- # Path for the floppy disk device
- #
- FDISK=/dev/fd0
-+OBJCOPY=objcopy
- 
- CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
- 	-ffreestanding -fPIC $(SMP_FL) -fno-stack-protector 
-@@ -30,7 +31,7 @@ memtest_shared: $(OBJS) memtest_shared.lds Makefile
- 	$(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
- 
- memtest_shared.bin: memtest_shared
--	objcopy -O binary $< memtest_shared.bin
-+	$(OBJCOPY) -O binary $< memtest_shared.bin
- 
- memtest: memtest_shared.bin memtest.lds
- 	$(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
deleted file mode 100644
index f4b42feb5fb3..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-http://forum.canardpc.com/threads/110952-fix-build-due-to-missing-reboot-symbol
-
-the reboot func is used elsewhere, so don't mark it inline
-
---- a/lib.c
-+++ b/lib.c
-@@ -33,7 +33,7 @@ struct ascii_map_str {
-         int keycode;
- };
- 
--inline void reboot(void)
-+void reboot(void)
- {
- 	
- 	/* tell the BIOS to do a cold start */

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch b/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch
deleted file mode 100644
index dcdccb8c6e97..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-make sure we re-use the existing CFLAGS settings so that we get all the right
-flags (like -fno-stack-protector).  just append the few changes we want (the
-optimization levels).
-
-https://bugs.gentoo.org/590974
-
---- a/Makefile
-+++ b/Makefile
-@@ -52,10 +52,10 @@ reloc.o: reloc.c
- 	$(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
- 
- test.o: test.c
--	$(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding test.c
-+test.o: CFLAGS += -O0 -fno-PIC
- 
- random.o: random.c
--	$(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c
-+random.o: CFLAGS += -O3 -fno-PIC
- 	
- # rule for build number generation  
- build_number:

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r5.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r5.ebuild
deleted file mode 100644
index e47609b69d52..000000000000
--- a/sys-apps/memtest86+/memtest86+-5.01-r5.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit mount-boot epatch toolchain-funcs
-
-DESCRIPTION="Memory tester based on memtest86"
-HOMEPAGE="http://www.memtest.org/"
-SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="-* amd64 x86"
-IUSE="+boot floppy iso serial"
-
-BOOTDIR="/boot/memtest86plus"
-QA_PRESTRIPPED="${BOOTDIR}/memtest /usr/share/${PN}/memtest"
-QA_FLAGS_IGNORED="${BOOTDIR}/memtest /usr/share/${PN}/memtest"
-
-RDEPEND="floppy? ( sys-fs/mtools )"
-DEPEND="iso? ( app-cdr/cdrtools )"
-
-pkg_pretend() {
-	use boot && mount-boot_pkg_pretend
-}
-
-src_prepare() {
-	sed -i -e 's,0x10000,0x100000,' memtest.lds || die
-	epatch "${FILESDIR}/${P}-gcc-473.patch" \
-		   "${FILESDIR}/${P}-hardcoded_cc.patch"
-	epatch "${FILESDIR}"/${P}-no-scp.patch
-	epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
-	epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
-	epatch "${FILESDIR}"/${P}-no-clean.patch #557890
-	epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638
-	epatch "${FILESDIR}"/${P}-test-random-cflags.patch #590974
-	epatch "${FILESDIR}"/${P}-objcopy.patch
-
-	sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
-	if use serial ; then
-		sed -i \
-			-e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
-			config.h \
-			|| die "sed failed"
-	fi
-	default
-}
-
-src_configure() {
-	tc-ld-disable-gold #580212
-	tc-export AS CC LD
-}
-
-src_compile() {
-	emake OBJCOPY="$(tc-getOBJCOPY)"
-	if use iso ; then
-		./makeiso.sh || die
-	fi
-}
-
-src_test() { :; }
-
-src_install() {
-	if use boot; then
-		insinto "${BOOTDIR}"
-		doins memtest memtest.bin
-	fi
-
-	insinto /usr/share/${PN}
-	use iso && newins mt*.iso memtest.iso
-	doins memtest memtest.bin
-
-	exeinto /etc/grub.d
-	newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
-
-	dodoc README README.build-process FAQ changelog
-
-	if use floppy ; then
-		dobin "${FILESDIR}"/make-memtest86+-boot-floppy
-		doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
-	fi
-}
-
-pkg_preinst() {
-	use boot && mount-boot_pkg_preinst
-}
-
-pkg_postinst() {
-	if use boot; then
-		mount-boot_pkg_postinst
-
-		elog "memtest86+ has been installed in ${BOOTDIR}/"
-		elog "You may wish to update your bootloader configs by adding these lines:"
-		elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
-		elog "   as /etc/grub.d/39_${PN}"
-		elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
-		elog "    > title=${PN}"
-		elog "    > root (hd?,?)"
-		elog "    > kernel ${BOOTDIR}/memtest.bin"
-		elog " - For lilo:"
-		elog "    > image  = ${BOOTDIR}/memtest.bin"
-		elog "    > label  = ${PN}"
-		elog ""
-		elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'."
-	fi
-}
-
-pkg_prerm() {
-	use boot && mount-boot_pkg_prerm
-}
-
-pkg_postrm() {
-	use boot && mount-boot_pkg_postrm
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/
@ 2022-06-07 17:43 Ben Kohler
  0 siblings, 0 replies; 8+ messages in thread
From: Ben Kohler @ 2022-06-07 17:43 UTC (permalink / raw
  To: gentoo-commits

commit:     b28d427224c238f876169474ba9c8c865c989f73
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  7 17:02:49 2022 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Tue Jun  7 17:42:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b28d4272

sys-apps/memtest86+: add 6.00_beta2

Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 sys-apps/memtest86+/Manifest                     |   1 +
 sys-apps/memtest86+/files/39_memtest86+-r2       | 126 +++++++++++++++++++++++
 sys-apps/memtest86+/memtest86+-6.00_beta2.ebuild |  71 +++++++++++++
 sys-apps/memtest86+/metadata.xml                 |   6 ++
 4 files changed, 204 insertions(+)

diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest
index a3c17016ab5d..30e66ca497f9 100644
--- a/sys-apps/memtest86+/Manifest
+++ b/sys-apps/memtest86+/Manifest
@@ -1 +1,2 @@
 DIST memtest86+-5.31b.tar.gz 227779 BLAKE2B 14aced912bb84115278a3aff7650a3571918b823335aaf7d09880ef10374c320f64878765d93d2ee5a75e2b33ef6c9c4886a9a168955bd77c668f06f5c86a6ca SHA512 ad5891fd0c430ce7a5d0cde2d10dee20b66ad8060d47c3e70e038461d9cde3a78dfc13442b5b09da7c662741945a670353c72dbc08fd5ee8bae82256001a9541
+DIST memtest86+-6.00_beta2.tar.gz 214840 BLAKE2B 223c3023ba38d584c9ff1923e859ee37f1d943be657c80d4151d0b9ded79b4b363f3e2f7e51d58c7b2b637133ecada0f9a952fcdbbf03d8c34cb00a64762022c SHA512 78b13cc05f470e40e347f6eddb4441c2b377c47ea9aa0252096ef37c884f452bdfce1292452a36aa3ce0cf59c3eb0e53c0e069863b3f165dcd648d9eae9c76ea

diff --git a/sys-apps/memtest86+/files/39_memtest86+-r2 b/sys-apps/memtest86+/files/39_memtest86+-r2
new file mode 100644
index 000000000000..a213e0325609
--- /dev/null
+++ b/sys-apps/memtest86+/files/39_memtest86+-r2
@@ -0,0 +1,126 @@
+#!/bin/sh
+
+. /usr/share/grub/grub-mkconfig_lib
+
+mtbios32=/boot/memtest86plus/memtest32.bios
+mtbios64=/boot/memtest86plus/memtest64.bios
+mtefi32=/boot/memtest86plus/memtest.efi32
+mtefi64=/boot/memtest86plus/memtest.efi64
+
+if [ $(ls /boot/memtest86plus | wc -l) -gt 1 ]; then
+	multiple_memtest=true
+fi
+
+submenu_indentation=""
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+	submenu_indentation="${grub_tab}"
+	cat <<EOF
+submenu 'Memtest86+' {
+EOF
+fi
+
+# Start bios32
+if [ -f "${mtbios32}" ]; then
+	gettext_printf "Found memtest image: %s\n" "${mtbios32}" >&2
+
+	device="$("${grub_probe}" --target=device "${mtbios32}")"
+	path="$(make_system_path_relative_to_its_root "${mtbios32}")"
+	cat <<EOF
+${submenu_indentation}if [ "x\$grub_platform" = xpc ]; then
+${submenu_indentation}menuentry 'Memtest86+ 32bit' {
+EOF
+
+	if [ -n "{submenu_indentation}" ]; then
+		prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+	else
+		prepare_grub_to_access_device "${device}" | grub_add_tab
+	fi
+
+	cat <<EOF
+	${submenu_indentation}linux "${path}"
+${submenu_indentation}}
+${submenu_indentation}fi
+EOF
+fi
+# End bios32
+
+# Start bios64
+if [ -f "${mtbios64}" ]; then
+        gettext_printf "Found memtest image: %s\n" "${mtbios64}" >&2
+
+        device="$("${grub_probe}" --target=device "${mtbios64}")"
+        path="$(make_system_path_relative_to_its_root "${mtbios64}")"
+        cat <<EOF
+${submenu_indentation}if [ "x\$grub_platform" = xpc ]; then
+${submenu_indentation}menuentry 'Memtest86+ 64bit' {
+EOF
+
+        if [ -n "{submenu_indentation}" ]; then
+                prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+        else
+                prepare_grub_to_access_device "${device}" | grub_add_tab
+        fi
+
+        cat <<EOF
+        ${submenu_indentation}linux "${path}"
+${submenu_indentation}}
+${submenu_indentation}fi
+EOF
+fi
+# End bios64
+
+# Start efi32
+if [ -f "${mtefi32}" ]; then
+        gettext_printf "Found memtest image: %s\n" "${mtefi32}" >&2
+
+        device="$("${grub_probe}" --target=device "${mtefi32}")"
+        path="$(make_system_path_relative_to_its_root "${mtefi32}")"
+        cat <<EOF
+${submenu_indentation}if [ "x\$grub_platform" = xefi ]; then
+${submenu_indentation}menuentry 'Memtest86+ 32bit UEFI' {
+EOF
+
+        if [ -n "{submenu_indentation}" ]; then
+                prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+        else
+                prepare_grub_to_access_device "${device}" | grub_add_tab
+        fi
+
+        cat <<EOF
+        ${submenu_indentation}chainloader "${path}"
+${submenu_indentation}}
+${submenu_indentation}fi
+EOF
+fi
+# End efi32
+
+# Start efi64
+if [ -f "${mtefi64}" ]; then
+        gettext_printf "Found memtest image: %s\n" "${mtefi64}" >&2
+
+        device="$("${grub_probe}" --target=device "${mtefi64}")"
+        path="$(make_system_path_relative_to_its_root "${mtefi64}")"
+        cat <<EOF
+${submenu_indentation}if [ "x\$grub_platform" = xefi ]; then
+${submenu_indentation}menuentry 'Memtest86+ 64bit UEFI' {
+EOF
+
+        if [ -n "{submenu_indentation}" ]; then
+                prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+        else
+                prepare_grub_to_access_device "${device}" | grub_add_tab
+        fi
+
+        cat <<EOF
+        ${submenu_indentation}chainloader "${path}"
+${submenu_indentation}}
+${submenu_indentation}fi
+EOF
+fi
+#End efi64
+
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+	cat <<EOF
+}
+EOF
+fi

diff --git a/sys-apps/memtest86+/memtest86+-6.00_beta2.ebuild b/sys-apps/memtest86+/memtest86+-6.00_beta2.ebuild
new file mode 100644
index 000000000000..0463eb856f04
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-6.00_beta2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit mount-boot
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="Memory tester based on PCMemTest"
+HOMEPAGE="https://www.memtest.org/"
+SRC_URI="https://github.com/memtest86plus/memtest86plus/archive/refs/tags/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="bios32 bios64 +boot efi32 efi64 iso32 iso64"
+
+ISODEPS="
+	dev-libs/libisoburn
+	sys-fs/dosfstools
+	sys-fs/mtools
+"
+BDEPEND="
+	iso32? ( ${ISODEPS} )
+	iso64? ( ${ISODEPS} )
+"
+
+S=${WORKDIR}/memtest86plus-${MY_PV}
+
+src_prepare() {
+	sed -i -e "s#/sbin/mkdosfs#mkfs.vfat#" build{32,64}/Makefile || die
+	sed -i -e "s/^AS = as/AS +=/" -e "/^CC/d" build{32,64}/Makefile || die
+	default
+}
+
+src_compile() {
+	pushd build32
+		use bios32 && emake memtest.bin
+		use efi32 && emake memtest.efi
+		use iso32 && emake iso
+	popd
+
+	pushd build64
+		use bios64 && emake memtest.bin
+		use efi64 && emake memtest.efi
+		use iso32 && emake iso
+	popd
+}
+
+install_memtest_images() {
+	use bios32 && newins build32/memtest.bin memtest32.bios
+	use bios64 && newins build64/memtest.bin memtest64.bios
+	use efi32 && newins build32/memtest.efi memtest.efi32
+	use efi64 && newins build64/memtest.efi memtest.efi64
+}
+
+src_install() {
+	default
+	if use boot; then
+		exeinto /etc/grub.d/
+		newexe "${FILESDIR}"/39_memtest86+-r2 39_memtest86+
+		insinto /boot/memtest86plus
+		install_memtest_images
+	fi
+
+	insinto /usr/share/${PN}
+	install_memtest_images
+	use iso32 && newins build32/memtest.iso memtest32.iso
+	use iso64 && newins build64/memtest.iso memtest64.iso
+}

diff --git a/sys-apps/memtest86+/metadata.xml b/sys-apps/memtest86+/metadata.xml
index 359afa21d566..dd0c79050ba4 100644
--- a/sys-apps/memtest86+/metadata.xml
+++ b/sys-apps/memtest86+/metadata.xml
@@ -6,9 +6,15 @@
 	<name>Ben Kohler</name>
 </maintainer>
 <use>
+	<flag name="bios32">Compile a BIOS-bootable 32bit memtest image</flag>
+	<flag name="bios64">Compile a BIOS-bootable 64bit memtest image</flag>
 	<flag name="boot">Also install to /boot instead of just /usr/share/memtest86+/</flag>
+	<flag name="efi32">Compile a EFI32-bootable 32bit memtest image</flag>
+	<flag name="efi64">Compile a UEFI-bootable 64bit memtest image</flag>
 	<flag name="floppy">Install a script to create floppy disks containing memtest86+ binaries.</flag>
 	<flag name="iso">Compile an ISO image</flag>
+	<flag name="iso32">Compile a 32bit ISO image</flag>
+	<flag name="iso64">Compile a 64bit ISO image</flag>
 	<flag name="serial">Compile with serial console support</flag>
 </use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/
@ 2023-05-19 12:55 Ben Kohler
  0 siblings, 0 replies; 8+ messages in thread
From: Ben Kohler @ 2023-05-19 12:55 UTC (permalink / raw
  To: gentoo-commits

commit:     b17dd9cc9097d341529cdd513cb54d6ef9dbfcb7
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Fri May 19 12:54:26 2023 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Fri May 19 12:55:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b17dd9cc

sys-apps/memtest86+: drop 5.31b-r3

Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 sys-apps/memtest86+/Manifest                       |   1 -
 sys-apps/memtest86+/files/39_memtest86+-r1         |  69 ------------
 .../memtest86+/files/make-memtest86+-boot-floppy   | 111 -------------------
 .../memtest86+/files/make-memtest86+-boot-floppy.1 |  39 -------
 ...emtest86+-5.31b-discard-note_gnu_property.patch |  23 ----
 .../memtest86+-5.31b-fix-gcc8-freeze-crash.patch   |  12 ---
 .../files/memtest86+-5.31b-gcc-473.patch           |  13 ---
 .../files/memtest86+-5.31b-hardcoded_cc.patch      |  16 ---
 .../files/memtest86+-5.31b-no-clean.patch          |  19 ----
 .../files/memtest86+-5.31b-objcopy.patch           |  21 ----
 .../memtest86+-5.31b-test-random-cflags.patch      |  17 ---
 sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild     | 117 ---------------------
 12 files changed, 458 deletions(-)

diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest
index a49e75d87f01..443b509c1c6f 100644
--- a/sys-apps/memtest86+/Manifest
+++ b/sys-apps/memtest86+/Manifest
@@ -1,3 +1,2 @@
-DIST memtest86+-5.31b.tar.gz 227779 BLAKE2B 14aced912bb84115278a3aff7650a3571918b823335aaf7d09880ef10374c320f64878765d93d2ee5a75e2b33ef6c9c4886a9a168955bd77c668f06f5c86a6ca SHA512 ad5891fd0c430ce7a5d0cde2d10dee20b66ad8060d47c3e70e038461d9cde3a78dfc13442b5b09da7c662741945a670353c72dbc08fd5ee8bae82256001a9541
 DIST memtest86+-6.10.tar.gz 230056 BLAKE2B 2462c31f1ca27aa166c447e51a9b388872faaf7f845100a122f5dd8eb11dc76e26c503dc14d0825bda397c7180a5259094a020d25dd9d43b1997bfbe424c7f65 SHA512 2fb8e6d375f7ced53b1c2d50ffeeafcee1282b2495ea4241958e210c0b4a3500701025041469459c0db1662c448a3b65a51a994d19bc8ac217e23fa935700e42
 DIST memtest86+-6.20.tar.gz 232436 BLAKE2B 6e3bea4b18049446f27da2cb1313300c578ef7fdb774b6a20df603271b66a6c0066be64a91b0a6d4ffcc63f1e139132942290a8111f6a991cccc0a5586cac966 SHA512 b12856bd6ba82dac6308bb9f611ddb16df68c3da4d00ad9abf23bcf5d3f2e5c424fc1bccedd8c0732b4c68013c421ed20c5db56c39b619bbe77c4c1f5e8504f0

diff --git a/sys-apps/memtest86+/files/39_memtest86+-r1 b/sys-apps/memtest86+/files/39_memtest86+-r1
deleted file mode 100644
index 20422b74d65a..000000000000
--- a/sys-apps/memtest86+/files/39_memtest86+-r1
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-. /usr/share/grub/grub-mkconfig_lib
-
-memtest=/boot/memtest86plus/memtest.bin
-
-memtestelf=/boot/memtest86plus/memtest
-
-if [ -f "${memtest}" ] && [ -f "${memtestelf}" ]; then
-	multiple_memtest=true
-fi
-
-submenu_indentation=""
-if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
-	submenu_indentation="${grub_tab}"
-	cat <<EOF
-submenu 'Memtest86+' {
-EOF
-fi
-
-if [ -f "${memtest}" ]; then
-	gettext_printf "Found memtest image: %s\n" "${memtest}" >&2
-
-	device="$("${grub_probe}" --target=device "${memtest}")"
-	path="$(make_system_path_relative_to_its_root "${memtest}")"
-	cat <<EOF
-${submenu_indentation}menuentry 'Memtest86+' {
-EOF
-
-	if [ -n "{submenu_indentation}" ]; then
-		prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
-	else
-		prepare_grub_to_access_device "${device}" | grub_add_tab
-	fi
-
-	cat <<EOF
-	${submenu_indentation}linux16 "${path}"
-${submenu_indentation}}
-EOF
-fi
-
-if [ -f "${memtestelf}" ]; then
-	gettext_printf "Found memtest image: %s\n" "${memtestelf}" >&2
-
-	device="$("${grub_probe}" --target=device "${memtestelf}")"
-	path="$(make_system_path_relative_to_its_root "${memtestelf}")"
-	cat <<EOF
-${submenu_indentation}menuentry 'Memtest86+ (ELF)' {
-EOF
-
-	if [ -n "${submenu_indentation}" ]; then
-		prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
-	else
-		prepare_grub_to_access_device "${device}" | grub_add_tab
-	fi
-
-	# We use knetbsd as a lazy way of booting an ELF.
-	# It's not actually related to NetBSD at all.
-	cat <<EOF
-	${submenu_indentation}knetbsd "${path}"
-${submenu_indentation}}
-EOF
-fi
-
-if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
-	cat <<EOF
-}
-EOF
-fi

diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy
deleted file mode 100644
index 9c225c740bf4..000000000000
--- a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/bin/sh
-#
-# Script for making a memtest86 boot floppy using GRUB as bootloader
-#
-
-# (c) 2003 Peter Loje Hansen <pl@2m.dk>
-#  - original version
-# (c) 2004 Yann Dirson <dirson@debian.org>
-#  - added parameters
-#  - ability to work on a floppy image instead of a real floppy
-#  - adapted patches from Martin Koeppe <martin@koeppe-net.de>, to use
-#    mtools and install full grub
-
-# TODO:
-# - add a flag to generate a default boot entry for (hd0)
-
-set -e
-
-MEMTEST=/boot/memtest86plus/memtest.bin
-FLOPPYIMAGE=/dev/fd0
-GRUBBIN=/sbin/grub
-GRUBLIB=/lib/grub
-MFORMAT=/usr/bin/mformat
-
-arch=$(uname -m)
-
-case "$arch" in
-	i386|i486|i686)		GRUBARCH=i386-pc;;
-	x86_64)				GRUBARCH=x86_64-pc;;
-	*)					error "Unsupported architecture: $arch";;
-esac
-
-error()
-{
-    echo >&2 "$0: $*"
-    exit 1
-}
-
-needsarg()
-{
-    [ $1 -ge 2 ] || error "syntax error"
-}
-
-[ -d $GRUBLIB ] || error "Can't find $GRUBLIB - did you install a recent grub package (0.95+cvs20040624 or later) ?"
-[ -x $MFORMAT ] || error "Can't find mformat - did you install the mtools package ?"
-
-while [ $# -gt 0 ]
-do
-    case "$1" in
-    --help) echo "$0 [--memtest $MEMTEST] [--floppyimage $FLOPPYIMAGE]"; exit 0 ;;
-    --memtest) needsarg $#; MEMTEST="$2"; shift ;;
-    --floppyimage) needsarg $#; FLOPPYIMAGE="$2"; shift ;;
-    *) error "syntax error" ;;
-    esac
-    shift
-done
-
-MOUNTPOINT=$(mktemp -d)
-
-if [ -b "$FLOPPYIMAGE" ]
-then
-    FINALDEV="$FLOPPYIMAGE"
-    FLOPPYIMAGE="$(mktemp)"
-else
-    FINALDEV=""
-fi
-
-echo "* Creating msdos file system"
-echo
-if [ ! -s "$FLOPPYIMAGE" ]; then
-    # unless a non-empty image exists, create a blank one first
-    dd bs=1024 count=1440 if=/dev/zero of="$FLOPPYIMAGE"
-fi
-# FIXME: "-f 1440" should probably be dropped
-mformat -i $FLOPPYIMAGE -f 1440 :: 
-
-mmd -i $FLOPPYIMAGE ::/boot 
-mmd -i $FLOPPYIMAGE ::/boot/grub 
-
-echo
-echo "* Installing GRUB files"
-mcopy -v -i "$FLOPPYIMAGE" - ::/boot/grub/menu.lst <<EOF
-color green/black light-green/black
-default 0
-timeout 10
-title  memtest
-kernel (fd0)/boot/memtest.bin
-EOF
-mcopy -v -i "$FLOPPYIMAGE" $GRUBLIB/$GRUBARCH/* ::/boot/grub 
-
-echo
-echo "* Installing $MEMTEST"
-mcopy -v -i "$FLOPPYIMAGE" "$MEMTEST" ::/boot/memtest.bin 
-
-echo
-echo -n "* Installing GRUB"
-$GRUBBIN --batch --device-map=/dev/null <<EOF
-device (fd0) $FLOPPYIMAGE
-root (fd0)
-setup (fd0)
-quit
-EOF
-
-if [ -n "$FINALDEV" ]; then
-    echo
-    echo "Insert a writable floppy for $FINALDEV and press enter"
-    read FOO
-
-    dd bs=1024 if="$FLOPPYIMAGE" of="$FINALDEV"
-    rm "$FLOPPYIMAGE"
-fi

diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1 b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1
deleted file mode 100644
index e1283e5efc8f..000000000000
--- a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1
+++ /dev/null
@@ -1,39 +0,0 @@
-.\" Man page for make-memtest86+-boot-floppy 
-
-.TH make-memtest86+-boot-floppy 1
-
-.SH NAME
-make-memtest86+-boot-floppy \- create a memtest86+ boot-floppy using GRUB.
-
-.SH SYNOPSIS
-
-.B make-memtest86+-boot-floppy [ \-\-memtest 
-.I <path to memtest86+-image>
-.B ] [ \-\-floppyimage 
-.I <path to floppyimage/device>
-.B ]
-
-.SH DESCRIPTION
-.B make-memtest86+-boot-floppy
-can create a memtest86+ boot floppy using GRUB as the bootloader.
-
-.SH OPTIONS
-
-.IP "\-\-memtest <path to the memtest-image>"
-Path to the memtest86+-image, default is /boot/memtest86+.bin.
-
-.IP "\-\-floppyimage <path to the floppyimage or device>"
-File or device where the boot-image should be written to, default is /dev/fd0.
-
-.IP "\-\-help" 
-Display a short message about the options of the tool.
-
-.SH AUTHOR
-This man-page has been written by Thomas Schmidt <thomas@thsnet.de>
-.PP
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU General Public License, Version 2 any
-later version published by the Free Software Foundation.
-.PP
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common\-licenses/GPL.

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-discard-note_gnu_property.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-discard-note_gnu_property.patch
deleted file mode 100644
index e24ad4318f37..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.31b-discard-note_gnu_property.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/Makefile	2021-12-04 15:15:45.845429722 +0100
-+++ b/Makefile	2021-12-04 15:22:51.924755794 +0100
-@@ -11,9 +11,9 @@
- OBJCOPY=objcopy
- 
- CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
-- -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
-+ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector -Wa,-mx86-used-note=no
- CPPFLAGS= -m32
--ASFLAGS= -32
-+ASFLAGS= -32 -mx86-used-note=no
- 
- SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g
- 
---- a/memtest.bin.lds	2020-04-12 17:14:51.000000000 +0200
-+++ b/memtest.bin.lds	2021-12-04 14:54:33.178625382 +0100
-@@ -11,5 +11,6 @@
- 		*(.data) 
- 		_end = . ;
- 	}
-+	/DISCARD/ : { *(.note.gnu.property) }
- 	_syssize = (_end - _start + 15) >> 4;
- }

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-fix-gcc8-freeze-crash.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-fix-gcc8-freeze-crash.patch
deleted file mode 100644
index 44d11b76b344..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.31b-fix-gcc8-freeze-crash.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur memtest86+-5.31b/Makefile memtest86+-5.31b.new/Makefile
---- memtest86+-5.31b/Makefile	2021-09-16 09:27:24.401570971 -0500
-+++ memtest86+-5.31b.new/Makefile	2021-09-16 09:30:24.332704245 -0500
-@@ -64,6 +64,9 @@
- memsize.o: memsize.c
- 	$(CC) -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector   -c -o memsize.o memsize.c
- 
-+test.o: test.c
-+test.o: CFLAGS += -fno-strict-overflow
-+
- random.o: random.c
- random.o: CFLAGS += -O3 -fno-PIC
\ No newline at end of file

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch
deleted file mode 100644
index 76c0761512b4..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-http://forum.canardpc.com/threads/110950-fix-controller-loop-error
-
---- a/Makefile
-+++ b/Makefile
-@@ -12,7 +12,7 @@ FDISK=/dev/fd0
- AS=as -32
- CC=gcc
- 
--CFLAGS= -Wall -Werror -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
-+CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
-  -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
- 
- SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch
deleted file mode 100644
index 4ee174478b7b..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -9,11 +9,10 @@
- #
- FDISK=/dev/fd0
- 
--AS=as -32
--CC=gcc
--
- CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
-  -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
-+CPPFLAGS= -m32
-+ASFLAGS= -32
- 
- SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g
- 

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch
deleted file mode 100644
index dbb560e506b9..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-http://forum.canardpc.com/threads/110954-PATCH-fix-parallel-build-issues
-
-
-don't run the clean target when building all as we run into parallel races:
- - memtest kicks off building of a bunch of .o files
- - clean runs in parallel which runs `rm` and deletes some of the new .o
- - memtest goes to link and fails because objects are missing
-
---- a/Makefile
-+++ b/Makefile
-@@ -22,7 +22,7 @@
- 
- SELF_TEST_OBJS = test.o self_test.o cpuid.o random.o
- 
--all: clean memtest.bin memtest
-+all: memtest.bin memtest
- 
- run_self_test : self_test
- 	./self_test && touch run_self_test

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch
deleted file mode 100644
index 9398c4163a4d..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Allow 'objcopy' override with user's OBJCOPY.
-
---- a/Makefile
-+++ b/Makefile
-@@ -8,6 +8,7 @@
- # Path for the floppy disk device
- #
- FDISK=/dev/fd0
-+OBJCOPY=objcopy
- 
- CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
-  -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
-@@ -36,7 +37,7 @@
- 	$(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
- 
- memtest_shared.bin: memtest_shared
--	objcopy -O binary $< memtest_shared.bin
-+	$(OBJCOPY) -O binary $< memtest_shared.bin
- 
- memtest: memtest_shared.bin memtest.lds
- 	$(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch
deleted file mode 100644
index f3faf1392b3a..000000000000
--- a/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-make sure we re-use the existing CFLAGS settings so that we get all the right
-flags (like -fno-stack-protector).  just append the few changes we want (the
-optimization levels).
-
-https://bugs.gentoo.org/590974
-
---- a/Makefile
-+++ b/Makefile
-@@ -65,7 +65,7 @@
- 	$(CC) -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector   -c -o memsize.o memsize.c
- 
- random.o: random.c
--	$(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c
-+random.o: CFLAGS += -O3 -fno-PIC
- 
- clean:
- 	rm -f *.o *.s *.iso memtest.bin memtest memtest_shared \

diff --git a/sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild b/sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild
deleted file mode 100644
index 77e7831ed564..000000000000
--- a/sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit mount-boot toolchain-funcs
-
-DESCRIPTION="Memory tester based on memtest86"
-HOMEPAGE="http://www.memtest.org/"
-SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="-* amd64 x86"
-IUSE="+boot floppy iso serial"
-
-BOOTDIR="/boot/memtest86plus"
-QA_PRESTRIPPED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
-QA_FLAGS_IGNORED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
-
-RDEPEND="floppy? ( sys-fs/mtools )"
-DEPEND="${RDEPEND}"
-BDEPEND="iso? ( app-cdr/cdrtools )"
-
-PATCHES=(
-	"${FILESDIR}/${P}-gcc-473.patch"
-	"${FILESDIR}/${P}-hardcoded_cc.patch"
-	"${FILESDIR}/${P}-no-clean.patch" #557890
-	"${FILESDIR}/${P}-objcopy.patch"
-	"${FILESDIR}/${P}-test-random-cflags.patch" #590974
-	"${FILESDIR}/${P}-fix-gcc8-freeze-crash.patch"
-	"${FILESDIR}/${P}-discard-note_gnu_property.patch"
-)
-
-pkg_pretend() {
-	use boot && mount-boot_pkg_pretend
-}
-
-src_prepare() {
-	sed -i -e 's,0x10000,0x100000,' memtest.lds || die
-	sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
-
-	if use serial ; then
-		sed -i -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
-			config.h || die "sed failed"
-	fi
-	#613196
-	use amd64 && sed -i -e's,$(LD) -s -T memtest.lds,$(LD) -s -T memtest.lds -z max-page-size=0x1000,' Makefile
-	default
-}
-
-src_configure() {
-	tc-ld-disable-gold #580212
-	tc-export AS CC LD
-}
-
-src_compile() {
-	emake OBJCOPY="$(tc-getOBJCOPY)"
-	if use iso ; then
-		./makeiso.sh || die
-	fi
-}
-
-src_test() { :; }
-
-src_install() {
-	if use boot ; then
-		insinto "${BOOTDIR}"
-		doins memtest memtest.bin
-	fi
-
-	insinto /usr/share/${PN}
-	use iso && newins mt*.iso memtest.iso
-	doins memtest memtest.bin
-
-	exeinto /etc/grub.d
-	newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
-
-	dodoc README README.build-process FAQ changelog
-
-	if use floppy ; then
-		dobin "${FILESDIR}"/make-memtest86+-boot-floppy
-		doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
-	fi
-}
-
-pkg_preinst() {
-	use boot && mount-boot_pkg_preinst
-}
-
-pkg_postinst() {
-	if use boot; then
-		mount-boot_pkg_postinst
-
-		elog "memtest86+ has been installed in ${BOOTDIR}/"
-		elog "You may wish to update your bootloader configs:"
-		elog " - For grub2 just re-run grub-mkconfig -o /boot/grub/grub.cfg, since a"
-		elog "   config generator has been installed at /etc/grub.d/39_${PN}"
-		elog " - For lilo, add the following to /etc/lilo.conf and re-run lilo:"
-		elog "    > image  = ${BOOTDIR}/memtest.bin"
-		elog "    > label  = ${PN}"
-		elog ""
-		elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'."
-	fi
-
-	if use boot && [ -e /sys/firmware/efi ]; then
-		ewarn "WARNING: You appear to be booted in EFI mode but ${PN} is a BIOS-only tool."
-	fi
-}
-
-pkg_prerm() {
-	use boot && mount-boot_pkg_prerm
-}
-
-pkg_postrm() {
-	use boot && mount-boot_pkg_postrm
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-19 12:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-13 13:22 [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2023-05-19 12:55 Ben Kohler
2022-06-07 17:43 Ben Kohler
2022-02-19 13:14 Ben Kohler
2017-03-14 23:54 Mike Frysinger
2016-11-26  0:09 Mike Frysinger
2016-07-10  2:48 NP Hardass
2015-12-12 23:32 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox