From 7a66d116d4f5cb941eac8161dc61a1c787d16b31 Mon Sep 17 00:00:00 2001 From: Sebastian Silva Date: Mon, 17 Sep 2018 02:05:31 -0500 Subject: [PATCH 1/5] Add rpicam software --- builder/chroot-script.sh | 14 ++++++++++++++ builder/files/etc/rc.local | 14 ++++++++++++++ builder/files/etc/rpicam_config.txt | 8 ++++++++ 3 files changed, 36 insertions(+) create mode 100755 builder/files/etc/rc.local create mode 100644 builder/files/etc/rpicam_config.txt diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index f9ac33b..fe77ab4 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -147,6 +147,12 @@ apt-get -o Dpkg::Options::=--force-confdef \ pi-bluetooth \ lsb-release \ gettext \ + unzip \ + zip \ + libav-tools \ + gstreamer1.0-tools \ + motion \ + gpac \ cloud-init @@ -209,6 +215,14 @@ echo "Installing rpi-serial-console script" wget -q https://raw.githubusercontent.com/lurch/rpi-serial-console/master/rpi-serial-console -O usr/local/bin/rpi-serial-console chmod +x usr/local/bin/rpi-serial-console +echo "Installing RPi Cam Web Interface" +wget -q https://github.com/silvanmelchior/RPi_Cam_Web_Interface/archive/master.zip -O /tmp/rpicam.zip +cd /tmp/ +unzip rpicam.zip +cd RPi_Cam_Web_Interface-master +cp /etc/rpicam_config.txt config.txt +bash ./install.sh q + # fix eth0 interface name ln -s /dev/null /etc/systemd/network/99-default.link diff --git a/builder/files/etc/rc.local b/builder/files/etc/rc.local new file mode 100755 index 0000000..65634df --- /dev/null +++ b/builder/files/etc/rc.local @@ -0,0 +1,14 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +exit 0 diff --git a/builder/files/etc/rpicam_config.txt b/builder/files/etc/rpicam_config.txt new file mode 100644 index 0000000..325c3f4 --- /dev/null +++ b/builder/files/etc/rpicam_config.txt @@ -0,0 +1,8 @@ +rpicamdir="cam" +webserver="" +webport="80" +user="" +webpasswd="" +autostart="yes" +jpglink="no" +phpversion="7" From 26ef94753552dbd78f4a92d8531aca3d5380b425 Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Mon, 22 Oct 2018 18:27:02 -0400 Subject: [PATCH 2/5] Install infragram --- builder/build.sh | 2 +- builder/chroot-script.sh | 15 +++++++++++++++ builder/files/var/www/index.html | 4 +++- versions.config | 4 ++-- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/builder/build.sh b/builder/build.sh index eaf17f2..aee6799 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -84,7 +84,7 @@ ls -alh /image_with_kernel_*.tar.gz # download the ready-made raw image for the RPi if [ ! -f "${BUILD_RESULT_PATH}/${RAW_IMAGE}.zip" ]; then - wget -q -O "${BUILD_RESULT_PATH}/${RAW_IMAGE}.zip" "https://github.com/hypriot/image-builder-raw/releases/download/${RAW_IMAGE_VERSION}/${RAW_IMAGE}.zip" + wget -q -O "${BUILD_RESULT_PATH}/${RAW_IMAGE}.zip" "https://jenkins.laboratoriopublico.org/job/image-builder-raw/ws/${RAW_IMAGE}.zip" fi # verify checksum of the ready-made raw image diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index fe77ab4..19fd25d 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -211,6 +211,21 @@ lighttpd-enable-mod fastcgi-php systemctl disable dhcpcd systemctl disable hciuart +echo "Installing infragram" + +# install npm/node: +curl -o node-v9.7.1-linux-armv6l.tar.gz https://nodejs.org/dist/v9.7.1/node-v9.7.1-linux-armv6l.tar.gz +tar -xzf node-v9.7.1-linux-armv6l.tar.gz +sudo cp -r node-v9.7.1-linux-armv6l/* /usr/local/ +sudo apt-get install git + +# install infragram in the web public folder: +cd /var/www/ +git clone https://github.com/publiclab/infragram.git +cd infragram +npm install +cd / + echo "Installing rpi-serial-console script" wget -q https://raw.githubusercontent.com/lurch/rpi-serial-console/master/rpi-serial-console -O usr/local/bin/rpi-serial-console chmod +x usr/local/bin/rpi-serial-console diff --git a/builder/files/var/www/index.html b/builder/files/var/www/index.html index 83618d4..9ce38a0 100644 --- a/builder/files/var/www/index.html +++ b/builder/files/var/www/index.html @@ -26,8 +26,10 @@

Public Lab Pi Camera Kit

If you're seeing this in a pop-up, close it and open http://pi.local in a browser.

On Android devices, you may have to turn off cellular data to use this in a browser.

-

While connected to this camera, you won't have regular internet access.

+

Access Infragram software

+

Access the camera

+ diff --git a/versions.config b/versions.config index f7bb136..d1e5bfc 100644 --- a/versions.config +++ b/versions.config @@ -4,8 +4,8 @@ ROOTFS_TAR_CHECKSUM="d1e7e6d48a25b4a206c5df99ecb8815388ec6945e4f97e78413d5a80778 # name of the ready made raw image for RPi RAW_IMAGE="rpi-raw.img" -RAW_IMAGE_VERSION="v0.2.2" -RAW_IMAGE_CHECKSUM="2fbeb13b7b0f2308dbd0d82780b54c33003ad43d145ff08498b25fb8bbe1c2c6" +RAW_IMAGE_VERSION="master" +RAW_IMAGE_CHECKSUM="e32c0b9f3cdb9c60bad97a724103fc1283cdc135848e6142d588cd96fac1d6a8" # specific versions of kernel/firmware and docker tools export KERNEL_BUILD="20180422-141901" From 609673d8f16b1dd8fb3685e2fe4aafc65050b829 Mon Sep 17 00:00:00 2001 From: jywarren Date: Thu, 1 Nov 2018 11:29:32 -0400 Subject: [PATCH 3/5] add image sequencer --- builder/chroot-script.sh | 11 ++++++++++- builder/files/var/www/index.html | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index 19fd25d..e292997 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -219,13 +219,22 @@ tar -xzf node-v9.7.1-linux-armv6l.tar.gz sudo cp -r node-v9.7.1-linux-armv6l/* /usr/local/ sudo apt-get install git -# install infragram in the web public folder: cd /var/www/ + +# install infragram in the web public folder: git clone https://github.com/publiclab/infragram.git cd infragram npm install cd / +echo "Installing image-sequencer" +# install image-sequencer in the web public folder: +git clone https://github.com/publiclab/image-sequencer.git +cd image-sequencer +npm install + +cd / + echo "Installing rpi-serial-console script" wget -q https://raw.githubusercontent.com/lurch/rpi-serial-console/master/rpi-serial-console -O usr/local/bin/rpi-serial-console chmod +x usr/local/bin/rpi-serial-console diff --git a/builder/files/var/www/index.html b/builder/files/var/www/index.html index 9ce38a0..1e90121 100644 --- a/builder/files/var/www/index.html +++ b/builder/files/var/www/index.html @@ -30,6 +30,7 @@

Public Lab Pi Camera Kit

Access Infragram software

Access the camera

+

Access Image Sequencer software

From 32fbea8e08c9419f2a9c4f669eaf480418ee5a59 Mon Sep 17 00:00:00 2001 From: jywarren Date: Mon, 5 Nov 2018 12:25:20 -0500 Subject: [PATCH 4/5] added buttons and new version of image sequencer --- builder/chroot-script.sh | 3 ++- builder/files/var/www/index.html | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index e292997..0fc4c63 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -222,10 +222,11 @@ sudo apt-get install git cd /var/www/ # install infragram in the web public folder: +echo "Installing infragram" git clone https://github.com/publiclab/infragram.git cd infragram npm install -cd / +cd /var/www/ echo "Installing image-sequencer" # install image-sequencer in the web public folder: diff --git a/builder/files/var/www/index.html b/builder/files/var/www/index.html index 1e90121..61fa061 100644 --- a/builder/files/var/www/index.html +++ b/builder/files/var/www/index.html @@ -28,9 +28,9 @@

Public Lab Pi Camera Kit

While connected to this camera, you won't have regular internet access.

-

Access Infragram software

-

Access the camera

-

Access Image Sequencer software

+

Access Infragram software

+

Access the camera

+

Access Image Sequencer software

From 305b711f1de00d734f36e3489e63f6249ab95438 Mon Sep 17 00:00:00 2001 From: jywarren Date: Thu, 15 Nov 2018 12:12:10 -0500 Subject: [PATCH 5/5] spectral-workbench --- builder/chroot-script.sh | 6 ++++++ builder/files/var/www/index.html | 1 + 2 files changed, 7 insertions(+) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index 0fc4c63..543d623 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -218,7 +218,13 @@ curl -o node-v9.7.1-linux-armv6l.tar.gz https://nodejs.org/dist/v9.7.1/node-v9.7 tar -xzf node-v9.7.1-linux-armv6l.tar.gz sudo cp -r node-v9.7.1-linux-armv6l/* /usr/local/ sudo apt-get install git +cd /var/www/ +# install spectral-workbench.js in the web public folder: +echo "Installing spectral-workbench.js" +git clone https://github.com/publiclab/spectral-workbench.js.git +cd spectral-workbench +npm install cd /var/www/ # install infragram in the web public folder: diff --git a/builder/files/var/www/index.html b/builder/files/var/www/index.html index 61fa061..c1d7503 100644 --- a/builder/files/var/www/index.html +++ b/builder/files/var/www/index.html @@ -28,6 +28,7 @@

Public Lab Pi Camera Kit

While connected to this camera, you won't have regular internet access.

+

Access Spectral Workbench

Access Infragram software

Access the camera

Access Image Sequencer software