General NAS-Central Forums

Welcome to the NAS community
It is currently Mon Feb 19, 2018 4:18 pm

All times are UTC




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Feb 14, 2018 10:04 pm 
Online

Joined: Sun Nov 07, 2010 7:16 pm
Posts: 24
Location: New Jersey
Hi out there...

I am looking for a nodejs packade for my NSA320...
I want to control a tuya plug and have the script etc already handy, but for running it i would need node...
And since it is not available for freetz in fritzbox, i was hoping et is available on the NAS...

Thx for any tip...

Jan

_________________
NSA 320 with FFP and Metarepository on 4.7 firmware


Top
 Profile  
 
PostPosted: Thu Feb 15, 2018 8:29 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2361
As I currently focused on updates, my system is incompatible with current ffp 0.7, so I can't help. Any volunteers to compile nodejs for ffp0.7arm? Mr. Dini? I think it is possible to compile nodejs 6.13.0, which has LTS until April 2019 and I can help with approprate patches.


Top
 Profile  
 
PostPosted: Thu Feb 15, 2018 12:09 pm 
Online
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 631
I have a 0.10.something now. But it's fine, if you have patches. :) Of courseI will try to compile a newer one. Would be an awesome thing tho.

_________________
Thanks nas-central the lot of help! :)


Last edited by MrDini on Thu Feb 15, 2018 3:54 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Feb 15, 2018 2:33 pm 
Online

Joined: Sun Nov 07, 2010 7:16 pm
Posts: 24
Location: New Jersey
Hello...

That just sounds great...
I have Entwareng and FFp on the box so i should be good installing it...
Please let me know how i can get that on the box...or where do download...
Thx!!!!

_________________
NSA 320 with FFP and Metarepository on 4.7 firmware


Top
 Profile  
 
PostPosted: Thu Feb 15, 2018 3:59 pm 
Online

Joined: Sun Nov 07, 2010 7:16 pm
Posts: 24
Location: New Jersey
Sounds better and better...
I am using node-v8.9.4-x64 right now to control the smart plug...so seems not to be sooo urgent for being state of the art compile...

_________________
NSA 320 with FFP and Metarepository on 4.7 firmware


Top
 Profile  
 
PostPosted: Thu Feb 15, 2018 4:42 pm 
Online
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 631
Our ZyXEL 3** NASes have ARMv5 CPUs. Node.JS is using V8 JS engine, which is formerly known as Google Chrome's JS engine too. Unfortunately with its release of 3.18 the no-vfp2 support has been dropped, So starting from node 0.11.0 (I think, but maybe it is another version) we Cannot compile any nodejs release because of the lack of VFP2 support in our CPU. So the latest working versions are the 0.10 node branch currently.

I also wanted to use node for a lot of interesting projects. But I had to rewrite everything into Python, that I use. But it would be awesome, if @barmalej2 Could send me some patches for that. :) And then I Can certainly package, and share the result.

_________________
Thanks nas-central the lot of help! :)


Top
 Profile  
 
PostPosted: Thu Feb 15, 2018 5:42 pm 
Online

Joined: Sun Nov 07, 2010 7:16 pm
Posts: 24
Location: New Jersey
Hmmmm...

I would even take the one you have for testing...
Cant believe that it needs to be this new version
As ling it does what i need i would be happy...

_________________
NSA 320 with FFP and Metarepository on 4.7 firmware


Top
 Profile  
 
PostPosted: Thu Feb 15, 2018 5:50 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2361
OK. Here we go:

https://raw.githubusercontent.com/buildroot/buildroot/master/package/nodejs/0001-check-if-uclibc-has-backtrace-support.patch
https://raw.githubusercontent.com/Optware/Optware-ng/master/sources/node/mips_arm-no-fpu.patch

Configure options:
Quote:
./configure \
--prefix=/ffp \
--dest-os=linux \
--dest-cpu=arm \
--with-arm-float-abi=softfp \
--with-arm-fpu=none \
--with-intl=system-icu \
--without-snapshot \
--shared-zlib \
--shared-openssl \
--shared-libuv \
--shared-http-parser \
--shared-cares

You will need libuv, http-parser and cares libs. Additionally, adjust source code for /ffp prefix and to declare:
Code:
export PYTHON=/ffp/bin/python
(v2.7) variable.


Top
 Profile  
 
PostPosted: Thu Feb 15, 2018 5:58 pm 
Online
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 631
Thanks a lot! :) Let's see.

_________________
Thanks nas-central the lot of help! :)


Top
 Profile  
 
PostPosted: Fri Feb 16, 2018 6:32 pm 
Online
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 631
The first patch not works, because there is no deps/v8/src/base/debug/stack_trace_posix.cc inside the node 6.13.0 tag... :roll: But i think in this release, we don't need to disable bt support. It isn't used here at all. Or I just Cannot grep it. :D

patch command wrote:
|diff --git a/deps/v8/src/base/debug/stack_trace_posix.cc b/deps/v8/src/base/debug/stack_trace_posix.cc
|index 87c0a73..d2c182a 100644
|--- a/deps/v8/src/base/debug/stack_trace_posix.cc
|+++ b/deps/v8/src/base/debug/stack_trace_posix.cc
--------------------------
File to patch:


Hmm, what a lovely error:
Code:
  g++ '-DV8_TARGET_ARCH_ARM' '-DCAN_USE_ARMV7_INSTRUCTIONS' '-DENABLE_DISASSEMBLER' '-DV8_I18N_SUPPORT' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' -I../deps/v8 -I../deps  -pthread -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -mfloat-abi=softfp -marm -fdata-sections -ffunction-sections -O3 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /i-data/bf835951/build/node-v6.13.0/out/Release/.deps//i-data/bf835951/build/node-v6.13.0/out/Release/obj.target/v8_base/deps/v8/src/accessors.o.d.raw   -c -o /i-data/bf835951/build/node-v6.13.0/out/Release/obj.target/v8_base/deps/v8/src/accessors.o ../deps/v8/src/accessors.cc
In file included from ../deps/v8/src/base/atomicops.h:151:0,
                 from ../deps/v8/src/base/accounting-allocator.h:8,
                 from ../deps/v8/src/zone.h:10,
                 from ../deps/v8/src/handles.h:13,
                 from ../deps/v8/src/accessors.h:11,
                 from ../deps/v8/src/accessors.cc:5:
../deps/v8/src/base/atomicops_internals_arm_gcc.h:260:4: error: #error "Your CPU's ARM architecture is not supported yet"
 #  error "Your CPU's ARM architecture is not supported yet"
    ^



:(

_________________
Thanks nas-central the lot of help! :)


Last edited by MrDini on Fri Feb 16, 2018 7:10 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Feb 16, 2018 7:00 pm 
Online

Joined: Sun Nov 07, 2010 7:16 pm
Posts: 24
Location: New Jersey
You guys have no idea how thankful i am...even if it never works, you tried...so great job...
Keeping my fingers crossed

_________________
NSA 320 with FFP and Metarepository on 4.7 firmware


Top
 Profile  
 
PostPosted: Fri Feb 16, 2018 8:45 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2361
MrDini wrote:
Hmm, what a lovely error:
In file included from ../deps/v8/src/base/atomicops.h:151:0,
from ../deps/v8/src/base/accounting-allocator.h:8,
from ../deps/v8/src/zone.h:10,
from ../deps/v8/src/handles.h:13,
from ../deps/v8/src/accessors.h:11,
from ../deps/v8/src/accessors.cc:5:
../deps/v8/src/base/atomicops_internals_arm_gcc.h:260:4: error: #error "Your CPU's ARM architecture is not supported yet"
# error "Your CPU's ARM architecture is not supported yet"
:(

Yea, that's bad. I was hoping that 2-nd patch will override this error, but it seams not enough. Not sure, what atomic ops V8 needs, but v5te can do that with __atomic built-ins , if not legacy __sync built-ins are used. I will take a look closer at Monday, but it seems like the road to nowhere.


Top
 Profile  
 
PostPosted: Fri Feb 16, 2018 10:06 pm 
Online
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 631
That patch just change the node's system check config. It doesn't modify the V8's source code.

Is the atomic ops related to the simple atomic support? Because it has been implemented on ARM since 2.6.32 kernel if I clearly remember. So our kernel is too old for that.

_________________
Thanks nas-central the lot of help! :)


Top
 Profile  
 
PostPosted: Sat Feb 17, 2018 8:26 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2361
MrDini wrote:
That patch just change the node's system check config. It doesn't modify the V8's source code.

Do we see the same things differently?
Quote:
--- a/deps/v8/build/toolchain.gypi
+++ b/deps/v8/build/toolchain.gypi

@@ -56,10 +56,24 @@
'arm_test_noprobe%': 'off',

# Similar to vfp but on MIPS.
- 'v8_can_use_fpu_instructions%': 'true',
+ 'conditions': [
+ ['mips_fpu_mode!="soft"', {
+ 'v8_can_use_fpu_instructions%': 'true',
+ }],
+ ['mips_fpu_mode=="soft"', {
+ 'v8_can_use_fpu_instructions%': 'false',
+ }],
+ ],

# Similar to the ARM hard float ABI but on MIPS.
- 'v8_use_mips_abi_hardfloat%': 'true',
+ 'conditions': [
+ ['mips_fpu_mode!="soft"', {
+ 'v8_use_mips_abi_hardfloat%': 'true',
+ }],
+ ['mips_fpu_mode=="soft"', {
+ 'v8_use_mips_abi_hardfloat%': 'false',
+ }],
+ ],

# Force disable libstdc++ debug mode.
'disable_glibcxx_debug%': 0,
@@ -207,7 +221,7 @@
}],
[ 'arm_version==7 or arm_version=="default"', {
'conditions': [
- [ 'arm_fpu!="default"', {
+ [ 'arm_fpu!="default" and arm_fpu!="none"', {
'cflags': ['-mfpu=<(arm_fpu)',],
}],
],
@@ -250,7 +264,7 @@
}],
[ 'arm_version==7 or arm_version=="default"', {
'conditions': [
- [ 'arm_fpu!="default"', {
+ [ 'arm_fpu!="default" and arm_fpu!="none"', {
'cflags': ['-mfpu=<(arm_fpu)',],
}],
],
@@ -526,6 +540,11 @@
'FPU_MODE_FP32',
],
}],
+ ['mips_fpu_mode=="soft"', {
+ 'defines': [
+ '_MIPS_ARCH_MIPS32R2',
+ ],
+ }],
],
}],
['mips_arch_variant=="r1"', {
@@ -665,6 +684,12 @@
[ 'clang==0', {
'cflags': ['-Wa,-mips32r2'],
}],
+ ['mips_fpu_mode=="soft"', {
+ 'defines': [
+ '_MIPS_ARCH_MIPS32R2',
+ ],
+ 'cflags': ['-msoft-float'],
+ }],
],
'cflags': ['-mips32r2'],
'ldflags': ['-mips32r2'],
--- a/deps/v8/src/base/build_config.h
+++ b/deps/v8/src/base/build_config.h
@@ -71,7 +71,7 @@
defined(__ARM_ARCH_7__)
# define CAN_USE_ARMV7_INSTRUCTIONS 1
# ifndef CAN_USE_VFP3_INSTRUCTIONS
-# define CAN_USE_VFP3_INSTRUCTIONS
+//# define CAN_USE_VFP3_INSTRUCTIONS
# endif
#endif

--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc

@@ -137,6 +137,7 @@

#if V8_HOST_ARCH_MIPS
int __detect_fp64_mode(void) {
+#ifndef __mips_soft_float
double result = 0;
// Bit representation of (double)1 is 0x3FF0000000000000.
__asm__ volatile(
@@ -153,6 +154,9 @@
: "t0", "$f0", "$f1", "memory");

return !(result == 1);
+#else
+ return 0;
+#endif
}


MrDini wrote:
Is the atomic ops related to the simple atomic support? Because it has been implemented on ARM since 2.6.32 kernel if I clearly remember. So our kernel is too old for that.

Bilobil can help to remember, that the problem is with __sync atomic family 8 byte instructions only until 3.1 kernel
Quote:
ARM supports 8 byte atomics with cmpxchg64 kernel helper with gcc-4.8 + Linux 3.1 (or Linux 2.6.30 w/ armv6k+).
Besides we can use __atomic builtins functions instead __sync.


Top
 Profile  
 
PostPosted: Sat Feb 17, 2018 9:56 am 
Online
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 631
Hmm, I just looked on the gypi ending, and it's node related. :roll: I Can only hardly imagine, it is a part of the original V8. But also, I were sketchy.

_________________
Thanks nas-central the lot of help! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: billbillw, Bing [Bot], Darkyputz, Majestic-12 [Bot], MrDini and 95 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group