LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 07-20-2009, 03:20 AM   #1
lp rob1
LQ Newbie
 
Registered: Jul 2009
Posts: 13

Rep: Reputation: 0
Question need kernel headers to install fxload, no /linux directory


i have been trying to install fxload-2008_10_13 for midisport firmware, which requires it. the make command results in the following:

# make
cc -c -O -Wall ezusb.c -o ezusb.o
ezusb.c:33:29: error: linux/usb/ch9.h No such file or directory
ezusb.c: In function 'ezusb_read':
ezusb.c:198: error: 'USB_DIR_IN' undeclared (first use in this function)
ezusb.c:198: error: (Each undeclared identifier is reported only once
ezusb.c:198: error: for each function it appears in.)
ezusb.c:198: error: 'USB_TYPE_VENDOR' undeclared (first use in this function)
ezusb.c:198: error: 'USB_RECIP_DEVICE' undeclared (first use in this function)
ezusb.c: In function 'ezusb_write':
ezusb.c:226: error: 'USB_DIR_OUT' undeclared (first use in this function)
ezusb.c:226: error: 'USB_TYPE_VENDOR' undeclared (first use in this function)
ezusb.c:226: error: 'USB_RECIP_DEVICE' undeclared (first use in this function)
ezusb.c: In function 'ezusb_cpucs':
ezusb.c:253: error: 'USB_DIR_OUT' undeclared (first use in this function)
ezusb.c:253: error: 'USB_TYPE_VENDOR' undeclared (first use in this function)
ezusb.c:253: error: 'USB_RECIP_DEVICE' undeclared (first use in this function)
make: *** [ezusb.o] Error 1

there is no such directory as /linux, so what do i do? i have found out that i need kernel headers, from where? i am confused
 
Old 07-21-2009, 02:26 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
I never tried Puppy, but I found a link where it explains how to install the kernel sources. All the related download links work. Here it is: http://puppy.cnbits.com/node/129 (see the section Prepare the kernel source).
 
Old 07-21-2009, 09:36 AM   #3
lp rob1
LQ Newbie
 
Registered: Jul 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Lightbulb fixed

yes!!! i installed the source as you suggested, but that didnt help. after changing the directory of ch9.h from /linux/include/linux/usb/ to /linux/usb/, i then modified ezusb.c in fxload to point to /linux/usb/ch9.h, not linux/usb/ch9.h. thanks colucix! oh, and i also searched for ch9.h, it appeared as /usr/include/linux/usb_ch9.h

so, if anyone out there wants to install fxload onto puppy linux, here is what you do:

1. download the fxload source (how else would you install it?)
2. extract the files into your installation directory. i recommend /usr/lib/fxload. here is how you do it through terminal. i will make some assumptions, you downloaded the file fxload-2008_10_13.tar.gz into /root/downloads/:
# mkdir /usr/lib/fxload
# cd /root/downloads
# tar -C /usr/lib/fxload -zxvf fxload-2008_10_13.tar.gz

this will create a directory called fxload-2008_10_13.
3. get ch9.h and put it into /linux/usb/:
# mkdir /linux
# mkdir /linux/usb
# cd /linux/usb
# cp /usr/include/linux/usb_ch9.h /linux/usb
# rename usb_ch9.h ch9.h

you now have /linux/usb/ch9.h
4. go to /usr/lib/fxload/fxload-2008_10_13, then right-click on ezusb.c with a text editor. search for 'ch9.h' you will see something like this:
# include <linux/version.h>
# include <linux/usb/ch9.h>
# include <linux/usbdevice_fs.h>

change the middle line to read this:
# include <linux/version.h>
# include </linux/usb/ch9.h>
# include <linux/usbdevice_fs.h>

5. back in the terminal window, we need to compile fxload:
# cd /usr/lib/fxload/fxload-2008_10_13
# make

if all goes well, you should see no errors, maybe one warning but as long as there are no errors, everything is ok.
6. last step. we need to install fxload.
# make install

so, fxload should be installed!
btw, colucix should take some of the credit, what for, im not sure. but still
 
Old 07-21-2009, 09:43 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by lp rob1 View Post
btw, colucix should take some of the credit, what for, im not sure. but still
He he he... I'm not sure, too... thanks anyway! Glad to see it works now!
 
Old 06-03-2010, 10:03 PM   #5
Berwyn
LQ Newbie
 
Registered: May 2010
Posts: 1

Rep: Reputation: 0
Easier way

Hi lp_rob,

That's complicated (but it does work, thanks!).

An easier way is to simply untar the fxload tgz and simply replace the following line of ezusb.c
Code:
include <linux/usb/ch9.h>
with
Code:
include </usr/include/linux/usb_ch9.h>
then "make install"
 
  


Reply

Tags
headers, kernel, puppy



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
install linux headers of a compiled kernel mariogarcia Debian 5 04-18-2007 06:23 PM
what directory to download kernel headers tkmsr Fedora 1 04-17-2007 04:05 AM
trying to find/install kernel-source or kernel-headers timsch75 Slackware 3 10-22-2005 09:17 AM
Strange file access restrictions in kernel-headers directory zero79 Debian 3 04-30-2004 10:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy

All times are GMT -5. The time now is 04:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration