maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Developing on the N900 itself ? (https://talk.maemo.org/showthread.php?t=32772)

qole 2010-05-19 23:51

Re: Developing on the N900 itself ?
 
Ok, here's how to get the image I uploaded working in a basic sort of way.

From a root terminal:
Code:

qmount /home/user/MyDocs/maemo-sdk-v1_2.img.ext2 /floppy
mkdir /floppy/dev
mkdir /floppy/dev/pts
mkdir /floppy/dev/shm
mkdir /floppy/dev
mkdir /floppy/var/run/dbus
mkdir /floppy/var/lib/dbus
mkdir /floppy/var/run/pulse
cp /bin/busybox /floppy/bin
CHROOT=/floppy synchroot
qumount /floppy

Now try to qchroot into it.

I had to hack these two files to get the binaries to install (just remove all the bits where it tries to start the daemons):
/var/lib/dpkg/info/hal.postinst
/var/lib/dpkg/info/alarmd.postinst

I also had to do an ln -s command inside the chroot:
Code:

ln -s /bin/busybox /bin/su
EDIT: Just discovered that busybox is missing from the original SDK, I had to copy it in...

Tigerite 2010-05-20 09:33

Re: Developing on the N900 itself ?
 
That seems to have worked, thanks!! I did get an odd couple of messages after the synchroot step, but they don't look to be anything major, just hosts and xkb?

Code:

Nokia-N900-02-8:/home/user/MyDocs/sdk# CHROOT=/floppy synchroot
synching the chroot...
mv: cannot rename '/floppy/etc/hosts': No such file or directory
mv: cannot rename '/floppy/usr/share/X11/xkb': No such file or directory

I also can't seem to find those two postinst files within the chroot.. I'll try to install the binaries without that step and see how I get on.

EDIT: I fixed the rename issues by slightly modifying the original commands to be:

Code:

qmount /home/user/MyDocs/maemo-sdk-v1_2.img.ext2 /floppy
mkdir /floppy/dev
mkdir /floppy/dev/pts
mkdir /floppy/dev/shm
mkdir /floppy/usr/share/X11/xkb
mkdir /floppy/var/run/dbus
mkdir /floppy/var/lib/dbus
mkdir /floppy/var/run/pulse
cp /bin/busybox /floppy/bin
cp /etc/hosts /floppy/etc/hosts
CHROOT=/floppy synchroot
qumount /floppy


Greippi 2010-05-20 09:47

Re: Developing on the N900 itself ?
 
I just use Easy Debian if I ever need to compile something. And everything seems to work fine.

Even though the only notable thing I have done this way is just yet another 99 bottles of beer program.

Or does anyone think it's a 'wrong' way?

Tigerite 2010-05-20 13:04

Re: Developing on the N900 itself ?
 
Ok, I think I got all the binaries downloaded and installed.. I had to also copy /etc/ld.so.conf into /floppy/etc/ld.so.conf and then hack the alarmd.postinst file as qole detailed. I didn't have to bother with hal.postinst though?

I also get this every time, not sure if it matters or not:

Code:

Failed to fetch http://repository.maemo.org/pool/maemo5.0/nokia-binaries/********************************/nokia-binaries/o/opengles-sgx-img/opengles-sgx-img-common-dev_0.20091104.30+0m5_armel.deb  Size mismatch

qole 2010-05-20 16:27

Re: Developing on the N900 itself ?
 
Quote:

Originally Posted by Tigerite (Post 667643)
I also get this every time, not sure if it matters or not:

Code:

Failed to fetch http://repository.maemo.org/pool/maemo5.0/nokia-binaries/.../nokia-binaries/o/opengles-sgx-img/opengles-sgx-img-common-dev_0.20091104.30+0m5_armel.deb  Size mismatch

Yes, I just started getting that last night, too. Something has changed in the repositories.... Maybe a sign that PR 1.2 is coming? ;)

I hacked around that by downloading the package (using wget in Maemo) and then installing it using
Code:

dpkg -i opengles-sgx-img-common-dev_0.20091104.30+0m5_armel.deb
(after first installing the dependencies, of course).

If you are getting that error, you aren't finished downloading the binaries. Not by a long shot... :(

I also think its cute the way the N900 reboots halfway through the install and you have to restart the install with a "dpkg --configure -a"

MohammadAG 2010-05-20 16:35

Re: Developing on the N900 itself ?
 
Quote:

Originally Posted by qole (Post 667965)
Yes, I just started getting that last night, too. Something has changed in the repositories.... Maybe a sign that PR 1.2 is coming? ;)

Saw PyQt 4.7 in the cauldron list so :)

Thanks for the image, I'll check it out today.
As for the .deb you're not the only ones, saw a couple more people ask about it (Got the working deb if anyone wants it)

Tigerite 2010-05-20 20:28

Re: Developing on the N900 itself ?
 
Quote:

Originally Posted by qole (Post 667965)
Yes, I just started getting that last night, too. Something has changed in the repositories.... Maybe a sign that PR 1.2 is coming? ;)

I hacked around that by downloading the package (using wget in Maemo) and then installing it using
Code:

dpkg -i opengles-sgx-img-common-dev_0.20091104.30+0m5_armel.deb
(after first installing the dependencies, of course).

If you are getting that error, you aren't finished downloading the binaries. Not by a long shot... :(

I also think its cute the way the N900 reboots halfway through the install and you have to restart the install with a "dpkg --configure -a"

Ah.. :( I downloaded over 600 files though and the installation took absolutely ages, over 4 hours, and yes there was a restart halfway through too (which I missed at first - only noticed it when my PuTTy session died!) I used the --fix-missing option to get around the opengles.. I'll probably have to start over from scratch now, right? Agh, why isn't there an easier way to download the binaries than mucking about with a long hex token in sources.list!

Thanks for all your help so far - it's been invaluable..

Tigerite 2010-05-20 20:29

Re: Developing on the N900 itself ?
 
Quote:

Originally Posted by MohammadAG (Post 667978)
Saw PyQt 4.7 in the cauldron list so :)

Thanks for the image, I'll check it out today.
As for the .deb you're not the only ones, saw a couple more people ask about it (Got the working deb if anyone wants it)

I'd love the working deb if possible, please..

Tigerite 2010-05-21 06:45

Re: Developing on the N900 itself ?
 
I built it all again from scratch overnight, and didn't get the error from opengles-sgx-img-common-dev_0.20091104.30+0m5_armel.deb so they must have fixed it (I didn't use --fix-missing this time). Woke up with the phone having rebooted itself, which was expected, and had to hack alarmd.postinst again but then dpkg --configure -a finished the job. Now I'm in the same quandary as qole, should I upload the final image including Nokia binaries somewhere? It's crazy that we all have to spend so many hours downloading and installing (by far the bit that takes longest) them just to use the SDK, when all that's required to access them is to type in a 5-digit number and then copy/paste a token code. Meh.

qole 2010-05-26 18:41

Re: Developing on the N900 itself ?
 
This post suggests that we only need to create an executable script called /usr/sbin/policy-rc.d with only one command in it:
Code:

exit 101
That should stop apt from trying to stop, start, or restart daemons when installing them in the chroot. That will probably keep the phone from rebooting, and will get rid of the need to hack the .postinst scripts.

But I agree that 4+ hours of installing the binaries and apps packages is a big job, and I wish I could post the finished image on my site...


All times are GMT. The time now is 15:09.

vBulletin® Version 3.8.8