From e8d58105f208fef92425fd0e29624907d9a0b336 Mon Sep 17 00:00:00 2001 From: wismna Date: Thu, 2 Mar 2017 14:51:53 -0500 Subject: [PATCH] Rename modules/readme.md to buildmodule.md --- buildmodule.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 buildmodule.md diff --git a/buildmodule.md b/buildmodule.md new file mode 100644 index 0000000..0ff56d1 --- /dev/null +++ b/buildmodule.md @@ -0,0 +1,24 @@ +

Build your own kernel module

+ +If your Raspberry Pi kernel is of a different version that the prebuilt modules present in this repository, here's how you can build your own. + +
    +
  1. Use this program to download the correct Raspberry Pi kernel source:
    + sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-update
  2. +
  3. + Get the kernel source:
    + rpi-source
    + If there are errors, be sure to check rpi-source's wiki for help +
  4. +
  5. + Patch the kernel module using the patch file from my repository:
    + cd ~/linux/drivers/usb/dwc2 + patch -i ~/HackPi/gadget.patch +
  6. +
  7. + Build the module:
    + cd ~/linux
    + make M=drivers/usb/dwc2 CONFIG_USB_DWC2=m +
  8. +
  9. Your module dwc2.ko should now be present in ~/linux/drivers/usb/dwc2
  10. +