Skip to content

Commit

Permalink
Make Node-RED packages optional
Browse files Browse the repository at this point in the history
Allows to shrink the example image build time specifically.

Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
jan-kiszka authored and BaochengSu committed Sep 27, 2023
1 parent 682bafc commit e1c7230
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
12 changes: 11 additions & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,19 @@ config KAS_INCLUDE_RT
default "kas/opt/preempt-rt.yml"
depends on PREEMPT_RT

config NODE_RED
bool "Node-RED support"
default y
help
Building image with Node-RED support.

config KAS_INCLUDE_NO_NODE_RED
string
default "kas/opt/no-node-red.yml"
depends on !NODE_RED

config DOCKER
bool "Docker support"
default n
help
Building image with docker support.

Expand Down
16 changes: 16 additions & 0 deletions kas/opt/no-node-red.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c) Siemens AG, 2023
#
# Authors:
# Jan Kiszka <[email protected]>
#
# This file is subject to the terms and conditions of the MIT License. See
# COPYING.MIT file in the top-level directory.
#

header:
version: 14

local_conf_header:
no-node-red: |
IOT2050_NODE_RED_SUPPORT = "0"
11 changes: 8 additions & 3 deletions recipes-core/images/iot2050-image-example.bb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ IMAGE_INSTALL += " \
iot2050-firmware-update \
tcf-agent \
mraa \
node-red \
node-red-gpio \
node-red-preinstalled-nodes \
${@ 'board-conf-tools' if d.getVar('QEMU_IMAGE') != '1' else '' } \
libteec1 \
optee-client-dev \
tee-supplicant \
"

IOT2050_NOD_RED_SUPPORT ?= "1"

IMAGE_INSTALL += "${@ ' \
node-red \
node-red-gpio \
node-red-preinstalled-nodes \
' if d.getVar('IOT2050_NOD_RED_SUPPORT') == '1' else ''}"

0 comments on commit e1c7230

Please sign in to comment.