summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-08-05 18:00:36 +0000
committerMike Frysinger <vapier@gentoo.org>2013-08-05 18:00:36 +0000
commitec6332bed04455fb233755d85cd549048698ae59 (patch)
treecda28746eb813fdd1b53df7419235704bc863b54 /dev-embedded
parentAdded patch reverting addition of hwclock. Fixes bug #479828. (diff)
downloadhistorical-ec6332bed04455fb233755d85cd549048698ae59.tar.gz
historical-ec6332bed04455fb233755d85cd549048698ae59.tar.bz2
historical-ec6332bed04455fb233755d85cd549048698ae59.zip
Add fix by Julius Werner from ChromiumOS for sending large images.
Package-Manager: portage-2.2.0_alpha179/cvs/Linux x86_64 Manifest-Sign-Key: 0xFB7C4156
Diffstat (limited to 'dev-embedded')
-rw-r--r--dev-embedded/smdk-dltool/ChangeLog11
-rw-r--r--dev-embedded/smdk-dltool/Manifest24
-rw-r--r--dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch359
-rw-r--r--dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild34
4 files changed, 424 insertions, 4 deletions
diff --git a/dev-embedded/smdk-dltool/ChangeLog b/dev-embedded/smdk-dltool/ChangeLog
index 11600fbc68b2..2fa9914de77f 100644
--- a/dev-embedded/smdk-dltool/ChangeLog
+++ b/dev-embedded/smdk-dltool/ChangeLog
@@ -1,6 +1,12 @@
# 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.6 2012/05/22 02:23:48 vapier Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-embedded/smdk-dltool/ChangeLog,v 1.7 2013/08/05 18:00:31 vapier Exp $
+
+*smdk-dltool-0.20-r4 (05 Aug 2013)
+
+ 05 Aug 2013; Mike Frysinger <vapier@gentoo.org>
+ +files/smdk-dltool-0.20-libusb-1.0-r1.patch, +smdk-dltool-0.20-r4.ebuild:
+ Add fix by Julius Werner from ChromiumOS for sending large images.
*smdk-dltool-0.20-r3 (22 May 2012)
@@ -33,4 +39,3 @@
+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/Manifest b/dev-embedded/smdk-dltool/Manifest
index ceda07e211fb..381e4e597f92 100644
--- a/dev-embedded/smdk-dltool/Manifest
+++ b/dev-embedded/smdk-dltool/Manifest
@@ -1,7 +1,29 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX smdk-dltool-0.20-add-S3C64xx-support.patch 2057 SHA256 46515ec624570fc9d04d136fb7fc8a4a53cbbdadade7a3c9695e6458aeda2e83 SHA512 7ae02b298390ab3bbdfe27c3f5cea55c8f2b75f60853227f37adee7a547ef2d1069286a633e2017a79440f257c25d4f26fe1eaad0ef51c04a067af8d1b815d64 WHIRLPOOL 1e0da727e9360d385d0cacd803f9262e43099571c5fb5a3b77f3a2f384468135ef35e6fdc72dcae76889f647c6131fe7a6787d68b882bd431a73b8f2fe6e8f27
AUX smdk-dltool-0.20-build.patch 430 SHA256 81e2059d8d6cf5a46b22c2691e122636756f3ef7bb2fb09e7ba23616643190b5 SHA512 8bd0918ebe2f7f583dd076ed9b4cc01e6d9dc397fe52981e97029727872552d4d01838c1602d170d2c1bb92e9a4759fef7eecc31336bcad22adb2c0e84e5d297 WHIRLPOOL 0c5f59170717f0d0501f1af4c3851fc1e713e62dee5c847d6c6d4948e25e25be32e6bfaf989e51469ad6c8ce281f42e45dd9cf9b46f52d60028a45a0c9cff855
+AUX smdk-dltool-0.20-libusb-1.0-r1.patch 8859 SHA256 7f5f9a30f6467813d8179ed166a9097fed5f84c65b34673a56f3fa9b4468c69a SHA512 7c1a39c7b6da1e2aecd651be6d78ec30383cd9a7858c40477e84bddd2cb80b8138a6cae55e3f6be71bd8aad03ff31dc3250f1579c63c106953fef2fb62e3e3bf WHIRLPOOL ea13b6b1b5ddf542c67fcaa2166147f9f6d14e7cf11ac1477b111acfd73095614baf789e7594e11a0107a0b667169cab36e243a7ce196c4e605c958213e720dc
AUX smdk-dltool-0.20-libusb-1.0.patch 8207 SHA256 ad6f6c8719a6cc840ef8ca4c39782bca74cb777d4383e9c1bbdc88211b9a604c SHA512 2c3f47ac0fbf573b8be17721639123607ec4aaf69e1eef602089d75ef614ba761b6f6d0182cbaa0abc57ef0bd5a2c61120b3369c9c73c29cd466fda3f5a99ab4 WHIRLPOOL 34757c6beedb4af6f8f3fd4f2cc5600488f4b855c36388b2ba4629a5f71f8e278851e32ea6017ebc09b54e357a9185eaeff1b38fb7c1df61df8b38475f9c8ea9
DIST smdk-tools-v0.20.tar.gz 5170 SHA256 fdda1a8ddb8b71a7a74e8efc85bd08ba8cb953a61eb610b846cf291436426e48 SHA512 2b0fd113bc9e6e6c07ad4163d404bffa8044150a2da55a8903192b9dcbead5e31d97a9315b561526f0cb2a65e415f34941bea0db3ac40e73048901fe95ff3a17 WHIRLPOOL d5feafc17e497a955135fa2c9a3e7857a8779c81ba124879a6aa57b495c9ac25452d1b63106abb4120daef0b8c131734da91c94f0400f03eb41688aa7825daba
EBUILD smdk-dltool-0.20-r3.ebuild 920 SHA256 527443988af2dfe10c1a8a05f6c6120d75279d499e75ab57751545b83553eb77 SHA512 d840acc1967ba0dc44b2f30b8af0b27ba1cacf365bc63bd8c86a79425a5e82f89ac03d48d5dd35a64f2f9400cead7d226dd4dd46e41e0c83ada7fcdc63928918 WHIRLPOOL 6c935786a776fa4f62791331756683e6085532fc29b414aca77a6c843775170e202beab4af481a211bb7a82a69138da8acc0b4898c89042eb4a65b6488e4ba58
-MISC ChangeLog 1448 SHA256 a1bf655e40c309de5eda3181f9e245d7da48a9448115d22e31de270e2477f972 SHA512 7b01240212253af029aae3fb30b5412f50d1e34fa2db27caf5dc83135d60f2dc8b0252c970c046ff62f6a855eb6ae7c33682f74bbe9a6a7f0e59b4d1209329a7 WHIRLPOOL c1e2ce0a45e15ef5697eb11176f9b3c2acb45dbc837c6fe2cb5ea65b77960316758045aedcf9ccc6e509d242aa3d74fa31b53914dff1f405bb2544ab961638cb
+EBUILD smdk-dltool-0.20-r4.ebuild 923 SHA256 49e4210e85221549850d791b80ff1610615a1a3ea417e0dd10e625acf8209d6d SHA512 4c2287948e151dba3379df532391148fcf447ba705fe35f1d2f0c70f1d811dd6f02035353f712aff9071c53855c8ac403e94451463d942824254f3b61946bab3 WHIRLPOOL 14111276f6031d732b9e05bd592098cf1367a85d8eae4364b41c20190fda41837c980e88043bea4efe6d54e8a9f67b7c285b0e4bbd9726e54ffb294d9324931e
+MISC ChangeLog 1679 SHA256 69a78ae21c14e31e4ba0761d62f8c534126a2d3e8040f99711eac4e763c4ec8e SHA512 57572ac3c5c3c06323471340493f053c8e020bb6c8280535cdf53039a2d13ca8dfe19ecc90f46239b745f04deaed0eb222a81fce2042ab9b69fda7fb2ddeca50 WHIRLPOOL d513527fce4d4bfad772231e8e1c99f117b1eacc05064577740dca411453a830936c4b031b32d2ab4b1aec35a4119a9bd54583471dec2faf2c260041031b9731
MISC metadata.xml 165 SHA256 fb7ede94a0633f77d601e3e81580eac1624a3bca14401a49d94082579507ba0a SHA512 2be6b57c8e55824d56afbe9ab641639e6e1b4cf73bf2795c2778e373777ad545b5211e06510f13703583e7bb18817f623bc00dddbc8c52ad5f100f085e5dfddf WHIRLPOOL 7fe27fc76b523efadbe65a61c187e78592bc1563423791709914a6263c587a8843c75e19c64f989c7fc8a105c6433a874116ec670df3a27b930634d7e14fb1fe
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iQIcBAEBCAAGBQJR/+hEAAoJELEHsLL7fEFW2RkP/iIqRVq9bwqagoP1fjOMrAIj
+PY47KXh6EC++qzT0peoOPXNO9VlawSLy3CSy25kC41/JpKQD/CkDqaNkf+wqposC
+2FMq7RatY6hWO9YCcKxOPJAjvBTQibGAT+pMWJrink+1pS7IIowA9qBBDnJUNzPr
+xTjkZ54DQPnInr/Nwt147tKq9pOM+GKtlMB7rY1S1cA7P0zB+sspOW9uTUsSbDgx
+et/ouJhtrJn8FRPRV7WoFGdyekXQ335z/9ac1Pyo2TQz76dnG8kBE3kJ/ug2RDA/
+mRUf/m1XG2ZI3X0/1bH7DV98F85QPrtFkuXfp3oxWbvSWzSLDubLAi/VOjfRzokm
+5lDh5p91NFnlPFU7nnK3x+jWws9PZ4mE6ysEKpZLKP7Fv1miLLhdJ3goJ8j4RXm1
+MxvVJgiqUmXXqpsjTazki17YgLAmsTlfO3GavUrQeDCukkG41ayFbHx5rnWBdlAw
+A/0QPx4ONCPgXxkFgbdeEahcZ4p/wubKuY/3WNGsNzTJ/k87e0Ykvyn87AEiRTqX
+2oJsAfKCjWOwZseTL3xVuYog/cyewk83tnVkkjt37/oRGwJ1muUgMsWoYSpM3fXk
+8lngezL1bAIkddkctPYTAu4jC0J2osYP5bhR7gPqyMiswJzNNm+M4D/MYSnm02FO
+6p4S7eMGkQ13tpOsqTga
+=MOQd
+-----END PGP SIGNATURE-----
diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch
new file mode 100644
index 000000000000..15afd1380984
--- /dev/null
+++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch
@@ -0,0 +1,359 @@
+migrate to libusb-1 by me (Mike Frysinger)
+
+workaround kernel/libusb transfer sizes by Julius Werner
+
+--- a/Makefile
++++ b/Makefile
+@@ -10,8 +10,8 @@
+ CFLAGS ?= -O2 -g
+ CFLAGS += -Wall
+ PKG_CONFIG ?= pkg-config
+-CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb)
+-LDLIBS = $(shell $(PKG_CONFIG) --libs libusb)
++CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0)
++LDLIBS = $(shell $(PKG_CONFIG) --libs libusb-1.0)
+
+ all: dltool
+
+--- a/dltool.c
++++ b/dltool.c
+@@ -7,15 +7,25 @@
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/param.h>
+
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+ #include <getopt.h>
+ #include <fcntl.h>
++#include <errno.h>
++#include <unistd.h>
+
+
+-#include <usb.h>
++#include <libusb.h>
++
++/* The kernel USB layer is restrictive in the max size in a single URB.
++ * When we exceed that, the kernel throws ENOMEM, but the libusb layer
++ * doesn't handle things gracefully. So manually split up into chunks
++ * ourselves so we can avoid that failure case.
++ */
++#define CHUNKSIZE (1 << 18)
+
+ unsigned int debug = 0;
+ unsigned long dl_addr = 0x30000000L;
+@@ -23,12 +33,22 @@ unsigned long dl_size = 0L;
+ unsigned char *dl_data = NULL;
+
+ char *dl_file = "download.dat";
+-char *dl_udev = NULL;
+-char *dl_ubus = NULL;
++libusb_context *ctx = NULL;
++libusb_device_handle *devh = NULL;
+
+ int ep_out = 0;
+
+ #define DBG(x) if (debug) { printf x; }
++#define err(fmt, args...) \
++ do { \
++ if (devh) \
++ libusb_close(devh); \
++ if (ctx) \
++ libusb_exit(ctx); \
++ fprintf(stderr, "dltool: " fmt "\n", ## args); \
++ exit(1); \
++ } while (0)
++#define errp(fmt, args...) err(fmt ": %s", ## args, strerror(errno))
+
+ void write_u32(unsigned char *dp, unsigned long val)
+ {
+@@ -108,25 +128,30 @@ void calc_cksum(unsigned char *data, ssize_t len)
+ cp[1] = cksum >> 8;
+ }
+
+-int verify_device(struct usb_device *dev)
++int verify_device(libusb_device *dev)
+ {
++ struct libusb_device_descriptor desc;
++
++ if (libusb_get_device_descriptor(dev, &desc))
++ return 0;
++
+ DBG(("dev %p: configurations %d\n",
+- dev, dev->descriptor.bNumConfigurations));
++ dev, desc.bNumConfigurations));
+
+- if (dev->descriptor.bNumConfigurations != 1)
++ if (desc.bNumConfigurations != 1)
+ return 0;
+
+- DBG(("\t=> bLength %d\n", dev->descriptor.bLength));
+- DBG(("\t=> bType %d\n", dev->descriptor.bDescriptorType));
+- DBG(("\t=> bcdUSB %x\n", dev->descriptor.bcdUSB));
+- DBG(("\t=> idVendor %x\n", dev->descriptor.idVendor));
+- DBG(("\t=> idProduct %x\n", dev->descriptor.idProduct));
++ DBG(("\t=> bLength %d\n", desc.bLength));
++ DBG(("\t=> bType %d\n", desc.bDescriptorType));
++ DBG(("\t=> bcdUSB %x\n", desc.bcdUSB));
++ DBG(("\t=> idVendor %x\n", desc.idVendor));
++ DBG(("\t=> idProduct %x\n", desc.idProduct));
+
+- if (dev->descriptor.idVendor == 0x5345 && dev->descriptor.idProduct == 0x1234) {
++ if (desc.idVendor == 0x5345 && desc.idProduct == 0x1234) {
+ ep_out = 3;
+ return 1;
+ }
+- else if(dev->descriptor.idVendor == 0x4e8 && dev->descriptor.idProduct == 0x1234){
++ else if(desc.idVendor == 0x4e8 && desc.idProduct == 0x1234){
+ printf("S3C64XX Detected!\n");
+ ep_out = 2;
+ return 1;
+@@ -173,6 +198,12 @@ struct option long_opts[] = {
+ .val = 'x',
+ },
+ {
++ .name = "help",
++ .has_arg = 0,
++ .flag = NULL,
++ .val = 'h',
++ },
++ {
+ .name = NULL
+ }
+ };
+@@ -181,12 +212,14 @@ int flg_show = 0;
+
+ int main(int argc, char **argv)
+ {
+- struct usb_bus *bus, *busp;
+- struct usb_device *result = NULL;
+- struct usb_device *found = NULL;
++ ssize_t num_devs, i;
++ libusb_device **list;
++ libusb_device *found;
++ int dl_ubus = -1;
++ int dl_udev = -1;
++ uint8_t bus_num, dev_num;
+ unsigned long fsize;
+- usb_dev_handle *devh;
+- int ret;
++ int ret, transferred;
+
+ printf("SMDK42XX,S3C64XX USB Download Tool\n");
+ printf("Version 0.20 (c) 2004,2005,2006"
+@@ -197,7 +230,7 @@ int main(int argc, char **argv)
+ int index = 0;
+ int c;
+
+- c = getopt_long(argc, argv, "a:b:d:f:s", long_opts, &index);
++ c = getopt_long(argc, argv, "a:b:d:f:shx", long_opts, &index);
+
+ DBG(("option index %d\n",c ));
+
+@@ -218,117 +251,134 @@ int main(int argc, char **argv)
+ break;
+
+ case 'b':
+- dl_ubus = optarg;
++ dl_ubus = atoi(optarg);
+ break;
+
+ case 'd':
+- dl_udev = optarg;
++ dl_udev = atoi(optarg);
+ break;
+
+ case 'x':
+ debug = 1;
++ break;
++
++ case 'h':
++ puts(
++ "Usage: dltool [options]\n"
++ "\n"
++ "-a <download addr>\n"
++ "-b <bus #>\n"
++ "-d <dev #>\n"
++ "-f <file>\n"
++ "-s Show found devices\n"
++ "-x Enable debug\n"
++ );
++ return 0;
+ }
+ }
+
+- usb_init();
+- usb_find_busses();
+- usb_find_devices();
+-
+- bus = usb_get_busses();
+-
+- DBG(("usb_get_busses: %p\n", bus));
+-
+- for (busp = bus; busp != NULL; busp = busp->next) {
+- struct usb_device *dev;
+-
+- DBG(("bus %p: dirname %s\n", busp, busp->dirname));
+-
+- if (dl_ubus) {
+- if (strcmp(busp->dirname, dl_ubus) != 0)
+- continue;
+- }
++ ret = libusb_init(&ctx);
++ if (ret)
++ errp("could not initialize usb stack");
+
+- for (dev = busp->devices; dev != NULL; dev = dev->next) {
+- DBG(("dev %p filename %s\n", dev, dev->filename));
++ bus_num = dev_num = 0;
++ found = NULL;
++ num_devs = libusb_get_device_list(ctx, &list);
++ for (i = 0; i < num_devs; ++i) {
++ libusb_device *dev = list[i];
++ bus_num = libusb_get_bus_number(dev);
++ dev_num = libusb_get_device_address(dev);
+
+- if (!verify_device(dev))
+- continue;
++ DBG(("bus %u; dev %u (%p)\n", bus_num, dev_num, dev));
+
+- if (flg_show) {
+- printf("bus %s: device %s\n",
+- busp->dirname, dev->filename);
+- continue;
+- }
++ if (dl_ubus >= 0 && bus_num != dl_ubus)
++ continue;
+
+- found = dev;
++ if (!verify_device(dev))
++ continue;
+
+- if (dl_udev) {
+- if (strcmp(dev->filename, dl_udev) == 0) {
+- result = dev;
+- break;
+- }
+- }
++ if (flg_show) {
++ printf("bus %u: device %u\n", bus_num, dev_num);
++ continue;
+ }
+
+- if (result != NULL)
+- break;
++ if (dl_udev >= 0 && dev_num != dl_udev)
++ continue;
++
++ found = dev;
++ break;
+ }
+
+ if (flg_show)
+ return 0;
+
+- DBG(("device %p, found %p\n", result, found));
++ DBG(("found %p\n", found));
+
+- if (result == NULL && found != NULL)
+- result = found;
+-
+- if (result == NULL) {
+- fprintf(stderr, "failed to find device\n");
+- return 1;
+- }
++ if (found == NULL)
++ err("failed to find device\n");
+
+- printf("=> found device: bus %s, dev %s\n",
+- result->bus->dirname, result->filename);
++ printf("=> found device: bus %u, dev %u\n",
++ bus_num, dev_num);
+
+ dl_data = load_file(dl_file, &dl_size, &fsize);
+- if (dl_data == NULL) {
+- printf("failed to load %s\n", dl_file);
+- return 1;
+- }
++ if (dl_data == NULL)
++ errp("failed to load %s", dl_file);
+
+ printf("=> loaded %ld bytes from %s\n", fsize, dl_file);
+
+- devh = usb_open(result);
+- if (devh == NULL) {
+- perror("usb_open");
+- return 1;
+- }
++ ret = libusb_open(found, &devh);
++ if (ret == 0) {
++ /*
++ * Seems to break some recovery modes :(
++ * http://crosbug.com/26083
++ * These fail:
++ * smdk-dltool -a 0x02021400 -f bl1.bin
++ * smdk-dltool -a 0x02023400 -f bl2.bin
++ */
++#if 0
++ uint8_t configuration;
++ struct libusb_config_descriptor *config;
++ libusb_get_active_config_descriptor(found, &config);
++ configuration = config->bConfigurationValue;
++ libusb_free_config_descriptor(config);
++ libusb_set_configuration(devh, configuration);
++#endif
++ } else
++ errp("libusb_open");
+
+ DBG(("claim interface\n"));
+
+- if (usb_claim_interface(devh, 0) < 0) {
+- perror("usb_claim_interface");
+- usb_close(devh);
+- return 1;
+- }
++ ret = libusb_claim_interface(devh, 0);
++ if (ret)
++ errp("libusb_claim_interface");
+
+ printf("=> Downloading %ld bytes to 0x%08lx\n", dl_size, dl_addr);
+
+ 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, ep_out, (void *)dl_data, dl_size, 5*1000*1000);
+- printf("=> usb_bulk_write() returned %d\n", ret);
+-
+- if (ret != dl_size) {
+- printf("failed to write %ld bytes\n", dl_size);
++ transferred = 0;
++ while (transferred < dl_size) {
++ int actual, expected = MIN(dl_size - transferred, CHUNKSIZE);
++ ret = libusb_bulk_transfer(devh, ep_out, dl_data + transferred,
++ expected, &actual, 5 * 1000 * 1000);
++ printf("=> usb_bulk_write(%d) returned %d, wrote %d\n",
++ expected, ret, actual);
++ transferred += actual;
++
++ if (ret || (expected != actual)) {
++ printf("failed to write %ld bytes (wrote %d): %s\n",
++ dl_size, transferred, strerror(errno));
++ ret = 1;
++ break;
++ }
+ }
+
+ free(dl_data);
+
+- usb_release_interface(devh, 0);
+- usb_close(devh);
++ libusb_release_interface(devh, 0);
++ libusb_close(devh);
++ libusb_exit(ctx);
+
+- return 0;
++ return ret;
+ }
diff --git a/dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild b/dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild
new file mode 100644
index 000000000000..b87ec2a45de9
--- /dev/null
+++ b/dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 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-r4.ebuild,v 1.1 2013/08/05 18:00:31 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="virtual/libusb:1"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/releases/smdk-tools-v${PV}/dltool
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-add-S3C64xx-support.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-libusb-1.0-r1.patch
+ tc-export CC PKG_CONFIG
+}
+
+src_install() {
+ newbin dltool smdk-usbdl
+ dodoc readme.txt
+}