From 9d520e04d9c53d20d5d86cd2337b52957fedde60 Mon Sep 17 00:00:00 2001 From: ScottW514 Date: Wed, 15 Apr 2020 17:13:51 -0400 Subject: [PATCH] initial commit --- meta-forgefirm/conf/distro/forgefirm.conf | 9 +++++++ meta-forgefirm/conf/layer.conf | 16 ++++++++++++ .../recipes-extended/uflius/ulfius_git.bb | 25 +++++++++++++++++++ .../recipes-forgefirm/forgectrl/forgectrl.bb | 19 ++++++++++++++ .../forgectrl/forgectrl/CMakeLists.txt | 8 ++++++ .../forgectrl/forgectrl/hello.c | 6 +++++ .../images/forgefirm-image-dev.bb | 15 +++++++++++ .../images/forgefirm-image.bb | 3 +++ 8 files changed, 101 insertions(+) create mode 100644 meta-forgefirm/conf/distro/forgefirm.conf create mode 100644 meta-forgefirm/conf/layer.conf create mode 100644 meta-forgefirm/recipes-extended/uflius/ulfius_git.bb create mode 100644 meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl.bb create mode 100644 meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl/CMakeLists.txt create mode 100644 meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl/hello.c create mode 100644 meta-forgefirm/recipes-forgefirm/images/forgefirm-image-dev.bb create mode 100644 meta-forgefirm/recipes-forgefirm/images/forgefirm-image.bb diff --git a/meta-forgefirm/conf/distro/forgefirm.conf b/meta-forgefirm/conf/distro/forgefirm.conf new file mode 100644 index 0000000..438ed8e --- /dev/null +++ b/meta-forgefirm/conf/distro/forgefirm.conf @@ -0,0 +1,9 @@ +require conf/distro/include/fslc-base.inc + +DISTRO = "forgefirm" +DISTRO_NAME = "OpenGlow/ForgeFIRM" +DISTRO_VERSION = "0.0.0" + +DISTRO_FEATURES_remove = " \ + 3g alsa avahi bluetooth bluez5 ext2 ipv6 irda nfc nfs opengl pci pcmcia \ + pulseaudio vulkan wayland x11 zeroconf " diff --git a/meta-forgefirm/conf/layer.conf b/meta-forgefirm/conf/layer.conf new file mode 100644 index 0000000..99cc4dc --- /dev/null +++ b/meta-forgefirm/conf/layer.conf @@ -0,0 +1,16 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "forgefirm-layer" +BBFILE_PATTERN_forgefirm-layer = "^${LAYERDIR}/" +BBFILE_PRIORITY_forgefirm-layer = "10" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_forgefirm-layer = "1" + +LAYERSERIES_COMPAT_forgefirm-layer = "zeus" diff --git a/meta-forgefirm/recipes-extended/uflius/ulfius_git.bb b/meta-forgefirm/recipes-extended/uflius/ulfius_git.bb new file mode 100644 index 0000000..f3e6f65 --- /dev/null +++ b/meta-forgefirm/recipes-extended/uflius/ulfius_git.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "C library for web frameworks" +HOMEPAGE = "https://github.com/babelouest/ulfius" + +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=40d2542b8c43a3ec2b7f5da31a697b88" + +SRC_URI = "git://github.com/babelouest/ulfius" +SRCREV = "${AUTOREV}" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +# For some reason, this package wants to install headers from other packages +# do_install_append() { +# rm -f ${D}${includedir}/orcania.h +# rm -f ${D}${includedir}/orcania-cfg.h +# rm -f ${D}${includedir}/yder.h +# rm -f ${D}${includedir}/yder-cfg.h +# } + +DEPENDS = "gnutls jansson libmicrohttpd" +RDEPENDS_${PN} = "gnutls jansson libmicrohttpd" + +EXTRA_OECMAKE += "-DWITH_JOURNALD=off" diff --git a/meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl.bb b/meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl.bb new file mode 100644 index 0000000..b635169 --- /dev/null +++ b/meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "System Control Daemon for ForgeFIRM powered Glowforge" +HOMEPAGE = "https://github.com/ScottW514/forgectrl" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "\ + file://CMakeLists.txt \ + file://hello.c \ +" + +S = "${WORKDIR}" + +inherit cmake + +DEPENDS += "libconfig ulfius" +RDEPENDS_${PN} = "libconfig ulfius" + +EXTRA_OECMAKE = "" diff --git a/meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl/CMakeLists.txt b/meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl/CMakeLists.txt new file mode 100644 index 0000000..e6b23be --- /dev/null +++ b/meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.10) +project(forgectrl C) + +set(CMAKE_C_STANDARD 11) +file(GLOB sources "${PROJECT_SOURCE_DIR}/*.c") + +add_executable(forgectrl ${sources}) +install(TARGETS forgectrl RUNTIME DESTINATION bin) diff --git a/meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl/hello.c b/meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl/hello.c new file mode 100644 index 0000000..34d86c4 --- /dev/null +++ b/meta-forgefirm/recipes-forgefirm/forgectrl/forgectrl/hello.c @@ -0,0 +1,6 @@ +#include +int main() { + // printf() displays the string inside quotation + printf("Hello, World!"); + return 0; +} diff --git a/meta-forgefirm/recipes-forgefirm/images/forgefirm-image-dev.bb b/meta-forgefirm/recipes-forgefirm/images/forgefirm-image-dev.bb new file mode 100644 index 0000000..3145b0a --- /dev/null +++ b/meta-forgefirm/recipes-forgefirm/images/forgefirm-image-dev.bb @@ -0,0 +1,15 @@ +require recipes-glowforge/images/glowforge-image.bb + +DESCRIPTION = "OpenGlow/ForgeFIRM development image for Glowforge" + +IMAGE_INSTALL += " \ + forgectrl \ +" + +IMAGE_INSTALL_remove = " \ + gfui-client \ +" + +IMAGE_FEATURES += " \ + tools-debug \ +" diff --git a/meta-forgefirm/recipes-forgefirm/images/forgefirm-image.bb b/meta-forgefirm/recipes-forgefirm/images/forgefirm-image.bb new file mode 100644 index 0000000..9877a19 --- /dev/null +++ b/meta-forgefirm/recipes-forgefirm/images/forgefirm-image.bb @@ -0,0 +1,3 @@ +require recipes-glowforge/images/glowforge-image.bb + +DESCRIPTION = "OpenGlow/ForgeFIRM image for Glowforge"