Difference between revisions of "Kernel-modules"

From Bashlinux
Jump to: navigation, search
(Redirected page to Modules)
 
Line 1: Line 1:
  +
#REDIRECT [[Modules]]
__NOTOC__
 
= Kernel module drivers =
 
== How to load Apple System Management Controller (applesmc) ==
 
 
The applesmc module allows to monitor the temperature on Macmini terminals and set/get the fan speed in order to control the temperature.
 
 
The rpm available at Bashlinux repository includes the kernel module for CentOS and a service daemon which is monitoring the temperature and setting the fan speed.
 
 
To get the module working install the rpm from repository:
 
 
<pre><nowiki>
 
# yum -y install applesmc-utils
 
</nowiki></pre>
 
 
 
== How to enable direct hardware access for video cards (drm) ==
 
 
The drm module avilable at Bashlinux repo has been modified in order to create dri device for AGP card on CX700M2 chipset.
 
 
== How to enable the security hardware device on Dell servers (tpm) ==
 
 
The tpm module available at Bashlinux repo has been build from sources to setup the TPM chipset on Dell servers.
 
 
To build the module is necessary to enable it on kernel, one way to get this done is going to the kernel source folder, usually `/usr/src/linux` then run the config utility.
 
'''Useful Information'''
 
Please note that `ncurses-devel` must be installed to get menuconfig running.
 
 
 
<pre><nowiki>
 
# cd /usr/local/src
 
# make menuconfig
 
</nowiki></pre>
 
 
Select the TPM device driver under ''Device Drivers > Character devices > TPM devices''
 
 
<pre><nowiki>
 
# make modules
 
</nowiki></pre>
 
 
 
== How to enable USB printers (usblp) ==
 
The usblp module available at Bashlinux repo has been modified in order to create a usblp device for USB printer Epson M129 series.
 
 
The patch is based on kernel 2.6.21
 
 
<pre><nowiki>
 
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
 
index 63e50a1..6584cf0 100644
 
--- a/drivers/usb/class/usblp.c
 
+++ b/drivers/usb/class/usblp.c
 
@@ -202,6 +202,7 @@ struct quirk_printer_struct {
 
 
#define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */
 
#define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
 
+#define USBLP_QUIRK_BAD_CLASS 0x4 /* descriptor uses vendor-specific Class or SubClass */
 
 
static const struct quirk_printer_struct quirk_printers[] = {
 
{ 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
 
@@ -218,6 +219,7 @@ static const struct quirk_printer_struct quirk_printers[] = {
 
{ 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
 
{ 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
 
{ 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <[email protected]> */
 
+ { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt Printer M129C */
 
{ 0, 0 }
 
};
 
 
@@ -1048,7 +1050,8 @@ static int usblp_select_alts(struct usblp *usblp)
 
ifd = &if_alt->altsetting[i];
 
 
if (ifd->desc.bInterfaceClass != 7 || ifd->desc.bInterfaceSubClass != 1)
 
- continue;
 
+ if (!(usblp->quirks & USBLP_QUIRK_BAD_CLASS))
 
+ continue;
 
 
if (ifd->desc.bInterfaceProtocol < USBLP_FIRST_PROTOCOL ||
 
ifd->desc.bInterfaceProtocol > USBLP_LAST_PROTOCOL)
 
@@ -1232,6 +1235,7 @@ static struct usb_device_id usblp_ids [] = {
 
{ USB_INTERFACE_INFO(7, 1, 1) },
 
{ USB_INTERFACE_INFO(7, 1, 2) },
 
{ USB_INTERFACE_INFO(7, 1, 3) },
 
+ { USB_DEVICE(0x04b8, 0x0202) }, /* Seiko Epson Receipt Printer M129C */
 
{ } /* Terminating entry */
 
};
 
</nowiki></pre>
 
 
 
== How to enable keyboard emulation (kbde) ==
 
Keyboard emulation is done by installing kbde-driver, it will read all the keystokes send to `/dev/kbde`. There is also a package that convert ascii char to keystroke.
 
 
To have both on system just install the proper RPMs:
 
 
<pre><nowiki>
 
yum -y install kbde-driver kbde
 
</nowiki></pre>
 
 
 
== Macros and variables ==
 
Some macros and variable names that are being renamed
 
* 2.6.35
 
 
<pre><nowiki>
 
usb_buffer_alloc => usb_alloc_coherent
 
usb_buffer_free => usb_free_coherent
 
</nowiki></pre>
 

Latest revision as of 03:24, 11 June 2015

Redirect to: