Voici un aperçu de l’installation de vscp_software sur un Raspberry Pi. Il s’appuie sur le tutoriel de mise en place du démon VSCP sous Unix . Je ne donne pas seulement les commandes, mais aussi la sortie détaillée de la plupart d’entre elles, alors graissez bien la molette de votre souris :-)
Mettre le système à jour#
Il faut d’abord s’assurer que tous les paquets installés sur le système sont à jour. Pour cela, on lance sudo apt-get update pour mettre à jour la liste et l’état des paquets, puis sudo apt-get upgrade pour mettre à niveau ceux qui ont une version plus récente.
root@raspberrypi:~# apt-get update
Get:1 http://raspberrypi.collabora.com wheezy Release.gpg [836 B]
Get:2 http://vontaene.de . Release.gpg [198 B]
Get:3 http://archive.raspberrypi.org wheezy Release.gpg [490 B]
Get:4 http://mirrordirector.raspbian.org wheezy Release.gpg [490 B]
Get:5 http://www.linux-projects.org wheezy Release.gpg [198 B]
Get:6 http://archive.raspbian.org wheezy Release.gpg [490 B]
Hit http://vontaene.de . Release
Get:7 http://raspberrypi.collabora.com wheezy Release [7,514 B]
Get:8 http://www.linux-projects.org wheezy Release [924 B]
Get:9 http://archive.raspberrypi.org wheezy Release [10.2 kB]
Get:10 http://mirrordirector.raspbian.org wheezy Release [14.4 kB]
Get:11 http://archive.raspbian.org wheezy Release [14.4 kB]
Ign http://vontaene.de . Release
Get:12 http://raspberrypi.collabora.com wheezy/rpi armhf Packages [2,214 B]
Get:13 http://www.linux-projects.org wheezy/main armhf Packages [1,697 B]
Hit http://vontaene.de ./main armhf Packages
Ign http://vontaene.de ./main Translation-en_GB
Get:14 http://archive.raspberrypi.org wheezy/main armhf Packages [108 kB]
Ign http://vontaene.de ./main Translation-en
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en_GB
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en
Get:15 http://archive.raspbian.org wheezy/main Sources [6,080 kB]
Ign http://www.linux-projects.org wheezy/main Translation-en_GB
Ign http://www.linux-projects.org wheezy/main Translation-en
Get:16 http://mirrordirector.raspbian.org wheezy/main armhf Packages [6,896 kB]
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Get:17 http://archive.raspbian.org wheezy/contrib Sources [53.2 kB]
Get:18 http://archive.raspbian.org wheezy/non-free Sources [98.5 kB]
Get:19 http://archive.raspbian.org wheezy/main armhf Packages [6,896 kB]
Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Get:20 http://archive.raspbian.org wheezy/contrib armhf Packages [23.6 kB]
Get:21 http://archive.raspbian.org wheezy/non-free armhf Packages [49.3 kB]
Ign http://archive.raspbian.org wheezy/contrib Translation-en_GB
Ign http://archive.raspbian.org wheezy/contrib Translation-en
Ign http://archive.raspbian.org wheezy/main Translation-en_GB
Ign http://archive.raspbian.org wheezy/main Translation-en
Ign http://archive.raspbian.org wheezy/non-free Translation-en_GB
Ign http://archive.raspbian.org wheezy/non-free Translation-en
Fetched 20.3 MB in 3min 24s (99.1 kB/s)
Reading package lists... Done
W: GPG error: http://vontaene.de . Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F0DAA5410C667A3E
root@raspberrypi:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
epiphany-browser wolfram-engine
The following packages will be upgraded:
bind9-host cups-bsd cups-client cups-common dbus dbus-x11 e2fslibs e2fsprogs
libbind9-80 libcomerr2 libcups2 libcupsimage2 libdbus-1-3 libdbus-1-dev
libdns88 libisc84 libisccc80 libisccfg82 liblwres80 libraspberrypi-bin
libraspberrypi-dev libraspberrypi-doc libraspberrypi0 libsmbclient libss2
libwbclient0 omxplayer python-pifacecommon python-rpi.gpio
python3-pifacecommon python3-rpi.gpio raspberrypi-bootloader samba-common
smbclient sonic-pi sudo uv4l-raspicam xdg-utils xserver-common
xserver-xorg-core
40 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 127 MB of archives.
After this operation, 5,933 kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://archive.raspberrypi.org/debian/ wheezy/main omxplayer armhf 0.3.6~git20150210~337004e [3,576 kB]
Get:2 http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy/main uv4l-raspicam armhf 1.9.27 [1,377 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main e2fslibs armhf 1.42.5-1.1+deb7u1 [186 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main e2fsprogs armhf 1.42.5-1.1+deb7u1 [984 kB]
...
Installer vscp_software#
On commence par installer le paquet vscp_software. Il dépend de quelques autres paquets, que l’on installe donc d’abord.
Installer le paquet build-essential#
root@raspberrypi:~# apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Installer le paquet libwxbase3.0-dev#
Ce paquet n’est pas disponible dans les distributions standard, il faudra donc l’installer nous-mêmes.
Ajoutez d’abord cette ligne à votre fichier /etc/apt/sources.list :
deb http://ftp.de.debian.org/debian wheezy-backports main
Lancez ensuite sudo apt-get update pour mettre à jour la liste des paquets, afin qu’elle inclue les paquets de la source que nous venons d’ajouter.
Lancez ensuite apt-get install libwxbase3.0 pour installer le paquet.
root@raspberrypi:~# apt-get install libwxbase3.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libwxbase3.0-dev' for regex 'libwxbase3.0'
Note, selecting 'libwxbase3.0-0' for regex 'libwxbase3.0'
Note, selecting 'libwxbase3.0-0-dbg' for regex 'libwxbase3.0'
The following extra packages will be installed:
wx3.0-headers
Suggested packages:
wx3.0-doc
The following NEW packages will be installed:
libwxbase3.0-0 libwxbase3.0-0-dbg libwxbase3.0-dev wx3.0-headers
0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
Need to get 14.3 MB of archives.
After this operation, 21.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
libwxbase3.0-0 wx3.0-headers libwxbase3.0-dev libwxbase3.0-0-dbg
Install these packages without verification [y/N]? Y
Get:1 http://ftp.de.debian.org/debian/ wheezy-backports/main libwxbase3.0-0 armhf 3.0.2-1~bpo70+1 [1,152 kB]
Get:2 http://ftp.de.debian.org/debian/ wheezy-backports/main wx3.0-headers armhf 3.0.2-1~bpo70+1 [1,517 kB]
Get:3 http://ftp.de.debian.org/debian/ wheezy-backports/main libwxbase3.0-dev armhf 3.0.2-1~bpo70+1 [135 kB]
Get:4 http://ftp.de.debian.org/debian/ wheezy-backports/main libwxbase3.0-0-dbg armhf 3.0.2-1~bpo70+1 [11.5 MB]
Fetched 14.3 MB in 9s (1,571 kB/s)
Selecting previously unselected package libwxbase3.0-0:armhf.
(Reading database ... 101119 files and directories currently installed.)
Unpacking libwxbase3.0-0:armhf (from .../libwxbase3.0-0_3.0.2-1~bpo70+1_armhf.deb) ...
Selecting previously unselected package wx3.0-headers.
Unpacking wx3.0-headers (from .../wx3.0-headers_3.0.2-1~bpo70+1_armhf.deb) ...
Selecting previously unselected package libwxbase3.0-dev.
Unpacking libwxbase3.0-dev (from .../libwxbase3.0-dev_3.0.2-1~bpo70+1_armhf.deb) ...
Selecting previously unselected package libwxbase3.0-0-dbg:armhf.
Unpacking libwxbase3.0-0-dbg:armhf (from .../libwxbase3.0-0-dbg_3.0.2-1~bpo70+1_armhf.deb) ...
Setting up libwxbase3.0-0:armhf (3.0.2-1~bpo70+1) ...
Setting up wx3.0-headers (3.0.2-1~bpo70+1) ...
Setting up libwxbase3.0-dev (3.0.2-1~bpo70+1) ...
update-alternatives: using /usr/lib/arm-linux-gnueabihf/wx/config/base-unicode-3.0 to provide /usr/bin/wx-config (wx-config) in auto mode
Setting up libwxbase3.0-0-dbg:armhf (3.0.2-1~bpo70+1) ...
Pour plus de détails, consultez cette page sur packages.debian.org .
Installer le démon Telnet#
Le Raspberry Pi n’est pas livré par défaut avec un serveur Telnet, mais nous en aurons besoin pour nous connecter à l’interface d’administration de VSCP. Nous allons donc l’installer :
sudo apt-get install telnetd
root@raspberrypi:~/vscp_software# sudo apt-get install telnetd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
openbsd-inetd
The following NEW packages will be installed:
openbsd-inetd telnetd
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 77.4 kB of archives.
After this operation, 211 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main openbsd-inetd armhf 0.20091229-2 [36.1 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main telnetd armhf 0.17-36 [41.3 kB]
Fetched 77.4 kB in 0s (94.7 kB/s)
Selecting previously unselected package openbsd-inetd.
(Reading database ... 103101 files and directories currently installed.)
Unpacking openbsd-inetd (from .../openbsd-inetd_0.20091229-2_armhf.deb) ...
Selecting previously unselected package telnetd.
Unpacking telnetd (from .../telnetd_0.17-36_armhf.deb) ...
Processing triggers for man-db ...
Setting up openbsd-inetd (0.20091229-2) ...
Stopping internet superserver: inetd.
Not starting internet superserver: no services enabled.
Setting up telnetd (0.17-36) ...
Adding user telnetd to group utmp
Ensuite, on démarre le service Telnet :
sudo /etc/init.d/openbsd-inetd restart
root@raspberrypi:~/vscp_software# sudo /etc/init.d/openbsd-inetd restart
Restarting internet superserver: inetd.
root@raspberrypi:~/vscp_software#
Vérifions que le service Telnet tourne bien :
netstat -a | grep telnet
root@raspberrypi:~/vscp_software# netstat -a | grep telnet
tcp 0 0 *:telnet *:* LISTEN
Comme Telnet n’est pas sécurisé, il vaut mieux limiter qui peut accéder au RPi via Telnet. Vous pouvez le faire avec le fichier /etc/hosts.allow. Ajoutez une ligne comme celle-ci dans /etc/hosts.allow pour autoriser les machines de votre réseau local :
in.telnetd : 192.168.1. : allow
Installer divers autres paquets#
Lancez les commandes suivantes pour installer des paquets supplémentaires :
- sudo apt-get install libssl-dev
- sudo apt-get install libpcap0.8-dev
- sudo apt-get install libcurl4-openssl-dev
- sudo apt-get install libpcap-dev
Sortie :
root@raspberrypi:~# apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version.
libssl-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
root@raspberrypi:~# apt-get install libpcap0.8-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libpcap0.8
The following NEW packages will be installed:
libpcap0.8 libpcap0.8-dev
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 380 kB of archives.
After this operation, 829 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libpcap0.8 armhf 1.3.0-1 [135 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libpcap0.8-dev armhf 1.3.0-1 [245 kB]
Fetched 380 kB in 0s (609 kB/s)
Selecting previously unselected package libpcap0.8:armhf.
(Reading database ... 101887 files and directories currently installed.)
Unpacking libpcap0.8:armhf (from .../libpcap0.8_1.3.0-1_armhf.deb) ...
Selecting previously unselected package libpcap0.8-dev.
Unpacking libpcap0.8-dev (from .../libpcap0.8-dev_1.3.0-1_armhf.deb) ...
Processing triggers for man-db ...
Setting up libpcap0.8:armhf (1.3.0-1) ...
Setting up libpcap0.8-dev (1.3.0-1) ...
root@raspberrypi:~# apt-get install libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
comerr-dev krb5-multidev libgssrpc4 libidn11-dev libkadm5clnt-mit8
libkadm5srv-mit8 libkdb5-6 libkrb5-dev libldap2-dev libssh2-1-dev
Suggested packages:
doc-base krb5-doc libcurl3-dbg krb5-user
The following NEW packages will be installed:
comerr-dev krb5-multidev libcurl4-openssl-dev libgssrpc4 libidn11-dev
libkadm5clnt-mit8 libkadm5srv-mit8 libkdb5-6 libkrb5-dev libldap2-dev
libssh2-1-dev
0 upgraded, 11 newly installed, 0 to remove and 2 not upgraded.
Need to get 3,223 kB of archives.
After this operation, 6,656 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgssrpc4 armhf 1.10.1+dfsg-5+deb7u3 [80.0 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libkadm5clnt-mit8 armhf 1.10.1+dfsg-5+deb7u3 [62.9 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libkdb5-6 armhf 1.10.1+dfsg-5+deb7u3 [61.2 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libkadm5srv-mit8 armhf 1.10.1+dfsg-5+deb7u3 [76.8 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main comerr-dev armhf 2.1-1.42.5-1.1+deb7u1 [42.7 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ wheezy/main krb5-multidev armhf 1.10.1+dfsg-5+deb7u3 [155 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libidn11-dev armhf 1.25-2 [661 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libkrb5-dev armhf 1.10.1+dfsg-5+deb7u3 [40.5 kB]
Get:9 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libldap2-dev armhf 2.4.31-1+nmu2 [523 kB]
Get:10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libssh2-1-dev armhf 1.4.2-1.1 [300 kB]
Get:11 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libcurl4-openssl-dev armhf 7.26.0-1+wheezy12 [1,221 kB]
Fetched 3,223 kB in 2s (1,131 kB/s)
Selecting previously unselected package libgssrpc4:armhf.
(Reading database ... 101984 files and directories currently installed.)
Unpacking libgssrpc4:armhf (from .../libgssrpc4_1.10.1+dfsg-5+deb7u3_armhf.deb) ...
Selecting previously unselected package libkadm5clnt-mit8:armhf.
Unpacking libkadm5clnt-mit8:armhf (from .../libkadm5clnt-mit8_1.10.1+dfsg-5+deb7u3_armhf.deb) ...
Selecting previously unselected package libkdb5-6:armhf.
Unpacking libkdb5-6:armhf (from .../libkdb5-6_1.10.1+dfsg-5+deb7u3_armhf.deb) ...
Selecting previously unselected package libkadm5srv-mit8:armhf.
Unpacking libkadm5srv-mit8:armhf (from .../libkadm5srv-mit8_1.10.1+dfsg-5+deb7u3_armhf.deb) ...
Selecting previously unselected package comerr-dev.
Unpacking comerr-dev (from .../comerr-dev_2.1-1.42.5-1.1+deb7u1_armhf.deb) ...
Selecting previously unselected package krb5-multidev.
Unpacking krb5-multidev (from .../krb5-multidev_1.10.1+dfsg-5+deb7u3_armhf.deb) ...
Selecting previously unselected package libidn11-dev.
Unpacking libidn11-dev (from .../libidn11-dev_1.25-2_armhf.deb) ...
Selecting previously unselected package libkrb5-dev.
Unpacking libkrb5-dev (from .../libkrb5-dev_1.10.1+dfsg-5+deb7u3_armhf.deb) ...
Selecting previously unselected package libldap2-dev:armhf.
Unpacking libldap2-dev:armhf (from .../libldap2-dev_2.4.31-1+nmu2_armhf.deb) ...
Selecting previously unselected package libssh2-1-dev.
Unpacking libssh2-1-dev (from .../libssh2-1-dev_1.4.2-1.1_armhf.deb) ...
Selecting previously unselected package libcurl4-openssl-dev.
Unpacking libcurl4-openssl-dev (from .../libcurl4-openssl-dev_7.26.0-1+wheezy12_armhf.deb) ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Setting up libgssrpc4:armhf (1.10.1+dfsg-5+deb7u3) ...
Setting up libkadm5clnt-mit8:armhf (1.10.1+dfsg-5+deb7u3) ...
Setting up libkdb5-6:armhf (1.10.1+dfsg-5+deb7u3) ...
Setting up libkadm5srv-mit8:armhf (1.10.1+dfsg-5+deb7u3) ...
Setting up comerr-dev (2.1-1.42.5-1.1+deb7u1) ...
Setting up krb5-multidev (1.10.1+dfsg-5+deb7u3) ...
Setting up libidn11-dev (1.25-2) ...
Setting up libkrb5-dev (1.10.1+dfsg-5+deb7u3) ...
Setting up libldap2-dev:armhf (2.4.31-1+nmu2) ...
Setting up libssh2-1-dev (1.4.2-1.1) ...
Setting up libcurl4-openssl-dev (7.26.0-1+wheezy12) ...
root@raspberrypi:~# apt-get install libpcap-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libpcap-dev
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 22.2 kB of archives.
After this operation, 47.1 kB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libpcap-dev all 1.3.0-1 [22.2 kB]
Fetched 22.2 kB in 0s (60.3 kB/s)
Selecting previously unselected package libpcap-dev.
(Reading database ... 102888 files and directories currently installed.)
Unpacking libpcap-dev (from .../libpcap-dev_1.3.0-1_all.deb) ...
Setting up libpcap-dev (1.3.0-1) ...
Cloner le dépôt vscp_software avec Git#
Maintenant que les dépendances sont installées, on télécharge la dernière version du logiciel VSCP sur la machine avec Git.
Git est préinstallé sur la plupart des distributions pour Raspi, vous ne devriez donc pas avoir à l’installer. Lancez simplement git clone https://github.com/grodansparadis/vscp_software .
root@raspberrypi:~# git clone https://github.com/grodansparadis/vscp_software
Cloning into 'vscp_software'...
remote: Counting objects: 27347, done.
remote: Compressing objects: 100% (112/112), done.
remote: Total 27347 (delta 48), reused 0 (delta 0), pack-reused 27235
Receiving objects: 100% (27347/27347), 492.54 MiB | 475 KiB/s, done.
Resolving deltas: 100% (14355/14355), done.
Checking out files: 100% (6001/6001), done.
Installer le paquet vscp_software#
Le git clone ci-dessus a créé un répertoire vscp_software. Placez-vous dans ce répertoire (cd vscp_software) et exécutez les commandes suivantes :
- sudo ./configure
- sudo make clean
- sudo make
- sudo make install
Vous pouvez aussi les lancer toutes d’un coup en une seule commande (./configure ; make clean; make; make install) et laisser la compilation tourner toute la nuit. Sur un Raspberry Pi, la compilation de ce paquet prend beaucoup de temps.
root@raspberrypi:~/vscp_software# ./configure ; make clean; make; make install
Si l’installation réussit, vous devriez voir :
Shall default web content be copied (y/n)? y
Your VSCP & Friends system is now installed.
============================================
- Start the VSCP daemon with 'sudo /etc/init.d/vscpd start'
or 'vscpd -s' to start the daemon in the foreground.
- Admin interface is at http://localhost:8080/vscp
- If you have installed the sample content it is located at
http://localhost:8080. Remember to change the ip address
in the file /srv/vscp/web/testws/settings.js to your local
ip address (192.168.1.7 ) to be able to access this content from other
machines than your local machine.
- You can reach core functionality in the telnet interface on
this machine at port 9598. Username: admin, Password: secret
- The configuration file for the VSCP daemon is at /etc/vscd/vscpd.conf and
you can read about the different available options here
http://www.vscp.org/docs/vscpd/doku.php?id=configuring_the_vscp_daemon
- Documentation is at http://www.vscp.org/docs/vscpd/doku.php asd more general
documentation is at http://www.vscp.org/docs
Have fun and remember to always be hungry and stay foolish or the other way
around be foolish - stay hungry! There is always a choice.
Installer le paquet lsb#
Ce paquet ne devrait plus être nécessaire pour compiler vscp_software. Si toutefois votre compilation échoue parce que ce paquet manque, voici comment l’installer :
root@raspberrypi:~# apt-get install lsb-release
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
lsb
The following NEW packages will be installed:
lsb-release
0 upgraded, 1 newly installed, 0 to remove and 42 not upgraded.
Need to get 26.8 kB of archives.
After this operation, 105 kB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main lsb-release all 4.1+Debian8+rpi1+deb7u1 [26.8 kB]
Fetched 26.8 kB in 0s (47.6 kB/s)
Selecting previously unselected package lsb-release.
(Reading database ... 101085 files and directories currently installed.)
Unpacking lsb-release (from .../lsb-release_4.1+Debian8+rpi1+deb7u1_all.deb) ...
Processing triggers for man-db ...
Setting up lsb-release (4.1+Debian8+rpi1+deb7u1) ...
Recompiler le noyau Linux#
Le noyau Linux standard du Raspi est malheureusement livré sans prise en charge de CAN, il faut donc recompiler le noyau avec la prise en charge de CAN.
Comme la compilation du noyau sur le Raspi lui-même prendrait très longtemps (comptez en jours), nous allons faire une compilation croisée sur une machine Ubuntu.
Installer les dépendances#
Il faut d’abord installer quelques paquets nécessaires à la compilation croisée du noyau : git-core et le compilateur gcc pour l’architecture ARM.
sudo apt-get install git-core gcc-4.6-arm-linux-gnueabi
Récupérer les sources#
Ensuite, on récupère les sources et quelques outils avec Git.
mkdir raspberrypi
cd raspberrypi
git clone https://github.com/raspberrypi/tools.git
git clone https://github.com/raspberrypi/linux.git
cd linux
Créer le fichier de configuration#
Générons maintenant le fichier .config à partir du fichier de configuration fourni pour le Raspberry Pi.
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- bcmrpi_cutdown_defconfig
Il se peut que le fichier de configuration arm-linux-gnueabi- bcmrpi_cutdown_defconfig ne soit pas disponible dans les sources que nous venons de télécharger. Dans ce cas, cherchez dans le dossier linux/arch/arm/configs un fichier similaire commençant par bcmrpi et se terminant par defconfig. Dans mon cas, j’ai utilisé :
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- bcmrpi_defconfig
Modifier la configuration du noyau#
Il faut ensuite modifier la configuration du noyau pour y inclure la prise en charge de CAN.
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig
Activez CAN dans le menu Networking.
Une image du noyau déjà compilée et le fichier de configuration sont disponibles en téléchargement dans la section Ressources ci-dessous.
Compiler le noyau#
Une fois les modifications voulues effectuées, enregistrez et quittez l’écran menuconfig. Nous sommes maintenant prêts à lancer la compilation. Vous pouvez accélérer la compilation en activant le make parallèle avec l’option -j. La valeur recommandée est nombre de cœurs du processeur + 1, par exemple 3 si vous avez un processeur double cœur :
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k -j3
Si la compilation a réussi, créez un répertoire pour les modules :
mkdir ../modules
Compilez ensuite les modules chargeables et installez-les dans le répertoire temporaire :
make modules_install ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- INSTALL_MOD_PATH=../modules/
Il faut maintenant utiliser imagetool-uncompressed.py du dépôt tools pour préparer le noyau pour le Pi.
cd ../tools/mkimage/
./imagetool-uncompressed.py ../../linux/arch/arm/boot/Image
Cela crée un fichier image kernel.img dans le répertoire courant. Insérez la carte SD contenant l’image Debian existante sur laquelle vous voulez installer le nouveau noyau. Montez la partition de démarrage. Supprimez le kernel.img existant et remplacez-le par le nouveau, en remplaçant boot-partition-uuid par l’identifiant de la partition telle qu’elle est montée dans Ubuntu.
sudo rm /media/boot-partition-uuid/kernel.img
sudo mv kernel.img /media/boot-partition-uuid/
Supprimez ensuite les répertoires /lib/modules et lib/firmware existants, en remplaçant « rootfs-partition-uuid » par l’identifiant de la partition du système de fichiers racine montée dans Ubuntu.
sudo rm -rf /media/rootfs-partition-uuid/lib/modules/
sudo rm -rf /media/rootfs-partition-uuid/lib/firmware/
Allez dans le répertoire de destination du make modules_install précédent, et copiez les nouveaux modules et le firmware à leur place :
cd ../../modules/
sudo cp -a lib/modules/ /media/rootfs-partition-uuid/lib/
sudo cp -a lib/firmware/ /media/rootfs-partition-uuid/lib/
sync
C’est tout ! Éjectez la carte SD et démarrez le nouveau noyau sur le Raspberry Pi.
Tester l’installation de VSCP#
Interface d’administration : Telnet#
Connectez-vous en Telnet à 192.168.1.7 sur le port 9598 et vous devriez voir ceci :
Page web d’administration#
Ouvrez http://192.168.1.7:8080/vscp dans votre navigateur et vous devriez voir cette page :
Contenu web d’exemple#
Ouvrez http://192.168.1.7:8080/ dans votre navigateur et vous devriez voir cette page :





