Has anyone had success boot of a kernel generated by handhelds-pxa-2.6_2.6.8.1-hh0.oe

From: Robert E. Anderson <rea.a.t.q.sr.unh.edu>
Date: Thu Sep 02 2004 - 17:05:35 EDT

I've been spending most of my time getting used to OE on my iPAQ 3835
where I still have lots of rough edges on my OE compiled distribution, a
lot of it leads back to busybox and module problems.

I did build an opie-image for the iPAQ 2215 to give the CF boot options
a try. If I could get it to work I would like to try to build an OE
package to generate the initrd that we need. I will probably post to
the OE mailing list and ask for ideas on where to start that process, in
the hopes that somebody else here may have an idea as to why what I
outline below doesn't work.

After spending 4 hours last night attempting to make an initrd that
would boot my OE generated kernel, I think there's still something wrong
with the kernel itself. Alternately I may have even more library issues
that I haven't addressed yet. I don't see why the other applications on
the initrd would have different library requirements, but I have NOT
changed all the libraries on the initrd (only the kernel modules).

I based my work on the bootable CF wiki example code.

My results where that I could never get the "cardmgr" command to find my
pcmcia card. Most of the time it seemed that /proc wasn't loaded. And
frequently I needed to do the insmod commands by hand. I don't have any
real corrections to offer since I've never had success in booting off my
OE CF image. I was able to boot of the supplied images and rootfs,
although it wasn't very usefull as both GPE and Opie had showstopping
problems with the touchscreen.

I did change two things in to make my life easier in the given CF boot
files:

        1. In the "linux/cf_boot/startup.txt" file on my CF card I changed the
"console=tty0" parameter to "console=ttyS0". I don't know what the
first one did, but I couldn't type on my serial connection to the 2215
until I made this change. I'm not sure why I would want a console on a
device without a keyboard, so the serial port just made sense to me.

        2. On the initrd, in the "linuxrc" file I was having a problem with the
PCMCIA module not working. Once I made the above change I was able to
type and see that it was, in fact, not loaded. Since nothing loads it,
my guess is that it was overlooked OR the "cardmgr" command should cause
it to load automatically? At any rate I figured it would be easier if
it was preloaded, which I did by changing the one line
  from: "for module_name in $PLATFORM_LCD"
  to: "for module_name in $PLATFORM_LCD $PLATFORM_PCMCIA"

-------------------------------------
To make the initrd Here's what I did:
-------------------------------------

        Mounted the given rootfs (using -o loop) and removed all of it's
contents. I then untared my OE image rootfs into it's premade EXT2
image and unmounted. Copied that rootfs over to become my CF cards
"linux/rootfs" file.

        Next I ungziped the given initrd and mounted that like above. Since
it's low on space I tared up the /lib/modules/2.6.6-hh0 directory and
removed it. I then used the following script pointing to an untarred
copy of the old 2.6.6-hh0 directory (on some other drive space) and my
OE produced rootfs/lib/modules/2.6.8.1-hh0 to get just the libaries
needing to be moved over.

[rea@new tmp]$ more ~/oe/ipaq2215/copy_mods.sh

FROMDIR=/big3/oe/ipaq2215/tmp/rootfs/lib/modules/2.6.8.1-hh0
TODIR=/mnt/rd/lib/modules/2.6.8.1-hh0

LIKEDIR=/tmp/oldmodules

mkdir -p $TODIR/
for d in `( cd $LIKEDIR && find . -type d -print )`; do
    mkdir -p $TODIR/$d;
done

for f in `( cd $LIKEDIR && find . ! -type d -print )`; do
    cp $FROMDIR/$f $TODIR/$f
done

exit;

The above shell script displays an error where the mach-pxa structure
has changed. To fix that I copied over the entire directory
"2.6.8.1-hh0/kernel/arch/arm/mach-pxa/h2200/" with the same name from
the OE rootfs to the initrd.

Once done I updated the "/lib/modules/latest" link, just in case it's
used someplace, and unmounted my initrd.

I gzip -9 compressed my initrd and copied it onto my CF card as
"linux/cf_boot/initrd". Also into this directory I copied from OE the
tmp/rootfs/boot/zImage-2.6.8.1-hh0 to "linux/cf_boot/zImage". I should
now have an matching Kernel and initrd with the same kernel modules
existing on my rootfs.

-- 
--------------------------------------------------------------
 Robert E. Anderson  		 	email: rea@sr.unh.edu
 Systems Programmer			phone: (603) 862-3489
 UNH Research Computing Center		  fax: (603) 862-1761
--------------------------------------------------------------
Received on Thu Sep 2 17:05:36 2004

This archive was generated by hypermail 2.1.8 : Thu Sep 02 2004 - 17:05:54 EDT