OpenWrt Forum Archive

Topic: [Solved] Build a Single Package

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm almost newbie about embedded linux but I have experience with linux for many years even I'm using it on my laptop. I read lots of things about OpenWrt Buildroot on the Wiki (about, install, usage etc.)

I need some packages (nodejs and node-red) but these aren't in repositories so I think I should compile all of them on my own. I just want someone who has many experience with OpenWrt Buildroot to check me that I'm really on right way to build these package. I don't want to lose my time for nothing. On the other hand, of course I may meet some difficulties even if I am on right way but it is an other issue.

Here my estimated steps for this building procedure, in my case for nodejs

- Get the all source code of OpenWrt

git clone git://git.openwrt.org/openwrt.git

- I think download and install all available "feeds" is optional and isn't necessary for building a single package, am I right?
- First I have to check for missing packages on my build-system so

make defconfig
make prereq

after these comes "make menuconfig" command so from this point I think I should follow up the instructions which are given on Wiki [How to Build a Single Package, nodejs]

- Do I need to get source code of nodejs from git or is it already in OpenWrt? It isn't very clear on document. If I realy need it, I think git command make a new directory which is called "node" or "nodejs" so where should I copy this new directory to, for instance <build_root_dir>/package/nodejs ?

- After that to make nodejs package available in make menuconfig

./scripts/feeds install <PACKAGENAME>

If I'm wrong, you may warn about this.

- I have to select my target platform, then tick nodejs package by pressing "m".

make menuconfig

- Run the following commands

make tools/install
make toolchain/install

- Next step on wiki page is building the dependencies but I think in our case it isn't necessary. There is no information about this on nodejs wiki page so I skip this step.

- And finally, in order to build the package

make package/nodejs/compile
make package/nodejs/install
make package/index

the my nodejs package will be in the bin/ directory.

I've mixed the instructions on the wiki pages [How to Build a Single Package, nodejs] because they aren't very clear. If you confirm me I will be very appreciated, thank you in advance

(Last edited by hoobastank on 31 Jan 2015, 18:59)

I found my answer on my own. Here is the solution to install nodejs on OpenWrt

00. cd ~
01. git clone git://git.openwrt.org/openwrt.git
02. cd openwrt/
03. ./scripts/feeds update -a
04. ./scripts/feeds install -a
05. cd ..
06. git clone git://github.com/brimstone/nodejs-openwrt.git
07. mv nodejs-openwrt node
08. cp -R node/ ~/openwrt/feeds/packages/lang
09. cd openwrt/
10. ./scripts/feeds update -i
11. ./scripts/feeds install node
12. make menuconfig
13. make tools/install
14. make toolchain/install
15. make package/uclibc++/compile
16. make package/uclibc++/install
17. make package/node/compile
18. make package/node/install

You have to choose  "Languages/node" package by pressing "M" and save your configuration to .config file on the step of 12. You may meet some errors on the step of 17. All modifications are made on ~/openwrt/feeds/packages/lang/node/Makefile file.

Fix 1:
https://github.com/brimstone/nodejs-openwrt/issues/3
At the line of LIBS, you have to change 4.6.3 to 4.8.3 or whatever a version number that you have.

Fix 2:
https://dev.openwrt.org/ticket/14939
You have to disable mips16 support so add the line below into Makefile
PKG_USE_MIPS16:=0

You have two files in ~/openwrt/bin/ar71xx/packages directory. Install both of them in your target system.

# opkg install uclibcxx_0.2.4-1_ar71xx.ipk
# opkg insall node_v0.10.17-2_ar71xx.ipk

If you don't have so much time to compile them, you can download them from here.
http://giorgiocefaro.com/blog/installin … rduino-yun

You may want to read this really useful tutorial page. It is really very nice and clear.
http://www.componentality.com/res/Step- … -HW.en.pdf

Have nice day.

Hi Giorgio,

thank you for this work!

Do you think it is posible to make a native openwrt package of this?

Best regards,

Dieter

Very nice!!!

hoobastank wrote:

I found my answer on my own. Here is the solution to install nodejs on OpenWrt

00. cd ~
01. git clone git://git.openwrt.org/openwrt.git
02. cd openwrt/
03. ./scripts/feeds update -a
04. ./scripts/feeds install -a
05. cd ..
06. git clone git://github.com/brimstone/nodejs-openwrt.git
07. mv nodejs-openwrt node
08. cp -R node/ ~/openwrt/feeds/packages/lang
09. cd openwrt/
10. ./scripts/feeds update -i
11. ./scripts/feeds install node
12. make menuconfig
13. make tools/install
14. make toolchain/install
15. make package/uclibc++/compile
16. make package/uclibc++/install
17. make package/node/compile
18. make package/node/install

You have to choose  "Languages/node" package by pressing "M" and save your configuration to .config file on the step of 12. You may meet some errors on the step of 17. All modifications are made on ~/openwrt/feeds/packages/lang/node/Makefile file.

Fix 1:
https://github.com/brimstone/nodejs-openwrt/issues/3
At the line of LIBS, you have to change 4.6.3 to 4.8.3 or whatever a version number that you have.

Fix 2:
https://dev.openwrt.org/ticket/14939
You have to disable mips16 support so add the line below into Makefile
PKG_USE_MIPS16:=0

You have two files in ~/openwrt/bin/ar71xx/packages directory. Install both of them in your target system.

# opkg install uclibcxx_0.2.4-1_ar71xx.ipk
# opkg insall node_v0.10.17-2_ar71xx.ipk

If you don't have so much time to compile them, you can download them from here.
http://giorgiocefaro.com/blog/installin … rduino-yun

You may want to read this really useful tutorial page. It is really very nice and clear.
http://www.componentality.com/res/Step- … -HW.en.pdf

Have nice day.

hoobastank wrote:

I found my answer on my own. Here is the solution to install nodejs on OpenWrt
... steps omitted

00. cd ~
06. git clone git://github.com/brimstone/nodejs-openwrt.git

... etc..
Have nice day.

I was really looking forward to trying this, however the repository seems to have gone missing.  Anyone know what happened?

Thanks,

DL

hoobastank wrote:

I found my answer on my own. Here is the solution to install nodejs on OpenWrt

00. cd ~
01. git clone git://git.openwrt.org/openwrt.git
02. cd openwrt/
03. ./scripts/feeds update -a
04. ./scripts/feeds install -a
05. cd ..
06. git clone git://github.com/brimstone/nodejs-openwrt.git
07. mv nodejs-openwrt node
08. cp -R node/ ~/openwrt/feeds/packages/lang
09. cd openwrt/
10. ./scripts/feeds update -i
11. ./scripts/feeds install node
12. make menuconfig
13. make tools/install
14. make toolchain/install
15. make package/uclibc++/compile
16. make package/uclibc++/install
17. make package/node/compile
18. make package/node/install

You have to choose  "Languages/node" package by pressing "M" and save your configuration to .config file on the step of 12. You may meet some errors on the step of 17. All modifications are made on ~/openwrt/feeds/packages/lang/node/Makefile file.
.

I follow this intruction, but no Makefile found in git
When I do
11. ./scripts/feeds install node
It says
WARNING: No feed for package 'node' found, maybe it's already part of the standard packages?
Any help?

The discussion might have continued from here.