Hi Jean-Claude Yes, I can give you my current work state. It is attached as tar.gz You will find: - A patch that will add support for node.js to a local project (not into ptxdist itself) - A local_src directory with a build script Everything is based on ptxdist 14.1.0 (from phytec) Some comments - I only tested node +ssl +npm (no ssl doesn't compile for some reason) - It will also add a host node package. This is necessary to build node_modules for the target on the host. This should probably be moved into cross section. - npm on the target works, as long as it doesn't want to compile anything. - My procedure to get node_modules on the target is: extract local_src from tar.gz into your project. Use the ./build_module.sh with a list of module required on target (e.g. ./build_module.sh can socket.io ejs) and move the node_modules directory to the target This currently works for me. Things to do: - Creation of node modules withing ptxdist (E.g. through node application in ptxdist with a dependency list) - More important: How to strip down node.js and node_modules (Remove documentation, sources, ... not needed on a embedded target) Hope this helps. Any feedback is appreciated. Alex On 2014-12-09 11:04, Jean-Claude Monnin wrote: > Hi Alex, > > I would like to integrate node.js in my image. > Would it be possible to share your existing rules (even if it’s in a > unfinished state)? > > Thanks, > Jean-Claude > >> On 21 Nov 2014, at 08:27, Alex Raimondi >> wrote: >> >> Hi >> >> I am working on adding nodejs to ptxdist. I use ptxdist to >> crosscompile my ARM based linux. >> >> I already succeeded in crosscompiling the nodejs base package and it >> works on the target. >> >> Node.js is special in some kind. To add extra modules it uses its >> own packet manager "npm". Some packages will build some binaries right >> on the target system upon installing. This will not work on a cross >> compiled target (with no compilers installed) >> >> So my approach is to allow the user to select additional modules and >> cross compile these modules on the host. >> >> So I guess I also need to build nodejs for the host to get my hands >> on the npm package manager. I created a host-node package and it >> successfully compiles. >> >> About the next steps I am unsure how to do that: >> >> - My host-node package currently does fetch/prepare/compile. What do >> I need to do in install or targetinstall? Currently my host-node gets >> installed into platform-XXX/sysroot-host >> >> - I need to use host built npm in (target) node to fetch modules. >> How do I correctly access the npm package manager? >> >> Is there any documentation about host tools usage? What is the >> meaning of cross tools? >> >> Thanks for any hint >> >> Best regards >> Alex Raimondi >> >> >> -- >> ptxdist mailing list >> ptxdist@pengutronix.de -- Mit freundlichen Grüssen Alex Raimondi -- ------------------------------------------------------------------ Miromico AG Alexander Raimondi phone : +41 43 222 57 00 Senior Design Engineer direct: +41 43 222 57 12 Gallusstrasse 4 email : alex.raimondi@miromico.ch CH-8006 Zurich, Switzerland www : www.miromico.ch ------------------------------------------------------------------