Reply
Thread Tools
Posts: 30 | Thanked: 16 times | Joined on Jan 2010 @ Berlin
#41
Originally Posted by CharlesM View Post
Do I really need all of this to compile simple command line progs?
For compiling small programs it is absolutly sufficient to install gcc [~9MB] and g++ (if needed) [~14MB] only. No build-essential and all that stuff. If you have no other unoptified stuff installed you should have no problems installing those packages. I did that, I have enough space left and for small on device compiling I have all I need.
 

The Following 2 Users Say Thank You to endboss For This Useful Post:
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#42
Originally Posted by nicola.mfb View Post
Hi, it may be interesting to put the sdk on an external microSD (like debootstrap but with maemo and sdk repositories), use chroot to develop and copy the results on the real OS.
Some hints for that?
This is a great idea. If someone doesn't pick this up before me I'll definitely go this route when I get back to this stuff. Unfortunately, my schedule is screwed for the next 3 weeks. In the meantime, just because, here are some instructions to get an SD card rollin':

Maybe choose a Class 6 from this page. I recently purchased this one. Then:

Turn off
Insert microSD card in n900
Turn on
And as root in an xterminal, type the following:

WARNING: Same as above

sfdisk /dev/mmcblk1 << EOS
,100,b***
,3900,L
,,L
EOS
# be patient and wait for the prompt to come back
mkfs.vfat /dev/mmcblk1p1
mkfs.ext3 /dev/mmcblk1p2
mkfs.ext3 /dev/mmcblk1p3
mkdir -p /mnt/mmc12
mount -t ext3 -o noatime,data=writeback /dev/mmcblk1p2 /mnt/mmc12
mount / /floppy
cp -a /floppy /mnt/mmc12/.chroot
# Be even more patient

The next step would be either the big post above (with a tiny list of other things) or a debian installer to be named later .

Originally Posted by CharlesM View Post
Do I really need all of this to compile simple command line progs?
You don't need to do everything from the big post to get simple compiling going. After you get to the package install step, just install build-essential:

apt-get install build essential

Then you should be able to:

gcc mybiitchinapp.c -o mybiitchinapp

***This has a side effect (possibly bad) of letting certain programs think this vfat area is an archive space. I left it in because I think it makes booting from an SD card less painful (if one were to decide to go that route), but don't quote me on that.
__________________
N9: Go white or go home

Last edited by daperl; 2010-01-24 at 16:54.
 
Posts: 107 | Thanked: 74 times | Joined on Jan 2010
#43
Ok, I managed to have a nice SDK partition, here some hints:

* mmcblk1p1 (or another sd partition) formatted and mounted on /sdk
* extract maemo-sdk-rootstrap_5.0_armel.tgz to /sdk
* create dev and mount it from real dev with mount -o bind
* mount /sdk/dev/pts, /sdk/proc and /sdk/sys properly (not sure about the last two, the first is necessary to avoid apt-get errors)
* add to /etc/apt/sources.list the line:
Code:
deb http://repository.maemo.org/ fremantle/xxxxx nokia-binaries
replace xxxxx with the exact string from your scratchbox installation.

That's all, I just checked out a my qt4 project and compiled with:

* chroot /sdk
* apt-get update
* apt-get install libqt4-dev
* cd blah
* qmake
* make

Please test and elaborate the above instruction, and provide further hints to have all automounted and working at device boot

Regards

Niko
 

The Following User Says Thank You to nicola.mfb For This Useful Post:
jaeezzy's Avatar
Posts: 664 | Thanked: 160 times | Joined on Jul 2008 @ Australia
#44
Originally Posted by nicola.mfb View Post
Ok, I managed to have a nice SDK partition, here some hints:

* mmcblk1p1 (or another sd partition) formatted and mounted on /sdk
* extract maemo-sdk-rootstrap_5.0_armel.tgz to /sdk
* create dev and mount it from real dev with mount -o bind
* mount /sdk/dev/pts, /sdk/proc and /sdk/sys properly (not sure about the last two, the first is necessary to avoid apt-get errors)
* add to /etc/apt/sources.list the line:
Code:
deb http://repository.maemo.org/ fremantle/xxxxx nokia-binaries
replace xxxxx with the exact string from your scratchbox installation.

That's all, I just checked out a my qt4 project and compiled with:

* chroot /sdk
* apt-get update
* apt-get install libqt4-dev
* cd blah
* qmake
* make

Please test and elaborate the above instruction, and provide further hints to have all automounted and working at device boot

Regards

Niko
Hi niko,
I would be very grateful if you could kindly elaborate each step and kinda make it step by step guide for biginners/average users. I have managed to install build-essential and gtk+ on the device itself and looking to finally get the maemo sdk and figured out, from what I saw here, is quite a bit of work for average user like me. Also agreed that its good to have it separately from the OS. Thank you.

P.S However isn't it possible to just install the packages required to compile hildon applications. thanks
 
Posts: 105 | Thanked: 15 times | Joined on Dec 2009 @ Baltimore, USA
#45
hello everyone,
is there a way i can compile and and develop directly on the n900?
ive tried to apt-get install gcc g++
but it tells me there is no installable candidate..

can anyone point me in the right direction?
 
Posts: 48 | Thanked: 32 times | Joined on Nov 2009 @ CT
#46
I don't believe that a compiler has been ported yet
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#47
See this thread which seems to have covered the same question.
 

The Following User Says Thank You to Rob1n For This Useful Post:
Posts: 13 | Thanked: 0 times | Joined on Feb 2010
#48
Originally Posted by endboss View Post
For compiling small programs it is absolutly sufficient to install gcc [~9MB] and g++ (if needed) [~14MB] only. No build-essential and all that stuff. If you have no other unoptified stuff installed you should have no problems installing those packages. I did that, I have enough space left and for small on device compiling I have all I need.
How have you installed GCC?
I tried this but it doesn't work:
$ sudo gainroot
$ apt-get install gcc

Thanks
 
Posts: 30 | Thanked: 16 times | Joined on Jan 2010 @ Berlin
#49
Originally Posted by alex94 View Post
How have you installed GCC?
I tried this but it doesn't work:
$ sudo gainroot
$ apt-get install gcc

Thanks
You probably didn't add the sources.
Edit /etc/apt/sources.list and add the following line to it:
deb http://repository.maemo.org fremantle/sdk free non-free
The fastest way to accomplish this is like this:
echo "deb http://repository.maemo.org fremantle/sdk free non-free" >> /etc/apt/sources.list
Afterwards type apt-get update. Now the installation should work.
 
Posts: 13 | Thanked: 0 times | Joined on Feb 2010
#50
Thanks enboss gcc is now on my machine.
I can compile C files, but how can i execute them?
I tried:
$ sudo gainroot
$ ./test
Error is: Permission denied
So i tried:
$ sudo ./test
but this doesn't work too
 
Reply

Tags
c compiler, c language, c programming, c++ compiler, c++ language, c++ programming, compile, compiler, development, maemo, on-device, on-device development, on-device programming, programming


 
Forum Jump


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