I would like to use gcc to build a jni library, can I install gcc?
How?
Thank you,
I would like to use gcc to build a jni library, can I install gcc?
How?
Thank you,
You can cross compile a program on a linux host system, transfer it to your Yun and run it on Linino. Since the newest Yun image is based on Attitude Adjustment this SDK should work with no problems now. It worked for most things on the old image as well.
http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrt-SDK-ar71xx-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2.tar.bz2
Thank you, will investigate.
I've been trying to build the toolchain in:
Linux ubuntu 3.13.0-24-generic #46-Ubuntu SMP
I've been following the instructions at:
But I'm getting and error when I try to execute:
sudo make tools/install
The error is:
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'getopt'... ok.
Checking 'fileutils'... ok.
Checking 'working-gcc'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'gawk'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'perl'... ok.
Checking '/usr/bin/python2.7'... ok.
Checking 'wget'... ok.
Checking 'git'... ok.
Checking 'gnutar'... ok.
Checking 'svn'... ok.
Checking 'gnu-find'... ok.
Checking 'getopt-extended'... ok.
Checking 'non-root'... failed.
Build dependency: Please do not compile as root.
Prerequisite check failed. Use FORCE=1 to override.
make[2]: *** [tmp/.prereq-build] Error 1
make[1]: *** [prereq] Error 2
make: *** [tools/install] Error 2
Maybe because I'm prefixing the make with sudo, but if I don't then it won't build at all and the error displayed is:
make[2]: *** [tmp/.prereq-build] Error 1
make[1]: *** [prereq] Error 2
make: *** [tools/install] Error 2
simon@ubuntu:~/linino/trunk$ uname -a
Linux ubuntu 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
simon@ubuntu:~/linino/trunk$ make FORCE=1 tools/install
rm: cannot remove '/home/simon/linino/trunk/tmp/info/.files-packageinfo-3546': Permission denied
make[3]: *** No rule to make target `/home/simon/linino/trunk/tmp/info/.files-packageinfo-3910'. Stop.
cat: /home/simon/linino/trunk/tmp/info/.files-packageinfo-3910: No such file or directory
rm: cannot remove '/home/simon/linino/trunk/tmp/info/.files-packageinfo.stamp.e2acf987b494d5dae9ced9f8732e751f': Permission denied
touch: cannot touch '/home/simon/linino/trunk/tmp/info/.files-packageinfo.stamp.d41d8cd98f00b204e9800998ecf8427e': Permission denied
touch: cannot touch '/home/simon/linino/trunk/tmp/info/.files-packageinfo.stamp': Permission denied
make[2]: *** [/home/simon/linino/trunk/tmp/info/.files-packageinfo.stamp] Error 1
make[1]: *** [prepare-tmpinfo] Error 2
make: *** [tools/install] Error 2
Any ideas?
Checking 'non-root'... failed.
remove sudo and try it again.
Permission denied
sudo chown username:username -R /home/username
That did the trick...thank you.
Next problem whilst working through:
% cd ~/projects/linino/trunk
% cd package
% ln ~/projects/blink1/openwrt blink1
I don't see a blink1 file or folder anywhere.
Why not use official openwrt-yun source:
http://forum.arduino.cc/index.php?topic=235489.msg1699935#msg1699935
after build complete.
make menuconfig
compile toolchain and SDK:
Thank you, I'll give it a go.
Are they're any guides or tutorials on how to use the toolchain to build and target applications for the Yun?
There is little about the Yun that is not normal OpenWrt stuff. Most of the unique things are in Python.
Here are the OpenWrt guides:
http://wiki.openwrt.org/doc/devel/crosscompile
This tutorial is my favorite setup:
http://downloads.openwrt.org/docs/eclipse.pdf
You get full source level debugging!
For linux programs that use configure and make this post has an example:
http://forum.arduino.cc/index.php?topic=237050.msg1704929#msg1704929
Thank you very much, will go through those.
I left the system building overnight, this morning I found it had stopped with an error:
checking for gpgme-config... failed
configure: error: GPGME 1.0.0 or later needed
make[3]: *** [/home/simon/OpenWrt-yun/build_dir/linux-ar71xx_generic/opkg-618/.configured_yyyy] Error 1
make[3]: Leaving directory `/home/simon/OpenWrt-yun/package/opkg'
make[2]: *** [package/opkg/compile] Error 2
make[2]: Leaving directory `/home/simon/OpenWrt-yun'
make[1]: *** [/home/simon/OpenWrt-yun/staging_dir/target-mips_r2_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/simon/OpenWrt-yun'
make: *** [world] Error 2
I followed the instructions at:
Any clues?
The instructions has two ways ssh/git or ssl/https. Which way you are following?
The output of
cat /proc/cpuinfo |grep processor
From this link:
Followed instructions from 'How to build' down.
simon@ubuntu:~/OpenWrt-yun$ cat /proc/cpuinfo |grep processor
processor : 0
processor : 1
processor : 2
processor : 3
output of:
nano feeds.conf.default
you have 4 CPU cores, use this command will speed up:
DL_FOLDER=~/DOWNLOAD MAKE_JOBS=5 ./build.sh
output of :
free
http://forum.arduino.cc/index.php?topic=235489.msg1699935#msg1699935
if you use ssl to get source like me then:
"feeds.conf.default" need update, you might need start over again. But this time with MAKE_JOBS=5.
free:
simon@ubuntu:~/OpenWrt-yun$ free
total used free shared buffers cached
Mem: 4041044 1894244 2146800 10680 286452 791220
-/+ buffers/cache: 816572 3224472
Swap: 4192252 0 4192252
Contents of feeds.conf.default:
DL_FOLDER=/DOWNLOAD MAKE_JOBS=5 ./build.sh
#src-git packages git@github.com:arduino/openwrt-packages-yun.git
src-git packages https://github.com/arduino/openwrt-packages-yun.git
src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package
src-svn luci http://svn.luci.subsignal.org/luci/branches/luci-0.11/contrib/package
src-git routing git://github.com/openwrt-routing/packages.git;for-12.09.x
#src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone
#src-svn efl svn://svn.openwrt.org/openwrt/feeds/efl
#src-svn xorg svn://svn.openwrt.org/openwrt/feeds/xorg
#src-svn desktop svn://svn.openwrt.org/openwrt/feeds/desktop
#src-svn xfce svn://svn.openwrt.org/openwrt/feeds/xfce
#src-svn lxde svn://svn.openwrt.org/openwrt/feeds/lxde
#src-link custom /usr/src/openwrt/custom-feed
DL_FOLDER=/DOWNLOAD MAKE_JOBS=5 ./build.sh
in "feeds.conf.default" ?
It is now, I added it before the last post.
checking for gpgme-config... failed
configure: error: GPGME 1.0.0 or later needed
It means package of GPGME is not fed. You might need start over.
total used free shared buffers cached
Mem: 4041044 1894244 2146800 10680 286452 791220
47% memory has been used.
reboot before start over or:
free && sync && echo 3 > /proc/sys/vm/drop_caches && free