Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricve committed Feb 10, 2017
2 parents a688b5f + cc1a7d6 commit 7d51854
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 54 deletions.
1 change: 1 addition & 0 deletions board/common/overlay/etc/init.d/S21passwd
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ case "$1" in

sed -r -i 's/root:([^:]+):[[:digit:]]+:/root:\1::/' /data/etc/shadow # removes pwd expiration
sed -r -i 's/admin:([^:]+):[[:digit:]]+:/admin:\1::/' /data/etc/shadow # removes pwd expiration
sync

msg_done
;;
Expand Down
11 changes: 9 additions & 2 deletions board/common/overlay/etc/init.d/S51crond
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
#!/bin/bash

sys_conf="/etc/crontabs"
conf="/data/etc/crontabs"

test -n "$os_version" || source /etc/init.d/base

start() {
msg_begin "Starting crond"

mkdir -p /data/etc/crontabs/
if [ -d $sys_conf ]; then
/usr/sbin/crond -c $sys_conf
fi

mkdir -p $conf
/usr/sbin/crond -c $conf

/usr/sbin/crond
test $? == 0 && msg_done || msg_fail
}

Expand Down
1 change: 1 addition & 0 deletions board/common/overlay/etc/init.d/S60sshd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ start() {
umask 077
hostname=$(hostname)
echo "Welcome to $hostname!" > /var/cache/sshd_banner
sync

/usr/sbin/sshd -f $conf
test $? == 0 && msg_done || msg_fail
Expand Down
3 changes: 1 addition & 2 deletions board/common/overlay/etc/init.d/S86web
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ start() {
cp -R /var/www/web/app/config /data/web/app
sed -i "s#__DIR__.'/../views'#'/var/www/web/app/views'#g" /data/web/app/config/view.php
chmod -R 777 /data/web/app
echo 'extension=memcached.so' >> /etc/php.ini
fi
}

Expand All @@ -39,4 +38,4 @@ case "$1" in
exit 1
esac

exit $?
exit $?
10 changes: 7 additions & 3 deletions board/common/overlay/etc/modprobe.d/modprobe.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# disable wifi power management
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=1
# wifi
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
options mwifiex disconnect_on_suspend=0
options rndis_wlan power_save=0
options b43 hwpctl=0
options ath6kl_core suspend_mode=1
options ath6kl_core suspend_mode=1
options brcmfmac roamoff=1

# media
options stk1160 keep_buffers=1
4 changes: 2 additions & 2 deletions board/common/overlay/etc/sshd_config
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Port 22
ListenAddress 0.0.0.0

HostKey /data/etc/ssh_host_key
HostKey /data/etc/ssh_host_rsa_key
HostKey /data/etc/ssh_host_dsa_key
HostKey /data/etc/ssh_host_ecdsa_key
Expand All @@ -14,4 +13,5 @@ UseDNS no
Banner /var/cache/sshd_banner

UsePrivilegeSeparation sandbox
Subsystem sftp /usr/libexec/sftp-server
Subsystem sftp /usr/libexec/sftp-server
IPQoS cs0 cs0
3 changes: 3 additions & 0 deletions board/common/overlay/usr/share/post-upgrade/2.2.0.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ chmod -R 777 $DATA_CONFIG_DIR
# Update configuration files for web
#

cp /var/www/web/app/config/session.php /data/web/app/config/session.php
cp /var/www/web/app/config/app.php /data/web/app/config/app.php
chmod 777 /data/web/app/config/app.php
cp /var/www/web/app/config/kerberos.php /data/web/app/config/kerberos.php
chmod 777 /data/web/app/config/kerberos.php

rm -rf /data/web/app/storage/views/*
rm -rf /data/web/app/storage/sessions/*
6 changes: 3 additions & 3 deletions mkrelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ echo "Preparing release for Raspberry Pi board"
mkdir -p $DIR/releases/rpi/$DATE
cp $DIR/kios-raspberrypi-* $DIR/releases/rpi/$DATE
for file in $DIR/output/raspberrypi/build/kerberosio-machinery*/kerberosio*; do cp -v -- "$file" "$DIR/releases/rpi/$DATE/rpi1-machinery-${file##*/}"; done
cd $DIR/output/raspberrypi/target/var/www/web && rm -rf app/storage && mkdir -p app/storage/cache && mkdir -p app/storage/logs && mkdir -p app/storage/meta && mkdir -p app/storage/sessions && mkdir -p app/storage/views && sed -i 's/memcached/file/g' app/config/session.php && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' app/config/app.php && sed -i "s#'/data/web/app/config'#\$this\['path'\] . '/config'#g" bootstrap/compiled.php && sed -i "s#'/data/web/app/storage'#__DIR__.'/../app/storage'#g" bootstrap/paths.php && tar czf $DIR/releases/rpi/$DATE/web.tar.gz .
cd $DIR/output/raspberrypi/target/var/www/web && rm -rf app/storage && mkdir -p app/storage/cache && mkdir -p app/storage/logs && mkdir -p app/storage/meta && mkdir -p app/storage/sessions && mkdir -p app/storage/views && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' app/config/app.php && sed -i "s#'/data/web/app/config'#\$this\['path'\] . '/config'#g" bootstrap/compiled.php && sed -i "s#'/data/web/app/storage'#__DIR__.'/../app/storage'#g" bootstrap/paths.php && sed -i "s#'/data/web/app/config'#app_path() . '/config'#g" app/controllers/UserController.php && sed -i "s#'/data/web/app/config'#app_path() . '/config'#g" app/controllers/SettingsController.php && tar czf $DIR/releases/rpi/$DATE/web.tar.gz .

echo "Preparing release for Raspberry Pi2 board"

mkdir -p $DIR/releases/rpi2/$DATE
cp $DIR/kios-raspberrypi2-* $DIR/releases/rpi2/$DATE
for file in $DIR/output/raspberrypi2/build/kerberosio-machinery*/kerberosio*; do cp -v -- "$file" "$DIR/releases/rpi2/$DATE/rpi2-machinery-${file##*/}"; done
cd $DIR/output/raspberrypi2/target/var/www/web && rm -rf app/storage && mkdir -p app/storage/cache && mkdir -p app/storage/logs && mkdir -p app/storage/meta && mkdir -p app/storage/sessions && mkdir -p app/storage/views && sed -i 's/memcached/file/g' app/config/session.php && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' app/config/app.php && sed -i "s#'/data/web/app/config'#\$this\['path'\] . '/config'#g" bootstrap/compiled.php && sed -i "s#'/data/web/app/storage'#__DIR__.'/../app/storage'#g" bootstrap/paths.php && tar czf $DIR/releases/rpi2/$DATE/web.tar.gz .
cd $DIR/output/raspberrypi2/target/var/www/web && rm -rf app/storage && mkdir -p app/storage/cache && mkdir -p app/storage/logs && mkdir -p app/storage/meta && mkdir -p app/storage/sessions && mkdir -p app/storage/views && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' app/config/app.php && sed -i "s#'/data/web/app/config'#\$this\['path'\] . '/config'#g" bootstrap/compiled.php && sed -i "s#'/data/web/app/storage'#__DIR__.'/../app/storage'#g" bootstrap/paths.php && sed -i "s#'/data/web/app/config'#app_path() . '/config'#g" app/controllers/UserController.php && sed -i "s#'/data/web/app/config'#app_path() . '/config'#g" app/controllers/SettingsController.php && tar czf $DIR/releases/rpi2/$DATE/web.tar.gz .

echo "Preparing release for Raspberry Pi3 board"

mkdir -p $DIR/releases/rpi3/$DATE
cp $DIR/kios-raspberrypi3-* $DIR/releases/rpi3/$DATE
for file in $DIR/output/raspberrypi3/build/kerberosio-machinery*/kerberosio*; do cp -v -- "$file" "$DIR/releases/rpi3/$DATE/rpi3-machinery-${file##*/}"; done
cd $DIR/output/raspberrypi3/target/var/www/web && rm -rf app/storage && mkdir -p app/storage/cache && mkdir -p app/storage/logs && mkdir -p app/storage/meta && mkdir -p app/storage/sessions && mkdir -p app/storage/views && sed -i 's/memcached/file/g' app/config/session.php && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' app/config/app.php && sed -i "s#'/data/web/app/config'#\$this\['path'\] . '/config'#g" bootstrap/compiled.php && sed -i "s#'/data/web/app/storage'#__DIR__.'/../app/storage'#g" bootstrap/paths.php && tar czf $DIR/releases/rpi3/$DATE/web.tar.gz .
cd $DIR/output/raspberrypi3/target/var/www/web && rm -rf app/storage && mkdir -p app/storage/cache && mkdir -p app/storage/logs && mkdir -p app/storage/meta && mkdir -p app/storage/sessions && mkdir -p app/storage/views && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' app/config/app.php && sed -i "s#'/data/web/app/config'#\$this\['path'\] . '/config'#g" bootstrap/compiled.php && sed -i "s#'/data/web/app/storage'#__DIR__.'/../app/storage'#g" bootstrap/paths.php && sed -i "s#'/data/web/app/config'#app_path() . '/config'#g" app/controllers/UserController.php && sed -i "s#'/data/web/app/config'#app_path() . '/config'#g" app/controllers/SettingsController.php && tar czf $DIR/releases/rpi3/$DATE/web.tar.gz .
3 changes: 3 additions & 0 deletions package/ffmpeg/ffmpeg.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ FFMPEG_VERSION = 2.7.2
FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.bz2
FFMPEG_SITE = http://ffmpeg.org/releases
FFMPEG_INSTALL_STAGING = YES
FFMPEG_INSTALL_TARGET = NO

FFMPEG_LICENSE = LGPLv2.1+, libjpeg license
FFMPEG_LICENSE_FILES = LICENSE.md COPYING.LGPLv2.1
Expand All @@ -18,6 +19,8 @@ endif

FFMPEG_CONF_OPTS = \
--prefix=/usr \
--enable-static \
--disable-shared \
--enable-avfilter \
--disable-version3 \
--enable-logging \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
From 5e710740af97636562d3a2d398b45c441974d2a4 Mon Sep 17 00:00:00 2001
From: root <root@buildroot.cedricverstraeten.be>
Date: Thu, 10 Mar 2016 13:13:56 -0500
Subject: [PATCH 1/1] add arm support to cmake - external projects
From 079fe3c129bafccfe6a31508ea626b8c7aad7586 Mon Sep 17 00:00:00 2001
From: cedricve <cedric@verstraeten.io>
Date: Mon, 30 Jan 2017 19:34:16 +0100
Subject: [PATCH] add arm support to cmake - external projects

Signed-off-by: root <root@buildroot.cedricverstraeten.be>
---
cmake/External-Googletest.cmake | 3 ++-
cmake/External-OpenCV.cmake | 14 ++++++++------
cmake/External-OpenCV.cmake | 13 +++++++------
cmake/External-RaspiCam.cmake | 3 ++-
cmake/External-Restclient.cmake | 4 ++--
4 files changed, 14 insertions(+), 10 deletions(-)
4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/cmake/External-Googletest.cmake b/cmake/External-Googletest.cmake
index 926e637..c0fb3ed 100644
Expand All @@ -31,17 +30,16 @@ index 926e637..c0fb3ed 100644
\ No newline at end of file
+set(GOOGLETEST_LIBRARIES "${GOOGLETEST_LIBRARY_DIR}googlemock/libgmock.a" "${GOOGLETEST_LIBRARY_DIR}googlemock/libgmock_main.a")
diff --git a/cmake/External-OpenCV.cmake b/cmake/External-OpenCV.cmake
index a8f97c9..d5df06b 100644
index 1a1c739..c155349 100644
--- a/cmake/External-OpenCV.cmake
+++ b/cmake/External-OpenCV.cmake
@@ -43,12 +43,14 @@ ExternalProject_Add(opencv
-DWITH_IPP:BOOL=OFF
@@ -48,12 +48,13 @@ ExternalProject_Add(opencv
-DBUILD_ZLIB:BOOL=ON
-DBUILD_WITH_STATIC_CRT:BOOL=ON
-DBUILD_FAT_JAVA_LIB=OFF
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/thirdparty
+ -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/../../host/usr/share/buildroot/toolchainfile.cmake
+ -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_SOURCE_DIR}/../../host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/
+
)

-set(OPENCV_INCLUDE_DIR ${CMAKE_BINARY_DIR}/thirdparty/include/)
Expand All @@ -52,7 +50,7 @@ index a8f97c9..d5df06b 100644
else()
set(OPENCV_LIBRARY_DIR ${CMAKE_BINARY_DIR}/thirdparty/x86/vc12/lib)
endif()
@@ -58,9 +60,9 @@ set(OPENCV_LIBRARIES opencv_imgproc opencv_core opencv_highgui opencv_videoio op
@@ -63,9 +64,9 @@ set(OPENCV_LIBRARIES opencv_imgproc opencv_core opencv_highgui opencv_video open
include_directories(${OPENCV_INCLUDE_DIR})
link_directories(${OPENCV_LIBRARY_DIR})

Expand Down Expand Up @@ -106,5 +104,5 @@ index 34eb211..b192d58 100644
\ No newline at end of file
+link_directories(${RESTCLIENT_LIBRARY_DIR})
--
1.9.1
2.5.0

4 changes: 2 additions & 2 deletions package/kerberosio-machinery/CPackConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Cédric Verstraeten")
SET(CPACK_PACKAGE_DESCRIPTION "Kerberos is a low-budget surveillance solution, that uses computer vision algorithms to detect changes, and that can trigger other devices. Kerberos is open source so you, but also other people, can customize the source to your needs and share it with our community. It has a green footprint when deploying on the Raspberry Pi and it's easy to install, you only need to transfer the image to the SD card and you're done.")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CPACK_PACKAGE_DESCRIPTION}")

SET(CPACK_PACKAGE_VERSION "2.1.0")
SET(CPACK_PACKAGE_VERSION "2.2.0")
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "2")
SET(CPACK_PACKAGE_VERSION_PATCH "0")

SET(CPACK_SYSTEM_NAME "armhf")
Expand Down
26 changes: 0 additions & 26 deletions package/kerberosio-web/0002-change-session-cache.patch

This file was deleted.

2 changes: 2 additions & 0 deletions package/kerberosio-web/kerberosio-web.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ define KERBEROSIO_WEB_INSTALL_TARGET_CMDS
cp -R $(@D)/* $(TARGET_DIR)/var/www/web
sed -i "s#\$$this\['path'\] . '/config'#'/data/web/app/config'#g" $(TARGET_DIR)/var/www/web/bootstrap/compiled.php
sed -i "s#__DIR__.'/../app/storage'#'/data/web/app/storage'#g" $(TARGET_DIR)/var/www/web/bootstrap/paths.php
sed -i "s#app_path() . '/config'#'/data/web/app/config'#g" $(TARGET_DIR)/var/www/web/app/controllers/UserController.php
sed -i "s#app_path() . '/config'#'/data/web/app/config'#g" $(TARGET_DIR)/var/www/web/app/controllers/SettingsController.php

# enable memcached
cat $(TARGET_DIR)/etc/php.ini | grep -q extension=memcached.so || echo "extension=memcached.so" >> $(TARGET_DIR)/etc/php.ini
Expand Down
2 changes: 1 addition & 1 deletion package/x264/x264.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ X264_CONF_OPTS += --disable-asm
endif

ifeq ($(BR2_STATIC_LIBS),)
X264_CONF_OPTS += --enable-pic --enable-shared
X264_CONF_OPTS += --enable-pic
endif

ifeq ($(BR2_PACKAGE_X264_CLI),)
Expand Down

0 comments on commit 7d51854

Please sign in to comment.