New package: Drivers for TBS devices

31 views
Skip to first unread message

Johannes Schwanzer

unread,
Apr 6, 2012, 4:50:36 PM4/6/12
to de...@geexbox.org
Hi folks,

finally done with the new TBS drivers package.
Should work for all recent TBS DVBx devices, no matter if card or usb box.
But tested only with a TBS 6922 PCIe card for DVB-S2.

The main issue was to have a package which does not disturb the modules which came with the kernel to be able to install or uninstall it via the package manager opkg.

This is achieved by not overwriting the original kernel modules (like the drivers package from TBS does by using "makeᅵ install"), but copy all related driver modules in
/lib/modules/$(kernel-version)/$VENDOR

in this case for TBS drivers:
/lib/modules/$(kernel-version)/tbs

The tbs modules are copied "flat" to this directory, cause any sub-dir architecture is not needed.
After that copy procedure one only needs to execute depmod -> and done.

This package depends on the "new" depmod from the patch of Tom. It does not work with busybox's depmod.
Just to explain: i use a postinst and postrm script within the opkg package with runs depmod after install or remove.


BTW:
There is no depmod needed to run from the "tbs-drivers/install" script, cause a "make" on openbrick base dir will anyway call a depmod from the "rootfs" script.
If one is only creating this tbs driver package to add it manually to a geexbox then the depmod will be run in the postinst script from package manager.

BTW2:
The part of the "rootfs" script which runs the depmod on the rootfs (as you all might know) is:
# create kernel modules dependancies
if [ "$DEPMOD" = yes ]; then
ᅵ $SCRIPTS/installdev module-init-tools
ᅵ VER=$(kernel_version)
ᅵ rm -f $INSTALL/lib/modules/$VER/modules.*
ᅵ $ROOT/$TOOLCHAIN/bin/depmod -b $INSTALL -v $VER > /dev/null
ᅵ for i in `ls $INSTALL/lib/modules/$VER/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do
ᅵᅵᅵ rm -f $i
ᅵ done
fi


The line
$ROOT/$TOOLCHAIN/bin/depmod -b $INSTALL -v $VER > /dev/null

is a bid missleading cause one could think that the parameter "-v" is used together with "$VER".
But "-v" is, as nearly always, only the verbose switch, which is not needed in this case if you send the output to /dev/null.






tbs-drivers.diff
Reply all
Reply to author
Forward
0 new messages