[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ltib] User Device Driver Installation
From: |
Stuart Hughes |
Subject: |
Re: [Ltib] User Device Driver Installation |
Date: |
Sat, 19 Feb 2011 10:27:23 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 |
Hi Todd,
Use: dist/lfs-5.1/helloworld/hello_mod.spec
as a template.
run: ./ltib -p hello_mod -m prep
go into rpm/BUILD/hello_mod-1.2
and read the README, it explains most of the salient points.
You can then:
* Modify what's in the hello_mod-1.2 to your module contents
* Copy the .spec file to your own packages name somewhere e.g:
dist/lfs-5.1/todds_module/todds_module.spec
* Re-name rpm/BUILD/hello_mod-1.2 to something sane (toddm-1.0)
* tar up the cleaned sources and put in /opt/ltib/pkgs
* Update the .spec file to reference the new directory name and new
source tarball name
* Move the build area out the way
* Test build your package to make sure it builds/deploys
When you're finally done, you could encapsulate it all in an srpm by
running: ./ltib -p your_package -f --keepsrpms
I can't guarantee all these steps are exactly like this, but hopefully
it's enough to get you going.
Regards, Stuart
On 18/02/11 14:34, address@hidden wrote:
> Where is the "right place" to put my driver? I tried:
> /lib/modules/2.6.26.3-rt3/kernel/m9k/m9kdriver.ko and then ran:
> ./ltib -p modeps -f
>
> The module wasn't loaded during boot.
>
> Should my module show up in: /etc/rc.d/rc.conf $MODLIST=""
>
>
> Could you point me to a recipe to "make it a package and have LTIB
> handle it"? Even after a lot of Googling I don't know where to begin.
>
> ----- Original Message -----
> From: "Stuart Hughes" <address@hidden>
> To: address@hidden
> Cc: address@hidden
> Sent: Friday, February 18, 2011 3:42:20 AM
> Subject: Re: [Ltib] User Device Driver Installation
>
> Hi Todd,
>
> The easiest thing is to make it a package and have LTIB handle it.
>
> Another possibility is to run:
> $ ./ltib -p modeps -f
> after you've copied you're module to the right place.
>
> Regards, Stuart
>
> On 17/02/11 22:18, address@hidden wrote:
>> I currently compile a device driver for my target and put it in
>> /lib/modules/mydriver.ko. This is done after LTIB is finished.
>>
>> I run insmod /lib/modules/m9kdriver.ko on the target after boot. This
>> all works fine. However, now I want to automate everything so the
>> driver gets installed automatically at boot.
>>
>> I added /lib/modules/m9kdriver.ko to: Target System Configuration --->
>> Options ---> load these modules at boot
>>
>> This doesn't work because depmod/modprobe expects the .ko files to be
>> in: /lib/modules/`uname -r`/kernel/
>>
>> I copied m9kdriver.ko to
>> /lib/modules/2.6.26.3-rt3/kernel/m9k/m9kdriver.ko and hoped it would be
>> loaded at boot time but it doesn't work. lsmod shows nothing loaded.
>> depmod -n does find m9kdriver.ko. (See below)
>>
>> Specifically, this is what I would like to do:
>>
>> 1. Compile m9kdriver.ko on my own.
>> 2. Copy it to the rootfs.
>> 3. Tell LTIB that I want my driver to be loaded, (if I need to.)
>> 4. Be happy when it loads at boot.
>>
>>
>> Is this possible? Any hints? Feel free to make recommendations if I'm
>> corrupting the flow too much.
>>
>> As always, much appreciated.
>> Todd
>>
>> Using: ltib 10.1.1 ($Revision: 1.68 $)
>> Target: MPC5200
>> Host: Ubuntu 10.10
>>
>>
>> address@hidden /]# lsmod
>> Module Size Used by
>> address@hidden /]# depmod -n
>> /lib/modules/2.6.26.3-rt3/kernel/net/xfrm/xfrm_user.ko:
>> /lib/modules/2.6.26.3-rt3/kernel/drivers/scsi/scsi_wait_scan.ko:
>> /lib/modules/2.6.26.3-rt3/kernel/drivers/char/alloc_rtsj_mem.ko:
>> /lib/modules/2.6.26.3-rt3/kernel/drivers/char/rmem.ko:
>> */lib/modules/2.6.26.3-rt3/kernel/m9k/m9kdriver.ko:*
>> # pci module vendor device subvendor subdevice class
>> clas
>> s_mask driver_data
>> # usb module _type cu_model dev_type dev_model
>> # ieee1394 module match_flags vendor_id model_id specifier_id version
>> # isapnp module cardvendor carddevice driver_data vendor
>> function ...
>>
>> # module matchBits bustype vendor product version evBits keyBits
>> relBits
>> absBits mscBits ledBits sndBits ffBits driver_info
>> # Aliases extracted from modules themselves.
>> alias net-pf-16-proto-6 xfrm_user
>> alias of:N*T*Cm9kdrv* *m9kdriver*
>> # Aliases for symbols, used by symbol_request().
>>
>>
>>
>>
>> _______________________________________________
>> LTIB home page: http://ltib.org
>>
>> Ltib mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/ltib
- [Ltib] User Device Driver Installation, sampsont, 2011/02/17
- Re: [Ltib] User Device Driver Installation, sampsont, 2011/02/18
- Re: [Ltib] User Device Driver Installation,
Stuart Hughes <=
- Re: [Ltib] User Device Driver Installation, sampsont, 2011/02/21
- Re: [Ltib] User Device Driver Installation, sampsont, 2011/02/21
- Re: [Ltib] User Device Driver Installation, sampsont, 2011/02/22
- Re: [Ltib] User Device Driver Installation, sampsont, 2011/02/24