nxhack / openwrt-node-packages

OpenWrt Project Node.js packages. v18.x TLS and v20.x LTS
GNU General Public License v2.0
257 stars 99 forks source link

unable to get node in, FPU-emu works #207

Closed bastup closed 6 years ago

bastup commented 6 years ago

Hello NXhack, I am trying to run your work on an Archer C7 v2, ar71xx-arch.

I am able to get the image up and running on the device but node is not available on the image, even with your guide. 'opkg update node' tells me that it cannot find the mips24 node archive over at openwrt. Which is true, it does not exist.

I am running the scripts as you point out under usage before i make menuconfig and make, and they return no errors. When I run make menuconfig there is a * next to node but node does not show up on the sysupgrade image. Any clue what has gone wrong?

nxhack commented 6 years ago

Hi @bastup

Have you selected the node package? Please refer to this for details.

https://openwrt.org/doc/howto/build?s[]=buildroot#make_menuconfig

bastup commented 6 years ago

Hello Hirokazu,

Yes, when I run make menuconfig the node package is marked with a * under image configuration.

I am sure I've done something wrong. This is my method within LEDE 17 trunk

./scripts/feeds update ./scripts/feeds install -a add src-git node https://github.com/nxhack/openwrt-node-packages.git to feeds.default.conf

./scripts/feeds update node rm the node packages ./scripts/feeds install -a -p

This returns no error about node.

then I run make menuconfig ->chose my model ->add FPU-emulation -> check image configuration that node is marked with a *, it is. make

The image produced works on my archer C7 but node is not there. opkg update and opkg install node throws error

Downloading http://downloads.lede-project.org/snapshots/packages/mips_24kc/node/Packages.gz *** Failed to download the package list from http://downloads.lede-project.org/snapshots/packages/mips_24kc/node/Packages.gz

Any help would be appreciated. Thanks! /Jonatan

On Tue, Feb 13, 2018 at 4:56 AM, Hirokazu MORIKAWA <notifications@github.com

wrote:

Hi @bastup https://github.com/bastup

Have you selected the node package? Please refer to this for details.

https://openwrt.org/doc/howto/build?s[]=buildroot#make_menuconfig

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nxhack/openwrt-node-packages/issues/207#issuecomment-365143582, or mute the thread https://github.com/notifications/unsubscribe-auth/AivVPt5YXIKT3G6iMsHg2OpCwujrVNxMks5tUQfcgaJpZM4SDCYy .

bastup commented 6 years ago

To clarify

./scripts/feeds install -a -p NODE

thanks

On Tue, Feb 13, 2018 at 6:34 AM, Jonatan jonatanbsandberg@gmail.com wrote:

Hello Hirokazu,

Yes, when I run make menuconfig the node package is marked with a * under image configuration.

I am sure I've done something wrong. This is my method within LEDE 17 trunk

./scripts/feeds update ./scripts/feeds install -a add src-git node https://github.com/nxhack/openwrt-node-packages.git to feeds.default.conf

./scripts/feeds update node rm the node packages ./scripts/feeds install -a -p

This returns no error about node.

then I run make menuconfig ->chose my model ->add FPU-emulation -> check image configuration that node is marked with a *, it is. make

The image produced works on my archer C7 but node is not there. opkg update and opkg install node throws error

Downloading http://downloads.lede-project.org/snapshots/packages/mips_ 24kc/node/Packages.gz *** Failed to download the package list from http://downloads.lede-project.org/snapshots/packages/mips_ 24kc/node/Packages.gz

Any help would be appreciated. Thanks! /Jonatan

On Tue, Feb 13, 2018 at 4:56 AM, Hirokazu MORIKAWA < notifications@github.com> wrote:

Hi @bastup https://github.com/bastup

Have you selected the node package? Please refer to this for details.

https://openwrt.org/doc/howto/build?s[]=buildroot#make_menuconfig

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nxhack/openwrt-node-packages/issues/207#issuecomment-365143582, or mute the thread https://github.com/notifications/unsubscribe-auth/AivVPt5YXIKT3G6iMsHg2OpCwujrVNxMks5tUQfcgaJpZM4SDCYy .

nxhack commented 6 years ago

Check ./bin/packages/mips_24kc/node/ The custom packages (.ipk) should be there.

Downloading http://downloads.lede-project.org/snapshots/packages/mips_24kc/node/Packages.gz *** Failed to download the package list from http://downloads.lede-project.org/snapshots/packages/mips_24kc/node/Packages.gz

Of course you do not have packages you build, not on site (downloads.lede-project.org). There is only in your hard disk.

nxhack commented 6 years ago

& Your custom firmware is in ./bin/targets/ar71xx/generic/

bastup commented 6 years ago

Hello Harokazu!

I have now gotten it to work. I misunderstood things in the make menuconfig. I now have an image with node.js built in and it runs, slow, but it runs.

It seems buggy though. When I run the example server from the documentation the server runs but when I try to connect with the browser I get server not found not the expected Hello World

Do you know why? have this happened to you? I chose the 9.5 version with make menuconfig.

Thank you! /Jonatan


const http = require('http');

const hostname = '127.0.0.1';const port = 8082; const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello World\n');});

server.listen(port, hostname, () => { console.log(Server running at http://${hostname}:${port}/);});

root@LEDE:/tmp# node test.js Server running at http://127.0.0.1:8082/

On Tue, Feb 13, 2018 at 7:18 AM, Hirokazu MORIKAWA <notifications@github.com

wrote:

& Your firmware is in ./bin/targets/ar71xx/generic/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nxhack/openwrt-node-packages/issues/207#issuecomment-365162321, or mute the thread https://github.com/notifications/unsubscribe-auth/AivVPk3MrHyRilbHcpWdK3jm4_e-1g_iks5tUSkfgaJpZM4SDCYy .

nxhack commented 6 years ago

const hostname = '127.0.0.1';const port = 8082;

You are binding to local loopback address. In this case, you can not connect from the external network.

bastup commented 6 years ago

Hello Hirokazu

Dear god, I am such an idiot, setting it to 192.168.1.1 works, of course. Things seem a little slow but that is because of my device.

Thank you dearly /Jonatan

On Wed, Feb 14, 2018 at 12:58 AM, Hirokazu MORIKAWA < notifications@github.com> wrote:

const hostname = '127.0.0.1';const port = 8082;

You are binding to loopback address. In this case, you can not connect from the external network.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nxhack/openwrt-node-packages/issues/207#issuecomment-365447247, or mute the thread https://github.com/notifications/unsubscribe-auth/AivVPuQE2lVAHxSHBzoGp_zEaz5AE4Hgks5tUiGggaJpZM4SDCYy .