From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mailout2.nine.ch ([2a02:418:4003::173]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XycnV-0002Oc-9X for ptxdist@pengutronix.de; Wed, 10 Dec 2014 09:39:02 +0100 Received: from webmail1.nine.ch (webmail1.nine.ch [94.230.211.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout2.nine.ch (Postfix) with ESMTPS id DBC7C100B7A for ; Wed, 10 Dec 2014 09:38:58 +0100 (CET) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_2698ed841b1a9ccc1a8cf01ef1b86a61" Date: Wed, 10 Dec 2014 09:38:58 +0100 From: Alexander Raimondi In-Reply-To: <254E6C49-779D-41BB-ABF6-13F482F16823@emailplus.org> References: <546EE97A.40102@miromico.ch> <254E6C49-779D-41BB-ABF6-13F482F16823@emailplus.org> Message-ID: <9af5f7d36de7a1b496ce9431df9c1702@miromico.ch> Subject: Re: [ptxdist] Integration of node.js Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de --=_2698ed841b1a9ccc1a8cf01ef1b86a61 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8"; format="flowed" 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 ------------------------------------------------------------------ --=_2698ed841b1a9ccc1a8cf01ef1b86a61 Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name=patch.tar.gz Content-Disposition: attachment; filename=patch.tar.gz H4sIAEoDiFQAA+1a63biyBGev9ZTdMY+uyamQQKBL4n3DAZsk8GGAJ6Z3SSH00g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z6/W9ZKZcr0+9/q3L1jaxUVLWcff/7NWj3D+JFh+rLlCT6ID44iSA9/u9J Ecq4YqffbNf6hYHjWJpJmI1LslIq8J8idK9YAx76QI6waFrx2A4pGTHTKI41DauQYMp4DAldw8BQ LcgY9IUBs3z4/1KJYzs2tXC5UMU+gTKTfaa6MEmSOIAToYvuvZ4rFgrSgMNzg2Gv0xmc7v0Sz38p Jp/GYdd8POvUeg38sXlRw7UriKyHov/oe44T4ChbSuLTwa+TwD+Mldqts8iqX6aSviSPliTVevXL 01VeSZxc64EEvvoLJl4yWK9PB8F509FPn2bDBwfJcK92DbZMZzxicwviyXbr+j1MAeuX6bm2G+ft 2kX/9Hv80cpjzyWBya27Rd/v/RLvarYYnvVh1EsPiaeZfE8LpvjDxIHXtV0pskx8FMXoY4z4wxA4 8GcuTWpYtHgGKo+kSMexzKmxaE/JHrWMMsooo4wyyiijjDLKKKOMMsooo4wyyiijjDLKKKOMMsro /4n+C1PJLk0AUAAA --=_2698ed841b1a9ccc1a8cf01ef1b86a61 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --=_2698ed841b1a9ccc1a8cf01ef1b86a61--