Re: Stupid driver build/debug questions



On 27/03/2008, Alexander Sack <pisymbol@xxxxxxxxx> wrote:
On Thu, Mar 27, 2008 at 3:25 PM, Julian Elischer <julian@xxxxxxxxxxxx> wrote:
> Alexander Sack wrote:
> > Hello:
> >
> > New to the FreeBSD kernel and I'm investigating a driver problem
> > (wasn't sure what list this should go on).
> >
> > I was wondering how to make a driver statically built instead of a
> > loadable module? Is this an artifact of the driver source build or
> > the generic kernel configuration mechanism via options etc.? i.e.
> > does a driver need to use something different than the bsd.kmod.mk
> > template make file to build a static driver.
> >
> > What I am trying to do is break at attach time more easily than
> > stepping through driver_probe_and_attach()/driver_attach_child() until
> > the attach routine gets called. I realize I can add a kdb_enter() but
> > I was trying to do this on a live system without rebuilding the kernel
> > (I understand this contradicts my first question but I still want to
> > know how to build drivers statically).
>
> put the filennames in /sys/conf/files or files.i386 (or whatever)
>
> at one stage you could also have a files.{CONFIGNAME} but I haven't
> tried that for a long time.


Thanks for the response. I will try this but I do have an obvious
question, the build scripts do not need to be edited at all with the
extra directory/files? It will just pickup my driver directory and
link against the kernel automagically?

Yes, It will if you add them to standard files list (see conf/files).
(Otherwise if you want it as options directive in your kernel config
than you should mark its module name in conf/files and also put
an appropriate record into conf/options).

-
pluknet
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • [PATCH 18-rc2] Fix typos in /Documentation : N-P
    ... Again, if you're not gonna do synchronization with disk drives (dang, ... -the kernel. ... There are two options specific to PSX driver portion. ... The driver uses the settings from the EEPROM set in the SCSI BIOS ...
    (Linux-Kernel)
  • two scary syslog kernel messages
    ... Sep 20 03:46:06 marvin kernel: kernel BUG at mm/rmap.c:482! ... ACPI: Local APIC address 0xfee00000 ... Allocating PCI resources starting at 80000000 ... ** driver failed to call pci_enable_device. ...
    (Debian-User)
  • Re: [PATCH, RFT, v4] sata_mv: convert to new EH
    ... check both new and old drives with SMART ... Use a HIGHMEM enabled kernel. ... ACPI: PM-Timer IO Port: 0xe408 ... Real Time Clock Driver v1.12ac ...
    (Linux-Kernel)
  • Re: [PATCH 18-rc3] Fix typos in /Documentation : Q-R
    ... The driver will receive them again on the ... The kernel is entered with r3 pointing to an area of memory that is ... Bits are then right shifted into the GP_SAMPLE register at the specified ... you get an interrupt when a full DWORD is recieved. ...
    (Linux-Kernel)
  • kernel Doc/ URL corrections
    ... -Documents about softnet driver issues in general can be found ... Additional documentation is available at Don Becker's Linux Drivers site: ... Just force it to be recognized by kernel parameters. ... Keywords: files, VFS, file operations, kernel interface, character ...
    (Linux-Kernel)