summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-01-20 22:44:17 +0000
committerMike Frysinger <vapier@gentoo.org>2012-01-20 22:44:17 +0000
commitf606f9131ba8545329e088862db56ecd377f97c9 (patch)
tree26e43e1c77f08c1a40c58a244017ad9673745f2b /dev-embedded/smdk-dltool
parenttidy (diff)
downloadgentoo-2-f606f9131ba8545329e088862db56ecd377f97c9.tar.gz
gentoo-2-f606f9131ba8545329e088862db56ecd377f97c9.tar.bz2
gentoo-2-f606f9131ba8545329e088862db56ecd377f97c9.zip
Initial ebuild by Doug Anderson.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'dev-embedded/smdk-dltool')
-rw-r--r--dev-embedded/smdk-dltool/ChangeLog11
-rw-r--r--dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch66
-rw-r--r--dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch18
-rw-r--r--dev-embedded/smdk-dltool/metadata.xml5
-rw-r--r--dev-embedded/smdk-dltool/smdk-dltool-0.20.ebuild33
5 files changed, 133 insertions, 0 deletions
diff --git a/dev-embedded/smdk-dltool/ChangeLog b/dev-embedded/smdk-dltool/ChangeLog
new file mode 100644
index 000000000000..1408967e4e85
--- /dev/null
+++ b/dev-embedded/smdk-dltool/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for dev-embedded/smdk-dltool
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-embedded/smdk-dltool/ChangeLog,v 1.1 2012/01/20 22:44:17 vapier Exp $
+
+*smdk-dltool-0.20 (20 Jan 2012)
+
+ 20 Jan 2012; Mike Frysinger <vapier@gentoo.org> +smdk-dltool-0.20.ebuild,
+ +files/smdk-dltool-0.20-add-S3C64xx-support.patch,
+ +files/smdk-dltool-0.20-build.patch, +metadata.xml:
+ Initial ebuild by Doug Anderson.
+
diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch
new file mode 100644
index 000000000000..5b615aeb119b
--- /dev/null
+++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch
@@ -0,0 +1,66 @@
+From ed9e5da97fdb40082aca7acbdce5286b530fb2ba Mon Sep 17 00:00:00 2001
+From: Maurus Cuelenaere <mcuelenaere@gmail.com>
+Date: Mon, 11 Jan 2010 01:55:34 +0100
+Subject: [PATCH] Add S3C64xx support
+
+Author: unknown
+URL: http://dev.odroid.com/frs/download.php/22/Linux-dltool.tar.gz
+---
+ dltool/dltool.c | 19 ++++++++++++++-----
+ 1 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/dltool/dltool.c b/dltool/dltool.c
+index 4e2d238..e76e607 100644
+--- a/dltool/dltool.c
++++ b/dltool/dltool.c
+@@ -26,6 +26,8 @@ char *dl_file = "download.dat";
+ char *dl_udev = NULL;
+ char *dl_ubus = NULL;
+
++int ep_out = 0;
++
+ #define DBG(x) if (debug) { printf x; }
+
+ void write_u32(unsigned char *dp, unsigned long val)
+@@ -120,9 +122,15 @@ int verify_device(struct usb_device *dev)
+ DBG(("\t=> idVendor %x\n", dev->descriptor.idVendor));
+ DBG(("\t=> idProduct %x\n", dev->descriptor.idProduct));
+
+- if (dev->descriptor.idVendor == 0x5345 &&
+- dev->descriptor.idProduct == 0x1234)
++ if (dev->descriptor.idVendor == 0x5345 && dev->descriptor.idProduct == 0x1234) {
++ ep_out = 3;
++ return 1;
++ }
++ else if(dev->descriptor.idVendor == 0x4e8 && dev->descriptor.idProduct == 0x1234){
++ printf("S3C64XX Detected!\n");
++ ep_out = 2;
+ return 1;
++ }
+
+ return 0;
+ }
+@@ -180,9 +188,9 @@ int main(int argc, char **argv)
+ usb_dev_handle *devh;
+ int ret;
+
+- printf("SMDK42XX USB Download Tool\n");
++ printf("SMDK42XX,S3C64XX USB Download Tool\n");
+ printf("Version 0.20 (c) 2004,2005,2006"
+- "Ben Dooks <ben-linux@fluff.org>\n");
++ " Ben Dooks <ben-linux@fluff.org>\n");
+ printf("\n");
+
+ while (1) {
+@@ -309,7 +317,8 @@ int main(int argc, char **argv)
+ write_header(dl_data, dl_addr, dl_size);
+ calc_cksum(dl_data, dl_size);
+
+- ret = usb_bulk_write(devh, 3, (void *)dl_data, dl_size, 5*1000*1000);
++ //ret = usb_bulk_write(devh, 3, (void *)dl_data, dl_size, 5*1000*1000);
++ ret = usb_bulk_write(devh, ep_out, (void *)dl_data, dl_size, 5*1000*1000);
+ printf("=> usb_bulk_write() returned %d\n", ret);
+
+ if (ret != dl_size) {
+--
+1.7.0.4
diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch
new file mode 100644
index 000000000000..bf4ad1ba7006
--- /dev/null
+++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch
@@ -0,0 +1,18 @@
+respect env build settings
+
+--- a/releases/smdk-tools-v0.20/dltool/Makefile
++++ b/releases/smdk-tools-v0.20/dltool/Makefile
+@@ -7,8 +7,11 @@
+
+ .PHONY: clean
+
+-dltool: dltool.c
+- $(CC) -O2 -Wall -g -lusb -o smdk-usbdl dltool.c
++CFLAGS ?= -O2 -g
++CFLAGS += -Wall
++LDLIBS = -lusb
++
++all: dltool
+
+ clean:
+ -rm smdk-usbdl
diff --git a/dev-embedded/smdk-dltool/metadata.xml b/dev-embedded/smdk-dltool/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/smdk-dltool/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/smdk-dltool/smdk-dltool-0.20.ebuild b/dev-embedded/smdk-dltool/smdk-dltool-0.20.ebuild
new file mode 100644
index 000000000000..5580ca937d98
--- /dev/null
+++ b/dev-embedded/smdk-dltool/smdk-dltool-0.20.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-embedded/smdk-dltool/smdk-dltool-0.20.ebuild,v 1.1 2012/01/20 22:44:17 vapier Exp $
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Tool to communicate with Samsung SMDK boards"
+HOMEPAGE="http://www.fluff.org/ben/smdk/tools/"
+SRC_URI="http://www.fluff.org/ben/smdk/tools/downloads/smdk-tools-v${PV}.tar.gz"
+
+# Email sent to author on 2012-01-18 querying about license
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/libusb"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/releases/smdk-tools-v${PV}/dltool
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-add-S3C64xx-support.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+ tc-export CC
+}
+
+src_install() {
+ newbin dltool smdk-usbdl
+ dodoc readme.txt
+}