mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 04:37:20 +08:00
memtest86+: imported from CCR
This commit is contained in:
parent
9e06366b9b
commit
4d9bd20308
32
memtest86+/60_memtest86+
Executable file
32
memtest86+/60_memtest86+
Executable file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
########################################################
|
||||
# This script generates a memtest86+ entry on grub.cfg #
|
||||
# if memtest is installed on the system. #
|
||||
########################################################
|
||||
|
||||
prefix="/usr"
|
||||
exec_prefix="${prefix}"
|
||||
|
||||
datarootdir="/usr/share"
|
||||
datadir="${datarootdir}"
|
||||
|
||||
. "${datadir}/grub/grub-mkconfig_lib"
|
||||
|
||||
MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin"
|
||||
CLASS="--class memtest86 --class gnu --class tool"
|
||||
|
||||
if [ -e "${MEMTEST86_IMAGE}" ] && is_path_readable_by_grub "${MEMTEST86_IMAGE}" ; then
|
||||
## image exists, create menu entry
|
||||
echo "Found memtest86+ image: ${MEMTEST86_IMAGE}" >&2
|
||||
_GRUB_MEMTEST_HINTS_STRING="$(${grub_probe} --target=hints_string ${MEMTEST86_IMAGE})"
|
||||
_GRUB_MEMTEST_FS_UUID="$(${grub_probe} --target=fs_uuid ${MEMTEST86_IMAGE})"
|
||||
_GRUB_MEMTEST_REL_PATH="$(make_system_path_relative_to_its_root ${MEMTEST86_IMAGE})"
|
||||
cat << EOF
|
||||
if [ "\${grub_platform}" == "pc" ]; then
|
||||
menuentry "Memory Tester (memtest86+)" ${CLASS} {
|
||||
search --fs-uuid --no-floppy --set=root ${_GRUB_MEMTEST_HINTS_STRING} ${_GRUB_MEMTEST_FS_UUID}
|
||||
linux16 ${_GRUB_MEMTEST_REL_PATH} ${GRUB_CMDLINE_MEMTEST86}
|
||||
}
|
||||
fi
|
||||
EOF
|
||||
fi
|
21
memtest86+/PKGBUILD
Normal file
21
memtest86+/PKGBUILD
Normal file
@ -0,0 +1,21 @@
|
||||
# Maintainer: Neophytos Kolokotronis <tetris4@ AT gmail DOT com>
|
||||
# Contributor: dinolib
|
||||
# Contributions from Arch: https://www.archlinux.org/packages/extra/any/memtest86+/
|
||||
|
||||
pkgname=memtest86+
|
||||
pkgver=5.01
|
||||
pkgrel=1
|
||||
pkgdesc="An advanced memory diagnostic tool"
|
||||
arch=('x86_64')
|
||||
url="http://www.memtest.org"
|
||||
license=('GPL2')
|
||||
install=memtest86+.install
|
||||
source=(http://www.memtest.org/download/${pkgver}/${pkgname}-${pkgver}.bin.gz
|
||||
60_memtest86+)
|
||||
md5sums=('14ec4c4d827a49629c41b499303355ed'
|
||||
'ed9c4a0612971521d9d8f81ed61f6ecd')
|
||||
|
||||
package() {
|
||||
install -D -m644 "${srcdir}/${pkgname}-${pkgver}.bin" "${pkgdir}/boot/memtest86+/memtest.bin"
|
||||
install -D "${srcdir}/60_memtest86+" "${pkgdir}/etc/grub.d/60_memtest86+"
|
||||
}
|
23
memtest86+/memtest86+.install
Normal file
23
memtest86+/memtest86+.install
Normal file
@ -0,0 +1,23 @@
|
||||
post_install() {
|
||||
cat << EOF
|
||||
For using memtest86+ please modifiy your bootloaders.
|
||||
|
||||
If /boot is on root partitions:
|
||||
==> GRUB add this to /boot/grub/menu.lst
|
||||
title Memtest86+ [/boot/memtest86+/memtest.bin]
|
||||
kernel (hd?,?)/boot/memtest86+/memtest.bin
|
||||
|
||||
==> Lilo add this to lilo.conf
|
||||
image = /boot/memtest86+/memtest.bin
|
||||
label = "Memtest86+"
|
||||
|
||||
If /boot is on seperate partition then just use /memtest86+/memtest.bin
|
||||
without /boot prefix.
|
||||
EOF
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
cat << EOF
|
||||
Please remove your additions from your bootloaders.
|
||||
EOF
|
||||
}
|
Loading…
Reference in New Issue
Block a user