Attached is a sample based on a module I was working on in the past using ltib.
Place the tar file in the ltib root dir and,
tar zxvf sample_ltib_ko.tgz
and read the following file: rpm/BUILD/sample_ltib_ko-0.0/Readme.txt for further instructions.
Regards,
Joe D.
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Stuart Hughes
> Sent: Wednesday, January 10, 2007 10:42 AM
> To: VinuxHuang
> Cc: ltib
> Subject: Re: Re: [Ltib] how to build a kernel module using
> ltib? (docu)
>
> Hi Vincent,
>
> I just posted a similar reply, try:
>
> $(MAKE) ARCH=$(LINTARCH) modules -C $(KernDir) M=$(SubDir)
>
> Regards, Stuart
>
> On Wed, 2007-01-10 at 11:00 +0000, Stuart Hughes wrote:
> > Hi Vincent,
> >
>
> This seems to be a common problem, someone else was asking
> today. I'll
>
> see if I can find an example and post it. I need to ask some other
>
> people how to do this as I don't work on the kernel (regularly).
> >
> > Regards, Stuart
> >
> >
>
> On Wed, 2007-01-10 at 17:36 +0800, VinuxHuang wrote:
> > > Hello,Stuart
> >
> I have tried to build a kernel mode with Ltib, but I
> always failed
> >
> for it couldn't build the correct format mod.
> >
> I get the error messages as follows:
> >
> powerpc-linux-ld: unrecognised emulation mode: elf_i386
> >
> Supported emulations: elf32ppclinux elf32ppc elf32ppcsim
> > >
> >
> Maybe I write a wrong Makefile.My Makefile is like that:
> > > obj-m += jc.o
> > > KernDir
> >
> = /home/vince/ltib-mpc8349emds-20060414/rpm/BUILD/linux-2.6.10
> > > SubDir = $(PWD)
> > > deflt:
> >
> $(MAKE) modules -C $(KernDir) M=$(SubDir)
> > > clean:
> >
> @rm -f *.o;rm -f *.ko;rm -f *.mod.c
> > >
> >
> Would you please give me some advice about how to
> write a correct
> >
> Makefile to build a kernel mode for ppc platform.
> > > Thanks very much,
> > > VinuxHuang
> > >
> > >
> > >
> ______________________________________________________________________
> > > VinuxHuang
> > > 2007-01-10
> > >
> > >
> ______________________________________________________________________
> > > 发件人: Stuart Hughes
> > > 发送时间: 2007-01-09 18:08:36
> > > 收件人: 黄荣坚
> > > 抄送: ltib
> >
> 主题: Re: [Ltib] how to build a kernel module using ltib? (docu)
> > >
> > > Hi VinuxHuang,
> > >
> >
> As far as adding your own additional modules goes, this
> can be done
> >
> inside or outside of ltib.
> > >
> >
> If you don't want to integrate into LTIB, simply build your module
> >
> outside LTIB and then make a directory:
> > > config/platform/ <target
>/merge/lib/modules/ <version >/misc/
> >
> and then copy your module there. You then have to
> manually load this
> >
> (or put into rc.local) at boot up.
> > >
> >
> If you want to integrate with LTIB, you'll need to write
> a spec file.
> >
> There are some hints in the FAQ at:
> >
> It's purely another package. The only thing you'll need
> to remember is
> >
> to make sure that you leave the kernel sources unpacked
> when you build.
> >
> You can do this by adding a dependency in
> config/userspace/packages.lkc
> >
> or more simply by clicking the option:
> >
> [x] Leave the sources after building
> >
> When running './ltib --configure'
> > >
> >
> If you want to change the kernel configuration, take a
> look at this:
> > >
> > > Regards, Stuart
> > >
> >
> On Tue, 2007-01-09 at 11:31 +0800, 黄荣坚 wrote:
> > > > Hello,all
> > >
> I'm a novice of ltib,and I want to build and deploy a kernel
> > >
> module for the target linux running on the board.Though
> I have read
> > >
> the LtibFAQ document,there seem to be not enough
> information for me to
> > >
> do this. So I hope I can get some help here about how I
> can build and
> > >
> deploy a kernel module with Ltib.
> > >
> Besides, I want to build a kernel which supports
> usb gadget mode.
> > >
> But when I use command: ./ltib -m config to configure
> the kernel ,I
> > >
> just can find the option
> > >
> in the configuration menu. How can I add the usb gadget support
> > >
> (file_storage etc.) to the configuration system? Would
> you please
> > >
> give me some advice about this?
> > >
> Thanks,
> > >
> VinuxHuang
> > > >
> > > >
> > > >
> ______________________________________________________________________
> > >
> > > >
> > >
> > >
> > >
> >
> __________ NOD32 1968 (20070109) Information __________
> > >
> >
> This message was checked by NOD32 antivirus system.
> > >
> > >
> >
> _______________________________________________
> > >
> > > Ltib mailing list
> > > address@hidden
> >
> >
> >
>
> _______________________________________________
> >
> > Ltib mailing list
> > address@hidden
> >
>
>
>
> _______________________________________________
>
> Ltib mailing list
> address@hidden
>
__________ NOD32 1970 (20070110) Information __________
This message was checked by NOD32 antivirus system.