Cross-compile nwjs for armv6

265 views
Skip to first unread message

gute...@outlook.com

unread,
May 10, 2016, 3:21:59 PM5/10/16
to nw.js
Hello guys,

I'm trying to get nwjs to run and achieve the following goals:

1. embedded ARMv6 device
2. there is no X server on the device so it uses the device exposed framebuffer on /dev/fb
3. run as the solo application on the device
4. there is no hardware acceleration on the device, so everything is draw to the underlying framebuffer via software
5. no video support is required. 
6. everything "magic" from it can be stripped of in order to reduce the footprint. we just need HTML/CSS/JS support
7. everything must be statically linked on the single binary so no dynamic link and external dependency if possible

So, in order to follow that line, we were looking for some docs/tutorials over the web like this one http://forum.odroid.com/viewtopic.php?f=52&t=16072 but they looks like are using their own toolchain to build it.

We already have a toolchain for that ARM device so we would like to use it if possible for the cross-compile.

Anyone has an idea on how to achieve that? We are really short on time here so I really appreciate any help.

Thanks!
Gutemberg

Roger Wang

unread,
May 10, 2016, 6:47:20 PM5/10/16
to nw.js, gute...@outlook.com
Unfortunately NW doesn't support rendering directly to framebuffer, but we're working on it. A headless version is being developed as well.

Roger

mikef...@gmail.com

unread,
May 11, 2016, 9:10:01 AM5/11/16
to nw.js, gute...@outlook.com
Roger,

I would be extremely interested in an ARM version, especially one that could write to a framebuffer.  When you say we're working on it, does that mean you have it on some roadmap?  Are you able to give any more details :) ?

Thanks!
Mike

gute...@outlook.com

unread,
May 11, 2016, 9:21:53 AM5/11/16
to nw.js, gute...@outlook.com, mikef...@gmail.com
Yeah me too!

We have 320k devices on field(just in Brazil, there are more in other countries) which today runs Mono + C# + Skia and we want HTML/CSS/JS/Node on that.

Regarding the framebuffer and Skia. I got it working pretty easy. It has a overload of CreateCanvas method which accept a pointer to a buffer so all I did was open the framebuffer device /dev/fb with mmap, get the allocated buffer pointer and pass to Skia. Since Chromium uses Skia, I believe you should have not big problems with it... You will probably has em expose some --with-framebuffer=/dev/fb parameter or an environment variable (like Gtk+ does) or even a config file (better!) that people can use at runtime.

Do you have any ETA on that?

Thanks!

Roger

unread,
May 11, 2016, 9:45:28 AM5/11/16
to gute...@outlook.com, nw.js, mikef...@gmail.com
It's been on the roadmap for a long time and now we have been working on it for a while. Once more detail is available I'll send it to this mailing list.

Thanks,
Roger

--
You received this message because you are subscribed to the Google Groups "nw.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gute...@outlook.com

unread,
May 11, 2016, 9:48:40 AM5/11/16
to nw.js, gute...@outlook.com, mikef...@gmail.com
Nice Roger, thanks!

Its important to note that there are people who already got armv7 working for both Chromium and node.js (i.e. PI 2+ boards) but not armv6 (like PI1) and that when I meant ARM I mean any linux-based ARM not just a single distro like raspbian or something.

Thank you very much for the support!

Waiting to hear from you :)

Best regards,
Gutemberg

Roger

unread,
May 11, 2016, 10:08:29 AM5/11/16
to gute...@outlook.com, nw.js, mikef...@gmail.com

Welcome. btw when I referred to our work and plan I mean only the framebuffer support.

workabroa...@gmail.com

unread,
Aug 13, 2016, 11:47:30 PM8/13/16
to nw.js, gute...@outlook.com
Hello,

I have just created a repository with the node-webkit binary port that runs on Raspbian, tested and working on Raspberry Pi 1 and Raspberry Pi 3 so it is ARMv6 and ARMv7 compatible.

Here you can check it: https://github.com/jalbam/nwjs_rpi

Gutemberg Ribeiro

unread,
Aug 14, 2016, 1:35:35 AM8/14/16
to workabroa...@gmail.com, nw.js
Hello!

Thank you for getting back. I really appreciate that however, there are some points for that to work in our case:

1. PI 1 has an armv6l cpu, the same as on our target device. Good, however, PI1 has VFP/FPU which is the main reason current chrome/node doesn't work on that device. In 2013, google removed non-fpu support from V8 which led us to this problem.
2. I can't see very well on that video on the read.me (I'm on mobile now) but our device has no window manager(x11, x-org etc) so we have to write to the framebuffer and as far as I understood, we need to implement a set of classes at Chrome o-zone layer in order to add support to other graphic devices which I assume is not done on that binary you posted on GH.
3. We need access to some native libs of the device so it can be exposed to javascript world and that is probably achievable by using node modules and I'm not very sure how it is going to work since the node version you mention is very old.

Would be good if you could share the code so we could try make it work and contribute back.

Thanks again for trying this.

Best regards,
Gutemberg


_____________________________
From: workabroa...@gmail.com
Sent: domingo, agosto 14, 2016 12:47 AM
Subject: Re: Cross-compile nwjs for armv6
To: nw.js <nwjs-g...@googlegroups.com>
Cc: <gute...@outlook.com>

reigelg...@gmail.com

unread,
Nov 3, 2016, 1:40:59 AM11/3/16
to nw.js
I'm on  the same boat as Gutemberg...

How is everything working so far?
Reply all
Reply to author
Forward
0 new messages