Skip to content

Commit

Permalink
Merge pull request #2648 from HiassofT/le82-memtester
Browse files Browse the repository at this point in the history
[8.2] include memtester in image
  • Loading branch information
chewitt authored Apr 13, 2018
2 parents bc574b1 + ff97658 commit 0beeae9
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 1 deletion.
37 changes: 37 additions & 0 deletions packages/debug/memtester/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

PKG_NAME="memtester"
PKG_VERSION="4.3.0"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://pyropus.ca/software/memtester/"
PKG_URL="http://pyropus.ca/software/memtester/old-versions/memtester-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="debug"
PKG_SHORTDESC="A userspace utility for testing the memory subsystem for faults"
PKG_TOOLCHAIN="manual"

make_target() {
make memtester
}

makeinstall_target() {
mkdir -p $INSTALL/usr/bin
cp memtester $INSTALL/usr/bin
}
34 changes: 34 additions & 0 deletions packages/debug/memtester/patches/memtester-001-cross-compile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Author: Helmut Grohne <helmut@subdivi.de>
Description: make the build system honor $CC to facilitate cross builds

Index: memtester-4.3.0/conf-cc
===================================================================
--- memtester-4.3.0.orig/conf-cc 2012-06-09 23:45:22.000000000 +0200
+++ memtester-4.3.0/conf-cc 2015-09-12 20:36:27.000000000 +0200
@@ -1,3 +1,3 @@
-cc -O2 -DPOSIX -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -DTEST_NARROW_WRITES -c
+$CC -O2 -DPOSIX -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -DTEST_NARROW_WRITES -c

This will be used to compile .c files.
Index: memtester-4.3.0/conf-ld
===================================================================
--- memtester-4.3.0.orig/conf-ld 2012-06-09 23:45:22.000000000 +0200
+++ memtester-4.3.0/conf-ld 2015-09-12 20:36:33.000000000 +0200
@@ -1,3 +1,3 @@
-cc -s
+$CC -s

This will be used to link .o files into an executable.
Index: memtester-4.3.0/Makefile
===================================================================
--- memtester-4.3.0.orig/Makefile 2015-09-12 20:01:06.000000000 +0200
+++ memtester-4.3.0/Makefile 2015-09-12 20:50:40.000000000 +0200
@@ -10,8 +10,6 @@
# You don't need to edit these; change the contents of the conf-cc and conf-ld
# files if you need to change the compile/link commands. See the README for
# more information.
-CC = $(shell head -n 1 conf-cc)
-LD = $(shell head -n 1 conf-ld)

SOURCES = memtester.c tests.c
OBJECTS = $(SOURCES:.c=.o)
2 changes: 1 addition & 1 deletion packages/virtual/debug/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.openelec.tv"
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain gdb"
PKG_DEPENDS_TARGET="toolchain gdb memtester"
PKG_SECTION="virtual"
PKG_SHORTDESC="debug: Metapackage for installing debugging tools"
PKG_LONGDESC="debug is a Metapackage for installing debugging tools"
Expand Down

0 comments on commit 0beeae9

Please sign in to comment.