Commit 46fc6996 authored by Karel Hanák's avatar Karel Hanák
Browse files

updated core, rpi and sunxi layers


Signed-off-by: Karel Hanák's avatarKarel Hanák <karel.hanak@iqrf.org>
parent f1b46beb
require conf/distro/poky.conf
DISTRO = "iqrf-gw-os"
DISTRO_NAME = "IQRF-GW-OS IQube"
DISTRO_VERSION = "1.0.0-beta"
DISTRO_CODENAME = "IQube"
DISTRO_NAME = "IQRF-GW-OS IQUBE"
DISTRO_VERSION = "1.4.0-alpha"
DISTRO_CODENAME = "iqube-dunfell"
# Replace sysv with systemd
DISTRO_FEATURES += "systemd"
......
......@@ -2,4 +2,5 @@
wifi.mac-address-randomization=1
[device]
match-device=driver:wlan0
wifi.scan-rand-mac-address=no
......@@ -4,8 +4,8 @@ LICENSE = "CLOSED"
S = "${WORKDIR}"
SRC_URI = "file://hosts \
file://hostname \
file://iqrf-gateway.json \
file://hostname \
file://iqrf-gateway.json \
"
do_install_append () {
......
......@@ -4,5 +4,6 @@
"gwId":"FFFFFFFFFFFFFFFF",
"gwToken":"iqube-ffffffffffffffff",
"gwHost":"iqube-ffffffffffffffff.local",
"gwImage":"iqube-yocto-v1.2.2"
"gwImage":"iqube-yocto-v1.4.0",
"gwInterface": "uart"
}
kernel.panic_on_rcu_stall=1
kernel.panic=20
......@@ -3,6 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = " \
file://init.sh \
file://0001-Move-localtime-to-data-partition.patch \
file://50-iqrf-sysctl.conf \
"
do_install_append() {
......@@ -14,6 +15,8 @@ do_install_append() {
# systemd services should have read-write permission to /etc and /data/etc
sed -i -e "s#\(^ReadWritePaths=.*\)#\1 /data/etc#" ${D}${systemd_unitdir}/system/systemd-timedated.service
install -m 600 ${WORKDIR}/50-iqrf-sysctl.conf ${D}${sysconfdir}/sysctl.d
}
FILES_${PN} += "${sbindir}/*"
......@@ -25,13 +25,13 @@ do_install_append_class-target() {
install -d ${D}${sysconfdir}/php/apache2-php7/
install -m 755 ${WORKDIR}/php.ini ${D}${sysconfdir}/php/apache2-php7/
# creat symlink manually for systemd service
# we cannot inherit systemd because systemd.bbclass contains check which
# remove all init.d files and php-fpm using init.d for startup script
install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants
# creat symlink manually for systemd service
# we cannot inherit systemd because systemd.bbclass contains check which
# remove all init.d files and php-fpm using init.d for startup script
install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants
ln -sf ${systemd_unitdir}/system/php-fpm.service \
${D}${sysconfdir}/systemd/system/multi-user.target.wants/php-fpm.service
ln -sf ${systemd_unitdir}/system/php-fpm.service \
${D}${sysconfdir}/systemd/system/multi-user.target.wants/php-fpm.service
}
FILES_${PN}-fpm += "${sysconfdir}/php-fpm.d/* ${sysconfdir}/php/apache2-php7/* ${sysconfdir}/tmpfiles.d/* ${sysconfdir}/systemd/*"
......@@ -61,7 +61,7 @@ server {
# Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_param HTTP_PROXY "";
fastcgi_read_timeout 600;
fastcgi_read_timeout 1800;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass backend;
......@@ -69,7 +69,7 @@ server {
include fastcgi_params;
}
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data: https://repository.iqrfalliance.org; connect-src 'self' ws: wss: https://apidocs.iqrf.org https://repository.iqrfalliance.org https://sentry.iqrf.org; media-src 'none'; object-src 'none'; prefetch-src 'self'; child-src 'none'; frame-src 'none'; worker-src 'none'; frame-ancestors 'none'; form-action 'self'; block-all-mixed-content; report-uri https://sentry.iqrf.org/api/2/security/?sentry_key=7cd0252aae6d491b98514b9486cd2771" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://repository.iqrfalliance.org; connect-src 'self' http: https: ws: wss: https://apidocs.iqrf.org https://repository.iqrfalliance.org https://sentry.iqrf.org; media-src 'none'; object-src 'none'; prefetch-src 'self'; child-src 'none'; frame-src 'none'; worker-src 'none'; frame-ancestors 'none'; form-action 'self'; block-all-mixed-content; report-uri https://sentry.iqrf.org/api/2/security/?sentry_key=7cd0252aae6d491b98514b9486cd2771" always;
add_header Referrer-Policy "same-origin" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "deny" always;
......@@ -79,4 +79,3 @@ server {
ssl_certificate /etc/iqrf-gateway-webapp/certs/cert.pem;
ssl_certificate_key /etc/iqrf-gateway-webapp/certs/privkey.pem;
}
......@@ -11,6 +11,9 @@ SRC_URI = "gitsm://gitlab.iqrf.org/open-source/iqrf-gateway-daemon.git;protocol=
file://0001-cmake.patch \
file://0002-cmake.patch \
file://iqrf-gateway-daemon.service \
file://iqrf__IdeCounterpart.json \
file://iqrf__JsCache.json \
file://iqrf__MqttMessaging.json \
"
SRCREV_FORMAT = "daemon_iqd-gw-01"
......@@ -41,6 +44,10 @@ do_install_append() {
cp -r ${IQRF_BASE_CFG_PATH}/cfgSchemas ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__IdeCounterpart.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__JsCache.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__MqttMessaging.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -d ${D}${sysconfdir}/iqrf-gateway-daemon/certs
install -d ${D}${sysconfdir}/iqrf-gateway-daemon/certs/core
......
......@@ -20,6 +20,7 @@ import os
import random
import time
import uuid
import subprocess
import netifaces
from websocket import create_connection
......@@ -317,6 +318,14 @@ def touch(path):
def main():
# don't run when we have flag set
if os.path.exists("/data/setter/bootpart"):
# update gw version after update
cfg = load_config()
cmd = subprocess.check_output('cat /etc/os-release | grep VERSION_ID | cut -d \"=\" -f 2 | tr -d \'"\'', shell=True)
currentVersion = cmd.decode('utf-8')
cfg['gwImage'] = "iqube-yocto-" + currentVersion.rstrip()
write_config(cfg)
print('Setter was started. Exit')
return 0
......
{
"component": "iqrf::IqrfUart",
"instance": "iqrf::IqrfUart-/dev/ttyS1",
"IqrfInterface": "/dev/ttyS1",
"baudRate": 57600,
"powerEnableGpioPin": 23,
"busEnableGpioPin": -1,
"uartEnableGpioPin": 6,
"spiEnableGpioPin": 10,
"i2cEnableGpioPin": 7,
"pgmSwitchGpioPin": -1,
"uartReset": true
}
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://config.json \
file://iqrf__IdeCounterpart.json \
file://iqrf__IqrfSpi.json \
file://iqrf__JsCache.json \
file://iqrf__MqttMessaging.json \
file://iqrf__IqrfSpi.json \
file://iqrf__IqrfUart.json \
"
do_install_append() {
install -m 644 ${WORKDIR}/config.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__IdeCounterpart.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__IqrfSpi.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__JsCache.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__MqttMessaging.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/config.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__IqrfSpi.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__IqrfUart.json ${D}${sysconfdir}/iqrf-gateway-daemon
}
{
"applicationName": "IqrfGatewayDaemon",
"resourceDir": "",
"dataDir": "/usr/share/iqrf-gateway-daemon",
"cacheDir": "/var/cache/iqrf-gateway-daemon",
"userDir": "",
"configurationDir": "/etc/iqrf-gateway-daemon",
"deploymentDir": "/usr/lib/iqrf-gateway-daemon",
"components": [
{
"name": "shape::TraceFormatService",
"libraryPath": "",
"libraryName": "TraceFormatService",
"enabled": true,
"startlevel": -4
},
{
"name": "shape::TraceFileService",
"libraryPath": "",
"libraryName": "TraceFileService",
"enabled": true,
"startlevel": -3
},
{
"name": "iqrf::SyslogLogger",
"libraryPath": "",
"libraryName": "SyslogLogger",
"enabled": true,
"startlevel": -3
},
{
"name": "shape::ConfigurationService",
"libraryPath": "",
"libraryName": "",
"enabled": true,
"startlevel": -2
},
{
"name": "shape::LauncherService",
"libraryPath": "",
"libraryName": "",
"enabled": true,
"startlevel": -2
},
{
"name": "shape::WebsocketCppService",
"libraryPath": "",
"libraryName": "WebsocketCppService",
"enabled": true,
"startlevel": 0
},
{
"name": "shape::MqttService",
"libraryPath": "",
"libraryName": "MqttService",
"enabled": false,
"startlevel": 0
},
{
"name": "shape::CurlRestApiService",
"libraryPath": "",
"libraryName": "CurlRestApiService",
"enabled": true,
"startlevel": -1
},
{
"name": "iqrf::Scheduler",
"libraryPath": "",
"libraryName": "Scheduler",
"enabled": true,
"startlevel": 1
},
{
"name": "iqrf::IqrfCdc",
"libraryPath": "",
"libraryName": "IqrfCdc",
"enabled": false,
"startlevel": 0
},
{
"name": "iqrf::IqrfSpi",
"libraryPath": "",
"libraryName": "IqrfSpi",
"enabled": false,
"startlevel": 0
},
{
"name": "iqrf::IqrfUart",
"libraryPath": "",
"libraryName": "IqrfUart",
"enabled": true,
"startlevel": 0
},
{
"name": "iqrf::IqrfDpa",
"libraryPath": "",
"libraryName": "IqrfDpa",
"enabled": true,
"startlevel": 0
},
{
"name": "iqrf::IqrfInfo",
"libraryPath": "",
"libraryName": "IqrfInfo",
"enabled": true,
"startlevel": 0
},
{
"name": "iqrf::IqrfBackup",
"libraryPath": "",
"libraryName": "IqrfBackup",
"enabled": true,
"startlevel": 0
},
{
"name": "iqrf::IqrfRestore",
"libraryPath": "",
"libraryName": "IqrfRestore",
"enabled": true,
"startlevel": 0
},
{
"name": "iqrf::MonitorService",
"libraryPath": "",
"libraryName": "MonitorService",
"enabled": true,
"startlevel": 0
},
{
"name": "iqrf::LegacyApiSupport",
"libraryPath": "",
"libraryName": "LegacyApiSupport",
"enabled": true,
"startlevel": 0
},
{
"name": "iqrf::MqMessaging",
"libraryPath": "",
"libraryName": "MqMessaging",
"enabled": true,
"startlevel": 10
},
{
"name": "iqrf::MqttMessaging",
"libraryPath": "",
"libraryName": "MqttMessaging",
"enabled": true,
"startlevel": 10
},
{
"name": "iqrf::BufferedMqttMessaging",
"libraryPath": "",
"libraryName": "BufferedMqttMessaging",
"enabled": false,
"startlevel": 10
},
{
"name": "iqrf::WebsocketMessaging",
"libraryPath": "",
"libraryName": "WebsocketMessaging",
"enabled": true,
"startlevel": 10
},
{
"name": "iqrf::UdpMessaging",
"libraryPath": "",
"libraryName": "UdpMessaging",
"enabled": true,
"startlevel": 10
},
{
"name": "iqrf::IdeCounterpart",
"libraryPath": "",
"libraryName": "IdeCounterpart",
"enabled": true,
"startlevel": 0
},
{
"name": "iqrf::JsonSplitter",
"libraryPath": "",
"libraryName": "JsonSplitter",
"enabled": true,
"startlevel": 1
},
{
"name": "iqrf::SchedulerMessaging",
"libraryPath": "",
"libraryName": "SchedulerMessaging",
"enabled": true,
"startlevel": 10
},
{
"name": "iqrf::JsonDpaApiRaw",
"libraryPath": "",
"libraryName": "JsonDpaApiRaw",
"enabled": true,
"startlevel": 2
},
{
"name": "iqrf::JsonMngApi",
"libraryPath": "",
"libraryName": "JsonMngApi",
"enabled": true,
"startlevel": 2
},
{
"name": "iqrf::JsonMngMetaDataApi",
"libraryPath": "",
"libraryName": "JsonMngMetaDataApi",
"enabled": true,
"startlevel": 2
},
{
"name": "iqrf::JsonIqrfInfoApi",
"libraryPath": "",
"libraryName": "JsonIqrfInfoApi",
"enabled": true,
"startlevel": 2
},
{
"name": "iqrf::JsonCfgApi",
"libraryPath": "",
"libraryName": "JsonCfgApi",
"enabled": true,
"startlevel": 2
},
{
"name": "iqrf::JsCache",
"libraryPath": "",
"libraryName": "JsCache",
"enabled": true,
"startlevel": 2
},
{
"name": "iqrf::JsRenderDuktape",
"libraryPath": "",
"libraryName": "JsRenderDuktape",
"enabled": true,
"startlevel": 2
},
{
"name": "iqrf::JsonDpaApiIqrfStandard",
"libraryPath": "",
"libraryName": "JsonDpaApiIqrfStandard",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::JsonDpaApiIqrfStdExt",
"libraryPath": "",
"libraryName": "JsonDpaApiIqrfStdExt",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::NativeUploadService",
"libraryPath": "",
"libraryName": "NativeUploadService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::WriteTrConfService",
"libraryPath": "",
"libraryName": "WriteTrConfService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::ReadTrConfService",
"libraryPath": "",
"libraryName": "ReadTrConfService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::SmartConnectService",
"libraryPath": "",
"libraryName": "SmartConnectService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::BondNodeLocalService",
"libraryPath": "",
"libraryName": "BondNodeLocalService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::EnumerateDeviceService",
"libraryPath": "",
"libraryName": "EnumerateDeviceService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::RemoveBondService",
"libraryPath": "",
"libraryName": "RemoveBondService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::AutonetworkService",
"libraryPath": "",
"libraryName": "AutonetworkService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::BackupService",
"libraryPath": "",
"libraryName": "BackupService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::RestoreService",
"libraryPath": "",
"libraryName": "RestoreService",
"enabled": true,
"startlevel": 3
},
{
"name": "iqrf::OtaUploadService",
"libraryPath": "",
"libraryName": "OtaUploadService",
"enabled": true,
"startlevel": 3
}
]
}
{
"component": "iqrf::IqrfSpi",
"instance": "iqrf::IqrfSpi-/dev/spidev1.0",
"IqrfInterface": "/dev/spidev1.0",
"powerEnableGpioPin": 19,
"busEnableGpioPin": -1,
"spiEnableGpioPin": 10,
"uartEnableGpioPin": 6,
"i2cEnableGpioPin": 7,
"pgmSwitchGpioPin": 3,
"spiReset": true
}
{
"component": "iqrf::IqrfUart",
"instance": "iqrf::IqrfUart-/dev/ttyS1",
"IqrfInterface": "/dev/ttyS1",
"baudRate": 57600,
"powerEnableGpioPin": 19,
"busEnableGpioPin": -1,
"uartEnableGpioPin": 6,
"spiEnableGpioPin": 10,
"i2cEnableGpioPin": 7,
"pgmSwitchGpioPin": -1,
"uartReset": true
}
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://config.json \
file://iqrf__IqrfSpi.json \
file://iqrf__IqrfUart.json \
"
do_install_append() {
install -m 644 ${WORKDIR}/config.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__IqrfSpi.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqrf__IqrfUart.json ${D}${sysconfdir}/iqrf-gateway-daemon
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment