RE: Simplified Steps for Building a Loadable module on -CURRENT





-----Original Message-----
From: Stefan Bethke [mailto:stb@xxxxxxxxxx]
Sent: Thursday, August 31, 2006 12:20 AM
To: David Christensen
Cc: freebsd-current@xxxxxxxxxxx
Subject: Re: Simplified Steps for Building a Loadable module
on -CURRENT

Am 31.08.2006 um 01:36 schrieb David Christensen:

Then what's the panic message, and how exactly are you
building your
module?


The message wasn't readable on the serial console. The text was
jumbled
and I could only make out bits and pieces of it.

And the module that got installed in /boot/kernel/<module>.ko does
exhibit the same problem, or not?
So I should do the following:

1) Comment out the driver I want to test in the kernel configuration
file.
For example, modify /usr/src/sys/amd64/conf/MYCONFIG.
2) Rebuild and install the kernel (cd /usr/src; make kernel
KERNCONF=MYCONFIG)

Which also builds and installs all modules into /boot/kernel
(see src/
sys/modulesMakefile for the list of modules that are built).

3) Reboot the system to start using the new kernel
4) Edit the driver in /usr/src/sys/dev/XXX as necessary
5) Build the kernel module (cd /usr/src/sys/modules/XXX; make)
6) Load the kernel module (kldload ./if_XXX) and cross my fingers.

No, make that:

6) Enable the kernel debugger, load the module, then show the list
the panic message, backtrace, etc. and tell us which driver you're
talking about and how you modified it.

1) The driver is /usr/src/sys/dev/bge.

2) My Makefile:
.PATH: .
KMOD= if_bge
SRCS= bus_if.h device_if.h pci_if.h miibus_if.h miidevs.h
SRCS+= if_bge.c if_bgereg.h
DEBUG_FLAGS = -g

.include <bsd.kmod.mk>

3) The source is unmodified from -CURRENT

4) Here's the panic (though it's a little hard to read):

Loading if_bge.ko
bge0: <Broadcom BCM5752 A1, ASIC rev. 0x6001> mem 0xdd100000-0xdd10ffff
irq 16 at device 0.0 on pci1




F
aaFt
lF attraaapt l3a0 :l rtersaeprtv e3d0 r(au:n kpnroewsne) rfva3u0l:t
rwehdielwes ei(nu rknevrknneelo dm o(duen
wkcnpnu)iodw =f n3); aafpuilca uildt =t w0 7h
fiihnlsiter uicltni oen ipkonienrtneer l= m0kxe8o:d0rxefnfef
fcfpfufl8i0 6m2o1dbe3d6

fs=t accpku 1p;o iindt ear= p 0 ; i a p i=c c0 xi1 0d: 0=x
f0fif0fdf f
rf=a ci2n0s50btd10

furcaimnet ipsotionrtuecrt n p o i i n t o=n e0rx 1=0 :
00xxfpfof88ifnf:f0ftaecr2 0=5 b0ex0x
lfi8m0dfef fsfefgfmfe8nxt0 f 4=2 0bfafsfe9 60fxf0f,f
t i0t6 20sx1fbf3ftfafc,6
pyspket a0 xc1kb
p o i o=i nDtPnLe r0 , p r e s t1e,r l o n g
1 ,= d0 xf 312 00:, 0gxrfafnf f1f
=: 0ixnftxe1sfs0ofra ce2f0lfabgds0
r efrfrfufprta femneafbfl epdf,a oIciOnP2Lt 2=8 b0e
r3c0u r
e n tf rp r oac emses == 100x (pi1dolien:t
0c:p0ue3r)
[thread pid 10 tid 100003 ]
Stopped at acpi_cpu_c1+0x6: leave
db> bt
Tracing pid 10 tid 100003 td 0xffffff017f61f560
acpi_cpu_c1() at acpi_cpu_c1+0x6
acpi_cpu_idle() at acpi_cpu_idle+0x180
cpu_idle() at cpu_idle+0x29
idle_proc() at idle_proc+0x85
fork_exit() at fork_exit+0xcf
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xffffffffac205d40, rbp = 0 ---
db>

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



Relevant Pages

  • input method on fc3?
    ... FC3 and soundcard ... >> without problems and sound works fine. ... What modules were loaded with kernel ... I can install and configure samba on Linux as easily as I can install ...
    (Fedora)
  • Fedora Core 2, Averatec 3220 notebook
    ... I recently bought an Averatec 3220 notebook computer and have spent some ... Following is a detailed "howto" guide for installing Linux (Fedora Core ... Linux distro, which is easy to install and use, and for lots of answers ... We need one because the default Fedora Core kernel doesn't grok NTFS ...
    (Fedora)
  • Re: Person new to FreeBSD needs help...
    ... It comes up when the system can't find a bootable kernel; ... It sounds like it's a pretty cut and dried install. ... Person new to FreeBSD needs help... ... > out what is going wrong, but it wasn't far from "unable to load ...
    (freebsd-questions)
  • Yum upgrade from F8 to F9 with KDE desktop - installation notes
    ... nVidia drivers from Freshrpms, and I had to install the latest nVidia driver ... kernel in step 5; once I did that, the dkms package (which gets installed from ... Use your preferred method to install the above file: ...
    (Fedora)
  • Yum upgrade from F8 to F8 with KDE desktop - installation notes
    ... nVidia drivers from Freshrpms, and I had to install the latest nVidia driver ... kernel in step 5; once I did that, the dkms package (which gets installed from ... relevant info to do a yum upgrade a bit daunting. ... Use your preferred method to install the above file: ...
    (Fedora)