-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: optimize build process for sscma-node and sscma-supervisor
Showing
7 changed files
with
71 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
source "$BR2_EXTERNAL_BR2EXT_PATH/reCamera/Config.in" | ||
source "$BR2_EXTERNAL_BR2EXT_PATH/sscma-supervisor/Config.in" | ||
source "$BR2_EXTERNAL_BR2EXT_PATH/sscma-app/Config.in" | ||
source "$BR2_EXTERNAL_BR2EXT_PATH/libhv/Config.in" | ||
source "$BR2_EXTERNAL_BR2EXT_PATH/sscma-node/Config.in" | ||
source "$BR2_EXTERNAL_BR2EXT_PATH/sscma-supervisor/Config.in" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
config BR2_PACKAGE_SSCMA_NODE | ||
bool "sscma-node" | ||
default y | ||
help | ||
This is the help text for the ssmca-node package. | ||
It will be displayed in the Buildroot configuration menu. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
################################################################################ | ||
# | ||
# sscma-node | ||
# | ||
################################################################################ | ||
|
||
SSCMA_NODE_VERSION = 0a62f1816c7fd2effb217f117915676ff70fb369 | ||
SSCMA_NODE_SITE = https://github.com/Seeed-Studio/sscma-example-sg200x | ||
SSCMA_NODE_SITE_METHOD = git | ||
SSCMA_NODE_GIT_SUBMODULES = YES | ||
SSCMA_NODE_LICENSE = Apache-2.0 | ||
SSCMA_NODE_DEPENDENCIES = host-nodejs mosquitto | ||
|
||
# Configure step: prepare the build environment and run CMake to configure the build | ||
define SSCMA_NODE_CONFIGURE_CMDS | ||
mkdir -p $(@D)/solutions/sscma-node/build && \ | ||
cd $(@D)/solutions/sscma-node/build && \ | ||
SG200X_SDK_PATH=$(shell realpath $(BUILD_DIR)/../../../../) $(BR2_CMAKE) -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=$(TARGET_DIR) .. | ||
endef | ||
|
||
# Build step: compile the package using the Makefile in the build directory | ||
define SSCMA_NODE_BUILD_CMDS | ||
$(MAKE) -C $(@D)/solutions/sscma-node/build | ||
endef | ||
|
||
# Install step: copy the built files to the target directory | ||
define SSCMA_NODE_INSTALL_TARGET_CMDS | ||
# Install the executable file | ||
$(INSTALL) -D -m 0755 $(@D)/solutions/sscma-node/build/sscma-node $(TARGET_DIR)/usr/local/bin/sscma-node | ||
|
||
# Copy other files from the source directory to the target directory | ||
cp -r $(@D)/solutions/sscma-node/files/* $(TARGET_DIR)/ | ||
|
||
# Create the necessary directories for node-red | ||
mkdir -p $(TARGET_DIR)/home/recamera/.node-red/node_modules | ||
|
||
# Use npm to install the node-red-contrib-sscma package | ||
$(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red node-red-contrib-sscma@0.1.0 | ||
endef | ||
|
||
$(eval $(generic-package)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
config BR2_PACKAGE_SSCMA_SUPERVISOR | ||
bool "supervisor" | ||
default n | ||
bool "sscma-supervisor" | ||
default y | ||
help | ||
This is the help text for the supervisor package. | ||
It will be displayed in the Buildroot configuration menu. | ||
This is the help text for the ssmca-supervisor package. | ||
It will be displayed in the Buildroot configuration menu. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters