diff --git a/board/raspberrypi/config.txt b/board/raspberrypi/config.txt index 076b80dafa..e69de29bb2 100644 --- a/board/raspberrypi/config.txt +++ b/board/raspberrypi/config.txt @@ -1,8 +0,0 @@ -arm_freq=700 -core_freq=250 -sdram_freq=400 -over_voltage=0 -gpu_mem=128 -gpu_mem_256=128 -gpu_mem_512=128 - diff --git a/board/raspberrypi/motioneye-modules/boardctl.py b/board/raspberrypi/motioneye-modules/boardctl.py index a3ff722525..d99d39fecf 100644 --- a/board/raspberrypi/motioneye-modules/boardctl.py +++ b/board/raspberrypi/motioneye-modules/boardctl.py @@ -17,6 +17,7 @@ import logging import os.path +import subprocess from config import additional_config @@ -53,13 +54,27 @@ OVERCLOCK = { 800: '800|250|400|0', 900: '900|250|450|0', 950: '950|250|450|0', - 1000: '1000|500|600|6' + 1000: '1000|500|600|6', + 1001: '1001|300|450|6' } +def _is_pi_zero(): + try: + subprocess.check_call('grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$" /proc/cpuinfo', shell=True) + return True + + except: + return False + + def _get_board_settings(): gpu_mem = 128 camera_led = True - arm_freq = 700 + if _is_pi_zero(): + arm_freq = 1001 + + else: + arm_freq = 700 if os.path.exists(CONFIG_TXT): logging.debug('reading board settings from %s' % CONFIG_TXT) @@ -268,7 +283,8 @@ def overclock(): ('800|250|400|0', 'modest (800/250/400/0)'), ('900|250|450|0', 'medium (900/250/450/0)'), ('950|250|450|0', 'high (950/250/450/0)'), - ('1000|500|600|6', 'turbo (1000/500/600/6)') + ('1000|500|600|6', 'turbo (1000/500/600/6)'), + ('1001|300|450|6', 'PiZero (1000/300/450/6)'), ], 'section': 'expertSettings', 'advanced': True, diff --git a/board/raspberrypi2/config.txt b/board/raspberrypi2/config.txt index e3f9f7d9ed..e69de29bb2 100644 --- a/board/raspberrypi2/config.txt +++ b/board/raspberrypi2/config.txt @@ -1,6 +0,0 @@ -arm_freq=900 -core_freq=250 -sdram_freq=450 -over_voltage=0 -gpu_mem=128 - diff --git a/board/raspberrypi2/motioneye-modules/boardctl.py b/board/raspberrypi2/motioneye-modules/boardctl.py index 2cf8235438..1b083345ef 100644 --- a/board/raspberrypi2/motioneye-modules/boardctl.py +++ b/board/raspberrypi2/motioneye-modules/boardctl.py @@ -60,7 +60,7 @@ OVERCLOCK = { def _get_board_settings(): gpu_mem = 128 camera_led = True - arm_freq = 700 + arm_freq = 1001 if os.path.exists(CONFIG_TXT): logging.debug('reading board settings from %s' % CONFIG_TXT) diff --git a/board/raspberrypi3/config.txt b/board/raspberrypi3/config.txt index d1e930937f..e69de29bb2 100644 --- a/board/raspberrypi3/config.txt +++ b/board/raspberrypi3/config.txt @@ -1,2 +0,0 @@ -gpu_mem=128 -