diff options
author | Steve Arnold <stephen.arnold42@gmail.com> | 2015-04-11 21:28:44 -0700 |
---|---|---|
committer | Steve Arnold <stephen.arnold42@gmail.com> | 2015-04-11 21:28:44 -0700 |
commit | 6bb198d7359224c744047a4844e08846900b3590 (patch) | |
tree | 40c320644ca62317821d2fed17079c4dfe4dc6d7 /dev-util/devmem2 | |
parent | updated ebuild to match upstream makefile changes (diff) | |
download | arm-6bb198d7359224c744047a4844e08846900b3590.tar.gz arm-6bb198d7359224c744047a4844e08846900b3590.tar.bz2 arm-6bb198d7359224c744047a4844e08846900b3590.zip |
switched to tarball download from github instead of git ebuild
Diffstat (limited to 'dev-util/devmem2')
-rw-r--r-- | dev-util/devmem2/Manifest | 5 | ||||
-rw-r--r-- | dev-util/devmem2/devmem2-0.1.ebuild (renamed from dev-util/devmem2/devmem2-20040805.ebuild) | 8 | ||||
-rw-r--r-- | dev-util/devmem2/files/Makefile | 11 | ||||
-rw-r--r-- | dev-util/devmem2/files/devmem2.c | 120 |
4 files changed, 4 insertions, 140 deletions
diff --git a/dev-util/devmem2/Manifest b/dev-util/devmem2/Manifest index 7eb249d..8bf4197 100644 --- a/dev-util/devmem2/Manifest +++ b/dev-util/devmem2/Manifest @@ -1,3 +1,2 @@ -AUX Makefile 170 SHA256 053e359680035e82e4bf646a6229927c4762ef50e02333259ead03943df4c549 SHA512 62f34b6d5d4c9b409814fae5a479a1de769b93f585cca0ba24b9c8e825c5f607e780d13bd1b697b666024ded5269fecb625c4d97dc731315095020c9fe01a244 WHIRLPOOL 8d1a682dacef4ca39ab1b4747dabb0df424c990bfcd1fa5b9eecae2c3375e51c8c66b59d19e2e392d426a5a2d0009ae1eaa3b57260ba12b4f83a97564e02d882 -AUX devmem2.c 3895 SHA256 b476a0e2462d4d17343b06de79ea78789380e9d05d6280afb74446a65dee40a5 SHA512 edf0f72081b6ab67734a722113781c945d5678c88716575a58628ab77c00a3e091591dd63c263b6c384ad2e4377c2c5a2d3846672625d6cef0407045e64cdbf2 WHIRLPOOL e5f06ac21415342821256886d34daa86cd5d13b05483fde541779e4df29eda194b22345e5d057ab3f8a30a419814b558f227215142172d7c21b67024e060d463 -EBUILD devmem2-20040805.ebuild 500 SHA256 d57a6ec6af87712d6a1c642f0feeb3cf78efcc2775e164ba314c7d285758dab0 SHA512 b3c7f5fad09cb580d3e8bd55ac6e5dabb4ae17b081ad39603c02adf35a7fc9b7bde0047a2b6b8d705d8e290b75e523554928138e2755e4d57fc8259cc56441f3 WHIRLPOOL 1e90068e677fae0d7ffbda4b957aa2c80758a94d90c3d5fcc4fcc8c012fb34615aaf7d9a2da4e45e2f255a742a8fb595ec0fa871baccae271742baf889d406a4 +DIST devmem2-0.1.tar.gz 8898 SHA256 ecf869e20ca0e7fa69773a94ada94ec3c012a5111153820a74767781e3794f68 SHA512 b8d8366f5afa3dd65bd04d01c12c8ce7e8e845a60f9e2d785771009e027afc7ed0bf7d64e03585a9a65aabdf9a842768963c9074d8fe6ffd135c454d6c7e1f0e WHIRLPOOL 6facc46021077b0be8da031aee086c351ac97a7041a9cf9429c3c0d664c18f192e4f0bceed806adc84e2440a0ec57de2fbde5dbad3777f3b986af76e507b4f96 +EBUILD devmem2-0.1.ebuild 487 SHA256 aa706cef87e9fcc05ac30ea18692a6150b496b46162d378bc6411f471e93943a SHA512 2f0c2b35f1afbc4651bc6f83c44941d809f480a80c76ad9974fd951377970d6756f011c15b65fc7427aae16600f0400e1bcc08d0866a98116f4d9d98dba35ee9 WHIRLPOOL 963a1ec58c3ee73326e37a302b9b1d47f4007b9bec2cf50d2c0f937af4536c1715a9bc7967add395f8d2366a9d9917ab58de0fd67aef1d5e86645076ec4815f0 diff --git a/dev-util/devmem2/devmem2-20040805.ebuild b/dev-util/devmem2/devmem2-0.1.ebuild index 764b255..b10e7c9 100644 --- a/dev-util/devmem2/devmem2-20040805.ebuild +++ b/dev-util/devmem2/devmem2-0.1.ebuild @@ -9,6 +9,8 @@ inherit toolchain-funcs DESCRIPTION="Simple program to read/write from/to any location in memory." HOMEPAGE="http://www.lartmaker.nl/lartware/port/" +SRC_URI="https://github.com/sarnold/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~arm" SLOT="0" @@ -17,12 +19,6 @@ IUSE="" DEPEND="" -S="${WORKDIR}" - -src_unpack() { - cp "${FILESDIR}"/Makefile "${FILESDIR}"/devmem2.c "${S}"/ -} - src_compile() { emake CC=$(tc-getCC) || die "make failed..." } diff --git a/dev-util/devmem2/files/Makefile b/dev-util/devmem2/files/Makefile deleted file mode 100644 index 831c374..0000000 --- a/dev-util/devmem2/files/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -SRC=devmem2.c - -devmem2: $(SRC) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) - -install: - mkdir -p $(DESTDIR)/usr/bin - install devmem2 $(DESTDIR)/usr/bin - -clean: - rm -f devmem2 diff --git a/dev-util/devmem2/files/devmem2.c b/dev-util/devmem2/files/devmem2.c deleted file mode 100644 index 74e41d2..0000000 --- a/dev-util/devmem2/files/devmem2.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * devmem2.c: Simple program to read/write from/to any location in memory. - * - * Copyright (C) 2000, Jan-Derk Bakker (jdb@lartmaker.nl) - * - * - * This software has been developed for the LART computing board - * (http://www.lart.tudelft.nl/). The development has been sponsored by - * the Mobile MultiMedia Communications (http://www.mmc.tudelft.nl/) - * and Ubiquitous Communications (http://www.ubicom.tudelft.nl/) - * projects. - * - * - * This program 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. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <errno.h> -#include <signal.h> -#include <fcntl.h> -#include <ctype.h> -#include <termios.h> -#include <sys/types.h> -#include <sys/mman.h> - -#define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \ - __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0) - -#define MAP_SIZE 4096UL -#define MAP_MASK (MAP_SIZE - 1) - -int main(int argc, char **argv) { - int fd; - void *map_base, *virt_addr; - unsigned long read_result, writeval; - off_t target; - int access_type = 'w'; - - if(argc < 2) { - fprintf(stderr, "\nUsage:\t%s { address } [ type [ data ] ]\n" - "\taddress : memory address to act upon\n" - "\ttype : access operation type : [b]yte, [h]alfword, [w]ord\n" - "\tdata : data to be written\n\n", - argv[0]); - exit(1); - } - target = strtoul(argv[1], 0, 0); - - if(argc > 2) - access_type = tolower(argv[2][0]); - - - if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) FATAL; - printf("/dev/mem opened.\n"); - fflush(stdout); - - /* Map one page */ - map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, target & ~MAP_MASK); - if(map_base == (void *) -1) FATAL; - printf("Memory mapped at address %p.\n", map_base); - fflush(stdout); - - virt_addr = map_base + (target & MAP_MASK); - switch(access_type) { - case 'b': - read_result = *((unsigned char *) virt_addr); - break; - case 'h': - read_result = *((unsigned short *) virt_addr); - break; - case 'w': - read_result = *((unsigned long *) virt_addr); - break; - default: - fprintf(stderr, "Illegal data type '%c'.\n", access_type); - exit(2); - } - printf("Value at address 0x%lld (%p): 0x%lu\n", (long long)target, virt_addr, read_result); - fflush(stdout); - - if(argc > 3) { - writeval = strtoul(argv[3], 0, 0); - switch(access_type) { - case 'b': - *((unsigned char *) virt_addr) = writeval; - read_result = *((unsigned char *) virt_addr); - break; - case 'h': - *((unsigned short *) virt_addr) = writeval; - read_result = *((unsigned short *) virt_addr); - break; - case 'w': - *((unsigned long *) virt_addr) = writeval; - read_result = *((unsigned long *) virt_addr); - break; - } - printf("Written 0x%lu; readback 0x%lu\n", writeval, read_result); - fflush(stdout); - } - - if(munmap(map_base, MAP_SIZE) == -1) FATAL; - close(fd); - return 0; -} |