-
Notifications
You must be signed in to change notification settings - Fork 22
/
install_on_fresh_raspbian.sh
executable file
·89 lines (72 loc) · 2.44 KB
/
install_on_fresh_raspbian.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
#
# install_on_fresh_raspbian.sh
#
# Automatic install script for "dabpi_ctl - raspberry pi fm/fmhd/dab receiver board"
# Copyright (C) 2014 Patrick De Zordo <patrick@spamreducer.eu>
# Bjoern Biesenbach <bjoern@bjoern-b.de>
#
# Version: 0.1.1-beta
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
cd
echo "System upgrade.."
sudo apt-get -y update
sudo apt-get -y upgrade
echo "Base system Setup.."
sudo apt-get -y install make git-core
sudo apt-get -y install git-core
echo "Clone WiringPI GIT repo.."
git clone git://git.drogon.net/wiringPi
echo "Build and install WiringPI.."
cd wiringPi
git pull origin
./build
echo "Clone DABPi-Ctl GIT repo.."
cd
git clone https://github.com/elmo2k3/dabpi_ctl.git
echo "Build and install DABPi-Ctl.."
cd dabpi_ctl
make
echo "Copy precompiled DABPi-Ctl Kernel to system.."
sudo cp kernel/Image /boot/kernel.img
sudo cp kernel/Image7 /boot/kernel7.img
echo "Remove old modules.."
sudo rm -rf /lib/modules
sudo rm -rf /lib/firmware
echo "Extract new modules.."
sudo tar -C / -xvzf kernel/lib.tar.gz
echo "Edit Raspberry drivers blacklist to allow SPI and I2C.."
cp /etc/modprobe.d/raspi-blacklist.conf ~
cat << EOF | sudo tee /etc/modprobe.d/raspi-blacklist.conf
# blacklist spi and i2c by default (many users don't need them)
#blacklist spi-bcm2708
#blacklist i2c-bcm2708
EOF
echo "Setup modules to load on boot.."
cp /etc/modules ~
cat << EOF | sudo tee /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
bcm2708-dmaengine
snd-bcm2835
snd-soc-rpi-dabpi
EOF
echo "============================================"
echo "ALL DONE - Happy Radio listening with DABPi!"
echo "============================================"