Reply
Thread Tools
Posts: 210 | Thanked: 841 times | Joined on Feb 2013
#1
Hi, i have managed to run maple on the n900 using qemu-i386 and native OpenJDK.

https://www.youtube.com/watch?v=MbtAgc1RU-4

Why? Because it was fun to try and i wanted to test the power of the n900.
I actually did this a few years ago while studying maths but just recently got another n900 so i thought i would try it again and share it with you. It is very easy to do .


Which x86 apps would you like to see on the n900?

// HOWTO (in maemo SDK):
// in this howto i assume that MyDocs is ext3. if it is not either convert it or use different paths!
// this is independant of the app you want to run
// i had issues with qemu-kvm, therefore i built qemu myself

// install python2.7 and set up update-alternatives

$ git clone https://github.com/GNOME/glib
$ cd glib
$ git checkout glib-2-46
$ ./configure --enable-static
$ make -j4
$ make install
$ cd ..
$ git clone https://github.com/krnlyng/qemu
$ cd qemu
$ git checkout n900hacks
// system currently fails, i will look into it later
// static is because i am working with i386 chroots too
$ ./configure --static --prefix=/usr --disable-system
// if you only need i386 add --target-list=i386-linux-user to speed up the build
$ make -j4
$ make DESTDIR=~/qemuinstall install
$ cd ..
$ cd qemuinstall
$ tar czvf ../qemu_git.tar.gz usr/
// upload the resulting tar gz file to your phone
$ scp ../qemu_git.tar.gz user@phone:~/MyDocs

// on phone
$ sudo gainroot
# tar xzvf /home/user/MyDocs/qemu_git.tar.gz -C /
# using your favourite editor edit /usr/bin/binfmt_i386_init
// copy and paste:
Code:
#!/bin/sh
mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
echo ':i386:M::\x7fELF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
// exit your editor
# binfmt_i386_init
# exit
// now you can run i386 applications

// IF YOU REBOOT
you have to execute binfmt_i386_init as root before you can start i386 applications

// OPTIONAL (but you most probably want to do this because without it there is not much use of qemu-i386)
// download an x86 chroot (choose your favourite distribution)
// or you can create one: https://wiki.debian.org/de/Debootstrap
// or for arch linux users like me: https://wiki.archlinux.org/index.php...existing_Linux
// (effectively: curl -O http://mirrors.kernel.org/archlinux/...-x86_64.tar.gz)
// tar it up (if not already), copy it to your n900 and untar (i used ~/MyDocs/root.i686)

// MAPLE
// this is maple specific
// for this the optional part from before is not optional
// on your phone
// follow the instructions here: https://wiki.maemo.org/OpenJDK_6.0_0..._Labs)_on_N900
// note: the first two links are dead, use the third.
// on your desktop
// install maple 13 on an x86 machine, activate it.
// tar it up, copy it to your n900 and untar (i used ~/MyDocs/maple13_i386)
$ cd ~/MyDocs/maple13_i386/bin
// edit activation, maple, mint, xmaple
// in everyone of those files look for MAPLE=foo, replace it with MAPLE=/home/user/MyDocs/maple13_i386
// or use some fancy sed command
// edit maple look for "bin.IBM_INTEL_LINUX")
// change MAPLE_JRE_BIN=foo to MAPLE_JRE_BIN="/opt/OpenJDK-camswl/jre/bin/"
// change JRE_ROOT=foo to JRE_ROOT="/opt/OpenJDK-camswl/jre/lib"
// change JRE_LIB3=foo to JRE_LIB3="$JRE_ROOT/arm/native_threads"
// edit maple13.desktop and replace Exec=foo with this:
Exec=/home/user/MyDocs/maple13_i386/bin/start_maple.sh
// create a new file in the current directory: start_maple.sh
// copy and paste this into the file (you have to replace root.i686 with your chroots name!):
Code:
#!/bin/sh

LD_LIBRARY_PATH=/home/user/MyDocs/root.i686/lib /home/user/MyDocs/maple13_i386/bin/xmaple
$ sudo gainroot
# cp maple13.desktop /usr/share/applications/hildon
# exit
// goto the app launcher and try it out

// IF YOU REBOOT
you have to execute binfmt_i386_init as root before you can start maple

Last edited by liar; 2015-11-18 at 08:36.
 

The Following 21 Users Say Thank You to liar For This Useful Post:
Posts: 23 | Thanked: 10 times | Joined on May 2014 @ Germany
#2
do you have any apps which you want to see on your N900?
 
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#3
Originally Posted by liar View Post
Hi, i have managed to run maple on the n900 using qemu-i386 and native OpenJDK.
Thats really nice could you make a tutorial or more precise steps?


Originally Posted by liar View Post
Which x86 apps would you like to see on the n900?
I would like to see matlab.
 

The Following User Says Thank You to Halftux For This Useful Post:
jellyroll's Avatar
Posts: 435 | Thanked: 684 times | Joined on Apr 2012 @ Netherlands 020
#4
Originally Posted by liar View Post
Which x86 apps would you like to see on the n900?
I would like to see NetworkMiner on the N900.
 

The Following User Says Thank You to jellyroll For This Useful Post:
Posts: 31 | Thanked: 50 times | Joined on Jan 2012 @ Ireland
#5
Originally Posted by liar View Post
It is very easy to do .
Great demo! Did you do something like this?
 

The Following User Says Thank You to zerox For This Useful Post:
Posts: 210 | Thanked: 841 times | Joined on Feb 2013
#6
Originally Posted by Halftux View Post
Thats really nice could you make a tutorial or more precise steps?
i have updated my original post.

i will probably make deb packages or at least provide downloads... soon

Originally Posted by Halftux View Post
I would like to see matlab.
i will look into matlab

Originally Posted by zerox View Post
Great demo! Did you do something like this?
yes, that was my inspiration
 

The Following 4 Users Say Thank You to liar For This Useful Post:
Posts: 258 | Thanked: 1,015 times | Joined on May 2010 @ Near Munich
#7
Thank you so much for posting this!

My favourite programming language only compiles on x86 and x64 and I so wanted to program on the way using my N900. Also I can adapt it for my raspberry.

Speed isn't of concern for the finished software, I am just curious how much it will influence the IDE experience.

I will try your guide next weekend.
 

The Following User Says Thank You to Macros For This Useful Post:
Posts: 210 | Thanked: 841 times | Joined on Feb 2013
#8
Originally Posted by jellyroll View Post
I would like to see NetworkMiner on the N900.
as far as i can tell NetworkMiner is a windows application. getting x86 wine to work is a different story... but maybe i will try eventually
 

The Following 3 Users Say Thank You to liar For This Useful Post:
Posts: 34 | Thanked: 26 times | Joined on May 2012
#9
Originally Posted by liar View Post
as far as i can tell NetworkMiner is a windows application. getting x86 wine to work is a different story... but maybe i will try eventually
It's very interesting. I'm looking forward
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:37.