global: remove recipes related to outdated features

There are several recipes in meta-digi related to features that we haven't
tested in a long time and don't appear in the DEY 5.0 documentation. Remove
them to avoid unexpected behavior.

Said features are:
    * Coral TPU support (only supported in DEY 3.2)
    * AWS support (removed from default images and docs in DEY 4.0)
    * dey-image-tiny (hasn't been maintained since DEY 2.0)

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2025-05-14 15:17:22 +02:00
parent 94c6e338f5
commit d4e1917f1c
29 changed files with 0 additions and 1344 deletions

View File

@ -1,37 +0,0 @@
SUMMARY = "Edge TPU runtime library for Coral devices"
HOMEPAGE = "https://coral.googlesource.com/edgetpu"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://libedgetpu/LICENSE.txt;md5=c0e85c67b919e863a1a7a3da109dc40d"
SRC_URI = "https://dl.google.com/coral/edgetpu_api/edgetpu_runtime_20210119.zip"
SRC_URI[md5sum] = "5c0b992d73683e395d6993761064d2df"
SRC_URI[sha256sum] = "b23b2c5a227d7f0e65dcc91585028d27c12e764f8ce4c4db3f114be4a49af3ae"
S = "${WORKDIR}/edgetpu_runtime"
RDEPENDS:${PN} = "libusb1"
# The library files in direct correspond to max frequency, those in throttled correspond to reduced frequency.
LIBEDGETPU_TYPE = "direct"
LIBEDGETPU_ARCH = "aarch64"
do_install() {
install -d ${D}${sysconfdir}/udev/rules.d
install -m 0644 ${S}/libedgetpu/edgetpu-accelerator.rules \
${D}${sysconfdir}/udev/rules.d/99-edgetpu-accelerator.rules
install -d ${D}/${libdir}
install -m 755 ${S}/libedgetpu/${LIBEDGETPU_TYPE}/${LIBEDGETPU_ARCH}/libedgetpu.so.1.0 \
${D}/${libdir}/libedgetpu.so.1.0
ln -sf ${libdir}/libedgetpu.so.1.0 ${D}/${libdir}/libedgetpu.so.1
ln -sf ${libdir}/libedgetpu.so.1.0 ${D}/${libdir}/libedgetpu.so
install -d ${D}/${includedir}
install -m 755 ${S}/libedgetpu/edgetpu.h ${D}/${includedir}/edgetpu.h
}
FILES:${PN} += "${libdir}/libedgetpu.so \
${includedir}/edgetpu.h \
"
INSANE_SKIP:${PN} += "already-stripped"

View File

@ -1,29 +0,0 @@
From: Arturo Buzarra <arturo.buzarra@digi.com>
Date: Mon, 28 Jun 2021 15:00:58 +0200
Subject: [PATCH] gstreamer: fix video sink for wayland images
Upstream-Status: Inappropriate [DEY specific]
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
---
gstreamer/gstreamer.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gstreamer/gstreamer.py b/gstreamer/gstreamer.py
index 2676439..e055d77 100644
--- a/gstreamer/gstreamer.py
+++ b/gstreamer/gstreamer.py
@@ -249,11 +249,11 @@ def run_pipeline(user_function,
scale_caps = 'video/x-raw,width={width},height={height}'.format(width=scale[0], height=scale[1])
PIPELINE += """ ! tee name=t
t. ! {leaky_q} ! videoconvert ! videoscale ! {scale_caps} ! videobox name=box autocrop=true
! {sink_caps} ! {sink_element}
t. ! {leaky_q} ! videoconvert
- ! rsvgoverlay name=overlay ! videoconvert ! ximagesink sync=false
+ ! rsvgoverlay name=overlay ! videoconvert ! waylandsink sync=false
"""
SINK_ELEMENT = 'appsink name=appsink emit-signals=true max-buffers=1 drop=true'
SINK_CAPS = 'video/x-raw,format=RGB,width={width},height={height}'
LEAKY_Q = 'queue max-size-buffers=1 leaky=downstream'
--

View File

@ -1,36 +0,0 @@
SUMMARY = "Edge TPU keyphrase detector"
HOMEPAGE = "https://coral.ai/examples"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRCREV = "655a354df5f939602ff6b9da2cbc4d2c78898107"
SRC_URI = "git://github.com/google-coral/project-bodypix.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
RDEPENDS:${PN} = "python3-pycoral \
python3-svgwrite \
python3-scipy \
libusb1 \
"
do_install() {
# Install Gstreamer examples
install -d ${D}/opt/libedgetpu
install -d ${D}/opt/libedgetpu/bodypix
install -d ${D}/opt/libedgetpu/bodypix/models
install -d ${D}/opt/libedgetpu/bodypix/posenet_lib
install -d ${D}/opt/libedgetpu/bodypix/posenet_lib/aarch64
install -m 0555 ${S}/models/bodypix_mobilenet* ${D}/opt/libedgetpu/bodypix/models/
install -m 0555 ${S}/bodypix.py ${D}/opt/libedgetpu/bodypix
install -m 0555 ${S}/gstreamer.py ${D}/opt/libedgetpu/bodypix
install -m 0555 ${S}/pose_engine.py ${D}/opt/libedgetpu/bodypix
install -m 0555 ${S}/posenet_lib/aarch64/posenet_decoder.so ${D}/opt/libedgetpu/bodypix/posenet_lib/aarch64
}
FILES:${PN} += "/opt/libedgetpu/bodypix/* \
"
INSANE_SKIP:${PN} += "already-stripped"

View File

@ -1,35 +0,0 @@
SUMMARY = "Edge TPU simple camera examples"
HOMEPAGE = "https://coral.ai/examples"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRCREV = "19335531f599133e054ec2ddcc31733d24031ba5"
SRC_URI = "git://github.com/google-coral/examples-camera.git;protocol=https;branch=master \
file://0001-gstreamer-fix-video-sink-for-wayland-images.patch \
"
S = "${WORKDIR}/git"
inherit gobject-introspection
RDEPENDS:${PN} = "python3-pycoral \
gstreamer1.0-plugins-base \
"
do_configure() {
bash download_models.sh
}
do_install() {
# Install Gstreamer examples
install -d ${D}/opt/libedgetpu
install -d ${D}/opt/libedgetpu/camera
install -d ${D}/opt/libedgetpu/camera/all_models
install -d ${D}/opt/libedgetpu/camera/gstreamer
rm -f ${S}/gstreamer/install_requirements.sh
install -m 0555 ${S}/all_models/* ${D}/opt/libedgetpu/camera/all_models/
install -m 0555 ${S}/gstreamer/* ${D}/opt/libedgetpu/camera/gstreamer/
}
FILES:${PN} += "/opt/libedgetpu/camera/* \
"

View File

@ -1,33 +0,0 @@
SUMMARY = "Edge TPU keyphrase detector"
HOMEPAGE = "https://coral.ai/examples"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRCREV = "43a5fd0578c75c9140b4f057de74f2dbac96ceff"
SRC_URI = "git://github.com/google-coral/project-keyword-spotter.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
RDEPENDS:${PN} = "python3-pycoral \
python3-pyaudio \
"
do_install() {
# Install Gstreamer examples
install -d ${D}/opt/libedgetpu
install -d ${D}/opt/libedgetpu/keyword
install -d ${D}/opt/libedgetpu/keyword/models
install -d ${D}/opt/libedgetpu/keyword/config
install -m 0555 ${S}/models/* ${D}/opt/libedgetpu/keyword/models/
install -m 0555 ${S}/run_model.py ${D}/opt/libedgetpu/keyword
install -m 0555 ${S}/mel_features.py ${D}/opt/libedgetpu/keyword
install -m 0555 ${S}/model.py ${D}/opt/libedgetpu/keyword
install -m 0555 ${S}/audio_recorder.py ${D}/opt/libedgetpu/keyword
install -m 0555 ${S}/config/labels_gc2.raw.txt ${D}/opt/libedgetpu/keyword/config
install -m 0555 ${S}/config/commands_v2.txt ${D}/opt/libedgetpu/keyword/config
}
FILES:${PN} += "/opt/libedgetpu/keyword/* \
"

View File

@ -1,49 +0,0 @@
SUMMARY = "TensorFlow Lite Python Library"
DESCRIPTION = "TensorFlow Lite is the official solution for running machine learning models on mobile and embedded devices."
SECTION = "devel/python"
HOMEPAGE = "https://www.tensorflow.org/lite/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/tflite_runtime-2.5.0.dist-info/METADATA;md5=8c4b9e107a64b0121980a8705094014b"
PYTHON_PACKAGE = "tflite_runtime-2.5.0-cp38-cp38-linux_aarch64.whl"
SRC_URI = "https://github.com/google-coral/pycoral/releases/download/v1.0.1/${PYTHON_PACKAGE};downloadfilename=${PYTHON_PACKAGE};subdir=${BP}"
SRC_URI[md5sum] = "9c47617e1fa0bdca673a78b8b6688d64"
SRC_URI[sha256sum] = "b87a4c152be05d3585521a1d5418f7645a4fb82965772489b983e93aae6bd9ac"
DEPENDS = "python3 python3-pip-native python3-wheel-native"
RDEPENDS:${PN} = "${PYTHON_PN} \
${PYTHON_PN}-numpy \
"
inherit python3native
do_unpack[depends] += "unzip-native:do_populate_sysroot"
do_unpack_extra(){
[ -d ${S} ] || mkdir -p ${S}
cd ${S}
unzip -q -o ${S}/${PYTHON_PACKAGE} -d ${S}
}
addtask unpack_extra after do_unpack before do_patch
do_install() {
# Install pip package
install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \
-t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \
${WORKDIR}/${BP}/tflite_runtime-*.whl
}
FILES:${PN} += "\
${libdir}/${PYTHON_DIR}/site-packages/* \
"
INSANE_SKIP:${PN} += "already-stripped"
# This package provides the same python files as NXP's tensorflow-lite
RCONFLICTS:${PN} = "tensorflow-lite"
COMPATIBLE_MACHINE = "(-)"
COMPATIBLE_MACHINE:aarch64 = "(.*)"

View File

@ -1,110 +0,0 @@
# Adds AWS IoT device SDK for embedded C configuration
#
# Customer specific MQTT HOST
AWS_IOT_MQTT_HOST ?= ""
# Default port for MQTT/S
AWS_IOT_MQTT_PORT ?= "8883"
# Thing Name of the Shadow the device is associated with
AWS_IOT_MY_THING_NAME ?= "AWS-IoT-C-SDK"
# Root CA file name
AWS_IOT_ROOT_CA_FILENAME ?= "rootCA.crt"
# Device signed certificate file name
AWS_IOT_CERTIFICATE_FILENAME ?= "cert.pem"
# Device private key filename
AWS_IOT_PRIVATE_KEY_FILENAME ?= "privkey.pem"
# MQTT PubSub
# Any time a message is sent out through the MQTT layer. The message is copied
# into this buffer anytime a publish is done.
# This will also be used in the case of Thing Shadow
AWS_IOT_MQTT_TX_BUF_LEN ?= "512"
# Any message that comes into the device should be less than this buffer size.
# If a received message is bigger than this buffer size the message will be
# dropped
AWS_IOT_MQTT_RX_BUF_LEN ?= "512"
# Maximum number of topic filters the MQTT client can handle at any given time.
# This should be increased appropriately when using Thing Shadow
AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS ?= "5"
# Thing Shadow specific configs
# At any given time we will wait for this many responses.
# This will correlate to the rate at which the shadow actions are requested
MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME ?= "10"
# We could perform shadow action on any thing Name and this is maximum Thing
# Names we can act on at any given time
MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME ?= "10"
# These are the max tokens that is expected to be in the Shadow JSON document.
# It includes the metadata that gets published
MAX_JSON_TOKEN_EXPECTED ?= "120"
# The Thing Name should not be bigger than this value. Modify this if the Thing
# Name needs to be bigger
MAX_SIZE_OF_THING_NAME ?= "20"
# Auto Reconnect specific config
# Minimum time before the First reconnect attempt is made as part of the
# exponential back-off algorithm (milliseconds)
AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL ?= "1000"
# Maximum time interval after which exponential back-off will stop attempting
# to reconnect (milliseconds)
AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL ?= "128000"
# Logging level control: error, warn, info, debug, trace.
AWS_IOT_LOGGING_LEVEL ?= "debug"
def get_log_level(d):
levels = ['error', 'warn', 'info', 'debug', 'trace']
log_flags = ""
log_level = d.getVar('AWS_IOT_LOGGING_LEVEL')
if log_level == 'none':
return ""
if log_level not in levels:
log_level = "debug"
d.setVar('AWS_IOT_LOGGING_LEVEL', log_level)
log_index = levels.index(log_level)
for i, val in enumerate(levels):
log_flags = log_flags + "-DENABLE_IOT_" + val.upper() + " "
if i == log_index:
break;
return log_flags
#######################
# AWS Greengrass Core #
#######################
#
# Verisign root CA server certificate used to authenticate the AWS IoT server.
#
# https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem
#
AWS_GGCORE_ROOT_CA ?= "aws-root-ca.pem"
# Greengrass core device certificate
AWS_GGCORE_CERTIFICATE ?= "gg-core.pem"
# Greengrass core device private key
AWS_GGCORE_PRIVATE_KEY ?= "gg-core.key"
# Greengrass core Thing ARN
AWS_GGCORE_THING_ARN ?= ""
# AWS IoT endpoint (check your account)
# CLI: aws iot describe-endpoint
AWS_GGCORE_IOT_HOST ?= ""

View File

@ -1,68 +0,0 @@
SUMMARY = "Python Library for Coral devices"
DESCRIPTION = "Python Library to run inferences and perform on-device transfer learning with TensorFlow Lite models on Coral devices"
SECTION = "devel/python"
HOMEPAGE = "https://coral.ai/software/#pycoral-api"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/pycoral-1.0.1.dist-info/LICENSE;md5=d8927f3331d2b3e321b7dd1925166d25"
PYTHON_PACKAGE = "pycoral-1.0.1-cp38-cp38-linux_aarch64.whl"
SRC_URI = "git://github.com/google-coral/pycoral.git;protocol=https;branch=master"
SRCREV = "d4b9f572fa3baef9d854483a171e02a6b3f9dbd0"
SRC_URI += "https://github.com/google-coral/pycoral/releases/download/v1.0.1/${PYTHON_PACKAGE};downloadfilename=${PYTHON_PACKAGE};subdir=${BP};name=python-wheel"
SRC_URI[python-wheel.md5sum] = "ea89677a47d7d81d2558b8dbbae44d95"
SRC_URI[python-wheel.sha256sum] = "894468447192fbcf946157db0f3b6424ece6d70bcec1243892d27cd7b521f176"
DEPENDS = "python3 python3-pip-native python3-wheel-native curl-native ca-certificates-native"
RDEPENDS:${PN} = "${PYTHON_PN} \
${PYTHON_PN}-numpy \
${PYTHON_PN}-pycairo \
${PYTHON_PN}-pygobject \
${PYTHON_PN}-pillow \
libedgetpu \
tensorflow-lite-coral \
"
inherit python3native
do_unpack[depends] += "unzip-native:do_populate_sysroot"
do_unpack_extra(){
[ -d ${S} ] || mkdir -p ${S}
cd ${S}
unzip -q -o ${S}/${PYTHON_PACKAGE} -d ${S}
}
addtask unpack_extra after do_unpack before do_patch
do_configure() {
export CURL_CA_BUNDLE=${STAGING_DIR_NATIVE}/etc/ssl/certs/ca-certificates.crt
cd ${WORKDIR}/git
bash examples/install_requirements.sh classify_image.py
}
do_install() {
# Install examples
install -d ${D}/opt/pycoral
install -m 0555 ${WORKDIR}/git/test_data/* ${D}/opt/pycoral
install -m 0555 ${WORKDIR}/git/examples/classify_image.py ${D}/opt/pycoral
# Install pip package
install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \
-t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \
${WORKDIR}/${BP}/pycoral-*.whl
}
FILES:${PN} += "\
${libdir}/${PYTHON_DIR}/site-packages/* \
/opt/pycoral/* \
"
INSANE_SKIP:${PN} += "already-stripped"
COMPATIBLE_MACHINE = "(-)"
COMPATIBLE_MACHINE:aarch64 = "(.*)"

View File

@ -1,31 +0,0 @@
# ***************************************************************************
# Copyright (c) 2017 Digi International Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
#
# ***************************************************************************
SUBDIRS := src
all: $(SUBDIRS)
.PHONY: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
.PHONY: clean install
clean install:
for a in $(SUBDIRS); do $(MAKE) -C $$a $@; done

View File

@ -1,79 +0,0 @@
# ***************************************************************************
# Copyright (c) 2017 Digi International Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
#
# ***************************************************************************
# Use GNU C Compiler.
CC ?= gcc
# Generated Library name.
NAME := awsiotsdk
# Location of Source Code.
SRC = .
#IoT client directory.
IOT_CLIENT_DIR = $(SRC)/..
PLATFORM_DIR = $(IOT_CLIENT_DIR)/platform/linux/mbedtls
PLATFORM_COMMON_DIR = $(IOT_CLIENT_DIR)/platform/linux/common
INSTALL_HEADERS_DIR = /usr/include/awsiotsdk
CFLAGS += -I $(IOT_CLIENT_DIR)/include
CFLAGS += -I $(IOT_CLIENT_DIR)/external_libs/jsmn
CFLAGS += -I $(PLATFORM_COMMON_DIR)
CFLAGS += -I $(PLATFORM_DIR)
CFLAGS += -Wall -g
CFLAGS += $(LOG_FLAGS)
CFLAGS += $(shell pkg-config --cflags mbedtls)
# Libraries to Link.
LIBS += $(shell pkg-config --libs --static mbedtls)
# Linking Flags.
LDFLAGS += $(DFLAGS)
# Target output to generate.
SRCS += $(wildcard $(SRC)/*.c)
SRCS += $(wildcard $(IOT_CLIENT_DIR)/external_libs/jsmn/*.c)
SRCS += $(wildcard $(PLATFORM_DIR)/*.c)
SRCS += $(wildcard $(PLATFORM_COMMON_DIR)/*.c)
OBJS = $(SRCS:.c=.o)
.PHONY: all
all: lib$(NAME).a
lib$(NAME).a: $(OBJS)
$(AR) -rcs $@ $^
.PHONY: install
install: lib$(NAME).a
# Install library and pkg-config file.
install -d $(DESTDIR)/usr/lib/pkgconfig
install -m 0644 lib$(NAME).a $(DESTDIR)/usr/lib/
install -m 0644 ../awsiotsdk.pc $(DESTDIR)/usr/lib/pkgconfig/
# Install header files.
install -d $(DESTDIR)$(INSTALL_HEADERS_DIR)
install -m 0644 $(IOT_CLIENT_DIR)/include/*.h $(DESTDIR)$(INSTALL_HEADERS_DIR)/
install -m 0644 $(IOT_CLIENT_DIR)/external_libs/jsmn/*.h $(DESTDIR)$(INSTALL_HEADERS_DIR)/
install -m 0644 $(PLATFORM_COMMON_DIR)/*.h $(DESTDIR)$(INSTALL_HEADERS_DIR)/
install -m 0644 $(PLATFORM_DIR)/*.h $(DESTDIR)$(INSTALL_HEADERS_DIR)/
.PHONY: clean
clean:
-rm -f lib$(NAME).a $(OBJS)

View File

@ -1,98 +0,0 @@
/*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/**
* @file aws_iot_config.h
* @brief AWS IoT specific configuration file
*/
#ifndef SRC_SHADOW_IOT_SHADOW_CONFIG_H_
#define SRC_SHADOW_IOT_SHADOW_CONFIG_H_
/* Get from console */
/* ================================================= */
/* Customer specific MQTT HOST. The same will be used for Thing Shadow */
#define AWS_IOT_MQTT_HOST "##AWS_IOT_MQTT_HOST##"
/* Default port for MQTT/S */
#define AWS_IOT_MQTT_PORT ##AWS_IOT_MQTT_PORT##
/* Thing Name of the Shadow this device is associated with */
#define AWS_IOT_MY_THING_NAME "##AWS_IOT_MY_THING_NAME##"
/* MQTT client ID should be unique for every device */
#define AWS_IOT_MQTT_CLIENT_ID AWS_IOT_MY_THING_NAME
/* Root CA file name */
#define AWS_IOT_ROOT_CA_FILENAME "##AWS_IOT_ROOT_CA_FILENAME##"
/* Device signed certificate file name */
#define AWS_IOT_CERTIFICATE_FILENAME "##AWS_IOT_CERTIFICATE_FILENAME##"
/* Device private key filename */
#define AWS_IOT_PRIVATE_KEY_FILENAME "##AWS_IOT_PRIVATE_KEY_FILENAME##"
/* ================================================= */
/* MQTT PubSub */
/* ================================================= */
/* Any time a message is sent out through the MQTT layer. The message is copied
* into this buffer anytime a publish is done.
* This will also be used in the case of Thing Shadow */
#define AWS_IOT_MQTT_TX_BUF_LEN ##AWS_IOT_MQTT_TX_BUF_LEN##
/* Any message that comes into the device should be less than this buffer size.
* If a received message is bigger than this buffer size the message will be
* dropped. */
#define AWS_IOT_MQTT_RX_BUF_LEN ##AWS_IOT_MQTT_RX_BUF_LEN##
/* Maximum number of topic filters the MQTT client can handle at any given time.
* This should be increased appropriately when using Thing Shadow */
#define AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS ##AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS##
/* Thing Shadow specific configs */
/* Maximum size of the Shadow buffer to store the received Shadow message */
#define SHADOW_MAX_SIZE_OF_RX_BUFFER AWS_IOT_MQTT_RX_BUF_LEN + 1
/* Maximum size of the Unique Client Id.
* For More info on the Client Id refer \ref response "Acknowledgments" */
#define MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80
/* This is size of the extra sequence number that will be appended to the
* Unique client Id */
#define MAX_SIZE_CLIENT_ID_WITH_SEQUENCE MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10
/* This is size of the the total clientToken key and value pair in the JSON */
#define MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20
/* At any given time we will wait for this many responses.
* This will correlate to the rate at which the shadow actions are requested */
#define MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME ##MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME##
/* We could perform shadow action on any thing Name and this is maximum Thing
* Names we can act on at any given time */
#define MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME ##MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME##
/* These are the max tokens that is expected to be in the Shadow JSON document.
* It includes the metadata that gets published */
#define MAX_JSON_TOKEN_EXPECTED ##MAX_JSON_TOKEN_EXPECTED##
/* All shadow actions have to be published or subscribed to a topic which is of
* the format $aws/things/{thingName}/shadow/update/accepted.
* This refers to the size of the topic without the Thing Name */
#define MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60
/* The Thing Name should not be bigger than this value. Modify this if the
* Thing Name needs to be bigger */
#define MAX_SIZE_OF_THING_NAME ##MAX_SIZE_OF_THING_NAME##
/* This size includes the length of topic with Thing Name */
#define MAX_SHADOW_TOPIC_LENGTH_BYTES MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME
/* ================================================= */
/* Auto Reconnect specific config */
/* ================================================= */
/* Minimum time before the First reconnect attempt is made as part of the
* exponential back-off algorithm */
#define AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL ##AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL##
/* Maximum time interval after which exponential back-off will stop attempting
* to reconnect */
#define AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL ##AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL##
/* ================================================= */
#endif /* SRC_SHADOW_IOT_SHADOW_CONFIG_H_ */

View File

@ -1,12 +0,0 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: awsiotsdk
Description: SDK for connecting to AWS IoT from a device using embedded C
Version: 2.1.1
Requires.private: mbedtls
Libs: -L${libdir} -lawsiotsdk
Cflags: -I${includedir}/awsiotsdk -I${includedir}

View File

@ -1,73 +0,0 @@
# Copyright (C) 2017, Digi International Inc.
SUMMARY = "SDK for connecting to AWS IoT from a device using embedded C"
HOMEPAGE = "https://github.com/aws/aws-iot-device-sdk-embedded-C"
SECTION = "base"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=acc7a1bf87c055789657b148939e4b40"
DEPENDS = "mbedtls"
SRC_URI = " \
git://github.com/aws/aws-iot-device-sdk-embedded-C.git;protocol=https;branch=main \
file://aws_iot_config.h.template \
file://awsiotsdk.pc \
file://Makefile \
file://Makefile.lib \
"
# Tag 'v2.1.1'
SRCREV = "70071112bd5e1c5b9f150894fafe199637b4f63a"
S = "${WORKDIR}/git"
inherit aws-iot pkgconfig
EXTRA_OEMAKE += "'LOG_FLAGS=${@get_log_level(d)}'"
do_configure() {
cp -f ${WORKDIR}/awsiotsdk.pc ${S}
# Copy and update the configuration header file.
cp -f ${WORKDIR}/aws_iot_config.h.template ${S}/include/aws_iot_config.h
sed -i -e "s,##AWS_IOT_MQTT_HOST##,${AWS_IOT_MQTT_HOST},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_MQTT_PORT##,${AWS_IOT_MQTT_PORT},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_MY_THING_NAME##,${AWS_IOT_MY_THING_NAME},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_ROOT_CA_FILENAME##,${AWS_IOT_ROOT_CA_FILENAME},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_CERTIFICATE_FILENAME##,${AWS_IOT_CERTIFICATE_FILENAME},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_PRIVATE_KEY_FILENAME##,${AWS_IOT_PRIVATE_KEY_FILENAME},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_MQTT_TX_BUF_LEN##,${AWS_IOT_MQTT_TX_BUF_LEN},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_MQTT_RX_BUF_LEN##,${AWS_IOT_MQTT_RX_BUF_LEN},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS##,${AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME##,${MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME##,${MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##MAX_JSON_TOKEN_EXPECTED##,${MAX_JSON_TOKEN_EXPECTED},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##MAX_SIZE_OF_THING_NAME##,${MAX_SIZE_OF_THING_NAME},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL##,${AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL},g" "${S}/include/aws_iot_config.h"
sed -i -e "s,##AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL##,${AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL},g" "${S}/include/aws_iot_config.h"
# Copy the Makefiles.
cp -f ${WORKDIR}/Makefile ${S}
cp -f ${WORKDIR}/Makefile.lib ${S}/src/Makefile
}
do_install() {
oe_runmake DESTDIR=${D} install
# Install certificates only if they exist.
if [ -f "${AWS_IOT_CERTS_DIR}/${AWS_IOT_ROOT_CA_FILENAME}" ] && \
[ -f "${AWS_IOT_CERTS_DIR}/${AWS_IOT_CERTIFICATE_FILENAME}" ] && \
[ -f "${AWS_IOT_CERTS_DIR}/${AWS_IOT_PRIVATE_KEY_FILENAME}" ]; then
install -d ${D}${sysconfdir}/ssl/certs
install -m 0644 "${AWS_IOT_CERTS_DIR}/${AWS_IOT_ROOT_CA_FILENAME}" ${D}${sysconfdir}/ssl/certs/
install -m 0644 "${AWS_IOT_CERTS_DIR}/${AWS_IOT_CERTIFICATE_FILENAME}" ${D}${sysconfdir}/ssl/certs/
install -m 0644 "${AWS_IOT_CERTS_DIR}/${AWS_IOT_PRIVATE_KEY_FILENAME}" ${D}${sysconfdir}/ssl/certs/
fi
}
PACKAGES =+ "${PN}-cert"
FILES:${PN}-cert = "${sysconfdir}/ssl/certs/"
ALLOW_EMPTY:${PN} = "1"

View File

@ -1,141 +0,0 @@
# Copyright (C) 2018-2022, Digi International Inc.
SUMMARY = "AWS IoT Greengrass core"
HOMEPAGE = "https://aws.amazon.com/greengrass/"
CONFIGURATION_DIRECTORY = "config"
LICENSE = "Apache-2.0 | BSD-2-Clause | BSD-3-Clause | MIT | PD | Proprietary"
SRC_URI:arm = " \
http:///not/exist/greengrass-linux-armv7l-${PV}.tar.gz;name=arm \
file://greengrass.service \
file://greengrass-init \
"
SRC_URI:aarch64 = " \
http:///not/exist/greengrass-linux-aarch64-${PV}.tar.gz;name=aarch64 \
file://greengrass.service \
file://greengrass-init \
"
GG_TARBALL_LOCAL_PATH ?= ""
# The tarball is only available for downloading after registration, so provide
# a PREMIRROR to a local directory that can be configured in the project's
# local.conf file using GG_TARBALL_LOCAL_PATH variable.
python() {
gg_tarball_local_path = d.getVar('GG_TARBALL_LOCAL_PATH')
if gg_tarball_local_path:
premirrors = d.getVar('PREMIRRORS')
d.setVar('PREMIRRORS', "http:///not/exist/greengrass.* file://%s \\n %s" % (gg_tarball_local_path, premirrors))
}
S = "${WORKDIR}/${BPN}"
inherit aws-iot update-rc.d useradd systemd
GG_USESYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', 'no', d)}"
# Disable tasks not needed for the binary package
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install() {
install -d ${D}/${BPN}
tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - -C ${S} . \
| tar --no-same-owner -xpf - -C ${D}/${BPN}
# Install wrapper bootscript to launch Greengrass core on boot
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/greengrass-init ${D}${sysconfdir}/greengrass
sed -i -e "s,##GG_INSTALL_DIR##,/${BPN},g" ${D}${sysconfdir}/greengrass
ln -sf ${sysconfdir}/greengrass ${D}${sysconfdir}/init.d/greengrass
# Install systemd service
install -d ${D}${systemd_unitdir}/system/
install -m 0644 ${WORKDIR}/greengrass.service ${D}${systemd_unitdir}/system/greengrass.service
# If certificates do exist, install them and update the config file
if [ -f "${AWS_IOT_CERTS_DIR}/${AWS_GGCORE_ROOT_CA}" ] && \
[ -f "${AWS_IOT_CERTS_DIR}/${AWS_GGCORE_CERTIFICATE}" ] && \
[ -f "${AWS_IOT_CERTS_DIR}/${AWS_GGCORE_PRIVATE_KEY}" ]; then
install -m 0644 "${AWS_IOT_CERTS_DIR}/${AWS_GGCORE_ROOT_CA}" \
"${AWS_IOT_CERTS_DIR}/${AWS_GGCORE_CERTIFICATE}" \
"${AWS_IOT_CERTS_DIR}/${AWS_GGCORE_PRIVATE_KEY}" \
${D}/${BPN}/certs/
sed -i -e "s,\[ROOT_CA_PEM_HERE],${AWS_GGCORE_ROOT_CA},g" \
-e "s,\[CLOUD_PEM_CRT_HERE],${AWS_GGCORE_CERTIFICATE},g" \
-e "s,\[CLOUD_PEM_KEY_HERE],${AWS_GGCORE_PRIVATE_KEY},g" \
${D}/${BPN}/config/config.json
fi
# Configure the rest of GG Core parameters
[ -n "${AWS_GGCORE_THING_ARN}" ] && sed -i -e "s,\[THING_ARN_HERE],${AWS_GGCORE_THING_ARN},g" ${D}/${BPN}/config/config.json
if [ -n "${AWS_GGCORE_IOT_HOST}" ]; then
AWS_GGCORE_HOST_PREFIX="$(echo ${AWS_GGCORE_IOT_HOST} | sed -e 's,\([^.]\+\)\.iot.*,\1,g')"
AWS_GGCORE_REGION="$(echo ${AWS_GGCORE_IOT_HOST} | sed -e 's,.*.iot\.\([^.]\+\)\..*,\1,g')"
[ -n "${AWS_GGCORE_HOST_PREFIX}" ] && sed -i -e "s,\[HOST_PREFIX_HERE],${AWS_GGCORE_HOST_PREFIX},g" ${D}/${BPN}/config/config.json
[ -n "${AWS_GGCORE_REGION}" ] && sed -i -e "s,\[AWS_REGION_HERE],${AWS_GGCORE_REGION},g" ${D}/${BPN}/config/config.json
fi
# Configure whether to use systemd or not
sed -i -e "/useSystemd/{s,\[yes|no],${GG_USESYSTEMD},g}" ${D}/${BPN}/config/config.json
}
pkg_postinst_ontarget:${PN}() {
# Enable protection for hardlinks and symlinks
if ! grep -qs 'protected_.*links' $D${sysconfdir}/sysctl.conf; then
cat >> $D${sysconfdir}/sysctl.conf <<-_EOF_
# Greengrass: protect hardlinks/symlinks
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
_EOF_
fi
# Customize '/etc/fstab'
if [ -f "$D${sysconfdir}/fstab" ]; then
# Disable TMPFS /var/volatile
sed -i -e '\#^tmpfs[[:blank:]]\+/var/volatile#s,^,#,g' $D${sysconfdir}/fstab
# Mount a cgroup hierarchy with all available subsystems
if ! grep -qs '^cgroup' $D${sysconfdir}/fstab; then
cat >> $D${sysconfdir}/fstab <<-_EOF_
# Greengrass: mount cgroups
cgroup /sys/fs/cgroup cgroup defaults 0 0
_EOF_
fi
fi
# Disable '/etc/resolv.conf' symlink
if [ -f "$D${sysconfdir}/default/volatiles/00_core" ]; then
sed -i -e '/resolv.conf/d' $D${sysconfdir}/default/volatiles/00_core
cat >> $D${sysconfdir}/default/volatiles/00_core <<-_EOF_
# Greengrass: create a real (no symlink) resolv.conf
f root root 0644 /etc/resolv.conf none
_EOF_
fi
}
FILES:${PN} = "/${BPN} ${sysconfdir} ${systemd_unitdir}"
CONFFILES:${PN} += "/${BPN}/config/config.json"
INITSCRIPT_NAME = "greengrass"
INITSCRIPT_PARAMS = "defaults 80 20"
SYSTEMD_SERVICE:${PN} = "greengrass.service"
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM:${PN} = "-r ggc_group"
USERADD_PARAM:${PN} = "-r -M -N -g ggc_group -s /bin/false ggc_user"
#
# Disable failing QA checks:
#
# Binary was already stripped
# No GNU_HASH in the elf binary
#
INSANE_SKIP:${PN} += "already-stripped ldflags file-rdeps"
RDEPENDS:${PN} += "ca-certificates python3-core sqlite3"

View File

@ -1,31 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2017, Digi International Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Description: Wrapper bootscript for AWS Greengrass core
#
GG_INSTALL_DIR="##GG_INSTALL_DIR##"
GG_LAUNCHER="$(find ${GG_INSTALL_DIR} -type f -name greengrassd)"
case "${1}" in
start | stop | restart)
${GG_LAUNCHER} ${1}
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

View File

@ -1,10 +0,0 @@
[Unit]
Description=Greengrass core daemon
[Service]
Type=forking
ExecStart=/etc/greengrass start
ExecStop=/etc/greengrass stop
[Install]
WantedBy=multi-user.target

View File

@ -1,29 +0,0 @@
# Copyright (C) 2020, Digi International Inc.
require greengrass.inc
#
# The Amazon Greengrass Core Product includes the following third-party software/licensing:
# github.com/aws/aws-sdk-go/; version 1.15.65 -- https://github.com/aws/aws-sdk-go/
# github.com/coreos/go-systemd/; version 10 -- https://github.com/coreos/go-systemd/
# github.com/docker/docker; version 1.12.0-rc4 -- https://github.com/docker/docker
# github.com/docker/go-units; version 0.3.1 -- https://github.com/docker/go-units
# github.com/go-ini/ini; version 1.32.0 -- https://github.com/go-ini/ini
# github.com/jmespath/go-jmespath; version 0.2.2 -- https://github.com/jmespath/go-jmespath
# github.com/mwitkow/go-http-dialer; version 0.1 -- https://github.com/mwitkow/go-http-dialer
# github.com/opencontainers/runc; version 1.0.0-rc3 -- https://github.com/opencontainers/runc
# github.com/opencontainers/runtime-spec; version 1.0.0-rc5 -- https://github.com/opencontainers/runtime-spec
# github.com/pquerna/ffjson; version 1.0 -- https://github.com/pquerna/ffjson
# github.com/vishvananda/netlink; version 0.1 -- https://github.com/vishvananda/netlink
#
# And the following Licenses:
LIC_FILES_CHKSUM = " \
file://ggc/core/THIRD-PARTY-LICENSES;md5=1f0ad815f019455e3a0efe55e888a69a \
"
SRC_URI[arm.md5sum] = "e54bb57929bc278ea89737c4abcd89e8"
SRC_URI[arm.sha256sum] ="91f3d92dca977ea504921c7dbae96a926adce441c8f9ec1896e4c8cf085d6d2e"
# For ARCH64 we use another tarball.
SRC_URI[aarch64.md5sum] = "1bdde4df4c461cd5502f7adbb79b2903"
SRC_URI[aarch64.sha256sum] ="912ecbe10398382894045f9b9dafd16eac7fabce0fc04fc9ee83c8ec8f67ca5a"

View File

@ -1,90 +0,0 @@
# Copyright (C) 2018,2019, Digi International Inc.
require greengrass.inc
#
# The package includes different licenses:
#
# [Apache-2.0]
# ggc/core/LICENSE/attributions/github_aws_aws_sdk_go_License.txt
# ggc/core/LICENSE/attributions/github_coreos_go_systemd_License.txt
# ggc/core/LICENSE/attributions/github_docker_docker_License.txt
# ggc/core/LICENSE/attributions/github_docker_go_units_License.txt
# ggc/core/LICENSE/attributions/github_go_ini_ini_License.txt
# ggc/core/LICENSE/attributions/github_jmespath_go_jmespath_License.txt
# ggc/core/LICENSE/attributions/github_opencontainers_runc_License.txt
# ggc/core/LICENSE/attributions/github_opencontainers_runtime_spec_License.txt
# ggc/core/LICENSE/attributions/github_pquerna_ffjson_License.txt
# ggc/core/LICENSE/attributions/github_vishvananda_netlink_License.txt
# [BSD-2-Clause]
# ggc/core/LICENSE/attributions/github_godbus_dbus_License.txt
# ggc/core/LICENSE/attributions/github_huin_gobinarytest_License.txt
# ggc/core/LICENSE/attributions/github_seccomp_libseccomp_golang_License.txt
# ggc/core/LICENSE/attributions/github_syndtr_gocapability_License.txt
# [BSD-3-Clause]
# ggc/core/LICENSE/attributions/github_fsnotify_fsnotify_License.txt
# ggc/core/LICENSE/attributions/github_golang_protobuf_License.txt
# ggc/core/LICENSE/attributions/github_jeffallen_mqtt_License.txt
# ggc/core/LICENSE/attributions/Golang_License.txt
# [ECLIPSE]
# ggc/core/LICENSE/attributions/github_paho_mqtt_License.txt
# [MIT]
# ggc/core/LICENSE/attributions/github_huin_mqtt_License.txt
# ggc/core/LICENSE/attributions/github_mattn_go_sqlite3_License.txt
# ggc/core/LICENSE/attributions/github_nu7hatch_gouuid_License.txt
# ggc/core/LICENSE/attributions/github_Sirupsen_logrus_License.txt
# ggc/core/LICENSE/attributions/github_urfave_cli_License.txt
# [Proprietary]
# ggc/core/LICENSE/Greengrass AWS SW License (IoT additiona) vr6.txt
# [Copyright-Only Decication]
# ggc/core/LICENSE/attributions/libb64_sourceforge_License.txt
LIC_FILES_CHKSUM = " \
file://ggc/core/LICENSE/attributions/curl_haxx_se_License.txt;md5=3b77a99e8530d6c9ccc9aab9a7436f99 \
file://ggc/core/LICENSE/attributions/github_aws_aws_sdk_go_License.txt;md5=d273d63619c9aeaf15cdaf76422c4f87 \
file://ggc/core/LICENSE/attributions/github_coreos_go_systemd_License.txt;md5=715f3348ed8b9bf4fac3b08133384a4d \
file://ggc/core/LICENSE/attributions/github_docker_docker_License.txt;md5=bba4ee48af378e39b452d742d29c710b \
file://ggc/core/LICENSE/attributions/github_docker_go_units_License.txt;md5=bb99db20f1c48c2c4952c27c72855e36 \
file://ggc/core/LICENSE/attributions/github_fsnotify_fsnotify_License.txt;md5=c38914c9a7ab03bb2b96d4baaee10769 \
file://ggc/core/LICENSE/attributions/github_godbus_dbus_License.txt;md5=b03a62440372a9acf9692ad365932c87 \
file://ggc/core/LICENSE/attributions/github_go_ini_ini_License.txt;md5=715f3348ed8b9bf4fac3b08133384a4d \
file://ggc/core/LICENSE/attributions/github_golang_protobuf_License.txt;md5=16fe162f7848190010b6ec7bfaac030a \
file://ggc/core/LICENSE/attributions/github_huin_gobinarytest_License.txt;md5=f2b3138d9d314bccf5297dea7e3e6d14 \
file://ggc/core/LICENSE/attributions/github_huin_mqtt_License.txt;md5=12fd125064676697934b7d8c09bed0e8 \
file://ggc/core/LICENSE/attributions/github_jeffallen_mqtt_License.txt;md5=b7269d52765d477e10f319c19d8a9d33 \
file://ggc/core/LICENSE/attributions/github_jmespath_go_jmespath_License.txt;md5=640d33f0070c9dc3a194d2ed7db02974 \
file://ggc/core/LICENSE/attributions/github_mattn_go_sqlite3_License.txt;md5=948f36a2300ac729e60416063190f664 \
file://ggc/core/LICENSE/attributions/github_nu7hatch_gouuid_License.txt;md5=6b18748dcc29fda05fa5aaef44d517fd \
file://ggc/core/LICENSE/attributions/github_opencontainers_runc_License.txt;md5=587c01b2dcc5dc3b4bed51b918c64731 \
file://ggc/core/LICENSE/attributions/github_opencontainers_runtime_spec_License.txt;md5=ef95ed297310c3d09ba16c06d5e161a5 \
file://ggc/core/LICENSE/attributions/github_paho_mqtt_License.txt;md5=655315b482a5955efb91d34de332ee48 \
file://ggc/core/LICENSE/attributions/github_pquerna_ffjson_License.txt;md5=d273d63619c9aeaf15cdaf76422c4f87 \
file://ggc/core/LICENSE/attributions/github_seccomp_libseccomp_golang_License.txt;md5=9205c4c469bfb9d3a63f346539ee445b \
file://ggc/core/LICENSE/attributions/github_Sirupsen_logrus_License.txt;md5=29baae91637760ae68feb57ca93e5a0a \
file://ggc/core/LICENSE/attributions/github_syndtr_gocapability_License.txt;md5=321f58fa53a0b1bb9a887f14660d436b \
file://ggc/core/LICENSE/attributions/github_urfave_cli_License.txt;md5=f1f14a2449300559aed90bedc36a71ed \
file://ggc/core/LICENSE/attributions/github_vishvananda_netlink_License.txt;md5=c95fd0efd62139c155e956a448df8fd6 \
file://ggc/core/LICENSE/attributions/Golang_License.txt;md5=3d7ed06383c65a3161b36c6a0b0b98f5 \
file://ggc/core/LICENSE/attributions/libb64_sourceforge_License.txt;md5=0f8f14bb84b17652f29aad01072e545f \
file://ggc/core/LICENSE/attributions/sqlite_org_License.txt;md5=380e2694a297aa32879ca2ae9c6c029b\
"
# Bitbake does not support spaces in filenames, but GG License does have spaces,
# so workaround the problem by renaming the file before using it.
GG_LIC_FILENAME = "Greengrass AWS SW License (IoT additional) vr6.txt"
GG_LIC_FILENAME_NOSPACES = "${@d.getVar('GG_LIC_FILENAME').replace(' ','_')}"
LIC_FILES_CHKSUM += "file://ggc/core/LICENSE/${GG_LIC_FILENAME_NOSPACES};md5=7df5bf535d02b2f83c260250fe330b6c"
SRC_URI[arm.md5sum] = "93ae820af2bf2527bafdb34598d174ed"
SRC_URI[arm.sha256sum] ="8fe99ba17917df2e192b7065e400e2dc85c4a0fbf7654fa0d141642cde92d88f"
# For ARCH64 we use another tarball.
SRC_URI[aarch64.md5sum] = "e4ec6dba43dcba4d2ec1b04d7c851cd3"
SRC_URI[aarch64.sha256sum] ="f45e502435850fb9a9931a46fd96329f95f53ff2d6d5aaa4bed11094c0237f4c"
# Rename GG license file
do_unpack[postfuncs] += "rename_license"
rename_license() {
cd ${S}/ggc/core/LICENSE/
mv "${GG_LIC_FILENAME}" "${GG_LIC_FILENAME_NOSPACES}"
}

View File

@ -1,29 +0,0 @@
# Copyright (C) 2018,2019, Digi International Inc.
require greengrass.inc
#
# The Amazon Greengrass Core Product includes the following third-party software/licensing:
# github.com/aws/aws-sdk-go/; version 1.15.65 -- https://github.com/aws/aws-sdk-go/
# github.com/coreos/go-systemd/; version 10 -- https://github.com/coreos/go-systemd/
# github.com/docker/docker; version 1.12.0-rc4 -- https://github.com/docker/docker
# github.com/docker/go-units; version 0.3.1 -- https://github.com/docker/go-units
# github.com/go-ini/ini; version 1.32.0 -- https://github.com/go-ini/ini
# github.com/jmespath/go-jmespath; version 0.2.2 -- https://github.com/jmespath/go-jmespath
# github.com/mwitkow/go-http-dialer; version 0.1 -- https://github.com/mwitkow/go-http-dialer
# github.com/opencontainers/runc; version 1.0.0-rc3 -- https://github.com/opencontainers/runc
# github.com/opencontainers/runtime-spec; version 1.0.0-rc5 -- https://github.com/opencontainers/runtime-spec
# github.com/pquerna/ffjson; version 1.0 -- https://github.com/pquerna/ffjson
# github.com/vishvananda/netlink; version 0.1 -- https://github.com/vishvananda/netlink
#
# And the following Licenses:
LIC_FILES_CHKSUM = " \
file://ggc/core/THIRD-PARTY-LICENSES;md5=28584ceb716d242782f9a7a7593c9ff2 \
"
SRC_URI[arm.md5sum] = "a7f3667ac9f24e434e7a85908d1db256"
SRC_URI[arm.sha256sum] ="339656dca947f1cff29635fbe7570b5ea04ca7256fd2177cf396711a60a8f26a"
# For ARCH64 we use another tarball.
SRC_URI[aarch64.md5sum] = "abfabf1464b7a1da0322dfd780415e48"
SRC_URI[aarch64.sha256sum] ="411956c8a41857c95dea5af6a41c7c0ab09310d621e054693d9e8ee57b23ed35"

View File

@ -1,29 +0,0 @@
# Copyright (C) 2019, Digi International Inc.
require greengrass.inc
#
# The Amazon Greengrass Core Product includes the following third-party software/licensing:
# github.com/aws/aws-sdk-go/; version 1.15.65 -- https://github.com/aws/aws-sdk-go/
# github.com/coreos/go-systemd/; version 10 -- https://github.com/coreos/go-systemd/
# github.com/docker/docker; version 1.12.0-rc4 -- https://github.com/docker/docker
# github.com/docker/go-units; version 0.3.1 -- https://github.com/docker/go-units
# github.com/go-ini/ini; version 1.32.0 -- https://github.com/go-ini/ini
# github.com/jmespath/go-jmespath; version 0.2.2 -- https://github.com/jmespath/go-jmespath
# github.com/mwitkow/go-http-dialer; version 0.1 -- https://github.com/mwitkow/go-http-dialer
# github.com/opencontainers/runc; version 1.0.0-rc3 -- https://github.com/opencontainers/runc
# github.com/opencontainers/runtime-spec; version 1.0.0-rc5 -- https://github.com/opencontainers/runtime-spec
# github.com/pquerna/ffjson; version 1.0 -- https://github.com/pquerna/ffjson
# github.com/vishvananda/netlink; version 0.1 -- https://github.com/vishvananda/netlink
#
# And the following Licenses:
LIC_FILES_CHKSUM = " \
file://ggc/core/THIRD-PARTY-LICENSES;md5=70018c9eb1875d260c975eef52c10657 \
"
SRC_URI[arm.md5sum] = "41e862deb244c563d438e4604b8b3ccc"
SRC_URI[arm.sha256sum] ="3658af95e21723f52533e441f8e3a9d9e167a8bc4ada6fc957201b6455438961"
# For ARCH64 we use another tarball.
SRC_URI[aarch64.md5sum] = "4fcd160f685a5131f5aabd6f7cc31b48"
SRC_URI[aarch64.sha256sum] ="8dd7341a51afe03102ea6408a6a529eee9f3a89519fdfcb14e5a9039e711f21b"

View File

@ -1,29 +0,0 @@
# Copyright (C) 2019, Digi International Inc.
require greengrass.inc
#
# The Amazon Greengrass Core Product includes the following third-party software/licensing:
# github.com/aws/aws-sdk-go/; version 1.15.65 -- https://github.com/aws/aws-sdk-go/
# github.com/coreos/go-systemd/; version 10 -- https://github.com/coreos/go-systemd/
# github.com/docker/docker; version 1.12.0-rc4 -- https://github.com/docker/docker
# github.com/docker/go-units; version 0.3.1 -- https://github.com/docker/go-units
# github.com/go-ini/ini; version 1.32.0 -- https://github.com/go-ini/ini
# github.com/jmespath/go-jmespath; version 0.2.2 -- https://github.com/jmespath/go-jmespath
# github.com/mwitkow/go-http-dialer; version 0.1 -- https://github.com/mwitkow/go-http-dialer
# github.com/opencontainers/runc; version 1.0.0-rc3 -- https://github.com/opencontainers/runc
# github.com/opencontainers/runtime-spec; version 1.0.0-rc5 -- https://github.com/opencontainers/runtime-spec
# github.com/pquerna/ffjson; version 1.0 -- https://github.com/pquerna/ffjson
# github.com/vishvananda/netlink; version 0.1 -- https://github.com/vishvananda/netlink
#
# And the following Licenses:
LIC_FILES_CHKSUM = " \
file://ggc/core/THIRD-PARTY-LICENSES;md5=53b6a4caa097863bc3971d5e0ac6d1db \
"
SRC_URI[arm.md5sum] = "63a1f6aae22260be19f34f278f7e7833"
SRC_URI[arm.sha256sum] ="4bc0bc8a938cdb3d846df92e502155c6ec8cbaf1b63dfa9f3cc3a51372d95af5"
# For ARCH64 we use another tarball.
SRC_URI[aarch64.md5sum] = "967cd25ac77e733b0a1b42d83dc96ed1"
SRC_URI[aarch64.sha256sum] ="4cbaf91e5354fe49ded160415394413f068426c2bba13089e6b8a28775990a9c"

View File

@ -1,29 +0,0 @@
# Copyright (C) 2017-2023, Digi International Inc.
DESCRIPTION = "DEY image including Amazon Web Services packages"
LICENSE = "MIT"
AWS_PACKAGES ?= " \
awsiotsdk-demo \
greengrass \
"
IMAGE_INSTALL = " \
packagegroup-dey-core \
${AWS_PACKAGES} \
${CORE_IMAGE_EXTRA_INSTALL} \
"
IMAGE_FEATURES += " \
dey-network \
ssh-server-dropbear \
${@bb.utils.contains('MACHINE_FEATURES', 'bluetooth', 'dey-bluetooth', '', d)} \
${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'dey-wireless', '', d)} \
"
IMAGE_LINGUAS = ""
inherit core-image
inherit dey-image
IMAGE_ROOTFS_SIZE = "8192"

View File

@ -1,11 +0,0 @@
#
# Copyright (C) 2014, Digi International Inc.
#
DESCRIPTION = "DEY busybox only based initramfs image."
include dey-image-tiny.bb
export IMAGE_BASENAME = "dey-image-tiny-initramfs"
IMAGE_FSTYPES = "cpio.gz.u-boot.tf"
inherit image_types

View File

@ -1,25 +0,0 @@
#
# Copyright (C) 2014, Digi International Inc.
#
DESCRIPTION = "DEY busybox only based image."
IMAGE_INSTALL= "\
base-files \
base-passwd \
busybox \
sysvinit \
initscripts \
${CORE_IMAGE_EXTRA_INSTALL} \
"
IMAGE_LINGUAS = " "
LICENSE = "MIT"
inherit core-image
inherit dey-image
IMAGE_ROOTFS_SIZE ?= "8192"
IMAGE_FSTYPES:remove = "ext4"
IMAGE_FSTYPES:append = " ext2"

View File

@ -1,13 +0,0 @@
DESCRIPTION = "Python library to create SVG drawings"
SECTION = "devel/python"
HOMEPAGE = "https://github.com/mozman/svgwrite"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=3e14f2d1a8674ddcbbd8b51762250049"
inherit pypi setuptools3
PYPI_PACKAGE = "svgwrite"
PYPI_PACKAGE_EXT = "zip"
SRC_URI[md5sum] = "8e6d536bdffefa03341b77dff5add485"
SRC_URI[sha256sum] = "a8fbdfd4443302a6619a7f76bc937fc683daf2628d9b737c891ec08b8ce524c3"

View File

@ -1,43 +0,0 @@
# Copyright (C) 2017-2019, Digi International Inc.
require recipes-digi/dey-examples/dey-examples-src.inc
SUMMARY = "AWS IoT device SDK Demo"
DESCRIPTION = "Demo application for AWS IoT device SDK"
SECTION = "base"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d"
DEPENDS = "awsiotsdk-c libconfuse"
AWS_USER_LED ?= ""
AWS_USER_LED:ccimx6ulstarter ?= "75"
AWS_USER_LED:ccimx6ulsbc ?= "488"
AWS_USER_LED:ccimx6sbc ?= "34"
AWS_USER_LED:ccimx6qpsbc ?= "34"
S = "${WORKDIR}/git/awsiot-sample"
inherit aws-iot pkgconfig
EXTRA_OEMAKE += "'LOG_FLAGS=${@get_log_level(d)}'"
do_configure() {
# Update the configuration header file.
sed -i -e "s,\(thing_name = \)\"\",\1\"${AWS_IOT_MY_THING_NAME}\",g" \
-e "s,\(host = \)\"\",\1\"${AWS_IOT_MQTT_HOST}\",g" \
-e "s,8883,${AWS_IOT_MQTT_PORT},g" \
-e "s,\([\"']\)rootCA.crt\([\"']\),\1${AWS_IOT_ROOT_CA_FILENAME}\2,g" \
-e "s,\([\"']\)cert.pem\([\"']\),\1${AWS_IOT_CERTIFICATE_FILENAME}\2,g" \
-e "s,\([\"']\)privkey.pem\([\"']\),\1${AWS_IOT_PRIVATE_KEY_FILENAME}\2,g" \
-e "s,\(user_led = \)-1,\1${AWS_USER_LED},g" \
"${S}/cfg_files/awsiotsdk.conf"
}
do_install() {
oe_runmake DESTDIR=${D} install
}
RRECOMMENDS:${PN} += "awsiotsdk-c-cert"
PACKAGE_ARCH = "${MACHINE_ARCH}"

View File

@ -1,3 +0,0 @@
# Copyright (C) 2017, Digi International Inc.
require swu.inc

View File

@ -1,141 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2017 by Digi International Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Description: AWS CLI wrapper to be used in DEY
#
SCRIPTNAME="$(basename ${0})"
USAGE="
AWS CLI wrapper to facilitate integration with Digi Embedded Yocto
Usage: ${SCRIPTNAME} [OPTIONS]
-c, --create-certs <PATH> Create Root CA and Greengrass Core device certificates under <PATH>
-t, --thing-name <NAME> Name of the Greengrass Core Thing. The script will register this Thing in your account if it is not already.
"
error() {
printf "%s\n" "${1}"
exit 1
}
do_create_certs() {
GG_ROOTCA_KEY="${GG_CERTS_DIR}/root-ca.key"
GG_ROOTCA_PEM="${GG_CERTS_DIR}/root-ca.pem"
GG_ROOTCA_VERIF_KEY="${GG_CERTS_DIR}/root-ca-verif.key"
GG_ROOTCA_VERIF_CSR="${GG_CERTS_DIR}/root-ca-verif.csr"
GG_ROOTCA_VERIF_PEM="${GG_CERTS_DIR}/root-ca-verif.pem"
GG_CORE_KEY="${GG_CERTS_DIR}/gg-core.key"
GG_CORE_CSR="${GG_CERTS_DIR}/gg-core.csr"
GG_CORE_PEM="${GG_CERTS_DIR}/gg-core.pem"
# Verify that no certificate artifact exists in the certs directory
if [ -f "${GG_ROOTCA_KEY}" ] || \
[ -f "${GG_ROOTCA_PEM}" ] || \
[ -f "${GG_ROOTCA_PEM}" ] || \
[ -f "${GG_ROOTCA_VERIF_KEY}" ] || \
[ -f "${GG_ROOTCA_VERIF_CSR}" ] || \
[ -f "${GG_ROOTCA_VERIF_PEM}" ] || \
[ -f "${GG_CORE_KEY}" ] || \
[ -f "${GG_CORE_CSR}" ] || \
[ -f "${GG_CORE_PEM}" ]; then
error "[ERROR] Certificates directory contains artifacts from previous execution"
fi
mkdir -p "${GG_CERTS_DIR}"
# Get AWS root CA certificate
printf "[INFO] Downloading AWS root CA certificate.\n"
AWS_ROOT_CA_URL="https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem"
[ -f "${GG_CERTS_DIR}/aws-root-ca.pem" ] || wget -t 2 -T 30 -q --passive-ftp --no-check-certificate -O "${GG_CERTS_DIR}/aws-root-ca.pem" "${AWS_ROOT_CA_URL}"
#
# Create a self-signed CA certificate (if it doesn't exit)
#
printf "[INFO] Creating Greengrass Core CA certificate and key.\n"
GG_ROOTCA_SUBJ="/C=US/ST=Minnesota/L=Minnetonka/O=Digi International Inc./OU=Digi Enginnering/CN=AWS IoT CA Certificate"
openssl genrsa -out "${GG_ROOTCA_KEY}" 2048 2>/dev/null
openssl req -x509 -new -nodes -key "${GG_ROOTCA_KEY}" -sha256 -days 1024 -out "${GG_ROOTCA_PEM}" -subj "${GG_ROOTCA_SUBJ}"
#
# Create verification certificate (needed to register the CA certificate)
#
printf "[INFO] Creating verification certificate.\n"
if ! REG_CODE="$(aws iot get-registration-code --query registrationCode 2>/dev/null)"; then
error "[ERROR] Unable to get registration code"
fi
GG_ROOTCA_VERIF_SUBJ="/C=US/ST=Minnesota/L=Minnetonka/O=Digi International Inc./OU=Digi Enginnering/CN=${REG_CODE}"
openssl genrsa -out "${GG_ROOTCA_VERIF_KEY}" 2048 2>/dev/null
openssl req -new -key "${GG_ROOTCA_VERIF_KEY}" -out "${GG_ROOTCA_VERIF_CSR}" -subj "${GG_ROOTCA_VERIF_SUBJ}"
openssl x509 -req -in "${GG_ROOTCA_VERIF_CSR}" -CA "${GG_ROOTCA_PEM}" -CAkey "${GG_ROOTCA_KEY}" -CAcreateserial -out "${GG_ROOTCA_VERIF_PEM}" -days 1024 -sha256 2>/dev/null
#
# Create Greengrass Core device certificate
#
printf "[INFO] Creating Greengrass Core device certificate.\n"
GG_CORE_SUBJ="/C=US/ST=Minnesota/L=Minnetonka/O=Digi International Inc./OU=Digi Enginnering/CN=AWS IoT Device Certificate"
openssl genrsa -out "${GG_CORE_KEY}" 2048 2>/dev/null
openssl req -new -key "${GG_CORE_KEY}" -out "${GG_CORE_CSR}" -subj "${GG_CORE_SUBJ}"
openssl x509 -req -in "${GG_CORE_CSR}" -CA "${GG_ROOTCA_PEM}" -CAkey "${GG_ROOTCA_KEY}" -CAcreateserial -out "${GG_CORE_PEM}" -days 1024 -sha256 2>/dev/null
}
do_register_thing() {
printf "[INFO] Registering Greengrass Core Thing.\n"
if ! AWS_GGCORE_THING_ARN="$(aws iot create-thing --thing-name ${GG_THING_NAME} --query thingArn 2>/dev/null)"; then
error "[ERROR] Unable to create Greengrass Core Thing"
fi
}
# Use GNU 'getopt' to parse command line options
SHORT_OPTS="hc:t:"
LONG_OPTS="help,create-certs:,thing-name:"
CMDLINE_OPTS=$(getopt -o ${SHORT_OPTS} -l ${LONG_OPTS} -- "$@") || error "${USAGE}"
eval set -- "${CMDLINE_OPTS}"
while true; do
case "$1" in
-h|--help) printf "%s\n" "${USAGE}"; exit 0;;
-c|--create-certs) GG_CERTS_DIR="${2}"; shift;;
-t|--thing-name) GG_THING_NAME="${2}"; shift;;
--) shift; break;;
esac
shift
done
# Sanity checks: AWS CLI needs to be installed and configured
if ! aws configure get aws_access_key_id >/dev/null 2>&1; then
error "[ERROR] AWS CLI needs to be installed and configured"
fi
AWS_GGCORE_IOT_HOST="$(aws iot describe-endpoint 2>/dev/null)"
[ -n "${GG_CERTS_DIR}" ] && do_create_certs
[ -n "${GG_THING_NAME}" ] && do_register_thing
# Print AWS IoT configuration for DEY projects
cat <<-_EOF_
For Greengrass enabled images, add the following configuration to your project:
AWS_IOT_CERTS_DIR = "${GG_CERTS_DIR:-</path/to/certificates>}"
AWS_GGCORE_IOT_HOST = "${AWS_GGCORE_IOT_HOST:-<AWS account unique endpoint>}"
AWS_GGCORE_THING_ARN = "${AWS_GGCORE_THING_ARN:-<AWS Greengrass Core Thing ARN>}"
Please verify variables' value is correct.
_EOF_