My try to install Gentoo
Hi, i am still very novice, so please add comment, if you see better ways of achieving my goals.
Set up Stage3
Mostly i've gone along the instruction of [cross-compiling] There is just one complication. You have to ensure, that you really use the same versions of python and libtool, it don't suffice to just install them. So follow step 1 through 5, then:
eselect python list eselect python set 1
Step 6 i wonder if the version Number is still correct. Somehow my version change later to 2.18-r3, but i did as told here. I followed to Step 9 and adapted the make.conf i got from the wrappers so that it satisfied the guide. Step 11 some of the link-targets didn't exist any more. i ignored this fact.
Now i started to emerge my system and advanced to the [Cross Install] Guide. the installation went fine, the only caveat was the openrc package. This wanted to install baselayout > 2.0 on my hostmachine. So i made my own overlay, copied the ebuild and deleted the RDEPEND Variable in the DEPEND Variable-definition. now
ebuild Manifest openrc-VERSION.ebuild
and the build went on. Later on i was told that i should have installed this package with emerge options-armv4tl- --root-deps=rdeps.
Now i took the binary packages that were build along the emerge and installed them with the emerge --root= option added the missing stuff (following guide), set gcc-config copied make.conf from /usr/arm... to etc and changed all directorys and erased the buildpkg feature, but added the getbinpkg feature and following variables: PORTAGE_BINHOST and PORTAGE_TMPDIR=/tmp (where i mount tmpfs for the sake of my sd card), and added EMERGE_DEFAULT_OPTS="--usepkg"
edited the etc/fstab file to load all parititions and the tmpfs
configured network, therefor edited /etc/conf.d/net and linked: ln -s /etc/init.d/net.lo /etc/init.d/net.usb0
copied timezone from usr/share/zoneinfo to etc/localtime
setup keywording from openmokooverlay, wich i am going to mount over nfs, and set profile:
cd etc/portage for c in keywords mask unmask use; do mkdir package.$c; done for c in keywords mask unmask use; do cd package.$c; ln -s usr/local/openmoko-overlay/portage-flags-target/$c openmoko; cd -; done cd .. ln -snf /usr/local/portage/openmoko-overlay/openmoko-target/profiles/openmoko make.profile
now i just need to compress this, and the stage3 ist ready: tar cjvf ../stage3.tar.bz2 .
Installing the stage3
To install the stage3 i used a Om2008.12 with kustomizer.
i am using 4 partitions on a 8 GB sd card. the first one is 10MB big, vfat and used to store the kernels, the second one is 500MB and stores the mentioned om2008.12 and the third is planned for gentoo with one GB. The rest ist stored in partition 5 and used to store data. I am thinking about if it was a good idea to make the last one an extended partition, as it seems i can't access it with om2008.12...
uboot is configured to be able to start to different kernels from the partition one at the sd card (uImage.bin and uImage2.bin)
i copied the stage3 to my running OM2008.12 and uncompressed it with tar xvpjf stage3.tar.bz2 -C GENTOODIR in the gentoo partition. now i installed a kernel in uImage2.bin and uncompressed the modules belonging to that in the gentoo partition, too.
chrooting in new installation
set date and prepared chrooting:
cp -L /etc/resolv.conf /mnt/gentoo/etc/ mount -t proc none /mnt/gentoo/proc mount -o bind /dev /mnt/gentoo/dev mount -o bind /dev/pts /mnt/gentoo/dev/pts
because in the new root the linking is not set up already, i had to do a little hack before chrooting:
echo "/usr/lib/gcc/armv4tl-softfloat-linux-gnueabi/4.3.2" >> GENTOODIR/etc/ld.so.conf chroot GENTOODIR/ /sbin/ldconfig -v chroot GENTOODIR/ /bin/bash
damn. After one day of investigation i noticed that i still have a newer (unstable) gcc Version installed for cross-compiling. So my arm-system got linked with that instead of the version i am using. Because of that i got many linking problems that weren't easy to find for me so i have to restart!
continuing
i had to install nfs-utils at my hostmachine and configured it. Was some work to get it used with my firewall. mkdir /usr/portage mount -t nfs 192.168.0.200:/usr/portage /usr/portage -o nolock
mkdir -p /usr/local/openmoko-overlay
mount -t nfs 192.168.0.200:/usr/local/openmoko-overlay /usr/local/openmoko-overlay
