LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-07-2015, 09:04 AM   #16
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931

Quote:
Originally Posted by marvic_32 View Post
Thanks, i had compiled Linux from the sources but this time it looked liked a bit deep surgery. So took suggestions of you people.

Finally, Do i have to compile one file or entire folder?

Thank You.
When you compiled the kernel and modules before did it create a KO file such as serial.ko? If so then you'd have to rebuild the kernel module which depends on this particular source file. For that you can search the Makefiles to see where the source is used. If it was compiled to be internal to the kernel, then you have to rebuild the kernel binary.

A suggestion is to modify the source in the tree where you did your original build and re-do the original build starting with the kernel build. If that source does not get recompiled, then it's part of the modules build. So then rebuild the modules and keep the log of that build, like set your window recall to a very large number or save the log as the build runs, and then check the top level module make which is entered for when that source is compiled. That way you can just build the particular module which it applies for and copy the KO file over to test your changes. But first you need to determine if that was included internally in the kernel, or not.
 
Old 04-07-2015, 10:44 AM   #17
marvic_32
LQ Newbie
 
Registered: Apr 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
When you compiled the kernel and modules before did it create a KO file such as serial.ko? If so then you'd have to rebuild the kernel module which depends on this particular source file. For that you can search the Makefiles to see where the source is used. If it was compiled to be internal to the kernel, then you have to rebuild the kernel binary.
No, it not created serial.ko but created individual kernel object files like option.ko, sierra.ko and so on.

This is the make file in serial folder

#
# Makefile for the USB serial device drivers.
#

# Object file lists.

obj-$(CONFIG_USB_SERIAL) += usbserial.o

usbserial-y := usb-serial.o generic.o bus.o

usbserial-$(CONFIG_USB_SERIAL_CONSOLE) += console.o

obj-$(CONFIG_USB_SERIAL_AIRCABLE) += aircable.o
obj-$(CONFIG_USB_SERIAL_ARK3116) += ark3116.o
obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o
obj-$(CONFIG_USB_SERIAL_CH341) += ch341.o
obj-$(CONFIG_USB_SERIAL_CP210X) += cp210x.o
obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o
obj-$(CONFIG_USB_SERIAL_CYPRESS_M8) += cypress_m8.o
obj-$(CONFIG_USB_SERIAL_DEBUG) += usb_debug.o
obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT) += digi_acceleport.o
obj-$(CONFIG_USB_SERIAL_EDGEPORT) += io_edgeport.o
obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI) += io_ti.o
obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o
obj-$(CONFIG_USB_SERIAL_F81232) += f81232.o
obj-$(CONFIG_USB_SERIAL_FTDI_SIO) += ftdi_sio.o
obj-$(CONFIG_USB_SERIAL_GARMIN) += garmin_gps.o
obj-$(CONFIG_USB_SERIAL_IPAQ) += ipaq.o
obj-$(CONFIG_USB_SERIAL_IPW) += ipw.o
obj-$(CONFIG_USB_SERIAL_IR) += ir-usb.o
obj-$(CONFIG_USB_SERIAL_IUU) += iuu_phoenix.o
obj-$(CONFIG_USB_SERIAL_KEYSPAN) += keyspan.o
obj-$(CONFIG_USB_SERIAL_KEYSPAN_PDA) += keyspan_pda.o
obj-$(CONFIG_USB_SERIAL_KLSI) += kl5kusb105.o
obj-$(CONFIG_USB_SERIAL_KOBIL_SCT) += kobil_sct.o
obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o
obj-$(CONFIG_USB_SERIAL_METRO) += metro-usb.o
obj-$(CONFIG_USB_SERIAL_MOS7720) += mos7720.o
obj-$(CONFIG_USB_SERIAL_MOS7840) += mos7840.o
obj-$(CONFIG_USB_SERIAL_MXUPORT) += mxuport.o
obj-$(CONFIG_USB_SERIAL_NAVMAN) += navman.o
obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o
obj-$(CONFIG_USB_SERIAL_OPTICON) += opticon.o
obj-$(CONFIG_USB_SERIAL_OPTION) += option.o
obj-$(CONFIG_USB_SERIAL_OTI6858) += oti6858.o
obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o
obj-$(CONFIG_USB_SERIAL_QCAUX) += qcaux.o
obj-$(CONFIG_USB_SERIAL_QUALCOMM) += qcserial.o
obj-$(CONFIG_USB_SERIAL_QT2) += quatech2.o
obj-$(CONFIG_USB_SERIAL_SAFE) += safe_serial.o
obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o
obj-$(CONFIG_USB_SERIAL_SIMPLE) += usb-serial-simple.o
obj-$(CONFIG_USB_SERIAL_SPCP8X5) += spcp8x5.o
obj-$(CONFIG_USB_SERIAL_SSU100) += ssu100.o
obj-$(CONFIG_USB_SERIAL_SYMBOL) += symbolserial.o
obj-$(CONFIG_USB_SERIAL_WWAN) += usb_wwan.o
obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o
obj-$(CONFIG_USB_SERIAL_VISOR) += visor.o
obj-$(CONFIG_USB_SERIAL_WISHBONE) += wishbone-serial.o
obj-$(CONFIG_USB_SERIAL_WHITEHEAT) += whiteheat.o
obj-$(CONFIG_USB_SERIAL_XIRCOM) += keyspan_pda.o
obj-$(CONFIG_USB_SERIAL_XSENS_MT) += xsens_mt.o

So, can i compile this make file?
 
Old 04-07-2015, 12:01 PM   #18
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Note that option.c is NOT in that Makefile. So while you can compile that, it's not going to make any difference considering the source you modified is not in that particular module.

Quote:
Originally Posted by marvic_32 View Post
This is the make file in serial folder
...
So, can i compile this make file?
 
Old 04-07-2015, 12:44 PM   #19
marvic_32
LQ Newbie
 
Registered: Apr 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Note that option.c is NOT in that Makefile. So while you can compile that, it's not going to make any difference considering the source you modified is not in that particular module.
option.c file is inside the serial folder. I edited this file.

Make file speaks about
obj-$(CONFIG_USB_SERIAL_OPTION) += option.o

What is this?

Last edited by marvic_32; 04-07-2015 at 12:45 PM.
 
Old 04-07-2015, 12:52 PM   #20
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
You're right, I missed that. I actually searched for option.c not option.o.

If you have the capabilities to make the modules properly set up then yes, you can just run that particular makefile to build just that module.
 
Old 04-07-2015, 06:58 PM   #21
marvic_32
LQ Newbie
 
Registered: Apr 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
You're right, I missed that. I actually searched for option.c not option.o.

If you have the capabilities to make the modules properly set up then yes, you can just run that particular makefile to build just that module.
Thanks, i will try this let you know.

Thanks you.
 
Old 04-08-2015, 01:46 AM   #22
marvic_32
LQ Newbie
 
Registered: Apr 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
I edited the option.c and
did this module build from the folder /drivers/usb/serial
ARCH=arm CROSS_COMPILE=${CCPREFIX} make

root@mars:/home/mars/Raspberry-Dev/linux/drivers/usb/serial# ARCH=arm CROSS_COMPILE=${CCPREFIX} make
make: *** No targets. Stop.

mars@mars:~/Raspberry-Dev/linux/drivers/usb/serial$ ARCH=arm CROSS_COMPILE=${CCPREFIX} make
make: *** No targets. Stop.

i try ed with as root and as user
Any problem in Makefile? or commands?

followed http://sysprogs.com/VisualKernel/tut...y/buildkernel/
 
Old 04-08-2015, 11:37 AM   #23
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Looks like step #9 would build the kernel and modules together. And then in step #11 you would install the modules to the correct target directory structure prior to copying it over to the Pi target. Therefore your changes should have been compiled if you followed that entirely. Considering that they have it all combined into the one make procedure, I'd use the "Contact" link they have on that site and ask if they know how to just build only the modules, and only a particular module sub-directory. You may also wish to retry step #9 with the qualifier: "make modules" and see if that makes just the modules and not the kernel. Further, another thing to try might be to give the proper subdirectory when invoking that make, such as "make drivers/usb/serial" to see if it will build just that set of drivers. But obviously invoke it from the top kernel level.
 
Old 04-08-2015, 12:57 PM   #24
marvic_32
LQ Newbie
 
Registered: Apr 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Looks like step #9 would build the kernel and modules together. And then in step #11 you would install the modules to the correct target directory structure prior to copying it over to the Pi target. Therefore your changes should have been compiled if you followed that entirely. Considering that they have it all combined into the one make procedure, I'd use the "Contact" link they have on that site and ask if they know how to just build only the modules, and only a particular module sub-directory. You may also wish to retry step #9 with the qualifier: "make modules" and see if that makes just the modules and not the kernel. Further, another thing to try might be to give the proper subdirectory when invoking that make, such as "make drivers/usb/serial" to see if it will build just that set of drivers. But obviously invoke it from the top kernel level.
Try ed all the ways still flashing errors.

Contacted the support team, told to follow http://sysprogs.com/VisualKernel/tut...y/basicmodule/

step 5: is optional? I could not find the config.gz from the Linux folder.
 
Old 04-09-2015, 05:06 AM   #25
marvic_32
LQ Newbie
 
Registered: Apr 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
step 5
scp pi@raspberrypi:/proc/config.gz .
ssh: connect to host raspberrypi port 22: Connection timed out
 
  


Reply



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
A rather odd kernel build error while building a powerpc version of kernel 3.0.3 bloggins666 Linux - Kernel 2 01-29-2015 10:08 AM
Unable to build kernel RPM with 'custom name'. (need not kernel but kernel-something) RattleSn@ke Linux - Kernel 1 01-12-2011 06:30 PM
Which is the kernel build directory? I Can't find kernel build files crabsody Debian 7 01-09-2007 04:48 AM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
New FAQ topic: Should I edit my kernel configuration?/Should I build a custom kernel? chort *BSD 10 09-10-2004 11:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:56 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