Thursday, August 20, 2009

gentoo in stardom SL3620-2S-LB2

  1. setup nfs mount in stardom
  2. download stage3-armv4l-2008.0.tar.bz2
  3. mv the above to nfs mounted directory and tar -xjvpf it.
  4. ignore the error that it can't create /dev/*
  5. enable telnet with http:///cgi/telnet/telnet.cgi
  6. telnet to the stardom and locate the stage3 bz2 above. tar -xjvpf again but to different directory
  7. remove incomplete /dev/* in step 3 and replace it with the directory created in step 6.
  8. Now you have the directory for chroot
create a chroot.sh in ~/admin/bin/ as below:

#!/bin/sh
CWD=`pwd`

cd /mnt/ide3/public/gentoo

mount -t proc none ./proc
mount -o bind /dev ./dev
mount -t sysfs none ./sys
mount -t usbfs none ./proc/bus/usb
bin/chroot . /bin/bash

cd $CWD

  1. ~/admin/bin/chroot.sh (keep chroot.sh in admin's home instead of /root so that it will be kept after reboot)
  2. env-update
  3. source /etc/profile
  4. export PS1="(chroot) $PS1"
  5. Inside chroot, we can tar -xjvpf the stage3 bz2 again without error. Exit this chroot and chroot to the new clean extract.
  6. emerge --sync
  7. optional when you are warned for new Portage version emerge --oneshot portage
  8. it hangs at emerge --sync. kill it and restart
  9. it suggests 'emerge portage'
  10. after 'emerge portage', it has:
* Messages for package sys-apps/portage-2.1.6.13: * *
In portage-2.1.6, the default behavior has changed for `emerge world`

* and `emerge system` commands. These commands will reinstall all

* packages from the given set unless an option such as --noreplace,
* --update, or --newuse is specified.


*
* File collision protection is now enabled by default via make.globals
* with FEATURES=protect-owned. If you want to disable collision
* protection completely (not recommended), then you need to ensure
* that neither protect-owned nor collision-protect are enabled.

*
* GNU info directory index is up-to-date.
* IMPORTANT: 2 config files in '/etc' need updating.

* See the CONFIGURATION FILES section of the emerge

* man page to learn how to update config files.


Problem 1 - come across blocked portage when:
  • emerge --update --deep --newuse world
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#blocked

Problem 2 - try revdep-rebuild but get the errors:

usr/bin/revdep-rebuild: line 661: /dev/fd/62: No such file or directory

* Dynamic linking on your system is consistent... All done. root@raidon_nas etc # gawk: cmd. line:6: fatal: cannot open file `3_errors.rr' for reading (No such file or directory) gawk: cmd. line:6: fatal: cannot open file `3_errors.rr' for reading (No such file or directory)

Attempts to solve the problems:

check other linux and find /dev/fd is symbolic link to /proc/self/fd

  • emerge --unmerge man-pages

it seems fixed.

re-issue:

  • emerge --update --deep --newuse world
Some messages during 10+ hours updates....

>>> Installing (4 of 75) dev-libs/expat-2.0.1-r1
* Please note that the soname of the library changed!

* If you are upgrading from a previous version you need

* to fix dynamic linking inconsistencies by executing:

* revdep-rebuild --library libexpat.so.0
* QA Notice: The following files contain writable and executable sections
* Files with such sections will not work properly (or at all!) on some

* architectures/operating systems. A bug should be filed at
* http://bugs.gentoo.org/ to make sure the issue is fixed.
* For more information, see http://hardened.gentoo.org/gnu-stack.xml
* Please include the following list of files in your report:

* Note: Bugs should be filed for the respective maintainers

* of the package in question and not hardened@g.o.

* !WX --- --- usr/lib/libbz2.a:blocksort.o

* !WX --- --- usr/lib/libbz2.a:huffman.o

* !WX --- --- usr/lib/libbz2.a:crctable.o
* !WX --- --- usr/lib/libbz2.a:randtable.o
* !WX --- --- usr/lib/libbz2.a:compress.o
* !WX --- --- usr/lib/libbz2.a:decompress.o
* !WX --- --- usr/lib/libbz2.a:bzlib.o


Oh! Another error at perl updates:

Reading MacJapanese (MacJapanese) Writing compiled form Not a HASH reference at ../bin/enc2xs line 661, line 7399. make[2]:
*** [ma_05_t.c] Error 9
make[2]: Leaving directory `/var/tmp/portage/dev-lang/perl-5.8.8-r5/work/perl-5.8.8/ext/Encode/JP' make[1]:
*** [subdirs] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-lang/perl-5.8.8-r5/work/perl-5.8.8/ext/Encode' make:
*** [lib/auto/Encode/Encode.so] Error 2

*
* ERROR: dev-lang/perl-5.8.8-r5 failed. * Call stack: * ebuild.sh, line 49: Called src_compile
* environment, line 2567: Called die
Find the below and run man emerge and fix it. Also find my change to locale.gen. Since perl fail at locale compilation, guess it may be related. Run locale-gen again to regenerate the locale file.

drwxr-xr-x 33 root root 4096 Aug 21 17:10 .
drwxr-xr-x 17 root root 4096 Aug 21 00:24 ..

-rw-r--r-- 1 root root 1215 Aug 20 17:24 ._cfg0000_dispatch-conf.conf

-rw-r--r-- 1 root root 2689 Aug 21 09:30 ._cfg0000_gai.conf

-rw-r--r-- 1 root root 875 Aug 21 09:30 ._cfg0000_locale.gen

-rw-r--r-- 1 root root 4630 Aug 21 03:03 ._cfg0000_man.conf

Now it is re-compiling the perl and get through the error during the compilation of MacJapanese. Looking good.