cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Node.js on the STM32MP1

JWali
Associate II

Any recommendations on how to install Node.js on OpenSTLinux / OpenEmbedded?

I want to run some node.js applications on the A7 processor.

I found this repository but there has been no activity for a few years.

https://github.com/imyller/meta-nodejs

13 REPLIES 13
gokhannsahin
Associate II

I have generated image with bitbake st-example-image-qt command after added nodejs to local.conf .

However, after added meta-iot-cloud to local.conf with CORE_IMAGE_EXTRA_INSTALL += "packagegroup-cloud-google", it gives the following erros;

ERROR: nodejs-native-8.12.0-r0 do_compile: oe_runmake failed
ERROR: nodejs-native-8.12.0-r0 do_compile: Function failed: do_compile (log file is located at /home/gokhan/STM32MP15-Ecosystem-v1.0.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-02-20/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/x86_64-linux/nodejs-native/8.12.0-r0/temp/log.do_compile.28025)

Olivier GALLIEN
ST Employee

Hi,

Sorry for late reply.

Applying attached patch 0001-nodejs-bump-to-10.16.2 in Distribution package might fix the compilation issue by getting a more recent nodejs version.

  apply patch 0001-nodejs-bump-to-10.16.2.patch on meta-st-openstlinux

   put the following line on conf/local.conf

      PREFERRED_VERSION_nodejs = "10%"

      PREFERRED_VERSION_nodejs-native = "10%"

   and you must have:

      $> bitbake -s | grep node

         nodejs                                            :8.12.0-r0              :10.16.2-r0

         nodejs-native                                     :8.12.0-r0              :10.16.2-r0

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
rzr www.rzr.online.fr
Associate II

As a workaround you could try to run node in a container with supported used land, It would require meta-virtualization with a couple of patches, like this one:

https://lists.yoctoproject.org/g/meta-virtualization/topic/docker_fix_init_script_for/71468074?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,40,71468074

radeshsharma
Associate II

Hello community,

I'm trying to implement node.js in distribution package for STM32MP157F-DK2. I'm little new to this development. I'm facing few issue after adding node.js from https://github.com/imyller/meta-nodejs

I'm getting a error when I'm trying t build:

ERROR: Nothing RPROVIDES 'meta-nodejs' (but /home/radesh/STM32MPU_workspace/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-11-17/layers/meta-st/meta-st-openstlinux/recipes-st/images/st-image-weston.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'meta-nodejs' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['meta-nodejs']
ERROR: Required build target 'st-image-weston' has no buildable providers.
Missing or unbuildable dependency chain was: ['st-image-weston', 'meta-nodejs']

Steps I follow:

cd layers
git clone https://github.com/imyller/meta-nodejs
bitbake-layers add-layer [your STM32MP1 Distribution path]/meta-nodejs

I have created a file called "nodejs_%.bbappend" with these contents 

   EXTRA_OEMAKE += "builddir_name=."

in this directory:

$HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/layers/meta-openembedded/meta-oe/recipes-devtools/nodejs

and added a stanza to

$HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Starter-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/layers/meta-openembedded/meta-oe/conf/layer.conf

to include nodejs

IMAGE_INSTALL_append += "nodejs"

After this all I try to build using:

bitbake st-image-weston

Thanks in advance for your valuable answers.