README 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Copyright 2013 Google Inc. All Rights Reserved. */
  2. -- BUILD --
  3. You need a fully configured kernel source tree in order to build the
  4. driver. Please set the location of the kernel tree in the Makefile (KDIR).
  5. If you want some extra debug information in the kernel logs, you could
  6. define the HANTRODEC_DEBUG but please be aware that allot of things are traced
  7. with this option.
  8. Also you could set a particular device MAJOR in the 'hantrodec.c' if you don't want
  9. dynamic allocation.
  10. Just run in this dir:
  11. %make
  12. -- USAGE --
  13. The parameters that can be set when loading the driver are the HW IO base
  14. address and the assigned IRQ number.
  15. First of all the module has to be inserted into the kernel with:
  16. (you need a Linux shell cmd line)
  17. %insmod hantrodec.o base_port=<baseaddress> irq=<irq number> pcie=<pcie_enabled>
  18. Set the correct values for the HW IO base address and the IRQ number if
  19. the default values compiled into the module are not valid.
  20. E.g., to disable PCIE mode:
  21. %insmod hantrodec.o pcie=0 base_port=<baseaddress> irq=<irq number>
  22. E.g., to enable vcmd mode:
  23. %insmod hantrodec.o vcmd=1
  24. Second of all a char device file has to be created:
  25. %mknod /dev/hantrodec c <MAJOR> 0
  26. Replace MAJOR with the correct value (i.e. read /proc/devices to found out
  27. the exact values).
  28. Make sure that you have RW rights for the newly created dev file (use 'chmod').
  29. The 'driver_load' script is provided for preparing all the things necessary for
  30. the driver to be usable. The script is using 'awk' to retrieve the device's
  31. major from /proc/devices. Remember to set the driver parameters.