Reply
Thread Tools
Posts: 838 | Thanked: 3,384 times | Joined on Mar 2009
#1
When /scratchbox/tools/bin/gzip is too old, what is correct solution for replace it (or skip using it)?

I compiled and installed inside scratchbox ARM version of gzip. Then renamed /scratchbox/tools/bin/gzip and then
Code:
file gzip 
 /bin/gzip
But this breaks other targets.

And gzip is not only problem. Another one is /scratchbox/devkits/doctools/bin/nroff and I'm sure there is more.
 

The Following 3 Users Say Thank You to AapoRantalainen For This Useful Post:
Posts: 11 | Thanked: 47 times | Joined on Feb 2013
#2
I've ran into the same (or rather very similar) problems. My solution is to build my own SDK without scratchbox using an armel debootstrap of Lenny and mixing in the maemo repositories. It seems to work so far and runs (chrooted) both nativley on the n900 and on my PC (Squeeze) with qemu.

I'd have to do it a few more times to get the instructions in order, but if anyone would like to try I can post what I have so far...
 

The Following 5 Users Say Thank You to Zaerc For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#3
Originally Posted by Zaerc View Post
I've ran into the same (or rather very similar) problems. My solution is to build my own SDK without scratchbox using an armel debootstrap of Lenny and mixing in the maemo repositories. It seems to work so far and runs (chrooted) both nativley on the n900 and on my PC (Squeeze) with qemu.

I'd have to do it a few more times to get the instructions in order, but if anyone would like to try I can post what I have so far...
I'm all ears!

Thanks for any information you can provide.
 

The Following 3 Users Say Thank You to reinob For This Useful Post:
Posts: 11 | Thanked: 47 times | Joined on Feb 2013
#4
Step 0: Prerequisites.
Code:
sudo apt-get install debootstrap binfmt-support qemu-user-static
My system already had them from previous experimentation, there could be more needed.

Step 1: Prepare the chroot.
Code:
sudo debootstrap --foreign --arch=armel --variant=minbase \
lenny lenny-maemo-sdk-armel htt\
p://archive.debian.org/debian/

sudo cp /usr/bin/qemu-arm-static lenny-maemo-sdk-armel/usr/bin

sudo chroot lenny-maemo-sdk-armel

echo "exit 101" >/usr/sbin/policy-rc.d

chmod -v 755 /usr/sbin/policy-rc.d

echo 'APT { Install-Recommends "false"; };' > /etc/apt/apt.conf.d/no-recommends

/debootstrap/debootstrap --second-stage

mkdir -v /home/opt

useradd -m user

mkdir -pv /scratchbox/etc

touch /scratchbox/etc/scratchbox-version

ln -sv ../usr /scratchbox/tools

echo "Package: *
Pin: origin repository.maemo.org
Pin-Priority: 2000
" >/etc/apt/preferences

echo "deb htt\
p://repository.maemo.org/ fremantle/tools free non-free
deb htt\
p://repository.maemo.org/ fremantle/sdk free non-free
deb-src htt\
p://repository.maemo.org/ fremantle/sdk free non-free
deb htt\
p://repository.maemo.org/ fremantle/4bc37c7c77ebe90177\
c050b805a8dc79 nokia-binaries" >/etc/apt/sources.list

exit


Step 2: Install the SDK.
Code:
sudo chroot lenny-maemo-sdk-armel

apt-get update

apt-get upgrade # all yes, except resolv.conf

apt-get install libc6 # 'Yes, do as I say!'

apt-get remove sysv-rc

rm -fv /usr/sbin/update-rc.d                                                    

touch /usr/sbin/update-rc.d                                                     

chmod -v 755 /usr/sbin/update-rc.d                                              

apt-get install mini-rc

apt-get install maemo-sdk-dev bsdutils coreutils \
debianutils mktemp diff findutils grep gzip mount \
sed sysvinit-utils tar

umount -v /opt

mv -v /opt/* /home/opt/

rmdir-v /opt

ln -sv home/opt /

# we're done already, the rest is just for showing off

apt-get build-dep maemopad

cd /tmp

apt-get source maemopad

cd maemopad-2.6

dpkg-buildpackage -b
Note that apt-get will complain about a lot of things, just go along with everything except the overwriting of resolv.conf, unless you have a dns-server running on localhost, then it should be fine too.

The maemopad that was produced in the end, installed without so much as a warning on my n900, and ran just fine.

PS. The resulting lenny-maemo-sdk-armel directory occupied about 509Meg on my system. So you'll need at least that much space, afterwards about 137Meg could be recovered with an apt-get clean.

Last edited by Zaerc; 2013-03-12 at 07:43.
 

The Following 5 Users Say Thank You to Zaerc For This Useful Post:
Posts: 11 | Thanked: 47 times | Joined on Feb 2013
#5
A little update on some progress here.

I have managed to upgrade this thing to Squeeze, just don't ask me how (yet) in my mind it's all a vague blur of endless apt-get update, dpkg --force-all -P, apt-cache policy, apt-get install <package>=<version> and installing dummy packages to satisfy stale (sometimes even ludicrous) dependencies etc...

One thing I do remember clearly was having to patch libglib2, and while I was struggeling to get the patches applied, I discovered that AapoRantalainen had already done the work here: http://cc.oulu.fi/~rantalai/maemo5/libglib/, a nice time-saver to me for which I am very grateful.

First I tried patching glib2.0-2.24.2 as that's the version Squeeze uses, but maemopad wouldn't link against it because some information on one of the auxilary libraries was missing (IIRC, should of saved the actual error but I'm sure it will still be there waiting for me on the next attempt). So for the time beeing I just installed Aapo's libglib2.0-0_2.35.3-0maemo2_armel.deb and libglib2.0-dev_2.35.3-0maemo2_armel.deb, to get things working for now.

To test it, I have build maemopad again. This time the installation (on real n900 maemo) of the resulting package had to be forced due to dependencies on the newer libraries of my build environment. And I know that this isn't really a proper test, but at least maemopad worked fine, just like before.

At the moment I'm just trying to build some of the major components of the system (the power-kernel compiled with an insignificant patch for instance), but I have no good way to test them. So I have bought another 32G micro-SD card to see if I can get a second (upgraded) system going on there to mess with.

I'm not entirely sure where to take it from here, so any suggestions would be welcome.
 

The Following 4 Users Say Thank You to Zaerc For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:59.