Differences
This shows you the differences between two versions of the page.
projects:gpio-bb:raspbian [2016/07/21 18:41] 127.0.0.1 external edit |
projects:gpio-bb:raspbian [2022/08/01 13:59] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== GPIO bit-bang driver for Raspbian ==== | ||
- | |||
- | === Kernel Config === | ||
- | |||
- | Determine the running kernel and its config on the Raspberry Pi target machine. | ||
- | < | ||
- | uname -a | ||
- | Linux pi3 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux | ||
- | zgrep "* firmware as of" / | ||
- | 53d1ae311226b5c | ||
- | zcat / | ||
- | </ | ||
- | |||
- | Examples. | ||
- | < | ||
- | Linux pi3 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/ | ||
- | Linux pi3 3.10.23+ #608 PREEMPT Mon Dec 9 21:11:23 GMT 2013 armv6l GNU/ | ||
- | Linux pi3 3.10.24+ #614 PREEMPT Thu Dec 19 20:38:42 GMT 2013 armv6l GNU/Linux c32bc633039cd9 | ||
- | Linux pi3 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/ | ||
- | Linux pi3 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/ | ||
- | </ | ||
- | |||
- | === Kernel Hash === | ||
- | |||
- | Determine the kernel hash for the firmware. | ||
- | < | ||
- | wget -q https:// | ||
- | cat / | ||
- | 94a382fed1a5ec303eef9e1f3439df8f759ba60c | ||
- | </ | ||
- | |||
- | Examples. | ||
- | < | ||
- | 3.6.11+ | ||
- | 3.10.23+ 9d34d0475f9 | ||
- | 3.10.24+ c32bc633039cd9 | ||
- | 3.10.25+ 030082b403b | ||
- | 3.12.28+ 53d1ae311226b5c 94a382fed1a5ec303eef9e1f3439df8f759ba60c | ||
- | </ | ||
- | |||
- | === Build === | ||
- | |||
- | On the build host fetch the raspberry pi build tools. | ||
- | < | ||
- | mkdir -p / | ||
- | cd / | ||
- | git clone git:// | ||
- | </ | ||
- | |||
- | Fetch the kernel source for the previously determined hash. | ||
- | < | ||
- | rm -Rf / | ||
- | cd / | ||
- | git clone https:// | ||
- | cd / | ||
- | git checkout 94a382fed1a5ec303eef9e1f3439df8f759ba60c | ||
- | git reset --hard | ||
- | </ | ||
- | |||
- | Prepare to build kernel and copy over configuration. | ||
- | < | ||
- | make ARCH=arm mrproper | ||
- | scp pi@pi: | ||
- | </ | ||
- | |||
- | Build the kernel using the raspberry pi build tools. | ||
- | < | ||
- | make ARCH=arm oldconfig | ||
- | make ARCH=arm CROSS_COMPILE=/ | ||
- | </ | ||
- | |||
- | Build the GPIO bit-bang module and copy to target machine. | ||
- | < | ||
- | hg clone http:// | ||
- | cd gpio-bb/ | ||
- | make | ||
- | scp ../ | ||
- | </ | ||
- | |||
- | === Install === | ||
- | |||
- | Install the module on the Raspberry Pi target machine (Eg. 3.12.28+). | ||
- | < | ||
- | mkdir -p / | ||
- | cp gpio-bb.ko / | ||
- | chown -R 0:0 / | ||
- | depmod -a | ||
- | </ | ||
- | |||
- | === Modprobe === | ||
- | |||
- | Load modules on target machine. | ||
- | < | ||
- | / | ||
- | install gpio-bb modprobe --ignore-install gpio-bb && modprobe gpio-bb && mknod / | ||
- | </ | ||
- | |||
- | < | ||
- | modprobe gpio-bb | ||
- | </ | ||