Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 272100 - [Ebuild-request] Request a new ebuild for drivers for DJ Hercules MP3
Summary: [Ebuild-request] Request a new ebuild for drivers for DJ Hercules MP3
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://ts.hercules.com/eng/index.php?...
Whiteboard: sunrise-removal
Keywords: EBUILD, InOverlay
Depends on: 100754
Blocks: 257110
  Show dependency tree
 
Reported: 2009-06-01 14:56 UTC by David Carlos Manuelda
Modified: 2016-06-08 16:48 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
hdj_mod-1.28.ebuild, no DKMS needed (hdj_mod-1.28.ebuild,1.27 KB, text/plain)
2009-09-17 15:45 UTC, Florian Klink
Details
snd_card_create.patch for using snd_card_create instead of snd_card_new (snd_card_create.patch,628 bytes, patch)
2009-09-17 15:47 UTC, Florian Klink
Details | Diff
hdj_mod-1.28-r1.ebuild, copies udev rules into /etc/udev/rules.d (hdj_mod-1.28-r1.ebuild,1.39 KB, text/plain)
2009-12-26 13:20 UTC, Florian Klink
Details
media-libs/hdj_mod/hdj_mod-1.28.ebuild (hdj_mod-1.28.ebuild,1.42 KB, text/plain)
2010-03-16 03:38 UTC, Alex Barker
Details
hdj_mod-1.28.ebuild (hdj_mod-1.28.ebuild,1.53 KB, text/plain)
2010-04-03 03:06 UTC, Alex Barker
Details
patch for 2.6.35 (hdjmod_kernel_2.6.35.patch,19.98 KB, text/plain)
2010-10-30 12:58 UTC, Florian Klink
Details
ebuild with modified epatch line (hdj_mod-1.28.ebuild,1.32 KB, text/plain)
2010-10-30 12:59 UTC, Florian Klink
Details
media-libs/hdj_mod-1.28.ebuild (hdj_mod-1.28.ebuild,1.32 KB, text/plain)
2010-11-04 04:08 UTC, Alex Barker
Details
files/hdjmod_kernel_2.6.34.patch (hdjmod_kernel_2.6.34.patch,20.00 KB, patch)
2010-11-04 04:09 UTC, Alex Barker
Details | Diff
New patch that works without problems (hdjmod_kernel_2.6.35.patch,19.41 KB, patch)
2010-11-24 21:56 UTC, David Carlos Manuelda
Details | Diff
media-libs/hdj_mod/hdj_mod-1.28.ebuild (hdj_mod-1.28.ebuild,1.35 KB, text/plain)
2011-02-22 19:16 UTC, Alex Barker
Details
media-libs/hdj_mod/files/dj_console_mp3_e2.patch (dj_console_mp3_e2.patch,1.34 KB, patch)
2011-02-22 19:18 UTC, Alex Barker
Details | Diff
media-libs/hdj_mod/files/kernel_2.6.31_fix.patch (kernel_2.6.31_fix.patch,860 bytes, patch)
2011-02-22 19:18 UTC, Alex Barker
Details | Diff
media-libs/files/kernel_2.6.35_fix.patch (kernel_2.6.35_fix.patch,21.69 KB, patch)
2011-02-22 19:19 UTC, Alex Barker
Details | Diff
media-libs/files/kernel_2.6.37_fix.patch (kernel_2.6.37_fix.patch,4.05 KB, patch)
2011-02-22 19:19 UTC, Alex Barker
Details | Diff
media-libs/hdj_mod/files/kernel_2.6.35_fix.patch (kernel_2.6.35_fix.patch,21.65 KB, patch)
2011-02-23 18:55 UTC, Alex Barker
Details | Diff
media-libs/hdj_mod/files/kernel_2.6.37_fix.patch (kernel_2.6.37_fix.patch,4.03 KB, patch)
2011-02-23 18:56 UTC, Alex Barker
Details | Diff
media-libs/hdj_mod/files/kernel_2.6.37_fix.patch (kernel_2.6.37_fix.patch,4.62 KB, patch)
2011-03-28 00:36 UTC, Florian Klink
Details | Diff
hdj_mod-1.28.ebuild (hdj_mod-1.28.ebuild,1.59 KB, text/plain)
2013-01-27 18:03 UTC, Florian Klink
Details
dj_console_mp3_e2.patch (dj_console_mp3_e2.patch,1.34 KB, patch)
2013-01-27 18:04 UTC, Florian Klink
Details | Diff
hdjmod_kernel_2.6.30.patch (hdjmod_kernel_2.6.30.patch,931 bytes, patch)
2013-01-27 18:05 UTC, Florian Klink
Details | Diff
hdjmod-kfree.patch (hdjmod-kfree.patch,864 bytes, patch)
2013-01-27 18:06 UTC, Florian Klink
Details | Diff
hdjmod_kernel_2.6.36.patch (hdjmod_kernel_2.6.36.patch,16.77 KB, patch)
2013-01-27 18:06 UTC, Florian Klink
Details | Diff
hdjmod_kernel_2.6.37.patch (hdjmod_kernel_2.6.37.patch,4.55 KB, patch)
2013-01-27 18:06 UTC, Florian Klink
Details | Diff
hdjmod_kernel_2.6.39.patch (hdjmod_kernel_2.6.39.patch,492 bytes, patch)
2013-01-27 18:07 UTC, Florian Klink
Details | Diff
hdjmod_kernel_3.6.patch (hdjmod_kernel_3.6.patch,1.41 KB, patch)
2013-01-27 18:07 UTC, Florian Klink
Details | Diff
hdjmod_kernel_3.7.patch (hdjmod_kernel_3.7.patch,415 bytes, patch)
2013-01-27 18:08 UTC, Florian Klink
Details | Diff
hdjmod_fix_hotplug.patch (hdjmod_fix_hotplug.patch,785 bytes, patch)
2013-01-27 18:09 UTC, Florian Klink
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2009-06-01 14:56:11 UTC
Hercules has released a linux driver for its controller for linux.
Since unfortunatelly I have no idea on how to compile it, I request an ebuild to test it, and possibly, to include it in main tree.

For more information: http://ts.hercules.com/eng/index.php?pg=view_files&gid=2&fid=28&pid=179&cid=1

Reproducible: Always
Comment 1 David Carlos Manuelda 2009-06-06 18:49:54 UTC
I've found a page with a comment of a gentoo user that claims to have it working under gentoo.
I've tried to do those commands successfully, but I couldn't test if it really works yet because I am not at home now.
The page is: http://www.mixxx.org/forums/viewtopic.php?f=3&t=497
DKMS is needed in order to build the module. I don't know if there is another possibility, should I add another bug requesting DKMS ebuild for gentoo?
I'll post again later when I go home to try the DJ Console.
Comment 2 David Carlos Manuelda 2009-06-06 18:55:46 UTC
I cannot edit my previous post.
In order to give clearer access to that post, I update the URI link with an anchor to see directly the interesting post.
See http://www.mixxx.org/forums/viewtopic.php?f=3&t=497#p1693 instead of previous one.
Comment 3 David Carlos Manuelda 2009-06-06 19:09:47 UTC
It needs some symbols to be compiled in kernel (or as a module):
Unknown symbol snd_rawmidi_receive
Unknown symbol snd_rawmidi_transmit_empty
Unknown symbol snd_rawmidi_transmit
Unknown symbol snd_rawmidi_transmit_ack
Unknown symbol snd_rawmidi_new
Unknown symbol snd_rawmidi_set_ops

So the ebuild should check if CONFIG_SND_RAWMIDI and CONFIG_SND_VIRMIDI are present in .config file.
Comment 4 David Carlos Manuelda 2009-06-06 19:11:57 UTC
More info: it appears that libdjconsole conflicts with this driver, so we could EWARN that mixxx needs to be compiled without it.
Comment 5 David Carlos Manuelda 2009-06-06 21:39:27 UTC
Final info:
I have it working making the steps mentioned in last forum URI with mixxx 1.6.1 (from bug #252895). With a note: module snd-seq-midi (if built as a module) SHOULD be modprobed before attempting to use mixxx and this device in order to avoid a SIGSEGV.
As a final question: would it be possible to compile this module without DKMS? As I've seen, DKMS will recompile module if kernel is changed, but this can (and should) be handled with emerge @module-rebuild to be more gentooish. How about that?
Unfortunatelly, I don't have any clue on how to do an ebuild for this, but at least, finally is tested and working.
Comment 6 ilGino 2009-06-07 12:11:11 UTC
Hello,

I've never written an ebuild and do not own a DJ console but these are the steps I followed in order to AT LEAST compile and insert successfully into the kernel Hercules' hdj module, without DKMS.

===================================================
Download Hercules_DJSeries_Linux.tgz from Hercules support website.

Extract all the content, kernel module source plus Control Panel source
# tar -xvzf Hercules_DJSeries_Linux.tgz

We are just interested in the kernel module
# cd "kernel module"

Kernel module is packed as an RPM archive, so we transform it in a plain tar gzipped archive
# rpm2tgz hdjmod-dkms-1.28-1.noarch.rpm

And we extract the kernel module source
# tar -xvzf hdjmod-dkms-1.28-1.noarch.tgz

We then copy from the nested directory structure just the directory we need and place it next to our kernel source tree
# cp -a hdjmod-dkms-1.28-1.noarch/usr/src/hdjmod-1.28/ /usr/src/

Then we move into the directory
# cd /usr/src/hdjmod-1.28/

Compile modules
# make modules

make -C /lib/modules/2.6.29.1-d/build M=/usr/src/hdjmod-1.28 LDDINC=/usr/src/hdjmod-1.28 modules
make[1]: Entering directory `/usr/src/linux-2.6.29.1'
  CC [M]  /usr/src/hdjmod-1.28/device.o
In file included from include/net/rtnetlink.h:5,
                 from include/net/neighbour.h:27,
                 from include/net/dst.h:15,
                 from include/net/sock.h:59,
                 from /usr/src/hdjmod-1.28/device.c:37:
include/net/netlink.h: In function 'nla_put_msecs':
include/net/netlink.h:823: warning: declaration of 'jiffies' shadows a global declaration
include/linux/jiffies.h:82: warning: shadowed declaration is here
  CC [M]  /usr/src/hdjmod-1.28/bulk.o
  CC [M]  /usr/src/hdjmod-1.28/configuration_manager.o
  CC [M]  /usr/src/hdjmod-1.28/midi.o
  CC [M]  /usr/src/hdjmod-1.28/midicapture.o
  CC [M]  /usr/src/hdjmod-1.28/midirender.o
  LD [M]  /usr/src/hdjmod-1.28/hdj_mod.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/hdjmod-1.28/hdj_mod.mod.o
  LD [M]  /usr/src/hdjmod-1.28/hdj_mod.ko
make[1]: Leaving directory `/usr/src/linux-2.6.29.1'


Install modules
# make install

install -d /lib/modules/2.6.29.1-d/kernel/sound/usb
install -c hdj_mod.ko /lib/modules/2.6.29.1-d/kernel/sound/usb

Try insert the modules into your working kernel
# modprobe hdj_mod
===================================================

Hope this helps someone create an ebuild.
Ciao,
Ilgino.
Comment 7 Florian Klink 2009-09-17 15:45:26 UTC
Created attachment 204439 [details]
hdj_mod-1.28.ebuild, no DKMS needed
Comment 8 Florian Klink 2009-09-17 15:47:13 UTC
Created attachment 204441 [details, diff]
snd_card_create.patch for using snd_card_create instead of snd_card_new
Comment 9 Vitoriung 2009-09-24 21:34:23 UTC
Excellent job Florian, I wrote that howto mentioned above,
but this is much easier Gentoo-elegant solution, tested, compiled fine.

Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31-gentoo i686)
Comment 10 Florian Klink 2009-09-26 23:58:56 UTC
Thanks ;-)

Forgot to add my emerge --info:

Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31-next-20090924 x86_64)
Comment 11 pedro 2009-10-06 15:12:26 UTC
following ilGino excelent guide, i just needed to do 

# depmod -a

right after "# make install" in order to modprobe see the module.

thanks again ilGino!
Comment 12 pedro 2009-10-14 12:22:23 UTC
just one more thing:

with this ebuild (1.28 without dkms) i cant get RMX to send midi signals.

BUT building 1.28 from dkms all works fine.

see here: http://www.mixxx.org/forums/viewtopic.php?f=5&t=851&p=2807#p2807
Comment 13 David H 2009-12-15 07:26:12 UTC
First, thanks to you folks for this thread!  I haven't set up a layman directory in order to test the ebuild, but I was able to get the driver built and installed following the steps here, however Two things ...


First I can't get the patch to patch.  I get this error:

    patching file device.c                                 
    Hunk #1 FAILED at 1660.                                
    1 out of 1 hunk FAILED -- saving rejects to file device.c.rej

Perhaps I am using the patch command wrong?  I did however manually edit the file to apply the patches to get it to compile.

Second, would it be useful to copy the udev rules (udev/98-hdj.rules) into the /etc/udev/rules.d/ directory?  Could this be added to the ebuild?

Again, thanks for getting this to work.
Comment 14 Florian Klink 2009-12-26 13:18:26 UTC
Merry Christmas ;-)

snd_card_create.patch has to be in "files/" subdirectory, will be used by ebuild. Works for me...

I added the commands to copy the udev rules into /etc/rules.d, maybe this also fixes the problem with the RMX. I only have the DJ Control MP3, so I can't confirm it ;-)
Comment 15 Florian Klink 2009-12-26 13:20:15 UTC
Created attachment 214204 [details]
hdj_mod-1.28-r1.ebuild, copies udev rules into /etc/udev/rules.d
Comment 16 pedro 2009-12-26 20:52:08 UTC
u might need  to do dos2unix on the files :)


(In reply to comment #13)
> First, thanks to you folks for this thread!  I haven't set up a layman
> directory in order to test the ebuild, but I was able to get the driver built
> and installed following the steps here, however Two things ...
> 
> 
> First I can't get the patch to patch.  I get this error:
> 
>     patching file device.c                                 
>     Hunk #1 FAILED at 1660.                                
>     1 out of 1 hunk FAILED -- saving rejects to file device.c.rej
> 
> Perhaps I am using the patch command wrong?  I did however manually edit the
> file to apply the patches to get it to compile.
> 
> Second, would it be useful to copy the udev rules (udev/98-hdj.rules) into the
> /etc/udev/rules.d/ directory?  Could this be added to the ebuild?
> 
> Again, thanks for getting this to work.
> 

Comment 17 Alex Barker 2010-03-16 02:27:53 UTC
I don't see dkms going into the tree anytime soon so I am going to look at patching this to compile without it.  Its either that or mixxx needs to go into an overlay with dkms and this ebuild. 
Comment 18 Alex Barker 2010-03-16 03:38:08 UTC
Created attachment 223843 [details]
media-libs/hdj_mod/hdj_mod-1.28.ebuild

tested and working ebuild for x86 && amd64.  This ebuild actually installs the module ;)

I will see if I can get this committed.
Comment 19 Florian Klink 2010-03-16 10:05:23 UTC
Thanks for the work!

As far as i know, BUILD_PARAMS had something to do with the kernel/makefile not detecting "amd64" arch, only x86_64, but now it works. So we can remove this line completely.

After a closer look at 98-hdj.rules, I think we don't need it. As far as I understand udev, the only thing it does is calling two helper scripts (not installed by ebuild).
They send SIGUSR1 to hdjmodd und hjdcpl
(see /var/tmp/portage/media-sound/hdj_mod-1.28/work/hdj_mod-1.28/udev).

But I never saw hdjmodd or hdjcpl, so I think we can remove the udev part.
Comment 20 Alex Barker 2010-03-16 16:50:03 UTC
I just took a look and it seems the remove script is just killing the process
of hdjmodd and hdjcpl.  The module i think corresponds to what this ebuild
installed as hdj_mod and the hdjcpl... I am guessing that was not installed and
I have no idea what it is.  I didnt write this driver so I dont know why it
would like to be killed like this but what should probably happen is the remove
script should be renamed and moved to /lib(64)/udev/ and the udev script
patched with some sed foo.  The above step should probably be repeated for the
add script which I think is identical to the remove script.  I will see if I
can take care of that later today.

In other news I am trying to get a mk2 on ebay right now, and if that fails I
will probably just buy one on amazon.  After I get it I will see if I can
maintain this ebuild so we can get it in to the tree.

(In reply to comment #19)

Comment 21 Alex Barker 2010-04-03 03:06:20 UTC
Created attachment 226341 [details]
hdj_mod-1.28.ebuild

finally figured out what to do with the udev rules.  Please test, my mk2 is in the mail some where.
Comment 22 Sergi Reyner 2010-10-17 04:00:10 UTC
It fails to build for me with kernel 2.6.34-gentoo-r6. This tiny patch (and appropiate epatch line in .ebuild) fixed it. There's certainly a better way to do it.


--- bulk.h      2009-01-27 14:25:50.000000000 +0000
+++ bulk.h.new  2010-10-17 04:48:45.000000000 +0100
@@ -24,6 +24,9 @@
 #if !defined(_BULK_H_)
 #define _BULK_H_
 
+// fix kmalloc errors
+#include <linux/slab.h>
+
 /* in BCD */
 extern u32 driver_version;
 
Comment 23 Florian Klink 2010-10-30 12:57:47 UTC
added patch from http://progressif.tehif.eu/articles/40 .

Correctly builds on 2.6.36. Please test, especially with older kernels!
Comment 24 Florian Klink 2010-10-30 12:58:45 UTC
Created attachment 252571 [details]
patch for 2.6.35
Comment 25 Florian Klink 2010-10-30 12:59:16 UTC
Created attachment 252573 [details]
ebuild with modified epatch line
Comment 26 Alex Barker 2010-11-02 21:10:13 UTC
Getting issues compiling for kernel 2.6.34 -r12

/var/tmp/portage/media-libs/hdj_mod-1.28/work/hdj_mod-1.28/configuration_manager.c:2201: error: implicit declaration of function 'kfree'
Comment 27 Alex Barker 2010-11-04 04:08:13 UTC
Created attachment 253143 [details]
media-libs/hdj_mod-1.28.ebuild

updated ebuild for >= 2.6.34
Comment 28 Alex Barker 2010-11-04 04:09:58 UTC
Created attachment 253145 [details, diff]
files/hdjmod_kernel_2.6.34.patch

patched patch file from the 2.6.35 patch.  Should build on >=2.6.34.  Please test on 2.6.32 and 2.6.33
Comment 29 David Carlos Manuelda 2010-11-24 03:14:30 UTC
Any patch for 2.6.36 and possibly future kernels?
Comment 30 pedro 2010-11-24 14:09:29 UTC
(In reply to comment #29)
> Any patch for 2.6.36 and possibly future kernels?
> 

works flawlessly on 2.6.36-gentoo
Comment 31 David Carlos Manuelda 2010-11-24 21:54:45 UTC
The patch is not working for me. I remade it and it seems to work for me. I attach it.
Comment 32 David Carlos Manuelda 2010-11-24 21:56:06 UTC
Created attachment 255361 [details, diff]
New patch that works without problems

The other did not work, so I remade this one. Tested on 2.6.36-gentoo-r3
Comment 33 Vitoriung 2010-12-06 22:46:52 UTC
perhaps I am doing something wrong, but it fails for me:

>>> Emerging (1 of 1) media-sound/hdj_mod-1.28 from unknown repo
 * Hercules_DJSeries_Linux.tgz RMD160 SHA1 SHA256 size ;-) ...                                                          [ ok ]
 * Package:    media-sound/hdj_mod-1.28
 * USE:  elibc_glibc kernel_linux userland_GNU x86
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/2.6.35-gentoo-r12/build
 * Found sources for kernel version:
 *     2.6.35-gentoo-r12
>>> Unpacking source...
>>> Unpacking Hercules_DJSeries_Linux.tgz to /var/tmp/portage/media-sound/hdj_mod-1.28/work
tar: A lone zero block at 19736
 * unpacking hdjmod-dkms-1.28-1.noarch.rpm ...                                                                          [ ok ]
 * unpacking hdjmod-dkms-1.28-1.noarch.tar.gz ...                                                                       [ ok ]
>>> Source unpacked in /var/tmp/portage/media-sound/hdj_mod-1.28/work
>>> Preparing source in /var/tmp/portage/media-sound/hdj_mod-1.28/work ...
 * Applying hdjmod_kernel_2.6.35.patch ...

 * Failed Patch: hdjmod_kernel_2.6.35.patch !
 *  ( /usr/local/portage/media-sound/hdj_mod/files/hdjmod_kernel_2.6.35.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/media-sound/hdj_mod-1.28/temp/hdjmod_kernel_2.6.35.patch.out

 * ERROR: media-sound/hdj_mod-1.28 failed:
 *   Failed Patch: hdjmod_kernel_2.6.35.patch!
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_prepare
 *   environment, line 3537:  Called epatch '/usr/local/portage/media-sound/hdj_mod/files/hdjmod_kernel_2.6.35.patch'
 *   environment, line 1540:  Called die
 * The specific snippet of code:
 *               die "Failed Patch: ${patchname}!";

cat /var/tmp/portage/media-sound/hdj_mod-1.28/temp/hdjmod_kernel_2.6.35.patch.out is here - http://paste.pocoo.org/show/301591/
Comment 34 David Carlos Manuelda 2010-12-06 22:52:32 UTC
(In reply to comment #33)
> perhaps I am doing something wrong, but it fails for me:
> 
> >>> Emerging (1 of 1) media-sound/hdj_mod-1.28 from unknown repo
>  * Hercules_DJSeries_Linux.tgz RMD160 SHA1 SHA256 size ;-) ...                 
>                                         [ ok ]
>  * Package:    media-sound/hdj_mod-1.28
>  * USE:  elibc_glibc kernel_linux userland_GNU x86
>  * Determining the location of the kernel source code
>  * Found kernel source directory:
>  *     /usr/src/linux
>  * Found kernel object directory:
>  *     /lib/modules/2.6.35-gentoo-r12/build
>  * Found sources for kernel version:
>  *     2.6.35-gentoo-r12
> >>> Unpacking source...
> >>> Unpacking Hercules_DJSeries_Linux.tgz to /var/tmp/portage/media-sound/hdj_mod-1.28/work
> tar: A lone zero block at 19736
>  * unpacking hdjmod-dkms-1.28-1.noarch.rpm ...                                 
>                                         [ ok ]
>  * unpacking hdjmod-dkms-1.28-1.noarch.tar.gz ...                              
>                                         [ ok ]
> >>> Source unpacked in /var/tmp/portage/media-sound/hdj_mod-1.28/work
> >>> Preparing source in /var/tmp/portage/media-sound/hdj_mod-1.28/work ...
>  * Applying hdjmod_kernel_2.6.35.patch ...
> 
>  * Failed Patch: hdjmod_kernel_2.6.35.patch !
>  *  ( /usr/local/portage/media-sound/hdj_mod/files/hdjmod_kernel_2.6.35.patch )
>  * 
>  * Include in your bugreport the contents of:
>  * 
>  *  
> /var/tmp/portage/media-sound/hdj_mod-1.28/temp/hdjmod_kernel_2.6.35.patch.out
> 
>  * ERROR: media-sound/hdj_mod-1.28 failed:
>  *   Failed Patch: hdjmod_kernel_2.6.35.patch!
>  * 
>  * Call stack:
>  *     ebuild.sh, line   56:  Called src_prepare
>  *   environment, line 3537:  Called epatch
> '/usr/local/portage/media-sound/hdj_mod/files/hdjmod_kernel_2.6.35.patch'
>  *   environment, line 1540:  Called die
>  * The specific snippet of code:
>  *               die "Failed Patch: ${patchname}!";
> 
> cat
> /var/tmp/portage/media-sound/hdj_mod-1.28/temp/hdjmod_kernel_2.6.35.patch.out
> is here - http://paste.pocoo.org/show/301591/
> 

That's why I edited the patch, and reposted it. The one I've copyed seems to work fine at least for me.
Comment 35 Vitoriung 2010-12-06 23:59:52 UTC
(In reply to comment #34)
> That's why I edited the patch, and reposted it. The one I've copyed seems to
> work fine at least for me.
> 

None of the patches seems to be working for me, the last error is with the patch you edited David.
Comment 36 David Carlos Manuelda 2010-12-07 00:03:44 UTC
Then I don't know what can be the cause :(
Comment 37 Vitoriung 2010-12-07 00:08:18 UTC
(In reply to comment #36)
> Then I don't know what can be the cause :(
> 

I will try to upgrade my kernel if it works for you on 2.6.36, or perhaps I am missing some package? What do I need except dkms? Some particular kernel settings?
Comment 38 David 2011-02-15 02:05:54 UTC
Hi. I have tried a lot of stuff and with some trial and error I got the hdjmod working on 2.6.37 kernel with Hercules MP3 e2 support doing the following, for ebuild creation:
Download source:
# wget ftp://ftp.hercules.com/pub/webupdate/DJCSeries/Hercules_DJSeries_Linux.tgz

Like ilGino said:
Extract all the content, kernel module source plus Control Panel source
# tar -xvzf Hercules_DJSeries_Linux.tgz

We are just interested in the kernel module
# cd "kernel module"

Kernel module is packed as an RPM archive, so we transform it in a plain tar
gzipped archive
# rpm2tgz hdjmod-dkms-1.28-1.noarch.rpm

And we extract the kernel module source
# tar -xvzf hdjmod-dkms-1.28-1.noarch.tgz

We then copy from the nested directory structure just the directory we need and
place it next to our kernel source tree
# cp -a hdjmod-dkms-1.28-1.noarch/usr/src/hdjmod-1.28/ /usr/src/

Then we move into the directory
# cd /usr/src/hdjmod-1.28/

Google for a hour to find this on Archlinux AUR:
https://aur.archlinux.org/packages.php?ID=25214

Download patches needed:
# wget https://aur.archlinux.org/packages/hdjmod/hdjmod/kernel_2.6.31_fix.patch
# wget https://aur.archlinux.org/packages/hdjmod/hdjmod/kernel_2.6.35_fix.diff
# wget https://aur.archlinux.org/packages/hdjmod/hdjmod/dj_console_mp3_e2.patch
# wget https://aur.archlinux.org/packages/hdjmod/hdjmod/kernel_2.6.37_fix.patch

Edit kernel_2.6.35_fix.diff due to a hardcoded link to ARCH kernel:
On line 125
# -#include "/usr/src/linux-2.6.37-ARCH/include/linux/slab.h"
# +#include "/usr/src/linux-2.6.37-gentoo/include/linux/slab.h"
Might need some better mod, this is a dirty fix.

Apply patches in this order:
# patch -p0 < kernel_2.6.31_fix.patch
# patch -p0 < kernel_2.6.35_fix.diff
# patch -p0 < dj_console_mp3_e2.patch
# patch -p0 < kernel_2.6.37_fix.patch

Compile and install modules
# make modules && make install

Try insert the modules into your working kernel
# modprobe hdj_mod

This, I hope will help you creating a ebuild, or at least get it working.
Comment 39 Alex Barker 2011-02-16 03:18:01 UTC
(In reply to comment #38)
> Hi. I have tried a lot of stuff and with some trial and error I got the hdjmod
> working on 2.6.37 kernel with Hercules MP3 e2 support doing the following, for
> ebuild creation:

I'll clean up the ebuild tonight if I have time or tomorrow.

Comment 40 Alex Barker 2011-02-22 19:16:58 UTC
Created attachment 263537 [details]
media-libs/hdj_mod/hdj_mod-1.28.ebuild

Both our patches and Arch's patches are a mess and have a few errors in them so I have recreated all of them.  This should work across all recent kernels.  Please TEST.
Comment 41 Alex Barker 2011-02-22 19:18:16 UTC
Created attachment 263539 [details, diff]
media-libs/hdj_mod/files/dj_console_mp3_e2.patch

Patch for the mp3 e2 dj console.
Comment 42 Alex Barker 2011-02-22 19:18:54 UTC
Created attachment 263541 [details, diff]
media-libs/hdj_mod/files/kernel_2.6.31_fix.patch

kernel 2.6.31 fixes
Comment 43 Alex Barker 2011-02-22 19:19:27 UTC
Created attachment 263543 [details, diff]
media-libs/files/kernel_2.6.35_fix.patch

Kernel 2.6.35 fixes
Comment 44 Alex Barker 2011-02-22 19:19:55 UTC
Created attachment 263545 [details, diff]
media-libs/files/kernel_2.6.37_fix.patch

kernel 2.6.37 fixes
Comment 45 Florian Klink 2011-02-22 19:32:35 UTC
patching doesn't seem to work here

Failed Patch: kernel_2.6.35_fix.patch

temp/kernel_2.6.35_fix.patch.out:
http://pastebin.com/JADy22jY

build.log:
http://pastebin.com/fXWi93Mg
Comment 46 Alex Barker 2011-02-23 02:10:26 UTC
(In reply to comment #45)
> patching doesn't seem to work here
> 

kernel_2.6.35_fix.patch is failing due to "No file to patch.  Skipping patch." which is making me wonder how you applied the kernel_2.6.31_fix.patch which also patches the device.c that was not found in the .35 patch.  I have tested this on x86 and amd64 and all patches are applying fine for me.  Is there something strange with your overlay? 
Comment 47 Florian Klink 2011-02-23 12:09:48 UTC
No, the patch thing is failing earlier. Normally, it tries out some -pnum settings, and if one is successful, it exits happily. The patches here are all written so that you have to use the -p0 option. But when portage tries to do this, it gets the 

---------
(Stripping trailing CRs from patch.)
patching file bulk.c
Hunk #1 FAILED at 34.
Hunk #2 FAILED at 461.
Hunk #3 FAILED at 553.
...
---------

messages, so something has to be wrong with this patch.

Portage tries as usual with another -pnum option. And with all those other ones, it doesn't find the files because -p0 was the right one

When I try to manually patch the files with

patch -p0 < /var/lib/layman/flokli/media-sound/hdj_mod/files/kernel_2.6.35_fix.patch

after portage failed, I get the same errors from above.


I simply copied the ebuilds and patches into my overlay, but you can check it out here: http://git.flokli.de/flokli-overlay/tree/media-sound/hdj_mod


I'm on amd64.
Comment 48 Alex Barker 2011-02-23 18:55:53 UTC
Created attachment 263641 [details, diff]
media-libs/hdj_mod/files/kernel_2.6.35_fix.patch

Fixed issue with patch 2.6.1
Comment 49 Alex Barker 2011-02-23 18:56:22 UTC
Created attachment 263643 [details, diff]
media-libs/hdj_mod/files/kernel_2.6.37_fix.patch

Fixed issue with patch 2.6.1
Comment 50 Florian Klink 2011-02-28 00:46:24 UTC
okay, now the patches work, but the build fails... (tested 2.6.36-gentoo-r8, 2.6.37-gentoo and 2.6.38-rc6, build.log: http://pastebin.com/MFsjte96 )

implicit declaration of function 'init_MUTEX'

Seems to me as if you missed some fixes in your patch ?!
Comment 51 Alex Barker 2011-03-02 17:13:22 UTC
(In reply to comment #50)
> okay, now the patches work, but the build fails... (tested 2.6.36-gentoo-r8,
> 2.6.37-gentoo and 2.6.38-rc6, build.log: http://pastebin.com/MFsjte96 )
> 
> implicit declaration of function 'init_MUTEX'
> 
> Seems to me as if you missed some fixes in your patch ?!
> 
I am pretty sure the patch isn't missing anything that was provided but I will double check.  I was able to build without error on 2.6.37-r1.  I am not sure if its another ~keyword quirk on your system that I don't know about.
Comment 52 Florian Klink 2011-03-28 00:36:10 UTC
Created attachment 267463 [details, diff]
media-libs/hdj_mod/files/kernel_2.6.37_fix.patch

Actually, it was a "logic error" in the

  #if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,37) )

lines, which should be:

  #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )

to also make this code active for newer kernels.

There is also a problem with

  spinlock_t channel_list_lock = SPIN_LOCK_UNLOCKED;

that should be

  DEFINE_SPINLOCK(channel_list_lock);

so I fixed that too.

Builds here (linus' 2.6.38 and a bit more) on amd64, please test!
Comment 53 pedro 2011-04-13 04:08:30 UTC
(In reply to comment #50)
> okay, now the patches work, but the build fails... (tested 2.6.36-gentoo-r8,
> 2.6.37-gentoo and 2.6.38-rc6, build.log: http://pastebin.com/MFsjte96 )
> 
> implicit declaration of function 'init_MUTEX'
> 
> Seems to me as if you missed some fixes in your patch ?!

hi!

i don't know what i'm doing differently but now the patchs always fail (Hunk #X failed).

what did u do to fix it? thanks 
p
Comment 54 Alex Barker 2011-04-13 06:55:30 UTC
Last time we had that problem it was due to the version of patch not being able to handle dos formatted files.
Comment 55 Alex Barker 2011-12-21 23:50:24 UTC
This is now in the sunrise overlay. You can find it at:
http://overlays.gentoo.org/proj/sunrise/browser/sunrise/media-sound/mixxx
Comment 56 Alex Barker 2011-12-21 23:51:10 UTC
(In reply to comment #55)
> This is now in the sunrise overlay. You can find it at:
> http://overlays.gentoo.org/proj/sunrise/browser/sunrise/media-sound/mixxx

Lets try that again, http://overlays.gentoo.org/proj/sunrise/browser/sunrise/media-libs/hdj_mod
Comment 57 ci3nte 2013-01-27 02:12:10 UTC
The ebuild fails to compile with kernel 3.6 or above, but I've seen, that Open Suse has a patch: http://lists.opensuse.org/archive/opensuse-commit/2012-12/msg01845.html
http://download.opensuse.org/factory/repo/src-oss/suse/src/hdjmod-1.28-13.1.src.rpm
Comment 58 Florian Klink 2013-01-27 18:03:23 UTC
Created attachment 337024 [details]
hdj_mod-1.28.ebuild

Modified the ebuild to openSUSE patch set.
Comment 59 Florian Klink 2013-01-27 18:04:47 UTC
Created attachment 337026 [details, diff]
dj_console_mp3_e2.patch
Comment 60 Florian Klink 2013-01-27 18:05:34 UTC
Created attachment 337028 [details, diff]
hdjmod_kernel_2.6.30.patch
Comment 61 Florian Klink 2013-01-27 18:06:22 UTC
Created attachment 337030 [details, diff]
hdjmod-kfree.patch
Comment 62 Florian Klink 2013-01-27 18:06:40 UTC
Created attachment 337032 [details, diff]
hdjmod_kernel_2.6.36.patch
Comment 63 Florian Klink 2013-01-27 18:06:57 UTC
Created attachment 337034 [details, diff]
hdjmod_kernel_2.6.37.patch
Comment 64 Florian Klink 2013-01-27 18:07:28 UTC
Created attachment 337036 [details, diff]
hdjmod_kernel_2.6.39.patch
Comment 65 Florian Klink 2013-01-27 18:07:48 UTC
Created attachment 337038 [details, diff]
hdjmod_kernel_3.6.patch
Comment 66 Florian Klink 2013-01-27 18:08:01 UTC
Created attachment 337040 [details, diff]
hdjmod_kernel_3.7.patch
Comment 67 Florian Klink 2013-01-27 18:09:11 UTC
Created attachment 337042 [details, diff]
hdjmod_fix_hotplug.patch
Comment 68 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-08 16:48:49 UTC
Hello, everyone.

It seems that at least one ebuild related to this bug exists in the Sunrise overlay at the moment. However, I have to regretfully announce that after a long inactivity period the Sunrise project has been discontinued and the related overlay will be eventually removed. For this reason, I'd like to ask you to reevaluate the ebuilds and consider moving them. If you'd like to maintain a package from Sunrise in Gentoo, please take a look at our Proxy Maintainers [1] project.

Please make sure to take ebuilds from the unreviewed developer Sunrise repository [2] rather than the -reviewed one, since the latter has not been updated for over a year. While at it, please note that:

1. Adding a package to Gentoo requires declaring yourself as an active maintainer for it. All bugs regarding the package will be assigned to you, and you will be expected to maintain it.

2. Some packages may not be suitable for addition anymore. While there's no strong rules that would prevent you from adding a package, it may be a bad idea to add old-unmaintained packages that will shortly result in a large number of bugs reported with no solution. If that is the case, please close the bug as RESOLVED/OBSOLETE to make it easier to find packages worth adding.

3. Some of the bugs were already closed as WONTFIX/OBSOLETE/... while the relevant ebuild was kept in Sunrise. If you disagree with the original decision, you still can add the ebuild via proxy-maint.

4. Pleaes note that many of the Sunrise ebuilds are old and may be buggy. If you decide to move them, please make sure to update/clean them up. The proxy-maint team will also review your ebuilds, therefore making sure they land in Gentoo in good quality.

Once again, thank you for your contribution. We hope that you will still want to contribute to Gentoo, through proxy-maint or otherwise.


[1]:https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
[2]:https://gitweb.gentoo.org/proj/sunrise.git/