Compare commits

..

7 Commits

10 changed files with 85 additions and 0 deletions

View File

@ -31,6 +31,8 @@ ENABLE_UART = "1"
ENABLE_SPI_BUS = "1" ENABLE_SPI_BUS = "1"
ENABLE_I2C = "1" ENABLE_I2C = "1"
RPI_EXTRA_CONFIG = "dtoverlay=w1-gpio,gpiopin=4"
RPI_USE_U_BOOT = "1" RPI_USE_U_BOOT = "1"
INHERIT += "rm_work" INHERIT += "rm_work"

View File

@ -31,6 +31,8 @@ ENABLE_UART = "1"
ENABLE_SPI_BUS = "1" ENABLE_SPI_BUS = "1"
ENABLE_I2C = "1" ENABLE_I2C = "1"
RPI_EXTRA_CONFIG = "dtoverlay=w1-gpio,gpiopin=4"
RPI_USE_U_BOOT = "1" RPI_USE_U_BOOT = "1"
INHERIT += "rm_work" INHERIT += "rm_work"

View File

@ -49,3 +49,6 @@ SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
MAINTAINER = "rorodist " MAINTAINER = "rorodist "
INHERIT += "buildhistory" INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1" BUILDHISTORY_COMMIT = "1"
KERNEL_MODULE_AUTOLOAD += "w1-gpio"
KERNEL_MODULE_AUTOLOAD += "w1-therm"

View File

@ -0,0 +1,3 @@
#!/bin/sh
gunicorn --bind 0.0.0.0:80 greenhouse:app

View File

@ -0,0 +1,35 @@
SUMMARY = "Greenhouse control"
SECTION = "Applications"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PR = "r0"
SRCREV = "${AUTOREV}"
SRC_URI = " \
git://git.blackfinn.de/python/greenhouse.git;protocol=https;branch=master \
file://run.sh \
"
S = "${WORKDIR}/git"
do_install_append () {
install -d ${D}/usr/
install -d ${D}/usr/bin/
install -m 0755 ${WORKDIR}/run.sh ${D}/usr/bin/
}
RDEPENDS_${PN} += " \
python3 \
python3-gunicorn \
python3-flask \
rpi.gpio \
w1thermsensor \
"
FILES_${PN} = " \
/usr/bin/run.sh \
"
inherit setuptools3

View File

@ -1,5 +1,6 @@
IMAGE_INSTALL_append = " \ IMAGE_INSTALL_append = " \
git \ git \
sudo \
vim \ vim \
" "

View File

@ -0,0 +1,21 @@
SUMMARY = "Greenhouse container image"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
require app-container-image.bb
IMAGE_INSTALL += " \
busybox \
greenhouse \
"
# docker run
# --detach
# --restart always
# --cap-add SYS_RAWIO
# --device=/dev/mem:/dev/mem
# --device=/dev/gpiomem:/dev/gpiomem
# --publish 80:80
# --name greenhouse
# greenhouse
# run.sh

View File

@ -0,0 +1,18 @@
SUMMARY = "RPi.GPIO"
SECTION = "Devtools"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"
SRC_URI[sha256sum] = "11c684af807c89c6f066ed93cb7cfc00082095fef8899e412e92e748e642d9c1"
inherit pypi setuptools3
PYPI_PACKAGE = "w1thermsensor"
# TARGET_CFLAGS += "-fcommon"
RDEPENDS_${PN} = " \
python3 \
"