Differences

This shows you the differences between two versions of the page.

Link to this comparison view

projects:gpio-bb:raspbian [2014/12/29 18:08]
darron
projects:gpio-bb:raspbian [2022/08/01 13:59]
Line 1: Line 1:
-==== GPIO bit-bang driver for Raspbian ==== 
  
-== Determine the running kernel and it's config on the Raspberry Pi target machine == 
-<code> 
-uname -a 
-Linux pi3 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux 
-zgrep "* firmware as of" /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | head -1 | awk '{ print $5 }' 
-53d1ae311226b5c 
-zcat /proc/config.gz > 53d1ae311226b5c.config 
-</code> 
- 
-== Examples == 
-<code> 
-Linux pi3 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux  d4f5315cfac4e 
-Linux pi3 3.10.23+ #608 PREEMPT Mon Dec 9 21:11:23 GMT 2013 armv6l GNU/Linux  9d34d0475f9 
-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  030082b403b 
-Linux pi3 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux  53d1ae311226b5c 
-</code> 
- 
-== Determine the kernel hash for this firmware == 
-<code> 
-wget -q https://raw.github.com/raspberrypi/firmware/53d1ae311226b5c/extra/git_hash -O /tmp/hash 
-cat /tmp/hash  
-94a382fed1a5ec303eef9e1f3439df8f759ba60c 
-</code> 
- 
-== Examples == 
-<code> 
-3.6.11+  d4f5315cfac4e   1587f775d0a3c437485262ba951afc5e30be69fa 
-3.10.23+ 9d34d0475f9     c15430e6a01e1332032d83f6484a866504e8ee97 
-3.10.24+ c32bc633039cd9  4bbea92eae6c0792e85a4ba079d367ac6aa77fb5 
-3.10.25+ 030082b403b     16eb921a96db3dc3555a65b53b99c15753e6b770 
-3.12.28+ 53d1ae311226b5c 94a382fed1a5ec303eef9e1f3439df8f759ba60c 
-</code> 
- 
-== On the build host fetch the kernel build tools == 
- 
-<code> 
-mkdir -p /embedded/raspbian/build/ 
-cd /embedded/raspbian/build/ 
-git clone git://github.com/raspberrypi/tools.git 
-</code> 
- 
-== Fetch the kernel source for the previously determined hash == 
- 
-<code> 
-cd /embedded/raspbian/build/ 
-rm -Rf /embedded/raspbian/build/linux 
-git clone https://github.com/raspberrypi/linux.git 
-cd /embedded/raspbian/build/linux/ 
-git checkout 94a382fed1a5ec303eef9e1f3439df8f759ba60c 
-git reset --hard 
-</code> 
- 
-== Prepare to build kernel and copy over configuration == 
-<code> 
-make ARCH=arm mrproper 
-scp pi@pi:53d1ae311226b5c.config .config 
-</code> 
- 
-== Build the kernel using the cross compiler tools == 
- 
-<code> 
-make ARCH=arm oldconfig 
-make ARCH=arm CROSS_COMPILE=/embedded/raspbian/build/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi- -j 8 
-</code> 
- 
-== Build the gpio bit-bang module from the k8048 build directory and copy to target machine == 
- 
-<code> 
-cd $HOME/k8048/Src/gpio-bb/raspbian 
-make  
-scp ../module/src/gpio-bb.ko pi@pi: 
-</code> 
- 
-== Install the module on the Raspberry Pi target machine (Eg. 3.12.28+) == 
- 
-<code> 
-mkdir -p /lib/modules/3.12.28+/kernel/local/ 
-cp gpio-bb.ko /lib/modules/3.12.28+/kernel/local/ 
-chown -R 0:0 /lib/modules/3.12.28+/kernel/local/ 
-depmod -a 
-</code> 
- 
-== Load modules on target machine == 
- 
-<code> 
-/etc/modprobe.d/modprobe.conf: 
-install gpio-bb modprobe --ignore-install gpio-bb && modprobe gpio-bb && mknod /dev/gpio-bb c 180 0 
-</code> 
- 
-<code> 
-modprobe gpio-bb 
-</code>