Help in compiling/linking a DEVICE DRIVER in SOLARIS10 x86
hello!
PROBLEM:
++++++++++++++++++++++++++++++++++
i need assistance in compiling/linking a video capture
driver (bt848x) (http://bt848x.sourceforge.net/) for
solaris 10 x86.
the driver uses the /usr/lib/libc.a (specifically the _xtoll.o)
which, if im not mistaken, is not available in solaris 10
anymore. so how am i going to compile it?
BACKGROUND:
++++++++++++++++++++++++++++++++++
the original compile/link code in the makefile is:
/usr/ccs/bin/ld -o bt848x -r bt848-cards.o bt848-driver.o
bt848-kern.o i2c.o tuner.o sound-tda9875.o
sound-msp3400.o _xtoll.o
i modified it to:
/usr/ccs/bin/ld -o bt848x bt848-cards.o bt848-driver.o
bt848-kern.o i2c.o tuner.o sound-tda9875.o
sound-msp3400.o -L/usr/lib -lc
(NOTE: i removed the -r and _xtoll.o; and added
-L/usr/lib -lc)
the output was:
Undefined first referenced
symbol __ in file
mod_install bt848-kern.o
delaybt848-cards.o
ddi_get_instancebt848-kern.o
nodevbt848-kern.o
ddi_create_minor_nodebt848-kern.o
ddi_regs_map_freebt848-kern.o
pci_config_getw bt848-driver.o
pci_config_getb bt848-driver.o
ddi_soft_state_zallocbt848-kern.o
ddi_dma_unbind_handlebt848-kern.o
kmem_alloc i2c.o
cv_broadcastbt848-driver.o
ddi_remove_intr bt848-kern.o
ddi_get_soft_statebt848-kern.o
mod_driveropsbt848-kern.o
ddi_get_lboltbt848-cards.o
mutex_tryenter bt848-kern.o
ddi_get_iblock_cookiebt848-kern.o
nochpollbt848-kern.o
ddi_copyin bt848-kern.o
mod_infobt848-kern.o
ddi_remove_minor_nodebt848-kern.o
nulldevbt848-kern.o
ddi_dma_syncbt848-driver.o
ddi_dma_addr_bind_handlebt848-kern.o
mod_remove bt848-kern.o
ddi_prop_lookup_int_arraybt848-cards.o
_pagesizebt848-driver.o
ddi_prop_op bt848-kern.o
ddi_dma_free_handlebt848-kern.o
ddi_set_driver_private bt848-kern.o
cv_wait_sig bt848-kern.o
ddi_intr_hilevelbt848-kern.o
ddi_regs_map_setupbt848-kern.o
pci_config_teardownbt848-driver.o
ddi_dma_mem_allocbt848-kern.o
ddi_copyout bt848-kern.o
cmn_errbt848-cards.o
ddi_dma_alloc_handlebt848-kern.o
ddi_prop_exists bt848-cards.o
cv_initbt848-kern.o
pci_config_setupbt848-driver.o
cv_destroy bt848-kern.o
timeoutsound-msp3400.o
untimeoutsound-msp3400.o
devmap_umem_setupbt848-kern.o
ddi_prop_get_intbt848-kern.o
uiomovebt848-kern.o
kmem_freei2c.o
ddi_add_intrbt848-kern.o
ddi_report_dev bt848-kern.o
getminorbt848-kern.o
mutex_exit bt848-driver.o
ddi_prop_freebt848-cards.o
ddi_soft_state_finibt848-kern.o
ddi_soft_state_freebt848-kern.o
ddi_soft_state_initbt848-kern.o
mutex_enter bt848-driver.o
ddi_mem_putlbt848-cards.o
ddi_mem_getlbt848-cards.o
drv_usecwaitbt848-cards.o
drv_usectohzbt848-cards.o
ddi_dma_mem_freebt848-kern.o
ld: fatal: Symbol referencing errors. No output written to bt848x
QUESTIONS:
++++++++++++++++++++++++++++++++++
1.) What other libraries do i need to include so that
there would no more "symbol referencing errors" ?
2.) Is my linking code correct?
/usr/ccs/bin/ld -o bt848x bt848-cards.o bt848-driver.o
bt848-kern.o i2c.o tuner.o sound-tda9875.o
sound-msp3400.o -L/usr/lib -lc
i mean, is it ok to build a driver with dynamic libraries?
or the device driver should always be statically linked?
COMPUTER SPECS:
++++++++++++++++++++++++++++++++++
Solaris 10 (6/06 release)
SunOS 5.10 Generic_118844-26 i86pc i386 i86pc
Pentium 4 - 1.4GHz
1GB RDRAM
32 BIT
Video Capture Card: PixelView PV-BT878P+FM.RC (rev.9F)
thanks!!!
-kllc

