[Angstrom-devel] Angstrom-x11-image on Collie

2007-06-22 Thread Shane Hathaway
Hello,

I'm determined to make angstrom-x11-image with kernel 2.6 work on my
Collie.  I've made progress, so I thought I'd share how I've done it and
where it currently breaks.

Materials:

- Collie (Sharp Zaurus SL-5500)
- Standard charger
- 2 GB SanDisk Ultra II compact flash card.  My Collie supports this
card well, and it's now inexpensive.  I also have an SD card, but since
the 2.6.x SD driver is still in testing, I prefer CF for now.
- CE-170TS serial cable, which is indispensable for this kind of work,
and now goes for US$5.
- Linux desktop

First, I checked out the org.openembedded.dev branch as the wiki
suggests.  I made a local.conf, which I will gladly share if anyone else
is also trying to do this.  I first tried to build under Gentoo x86_64,
but the build broke in strange ways.  So I set up a 32 bit Debian Etch
chroot (using debootstrap) and built inside there.  Debian worked much
better for this purpose.

I built angstrom-console-image and angstrom-x11-image.  Once both were
built, I created a 128 MB ext2 filesystem based on angstrom-x11-image,
like this:


dd if=/dev/zero of=angstrom-x11-image-rootfs.bin bs=1048576 count=128
/sbin/mke2fs angstrom-x11-image-rootfs.bin
mkdir mnt
sudo mount -o loop angstrom-x11-image-rootfs.bin mnt
cd mnt
tar xpvzf ../Angstrom-x11-image-glibc-test-20070622-collie.rootfs.tar.gz
cd ..
sudo umount mnt


I put the kernel on the 2 GB card as "zImage", the console image as
"initrd.bin", and the 128 MB filesystem as
"boot-images/angstrom-x11-image-rootfs.bin".  I flashed the Zaurus with
that card and booted with the serial cable attached.  Using minicom on
the desktop, with the serial port /dev/ttyS0 set to 115200-N81, I saw
the Zaurus boot messages and finally got a login prompt.  I logged in as
root.  At this point, I felt at home with my big keyboard and a
conventional shell prompt.

I killed most of the running processes, then mounted a loopback
filesystem at the root, similar to the OpenZaurus altboot script:


image=/media/cf/boot-images/angstrom-x11-image-rootfs.bin
fsck $image
mkdir -p /pivot
mount -o loop $image /pivot
mkdir -p /pivot/old_root
mount -t proc proc /pivot/proc
mount -t sysfs sysfs /pivot/sys
mount --bind /dev /pivot/dev
mount --bind /var/volatile /pivot/var/volatile
mount -t devpts devpts /pivot/dev/pts
cd /pivot
pivot_root . old_root


Now the root filesystem was the 128 MB filesystem I created earlier.  I
was finally ready to start gpe-dm, the desktop manager for GPE.

I was happy to see X work, but the screen filled with boxes instead of
characters.  It was impossible to read the screen unless you could guess
what each word was by counting boxes.  It looked as if a font was
missing.  I puzzled over this until I figured out I could watch a trace
of gpe-login through minicom, like so:


/etc/X11/Xserver &
export DISPLAY=:0
strace gpe-login


The trace revealed that gpe-login was looking for
/etc/pango/pango.modules and /etc/gtk-2.0/gdk-pixbuf.loaders, but those
files did not exist.  I learned that these files are supposed to be
created by ipkg postinstall scripts, but for some reason that is not
happening.  So I did what the postinstall scripts would do:


pango-querymodules > /etc/pango/pango.modules
gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders


Now gpe-login worked (yay!) but the touch screen did not.  I searched
until I figured out that the ucb1x00-ts module is supposed to be loaded.
 After I ran the following, the touch screen worked well:


modprobe ucb1x00-ts
ts_calibrate


Then I restarted gpe-dm.  The gpe-login program executed successfully
(yay!), then I reached the Time and Date Setup screen.  I set the time
and date, but when I pushed the confirm arrow, my Collie froze and it
dumped a kernel stack trace to my minicom session.  At that point, I
decided I had made enough progress to report.  I intend to file bug
reports on the postinstall problems and the freezing.

I'm happy I was able to get this far.  Thanks for the work on Collie
support.  If anyone can suggest a simpler way to boot Angstrom with GPE
on a Collie, I'm all ears--but keep in mind that the X11 image is
already too big to fit in the internal flash memory, so the root
filesystem really has to be on a CF or SD card.

Shane



___
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel


Re: [Angstrom-devel] Angstrom-x11-image on Collie

2007-06-22 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Shane Hathaway schreef:
> I intend to file bug
> reports on the postinstall problems and the freezing.

That's not a bug, since pivot_root doesn't run init so the ipkg-cl configure 
script
doesn't get run.

regards,

Koen

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGe3svMkyGM64RGpERAmmVAJ9CY4eeQNcip5+BeKFYXrxShsPGXACcCOhX
A2BkhmFAUF2QnjTGz5FXY1Q=
=TmzQ
-END PGP SIGNATURE-

___
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel


Re: [Angstrom-devel] Angstrom-x11-image on Collie

2007-06-22 Thread shane . oe
Koen Kooi wrote:
> Shane Hathaway schreef:
>> I intend to file bug
>> reports on the postinstall problems and the freezing.
> 
> That's not a bug, since pivot_root doesn't run init so the ipkg-cl configure 
> script
> doesn't get run.

Ok.  I guessed I was just lacking knowledge of some script, so I sent an
email instead of filing a bug.  Thanks.

I haven't yet figured out the magic to get /sbin/init to do the right
thing after pivot_root.  I want the secondary init to start services,
but it detects that it's not running as pid 1 and defers to the real
init.  Should I keep trying to convince the secondary init to do what I
want, or should I forget init and just run what it would run?

Shane


___
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel


Re: [Angstrom-devel] Angstrom-x11-image on Collie

2007-06-22 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] schreef:
> Koen Kooi wrote:
>> Shane Hathaway schreef:
>>> I intend to file bug
>>> reports on the postinstall problems and the freezing.
>> That's not a bug, since pivot_root doesn't run init so the ipkg-cl configure 
>> script
>> doesn't get run.
> 
> Ok.  I guessed I was just lacking knowledge of some script, so I sent an
> email instead of filing a bug.  Thanks.
> 
> I haven't yet figured out the magic to get /sbin/init to do the right
> thing after pivot_root.  I want the secondary init to start services,
> but it detects that it's not running as pid 1 and defers to the real
> init.  Should I keep trying to convince the secondary init to do what I
> want, or should I forget init and just run what it would run?

'exec /sbin/init' at the end of the first initscript, that will give it pid 1.

regards,

Koen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGe4JnMkyGM64RGpERAsyIAJ9HupGipVXm9DDCKz1F1ThLIjOTGgCgoHht
SYetN8nBXXmA9XoEcWB3cok=
=ioVH
-END PGP SIGNATURE-

___
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel


Re: [Angstrom-devel] Angstrom-x11-image on Collie

2007-06-22 Thread shane . oe
Koen Kooi wrote:
> [EMAIL PROTECTED] schreef:
>> I haven't yet figured out the magic to get /sbin/init to do the right
>> thing after pivot_root.  I want the secondary init to start services,
>> but it detects that it's not running as pid 1 and defers to the real
>> init.  Should I keep trying to convince the secondary init to do what I
>> want, or should I forget init and just run what it would run?
> 
> 'exec /sbin/init' at the end of the first initscript, that will give it pid 1.

Ah-ha, that should work!  Thanks.

Shane


___
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel


Re: [Angstrom-devel] Angstrom-x11-image on Collie

2007-06-22 Thread Stéphane Gourichon
Shane Hathaway a écrit :
> I'm determined to make angstrom-x11-image with kernel 2.6 work on my
> Collie.  I've made progress, so I thought I'd share how I've done it and
> where it currently breaks.

Thanks a lot for making progress and sharing it !

> I made a local.conf, which I will gladly share if anyone else
> is also trying to do this.

Please share. I was never sure of what I put in my local.conf, the wiki 
being rather short about it and not seeming to cover collie very well.

I have tried in the past to build a complete distribution with varying 
progress but there were too many things I was unsure of to figure out 
what the problems actually were and how to solve them.

Moreover, after I added hints on the wiki on the already existing 
http://linuxtogo.org/gowiki/BuildEnvironment , the page was removed 
because a (too short) page on Angstrom main site had similar content, 
without retaining the hints.

> (lot of interesting stuff)

You give enough details so that it seems other can follow your steps. 
Thank you !

I (and probably others) would be happy to at least test and comment, and 
perhaps offer improvements, if I had a way to test without having after 
each test session to reflash and reconfigure my regular root for daily 
normal use of the machine, see
http://www.mail-archive.com/angstrom-distro-devel@linuxtogo.org/msg00109.html
Can you provide hints ?

> Materials: (...)
> - CE-170TS serial cable, which is indispensable for this kind of work,
> and now goes for US$5.

Since my question (ref above) about easing the testing never had any 
answer, I did not bother to ask for a cable, cf
http://www.mail-archive.com/angstrom-distro-devel@linuxtogo.org/msg00117.html
but if any cables are still available I shall make good use of one.
(Marcin, I can afford post + cable price of course.)

Thank you.

-- Stéphane Gourichon

___
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel


Re: [Angstrom-devel] Angstrom-x11-image on Collie

2007-06-22 Thread Shane Hathaway
Stéphane Gourichon wrote:
> Shane Hathaway a écrit :
>> I'm determined to make angstrom-x11-image with kernel 2.6 work on my
>> Collie.  I've made progress, so I thought I'd share how I've done it and
>> where it currently breaks.
>
> Thanks a lot for making progress and sharing it !
>
>> I made a local.conf, which I will gladly share if anyone else
>> is also trying to do this.
>
> Please share. I was never sure of what I put in my local.conf, the wiki
> being rather short about it and not seeming to cover collie very well.

I've attached it, but the list might filter it out.  The only
interesting lines are:

MACHINE = "collie"
DISTRO = "angstrom-2007.1"
GLIBC_GENERATE_LOCALES = "en_US.UTF-8"
CCACHE = ""
ANGSTROM_MODE = "glibc"
COLLIE_MEMORY_SIZE="64"
COLLIE_RAMDISK_SIZE="0"

> I have tried in the past to build a complete distribution with varying
> progress but there were too many things I was unsure of to figure out
> what the problems actually were and how to solve them.

It's not easy and the details are shifting often, but progress is going
in the right direction.  For example, only a few weeks ago the correct
DISTRO was angstrom-2007.1-oabi, but the oabi part has been thankfully
simplified away.

> Moreover, after I added hints on the wiki on the already existing
> http://linuxtogo.org/gowiki/BuildEnvironment , the page was removed
> because a (too short) page on Angstrom main site had similar content,
> without retaining the hints.
>
>> (lot of interesting stuff)
>
> You give enough details so that it seems other can follow your steps.
> Thank you !

I should mention some corrections to my post:

- I'm using Debian Sid, not Etch, although Etch would probably work
equally well.
- When I use tar to extract the x11 image into a loopback filesystem, I
do it *as root* (sudo tar xpvzf ...) to preserve file ownership.
- The list of materials required should have also listed a USB CF
adapter so that the desktop can write to the CF card directly.

> I (and probably others) would be happy to at least test and comment, and
> perhaps offer improvements, if I had a way to test without having after
> each test session to reflash and reconfigure my regular root for daily
> normal use of the machine, see
> http://www.mail-archive.com/angstrom-distro-devel@linuxtogo.org/msg00109.html
> Can you provide hints ?

I'd like that too.  kexec can probably accomplish this, but I have not
yet tried it.  I believe kexec is only available in 2.6.x, so the kernel
installed in the Collie's internal flash will have to be 2.6.x, but not
necessarily a bleeding edge version.

>> Materials: (...)
>> - CE-170TS serial cable, which is indispensable for this kind of work,
>> and now goes for US$5.
>
> Since my question (ref above) about easing the testing never had any
> answer, I did not bother to ask for a cable, cf
> http://www.mail-archive.com/angstrom-distro-devel@linuxtogo.org/msg00117.html
> but if any cables are still available I shall make good use of one.
> (Marcin, I can afford post + cable price of course.)

I got mine through Amazon.  It's still available there.

Shane


#
# OpenEmbedded local configuration file (sample)
#
# Please visit the Wiki at http://openembedded.org/ for more info.
#
#
# Be SURE to read this file in its entirety and the GettingStarted page on the
# wiki before proceeding.
#
# Once you have done that, remove the line at the end of this
# file and build away.
# 
# WARNING: lines starting with a space (' ') will result in parse failures.
# Remove '# ' from commented lines to activate them.
#
# NOTE: Do NOT use $HOME in your paths, BitBake does NOT expand ~ for you.  If 
you
# must have paths relative to your homedir use ${HOME} (note the {}'s there
# you MUST have them for the variable expansion to be done by BitBake).  Your
# paths should all be absolute paths (They should all start with a / after
# expansion.  Stuff like starting with ${HOME} or ${TOPDIR} is ok).

# Use this to specify where BitBake should place the downloaded sources into
DL_DIR = "/OE/downloads"

# Delete the line below. Then specify which .bb files to consider for
# your build. Typically this will be something like BBFILES = 
"/path/to/openembedded/packages/*/*.bb"
BBFILES = "/OE/org.openembedded.dev/packages/*/*.bb"

# Use the BBMASK below to instruct BitBake to _NOT_ consider some .bb files
# This is a regulary expression, so be sure to get your parenthesis balanced.
BBMASK = ""

# Uncomment this if you want to use a prebuilt toolchain. You will need to
# provide packages for toolchain and additional libraries yourself. You also
# have to set PATH in your environment to make sure BitBake finds additional 
binaries.
# Note: You will definitely need to say:
ASSUME_PROVIDED += " virtual/arm-angstrom-linux-gcc-2.95"
# to build any of two Linux 2.4 Embedix kernels,
# i.e. openzaurus-sa-2.4.18 and openzaurus-pxa-2.4.18 - and don't forget
# to rename the binaries as instructed in the Wiki.
# ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}

Re: [Angstrom-devel] Angstrom-x11-image on Collie

2007-06-22 Thread Marcin Juszkiewicz
Dnia piątek, 22 czerwca 2007, Shane Hathaway napisał:

[local.conf]
> The only interesting lines are:

Those are usefull:

> MACHINE = "collie"
> DISTRO = "angstrom-2007.1"
> COLLIE_MEMORY_SIZE="64"
> COLLIE_RAMDISK_SIZE="0"

Those can be skipped:

> ANGSTROM_MODE = "glibc"
> GLIBC_GENERATE_LOCALES = "en_US.UTF-8"

That one I would not use (ccache is usefull):

> CCACHE = ""

Also add:

IMAGE_FSTYPES += "ext2"

This should give you images in ext2 files so no need to create loopback 
files where you unpack tarballs.

> I'd like that too.  kexec can probably accomplish this, but I have not
> yet tried it.  I believe kexec is only available in 2.6.x, so the
> kernel installed in the Collie's internal flash will have to be 2.6.x,
> but not necessarily a bleeding edge version.

Any kexec capable kernel in flash to boot and then use kexec to boot any 
other kernel (including 2.4 one).

> >> Materials: (...)
> >> - CE-170TS serial cable, which is indispensable for this kind of

> > Since my question (ref above) about easing the testing never had any
> > answer, I did not bother to ask for a cable, cf
> > http://www.mail-archive.com/angstrom-distro-devel@linuxtogo.org/msg00
> >117.html but if any cables are still available I shall make good use
> > of one. (Marcin, I can afford post + cable price of course.)

> I got mine through Amazon.  It's still available there.

Shane: not everyone lives in USA (Amazon sends electronics only there).

If someone from Europe needs serial cable for Zaurus please contact Rolf.

-- 
JID: hrw-jabber.org
OpenEmbedded developer/consultant

 Packrat's Credo:
I have no use for it, but I hate to see it go to waste.



___
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel


Re: [Angstrom-devel] Angstrom-x11-image on Collie

2007-06-30 Thread Rolf Leggewie
Marcin Juszkiewicz wrote:
 Materials: (...)
 - CE-170TS serial cable, which is indispensable for this kind of

> If someone from Europe needs serial cable for Zaurus please contact Rolf

... who just got back from Venice and will again be gone for a few more
days. I'll likely have Internet connection this time, though.  Drop me
your details and you can have a cable shortly.  I also intend to
continue with collie development and wiki work.  Good to see others
picking up the same areas.

Ciao

Rolf


___
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel