ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] User Device Driver Installation


From: sampsont
Subject: Re: [Ltib] User Device Driver Installation
Date: Mon, 21 Feb 2011 22:05:31 +0000 (UTC)

For auto-start, adding your own
config/platform/_target_/etc/rc.d/rc.local is probably your best (simplest) bet.
                         ^
                         |
                         - Did you mean to put 'merge' in the path here?

I made a rc.local at ltib/

merge
`-- etc
    `-- rc.d
        `-- rc.local

but it's not getting into rootfs.  Maybe I'm not asking LTIB to do the right thing. What is the LTIB command I need to execute to have the merge directories installed in rootfs?

----- Original Message -----
From: "Stuart Hughes" <address@hidden>
To: address@hidden
Cc: address@hidden
Sent: Monday, February 21, 2011 3:51:56 PM
Subject: Re: [Ltib] User Device Driver Installation

Hi Todd,

For auto-start, adding your own
config/platform/_target_/etc/rc.d/rc.local is probably your best
(simplest) bet.

Again, for fstab, add your own merge version to override the rpm version.

Regards, Stuart

On 21/02/11 19:54, address@hidden wrote:
> Hi Stuart,
> My module loads at runtime now.  I put my module in
> /lib/modules/2.6.26.3-rt3/m9k/m9kdriver.ko.  It seems like it needs to
> be in: /lib/modules/2.6.26.3-rt3/ to be found.
>
> My next desire is to automatically launch/shutdown my application.
>
> I hacked /etc/rc.d/rc.conf to add 'm9000' in cfg_services and
> cfg_services_r and added my own script at /etc/rc.d/init.d/m9000.  This
> works but it seems like a hack.
>
> *Is there a recommended way in LTIB to have a user script run at
> startup/shutdown so I can bring up/down my app automatically?*
>
>
> I also need to mount my HD. I added:  '/dev/sda /hd ext2
> rw,errors=continue 0 0' to /ltib/rootfs/etc/fstab.  It works but I think
> ./ltib -m distclean wipes it out. * Is there a better way to put this in
> LTIB?*
>
> I really appreciate your help!
> Todd
>
>
> ----- Original Message -----
> From: "Stuart Hughes" <address@hidden>
> To: address@hidden
> Cc: address@hidden
> Sent: Saturday, February 19, 2011 11:19:18 AM
> Subject: Re: [Ltib] User Device Driver Installation
>
> Hi Todd,
>
> I forgot also to say that to get the runtime to load up your module,
> when configuring ltib (./ltib --configure), select
>         Target System Configuration Options --->
>                 ()  load these modules at boot
> and type hit 'Enter' and enter m9kdriver
>
> Regards, Stuart
>
> On 19/02/11 10:27, Stuart Hughes wrote:
>> 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 home page: http://ltib.org
>>
>> Ltib mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/ltib
>>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]