summaryrefslogtreecommitdiffstats
path: root/rules/memtest86p.make
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@systec-electronic.com>2011-06-20 09:15:02 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-06-20 20:04:03 +0200
commit5e954fbef00fedd66fdc9a0c98ef290265bf32a9 (patch)
treefa5a345234c99a98009a767f767648cb061726f6 /rules/memtest86p.make
parent5af49fbde5c186cf82e6b340cc3fc2f098cf8f23 (diff)
downloadptxdist-5e954fbef00fedd66fdc9a0c98ef290265bf32a9.tar.gz
ptxdist-5e954fbef00fedd66fdc9a0c98ef290265bf32a9.tar.xz
memtest86+: added new package
In ptxdist it is called MEMTEST86P because + is not valid. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> [mol: build only for x86] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/memtest86p.make')
-rw-r--r--rules/memtest86p.make81
1 files changed, 81 insertions, 0 deletions
diff --git a/rules/memtest86p.make b/rules/memtest86p.make
new file mode 100644
index 000000000..d385e6fe4
--- /dev/null
+++ b/rules/memtest86p.make
@@ -0,0 +1,81 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Alexander Stein <alexander.stein@systec-electronic.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_ARCH_X86)-$(PTXCONF_MEMTEST86P) += memtest86p
+
+#
+# Paths and names
+#
+MEMTEST86P_VERSION := 4.20
+MEMTEST86P := memtest86+-$(MEMTEST86P_VERSION)
+MEMTEST86P_SUFFIX := tar.gz
+MEMTEST86P_URL := http://www.memtest.org/download/$(MEMTEST86P_VERSION)/$(MEMTEST86P).$(MEMTEST86P_SUFFIX)
+MEMTEST86P_SOURCE := $(SRCDIR)/$(MEMTEST86P).$(MEMTEST86P_SUFFIX)
+MEMTEST86P_DIR := $(BUILDDIR)/$(MEMTEST86P)
+MEMTEST86P_LICENSE := GPL-2
+MEMTEST86P_MD5 := ef62c2f5be616676c8c62066dedc46b3
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/memtest86p.prepare:
+ @$(call targetinfo)
+
+ifdef PTXCONF_MEMTEST86P_SERIAL
+ sed -i -e 's/#define SERIAL_CONSOLE_DEFAULT 0/#define SERIAL_CONSOLE_DEFAULT 1/' $(MEMTEST86P_DIR)/config.h
+ sed -i -e 's/#define SERIAL_BAUD_RATE .*/#define SERIAL_BAUD_RATE $(PTXCONF_MEMTEST86P_BAUDRATE)/' $(MEMTEST86P_DIR)/config.h
+else
+ @sed -i -e 's/#define SERIAL_CONSOLE_DEFAULT 1/#define SERIAL_CONSOLE_DEFAULT 0/' $(MEMTEST86P_DIR)/config.h
+endif
+ # Don't prestrip generated files
+ sed -i -e 's/$$(LD) -s /$$(LD) /' $(MEMTEST86P_DIR)/Makefile
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+MEMTEST86P_PATH := PATH=$(CROSS_PATH)
+MEMTEST86P_MAKE_OPT := $(CROSS_ENV_PROGS)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/memtest86p.install:
+ @$(call targetinfo)
+ install -D -m 644 $(MEMTEST86P_DIR)/memtest.bin \
+ $(MEMTEST86P_PKGDIR)/boot/memtest86+.bin
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/memtest86p.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, memtest86p)
+ @$(call install_fixup, memtest86p,PRIORITY,optional)
+ @$(call install_fixup, memtest86p,SECTION,base)
+ @$(call install_fixup, memtest86p,AUTHOR,"Alexander Stein <alexander.stein@systec-electronic.com>")
+ @$(call install_fixup, memtest86p,DESCRIPTION,missing)
+
+ @$(call install_copy, memtest86p, 0, 0, 0644, -, /boot/memtest86+.bin)
+
+ @$(call install_finish, memtest86p)
+
+ @$(call touch)
+
+# vim: syntax=make