Skip to content
This repository was archived by the owner on Oct 27, 2018. It is now read-only.

Commit e265c64

Browse files
committed
raspberrypi(2): updated kernel to 3.18.8
1 parent 23452ed commit e265c64

File tree

10 files changed

+239
-12
lines changed

10 files changed

+239
-12
lines changed

board/common/overlay/sbin/loadmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
test -f /etc/modules || exit 0
44

5-
for module in $(cat /etc/modules); do
6-
modprobe $module || true
7-
done
5+
cat /etc/modules | while read line; do test -n "$line" && /sbin/modprobe $line; done
6+
7+
exit 0
88

board/raspberrypi/kernel.patch.gz

51.7 KB
Binary file not shown.

board/raspberrypi2/config.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
start_file=start.elf
22
fixup_file=fixup.elf
3-
arm_freq=800
4-
core_freq=500
5-
sdram_freq=500
6-
over_voltage=6
3+
arm_freq=900
4+
core_freq=250
5+
sdram_freq=450
6+
over_voltage=0
77
gpu_mem_256=128
88
gpu_mem_512=128
99
disable_camera_led=0

board/raspberrypi2/kernel.patch.gz

51.7 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
bcm2835-v4l2
1+
bcm2835-v4l2 max_video_width=2592 max_video_height=1944
22

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
2+
# Copyright (c) 2015 Calin Crisan
3+
# This file is part of motionPie.
4+
#
5+
# motionEye is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
18+
import logging
19+
import os.path
20+
21+
from config import additional_config
22+
23+
24+
CONFIG_TXT = '/boot/config.txt'
25+
26+
OVERCLOCK = {
27+
700: '700|250|400|0',
28+
800: '800|250|400|0',
29+
900: '900|250|450|0',
30+
950: '950|250|450|0',
31+
1000: '1000|500|600|6'
32+
}
33+
34+
def _get_board_settings():
35+
gpu_mem = 128
36+
camera_led = True
37+
arm_freq = 700
38+
39+
if os.path.exists(CONFIG_TXT):
40+
logging.debug('reading board settings from %s' % CONFIG_TXT)
41+
42+
with open(CONFIG_TXT) as f:
43+
for line in f:
44+
line = line.strip()
45+
if not line or line.startswith('#'):
46+
continue
47+
48+
parts = line.split('=', 1)
49+
if len(parts) != 2:
50+
continue
51+
52+
name, value = parts
53+
name = name.strip()
54+
value = value.strip()
55+
56+
if name.startswith('gpu_mem'):
57+
gpu_mem = int(value)
58+
59+
elif name == 'arm_freq':
60+
arm_freq = int(value)
61+
62+
elif name == 'disable_camera_led':
63+
camera_led = value == '0'
64+
65+
overclock = OVERCLOCK.get(arm_freq, '700|250|400|0')
66+
67+
s = {
68+
'gpuMem': gpu_mem,
69+
'overclock': overclock,
70+
'cameraLed': camera_led
71+
}
72+
73+
logging.debug('board settings: gpu_mem=%(gpuMem)s, overclock=%(overclock)s, camera_led=%(cameraLed)s' % s)
74+
75+
return s
76+
77+
78+
def _set_board_settings(s):
79+
s.setdefault('gpuMem', 128)
80+
s.setdefault('overclock', '700|250|400|0')
81+
s.setdefault('cameraLed', True)
82+
83+
seen = set()
84+
85+
logging.debug('writing board settings to %s: ' % CONFIG_TXT +
86+
'gpu_mem=%(gpuMem)s, overclock=%(overclock)s, camera_led=%(cameraLed)s' % s)
87+
88+
arm_freq, gpu_freq, sdram_freq, over_voltage = s['overclock'].split('|')
89+
90+
lines = []
91+
if os.path.exists(CONFIG_TXT):
92+
with open(CONFIG_TXT) as f:
93+
lines = f.readlines()
94+
95+
for i, line in enumerate(lines):
96+
line = line.strip()
97+
if not line:
98+
continue
99+
100+
line = line.strip('#')
101+
102+
try:
103+
name, _ = line.split('=', 1)
104+
name = name.strip()
105+
106+
except:
107+
continue
108+
109+
seen.add(name)
110+
111+
if name.startswith('gpu_mem'):
112+
lines[i] = '%s=%s' % (name, s['gpuMem'])
113+
114+
elif name == 'arm_freq':
115+
lines[i] = 'arm_freq=%s' % arm_freq
116+
117+
elif name in ['gpu_freq', 'core_freq']:
118+
lines[i] = '%s=%s' % (name, gpu_freq)
119+
120+
elif name == 'sdram_freq':
121+
lines[i] = 'sdram_freq=%s' % sdram_freq
122+
123+
elif name == 'over_voltage':
124+
lines[i] = 'over_voltage=%s' % over_voltage
125+
126+
elif name == 'disable_camera_led':
127+
lines[i] = 'disable_camera_led=%s' % ['1', '0'][s['cameraLed']]
128+
129+
if 'gpu_mem' not in seen:
130+
lines.append('gpu_mem=%s' % s['gpuMem'])
131+
132+
if 'gpu_mem_256' not in seen:
133+
lines.append('gpu_mem_256=%s' % s['gpuMem'])
134+
135+
if 'gpu_mem_512' not in seen:
136+
lines.append('gpu_mem_512=%s' % s['gpuMem'])
137+
138+
if 'arm_freq' not in seen:
139+
lines.append('arm_freq=%s' % arm_freq)
140+
141+
if 'gpu_freq' not in seen:
142+
lines.append('gpu_freq=%s' % gpu_freq)
143+
144+
if 'sdram_freq' not in seen:
145+
lines.append('sdram_freq=%s' % sdram_freq)
146+
147+
if 'over_voltage' not in seen:
148+
lines.append('over_voltage=%s' % over_voltage)
149+
150+
if 'disable_camera_led' not in seen:
151+
lines.append('disable_camera_led=%s' % ['1', '0'][s['cameraLed']])
152+
153+
logging.debug('remounting /boot read-write')
154+
if os.system('mount -o remount,rw /boot'):
155+
logging.error('failed to remount /boot read-write')
156+
157+
with open(CONFIG_TXT, 'w') as f:
158+
for line in lines:
159+
if not line.strip():
160+
continue
161+
if not line.endswith('\n'):
162+
line += '\n'
163+
f.write(line)
164+
165+
166+
@additional_config
167+
def boardSeparator():
168+
return {
169+
'type': 'separator',
170+
'section': 'expertSettings',
171+
'advanced': True
172+
}
173+
174+
175+
@additional_config
176+
def gpuMem():
177+
return {
178+
'label': 'GPU Memory',
179+
'description': 'set the amount of memory reserved for the GPU (choose at least 96MB if you use the CSI camera board)',
180+
'type': 'number',
181+
'min': '16',
182+
'max': '448',
183+
'section': 'expertSettings',
184+
'advanced': True,
185+
'reboot': True,
186+
'get': _get_board_settings,
187+
'set': _set_board_settings,
188+
'get_set_dict': True
189+
}
190+
191+
192+
@additional_config
193+
def cameraLed():
194+
return {
195+
'label': 'Enable CSI Camera Led',
196+
'description': 'control the led on the CSI camera board',
197+
'type': 'bool',
198+
'section': 'expertSettings',
199+
'advanced': True,
200+
'reboot': True,
201+
'get': _get_board_settings,
202+
'set': _set_board_settings,
203+
'get_set_dict': True
204+
}
205+
206+
207+
@additional_config
208+
def overclock():
209+
return {
210+
'label': 'Overclocking',
211+
'description': 'choose an overclocking preset for your Raspberry PI',
212+
'type': 'choices',
213+
'choices': [
214+
('700|250|400|0', 'none (700/250/400/0)'),
215+
('800|250|400|0', 'modest (800/250/400/0)'),
216+
('900|250|450|0', 'medium (900/250/450/0)'),
217+
('950|250|450|0', 'high (950/250/450/0)'),
218+
('1000|500|600|6', 'turbo (1000/500/600/6)')
219+
],
220+
'section': 'expertSettings',
221+
'advanced': True,
222+
'reboot': True,
223+
'get': _get_board_settings,
224+
'set': _set_board_settings,
225+
'get_set_dict': True
226+
}
227+

boot/rpi-firmware/rpi-firmware.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
#############################################################
66

7-
RPI_FIRMWARE_VERSION = 47bd0f0f
7+
RPI_FIRMWARE_VERSION = b9fac65
88
RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION))
99
RPI_FIRMWARE_LICENSE = BSD-3c
1010
RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom

configs/raspberrypi2_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ BR2_CCACHE=y
77
BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi2"
88
BR2_OPTIMIZE_2=y
99
BR2_KERNEL_HEADERS_VERSION=y
10-
BR2_DEFAULT_KERNEL_VERSION="3.18.7"
10+
BR2_DEFAULT_KERNEL_VERSION="3.18.8"
1111
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y
1212
BR2_UCLIBC_CONFIG="board/common/uClibc-0.9.33.config"
1313
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y

configs/raspberrypi_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BR2_CCACHE=y
66
BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi"
77
BR2_OPTIMIZE_2=y
88
BR2_KERNEL_HEADERS_VERSION=y
9-
BR2_DEFAULT_KERNEL_VERSION="3.18.7"
9+
BR2_DEFAULT_KERNEL_VERSION="3.18.8"
1010
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y
1111
BR2_UCLIBC_CONFIG="board/common/uClibc-0.9.33.config"
1212
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y

package/raspberrypi/rpi-userland/rpi-userland.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
#############################################################
66

7-
RPI_USERLAND_VERSION = c5341f09
7+
RPI_USERLAND_VERSION = 0de0b20
88
RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
99
RPI_USERLAND_LICENSE = BSD-3c
1010
RPI_USERLAND_LICENSE_FILES = LICENCE

0 commit comments

Comments
 (0)