Skip to content

Commit

Permalink
first stab at instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
gflarity committed Jul 11, 2012
0 parents commit 35dee13
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 0 deletions.
70 changes: 70 additions & 0 deletions README.md
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,70 @@
### About

If you're looking to run the latest Node.JS on the Raspberry Pi, you've come to the right place.


### Installation


Installation from the binaries available is easy:

```
tar xzf node-v0.8.2.tar.gz
cp -R ./node-v0.8.2/* /
```

### Building

Building is a bit tricker, follow along.

First install some dependencies:

```
sudo apt-get install git-core build-essential libssl-dev
```


Grab the NodePi and Node.JS source and checkout the version you want:


```
git clone https://github.com/gflarity/node_pi.git
git clone https://github.com/joyent/node.git
cd node
git checkout origin/v0.8.2-release -b v0.8.2-release
```


Now apply the patch appropriate for your version of Node.js:

```
git apply --stat ../node_pi/v0.8.2-release-raspberrypi.patch
```

Then set the follow exports for use during compilation:

```
export GYP_DEFINES="armv7=0"
export CCFLAGS='-march=armv6'
export CXXFLAGS='-march=armv6'`
```

Run configure and be sure to use the shared openssl lib that we downloaded earlier:

```
./configure --shared-openssl
```

Now make and install:


```
make
sudo make install
```


### Credits

http://www.raspberrypi.org/phpBB3//viewtopic.php?f=34&t=9929
http://elsmorian.com/post/23474168753/node-js-on-raspberry-pi
63 changes: 63 additions & 0 deletions v0.8.2-release-raspberrypi.patch
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,63 @@
From 6a71e141d22e27d061a6698977c6fe4968a25b46 Mon Sep 17 00:00:00 2001
From: Geoff Flarity <geoff.flarity@gmail.com>
Date: Tue, 10 Jul 2012 23:48:18 +0000
Subject: [PATCH] changes for Raspberry pi

---
deps/v8/SConstruct | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct
index ebce7ff..103e851 100644
--- a/deps/v8/SConstruct
+++ b/deps/v8/SConstruct
@@ -80,8 +80,8 @@ LIBRARY_FLAGS = {
},
'gcc': {
'all': {
- 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
- 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'],
+ 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS', '-march=armv6'],
+ 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions', '-march=armv6'],
},
'visibility:hidden': {
# Use visibility=default to disable this.
@@ -159,22 +159,22 @@ LIBRARY_FLAGS = {
},
'armeabi:softfp' : {
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0'],
- 'vfp3:on': {
- 'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
- },
- 'simulator:none': {
- 'CCFLAGS': ['-mfloat-abi=softfp'],
- }
+# 'vfp3:on': {
+# 'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
+# },
+# 'simulator:none': {
+# 'CCFLAGS': ['-mfloat-abi=softfp'],
+# }
},
'armeabi:hard' : {
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=1'],
- 'vfp3:on': {
- 'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
- },
- 'simulator:none': {
- 'CCFLAGS': ['-mfloat-abi=hard'],
- }
- }
+# 'vfp3:on': {
+# 'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
+# },
+# 'simulator:none': {
+# 'CCFLAGS': ['-mfloat-abi=hard'],
+# }
+# }
},
'simulator:arm': {
'CCFLAGS': ['-m32'],
--
1.7.10.4

0 comments on commit 35dee13

Please sign in to comment.