12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- -- BUILD --
- You need a fully configured kernel source tree in order to build the
- driver. Please set the location of the kernel tree in the Makefile (KDIR).
- If you want some extra debug information in the kernel logs, you could
- define the HX280ENC_DEBUG but please be aware that allot of things are traced
- with this option.
- Also you could set a particular device MAJOR in the 'hx280enc.c' if you don't want
- dynamic allocation.
- Just run in this dir:
- %make
- If you want to install the modules please check first the install destination
- in the Makefile (MDIR, DEST) and run:
- %make install
- -- USAGE --
- Run script driver_load.sh to do all the things described below.
- > sh driver_load.sh base_port=0xc0000000 irq=30
- The parameters that can be set when loading the driver are the HW IO base
- address and the assigned IRQ number. The default values are:
- base_port=0xc0000000 and irq=30
- First of all the module has to be inserted into the kernel with:
- (you need a Linux shell cmd line)
- %insmod hx280enc.o base_port=0xc0000000 irq=30
- Set the correct values for the HW IO base address and the IRQ number if
- the default values compiled into the module are not valid.
- Second of all a char device file has to be created:
- %mknod /tmp/dev/hx280 c 254 0
- Replace MAJOR = 254 with the correct value (i.e. read /proc/devices to find out
- the exact value).
- Make sure that you have RW rights for the newly created dev file (use 'chmod').
- The 'driver_load' script is provided for preparing all the things necessary for
- the driver to be usable. The script is using 'cat' to retrieve the device's
- major from /proc/devices. Remember to set the driver parameters.
|