Skip to content

Commit

Permalink
compatibility with 3.18
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalLumberjack committed Jan 28, 2015
1 parent 03507db commit b62843a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 37 deletions.
23 changes: 13 additions & 10 deletions README.md
Expand Up @@ -11,6 +11,10 @@ So i started to wire my joysticks and buttons to my raspberry pi, and I wrote th

However, the Raspberry Pi Board B Rev 2 has a maximum of 21 usable GPIOs, not enough to wire all the 28 switches (2 joystick and 20 buttons) that a standard panel requires.

UPDATE 0.1.3 : Compatibilyty with 3.18.3 :

As the module will not load with recent kernel and headers, we add the possibility of downgrading your firmware to a compatible version, until we find a fix.

UPDATE 0.1.2 : Downgrade to 3.12.28+ :

As the module will not load with recent kernel and headers, we add the possibility of downgrading your firmware to a compatible version, until we find a fix.
Expand Down Expand Up @@ -69,13 +73,12 @@ Download the installation script :
```shell
mkdir mkjoystick
cd mkjoystick
wget https://github.com/digitalLumberjack/mk_arcade_joystick_rpi/releases/download/0.1.2/install.sh
wget https://github.com/digitalLumberjack/mk_arcade_joystick_rpi/releases/download/0.1.3/install.sh
```

As the last kernel headers and firmware make the module incompatible, we are searching a solution.
Until then, you will have to install the 3.12.28+ kernel with :
Update your system :
```shell
sudo sh ./install.sh installKernel
sudo sh ./install.sh updateSystem
sudo reboot
```

Expand All @@ -89,11 +92,11 @@ Now jump to [Loading the driver](#loading-the-driver)


### Manual Installation ###
You need to have a system with 3.12.28+ kernel (we're fixing that):
Update system :
```shell
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update de69b134dc6e4066fe70db29816d57895dffd9b9
sudo rpi-update
```


Expand All @@ -111,16 +114,16 @@ sudo rm linux-headers-`uname -r`_`uname -r`-2_armhf.deb

3 - Install driver from release (prefered):
```shell
wget https://github.com/digitalLumberjack/mk_arcade_joystick_rpi/releases/download/v0.1.2/mk-arcade-joystick-rpi-0.1.2.deb
sudo dpkg -i mk-arcade-joystick-rpi-0.1.1.deb
wget https://github.com/digitalLumberjack/mk_arcade_joystick_rpi/releases/download/v0.1.3/mk-arcade-joystick-rpi-0.1.3.deb
sudo dpkg -i mk-arcade-joystick-rpi-0.1.3.deb
```

3bis- (Alternative option) Install driver from sources :
```shell
sudo git clone https://github.com/digitalLumberjack/mk_arcade_joystick_rpi.git
cd mk_arcade_joystick_rpi
./utils/makepackage.sh 0.1.1
sudo dpkg -i build/mk-arcade-joystick-rpi-0.1.1.deb
./utils/makepackage.sh 0.1.3
sudo dpkg -i build/mk-arcade-joystick-rpi-0.1.3.deb
```

### Loading the driver ###
Expand Down
49 changes: 22 additions & 27 deletions utils/install.sh
Expand Up @@ -2,39 +2,34 @@

if [ "$1" = "updatesystem" ]
then
echo "update system break module compatibily, use ./install.sh installKernel "
exit 0
sudo apt-get update
sudo apt-get upgrade -y
sudo rpi-update
echo "Updating system"
sudo apt-get update ||
{ echo "ERROR : Unable to apt-get update" && exit 1 ;}
sudo apt-get upgrade -y ||
{ echo "ERROR : Unable to apt-get upgrade" && exit 1 ;}
sudo rpi-update ||
{ echo "ERROR : Unable to updta the firmware" && exit 1 ;}
echo "Please reboot if the message above asks for it"
elif [ "$1" = "installKernel" ]; then
echo "will install the last compatible kernel : 3.12.28+"
sudo apt-get update
sudo apt-get upgrade -y
sudo rpi-update de69b134dc6e4066fe70db29816d57895dffd9b9
echo "Please reboot if the message above asks for it"

else
echo "Installing required dependencies"
sudo apt-get install -y --force-yes dkms cpp-4.7 gcc-4.7 git joystick
sudo apt-get install -y --force-yes dkms cpp-4.7 gcc-4.7 git joystick ||
{ echo "ERROR : Unable to install required dependencies" && exit 1 ;}
echo "Downloading current kernel headers"
wget http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-`uname -r`_`uname -r`-2_armhf.deb
wget http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-`uname -r`_`uname -r`-2_armhf.deb ||
{ echo "ERROR : Unable to find kernel headers" && exit 1 ;}
echo "Installing current kernel headers"
sudo dpkg -i linux-headers-`uname -r`_`uname -r`-2_armhf.deb
sudo dpkg -i linux-headers-`uname -r`_`uname -r`-2_armhf.deb ||
{ echo "ERROR : Unable to install kernel headers" && exit 1 ;}
rm linux-headers-`uname -r`_`uname -r`-2_armhf.deb
echo "Downloading mk_arcade_joystick_rpi 0.1.1"
wget https://github.com/digitalLumberjack/mk_arcade_joystick_rpi/releases/download/0.1.1/mk-arcade-joystick-rpi-0.1.1.deb
echo "Installing mk_arcade_joystick_rpi 0.1.1"
sudo dpkg -i mk-arcade-joystick-rpi-0.1.1.deb
if [ "$?" -eq "0" ]
then
echo "Installation OK"
echo "Load the module with 'sudo modprobe mk_arcade_joystick_rpi map=1' for 1 joystick"
echo "or with 'sudo modprobe mk_arcade_joystick_rpi map=1,2' for 2 joysticks"
echo "See https://github.com/digitalLumberjack/mk_arcade_joystick_rpi#loading-the-driver for more details"
else
echo "Something went wrong..."
fi
wget https://github.com/digitalLumberjack/mk_arcade_joystick_rpi/releases/download/0.1.1/mk-arcade-joystick-rpi-0.1.3.deb ||
{ echo "ERROR : Unable to find mk_arcade_joystick_package" && exit 1 ;}
echo "Installing mk_arcade_joystick_rpi 0.1.3"
sudo dpkg -i mk-arcade-joystick-rpi-0.1.3.deb ||
{ echo "ERROR : Unable to install mk_arcade_joystick_rpi" && exit 1 ;}
echo "Installation OK"
echo "Load the module with 'sudo modprobe mk_arcade_joystick_rpi map=1' for 1 joystick"
echo "or with 'sudo modprobe mk_arcade_joystick_rpi map=1,2' for 2 joysticks"
echo "See https://github.com/digitalLumberjack/mk_arcade_joystick_rpi#loading-the-driver for more details"
fi

0 comments on commit b62843a

Please sign in to comment.