|
Page 4 of 9 |
|
Prev |
2 3 4
5 6
|
Next
| Last
Re: C/C++ program for n900
4 Attachment(s)
Quote:
WARNING: These notes/instructions are for Advanced Linux/Maemo Developers and crazy people only. Please, please, please don't try any of the following if you don't fit in either of these two categories. This could f*ck up your n900 and force you to reflash, especially if you don't properly remove the busybox links mentioned later. FURTHER WARNING: This is for C and C++ builds. Because of the Python mount bindings, I don't think Python stuff works in this chroot. So, for now this is for building stuff with no Python runtime build dependencies. And lastly, read everything before trying anything; get an understanding of the process. Good luck! These are mostly notes, but it wouldn't be too difficult to put them in a robust shell script. And as a last disclaimer, these notes are from memory and timestamp sorting. I'm optimistic, but it's possible something fell through the cracks. Download this post's attachments to /home/user so they're in both roots, then do the following as root: # Install bash # It's either in fremantle/sdk free non-free, fremantle/tools free non-free, or extras # Fix your /etc/apt/sources.list accordingly # For example: echo "deb http://repository.maemo.org/ fremantle/sdk free non-free" >> /etc/apt/sources.list apt-get update apt-get install bash # Fix your /etc/apt/sources.list again if you want to. If you do, then update again: apt-get update # Clone the system # This takes a while, so be patient. mount --bind / /floppy cp -a /floppy /home/.chroot umount /floppy # Fix and Make some directories rm /home/.chroot/opt mkdir /home/.chroot/opt mkdir -p /home/.chroot/home/user/MyDocs # Setup the mount bindings # Look at /home/user/chroot.sh.txt so you know what it's doing # Do the following only once per n900 boot, # otherwise you could have a mounting mess. # Clean-up is on you at the moment. . /home/user/chroot.sh.txt # Let's chroot chroot /home/.chroot /bin/bash --rcfile /home/user/chrootrc.txt -i # You should now be in the chroot. # Check and make sure df # what size is / ? # It should be near 2064208 1k-blocks # It shouldn't be near 233224 1k-blocks # If it's not near 2064208, STOP. YOU'RE DONE FOR THE TIME BEING. # Setup apt-get for some serious work. echo "deb http://repository.maemo.org/ fremantle/sdk free non-free" >> /etc/apt/sources.list echo "deb-src http://repository.maemo.org/ fremantle/sdk free non-free" >> /etc/apt/sources.list apt-get update # Install the packages listed in /home/user/dpkg-list.txt # The packages are listed in the order they should be installed # This list is based on following the rabbit hole of dependencies from the # maemo-sdk-dev meta-package # How you get this done is up to you. # I did this by hand in chunks of 15 or so. # Obviously, fix stuff when it breaks. Ouch! # After that most heinous process, # install some non-busybox binaries from /home/user/other.tar.gz # I compiled coreutils in FREMANTLE_ARMEL to get the i386 replacements*; # I just copied the armel versions (I think). # More of these non-busybox tools might be necessary for complex builds. Not sure. # But before that, first remove the busybox links. Maybe try the following: Code:
cd /# Did you successfully remove the busybox links from the previous step? # If not, go no further until you verify that you did. # You should be ready to install this small set of binaries and symbolic links # I'm not sure what options the busybox tar has, but the following should work cd / tar xzf /home/user/other.tar.gz # You might be done. # Try building maemopad # I haven't been able to get the builds working as user yet, so... mkdir -p /home/user/src/maemopad cd /home/user/src/maemopad apt-get source maemopad cd maemopad-2.6 # Remember, you're still root dpkg-buildpackage -b -d -nc # or maybe dpkg-buildpackage -b -d -nc -rfakeroot # These should be equivalent in this scenario # What happened? # If the build was successful, don't try installing until you leave the chroot. *Scratchbox uses some i386 binary tools regardless of build architecture |
Re: C/C++ program for n900
Woops, I forgot the maemo-optify perl scripts. I'll have to deal with that later; time for sleep.
|
Re: C/C++ program for n900
I realized after the PR1.1 update that it's a very bad idea to mount --bind /opt. I just got an 8GB card so I'm gonna rework everything on to that. After I fix the /opt stuff, Python should be usable in the chroot.
Also, I've added some other missing tools and packages that I will document after the migration. |
Re: C/C++ program for n900
Daperl, thanks for putting all that together. One comment: you tarred the other.tar.gz using the tar program included inside it. Therefore, we cannot untar it without already having that tar installed. Any chance you could retar it using the busybox tar?
|
Re: C/C++ program for n900
1 Attachment(s)
Quote:
Code:
tar xzf others.tar.gzCode:
gunzip tar.gz |
Re: C/C++ program for n900
Some cut and paste goodness for the horrible apt-get list.
Code:
binutils cpp-4.2 bash libgomp1 gcc-4.2 gcc-4.2-base libc6-dev libstdc++6-4.2-dev g++-4.2 readline-common netbase liblocale-gettext-perl libmagic1 python-support build-essential perl-modules perl-base patch g++ gcc perl make cpio autotools-dev m4 autoconf automake1.9 automake1.8 automake1.7 automake1.4 pkg-config libtool libtimedate-perl intltool-debian module-init-tools libpango1.0-common |
Re: C/C++ program for n900
Yeah, I was working on a nice clean room version of 51-1 when the repositories went down. I fixed the Python stuff and I hope to get back to this soon, but for the short term I have been diverted. Thanks for the list.
|
Re: C/C++ program for n900
Do I really need all of this to compile simple command line progs?
|
Re: C/C++ program for n900
For doing class room exercises it really should be enough to use the tcc compiler, see: http://bellard.org/tcc/ . Unfortunately it seems there is no package for it yet.
Also, note that most of the dependencies listed above are not for gcc per se, but dependencies for linking to all installed libraries and API's on the phone. |
Re: C/C++ program for n900
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? |
| All times are GMT. The time now is 08:42. |
Page 4 of 9 |
|
Prev |
2 3 4
5 6
|
Next
| Last
vBulletin® Version 3.8.8