Rebuilding the Kernel

Tom Hoffman tom.hoffman at gmail.com
Wed Jan 23 15:14:56 EST 2008


OK, not quite there...

I installed the regular, devel and src RPM's for the kernel I've got on my XO.

cd'ed to here:
/usr/src/kernels/2.6.22-20080118.2.olpc.a985ba6d19d39cc-i586/drivers/usb/misc/sisusbvga

Did: make -C /lib/modules/2.6.22-20080118.2.olpc.a985ba6d19d39cc/build/
SUBDIRS=`pwd` modules

The result was an apparently empty file called Module.symvers
Didn't seem to get a .ko

Here's the Makefile:

obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga.o

sisusbvga-objs := sisusb.o sisusb_init.o sisusb_con.o

Thanks!  Hope I'm not being too clueless here...

--Tom




On Jan 23, 2008 12:11 PM, Dan Williams <dcbw at redhat.com> wrote:
> On Wed, 2008-01-23 at 12:01 -0500, Tom Hoffman wrote:
> > Thanks Dan.  I'll give this a shot.
>
> No problem, does the usb2vga stuff give you a Makefile at all?  If so,
> could you attach it?
>
> If not, it's pretty easy to make one, assuming that the module doesn't
> require weird build-time magic (most don't since they are < 10 files and
> usually just one or two).
>
> Dan
>
>
>
> > --Tom
> >
> > On Jan 23, 2008 11:42 AM, Dan Williams <dcbw at redhat.com> wrote:
> > >
> > > On Wed, 2008-01-23 at 11:24 -0500, Tom Hoffman wrote:
> > > > Hi all,
> > > >
> > > > I'm trying to get a USB2VGA adapter working.  Step 1 would appear to
> > > > be compiling the SISUSBVGA module in the standard kernel tree and
> > > > getting it onto my XO.
> > > >
> > > > So I've been trying http://wiki.laptop.org/go/Rebuilding_OLPC_kernel
> > > >
> > > > And rpmbuild bombs out the same way whether I use a SRPM or git:
> > > >
> > > > ++ /usr/bin/id -u
> > > > + '[' 500 = 0 ']'
> > > > + /bin/chmod -Rf a+rX,u+w,g-w,o-w .
> > > > + mv linux-2.6. vanilla
> > > > mv: cannot stat `linux-2.6.': No such file or directory
> > > > error: Bad exit status from /var/tmp/rpm-tmp.57150 (%prep)
> > > >
> > > >
> > > > RPM build errors:
> > > >     Bad exit status from /var/tmp/rpm-tmp.57150 (%prep)
> > > >
> > > > This is on Fedora 8.
> > > >
> > > > Anyone have any helpful advice?  I'll update the wiki if you do.
> > >
> > > You don't need to rebuild the kernel itself.  All you need is to install
> > > the kernel-devel package for the kernel you want to build against.
> > >
> > > Then cd into your usb2vga driver directory.  Run:
> > >
> > > make -C /lib/modules/<kernel version>/build SUBDIRS=`pwd` modules
> > >
> > > And it'll spit out a .ko you can load if usb2vga has a makefile in the
> > > appropriate form (which should be quite simple).
> > >
> > > If you want to build it for the XO, find out the version of the kernel
> > > running on the XO, and get the matching kernel-devel package from
> > > Andres' site at http://dev.laptop.org/~dilinger/stable/
> > >
> > > And do the same:
> > >
> > > make -C /lib/modules/<olpc kernel version>/build SUBDIRS=`pwd` modules
> > >
> > > Many times, the module (like madwifi, some out-of-tree v4l2 drivers, or
> > > others) will include the right makefile magic for you to just type
> > > 'make' and it'll handle this all for you.
> > >
> > > Dan
> > >
> > >
> > >
>
>



More information about the Devel mailing list