building ulcd7 image from Angstrom

I'm finally setting up a development environment to work with the
BeagleBoard-xM with the ULCD7 display. I downloaded the latest ULCD7
image Beagleboardtoys.com and
put it on an SD card. It works[*].

For my main work I'm going to need to build an Angstrom image that
supports the ULCD7 display. http://www.angstrom-distribution.org/building-angstrom
was clear enough, but what's missing is which bitbake recipe I should
use, since "x11-image" doesn't exist in oe-core. cloud9-gfx-image
seems the most likely but dies in the last step of creating a root
file system with:

/etc/fstab entries need to be created with the user flag for the loop
devices like:

/dev/loop2 /opt/beagleboard/Angstrom/build/tmp-angstrom_2010_x-

eglibc/work/beagleboard-angstrom-linux-gnueabi/cloud9-gfx-image-1.0-r0/
tmp-mnt-boot msdos user 0 0

If it's relevant, I'm using Fedora 15 as a host.

How do I rebuild esc-20110927-final or an equivalent from-scratch
Angstrom distribution for the xM with ULCD7? (Narcissus isn't going
to work for me as I'll be adding a layer; I need to do the builds
locally.)

Peter

[*] Actually, on esc-20110927-final the multimedia demos don't run,
probably due to whatever's causing the boot to complain:

Running /usr/share/ti/gst/omap3530/loadmodules.sh
FATAL: Module cmemk not found.
FATAL: Module dsplinkk not found.
FATAL: Module lpm_omap3530 not found.
FATAL: Module sdmak not found.

If I could reconstruct the image, I could probably fix that.

It is expected to die at that point to tell you what to do. OE doesn't run as root and so it can't do the mounting of loop2 required to create your sd image on its own. You have to add that to your fstab to be able to create it.

Also add your username to the disk group required to create loop devices:
gpasswd -a <username> disk

Thanks,
Joel

From: beagleboard@googlegroups.com
[mailto:beagleboard@googlegroups.com] On Behalf Of pabigot
Sent: Saturday, November 05, 2011 5:49 PM
To: Beagle Board
Subject: [beagleboard] building ulcd7 image from Angstrom

I'm finally setting up a development environment to work with the
BeagleBoard-xM with the ULCD7 display. I downloaded the latest ULCD7
image Beagleboardtoys.com and
put it on an SD card. It works[*].

For my main work I'm going to need to build an Angstrom image that
supports the ULCD7 display. http://www.angstrom-
distribution.org/building-angstrom
was clear enough, but what's missing is which bitbake recipe I should
use, since "x11-image" doesn't exist in oe-core.

I'd suggest starting with systemd-gnome-image and building up from
there. The esc image was built using OE-classic via Narcissus and not
all packages have become available in OE-core yet. Adding what is
missing shouldn't be too difficult, but you need a starting point.

BTW, here's how I cheat to figure out a bit about what actually works;
I look at Angstrom's testlab output[1].

[1] http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/testlab/

Thanks; I hadn't encountered that with oe-dev builds for Angstrom on
at91, so assumed it was a problem with the rootfs rather than host.
Ick, though, at having to add fstab entries for transient file system
creation.

cloud9-gfx-image goes on to fail with:
cp: cannot stat `/opt/beagleboard/Angstrom/build/tmp-angstrom_2010_x-
eglibc/deploy/images/beagleboard/MLO': No such file or directory

There's an MLO-beagleboard, but no MLO. The official ULCD7 image
doesn't have an MLO file. I've hacked sdcard_image.bbclass to work
around that.

After that, ti-hw-bringup-image.bb needs a DEPENDS="genext2fs-native"
line, since genext2fs isn't available on Fedora.

At the moment, it boots, spits out a huge number of udevd timeout
errors, and is thinking really hard about S98configure.

Thanks; I'll see how far I can take it from here.

Peter

Run this script (as root) on the img.gz file:

$ cat /data/ssd/loop-fsck.sh
#!/bin/sh

IMAGE=$1
DEVICE=$2

zcat $IMAGE > sd.img ; kpartx -a -v sd.img && fsck.ext3 -f -y /dev/mapper/loop0p2 ; kpartx -d sd.img && gzip -2 sd.img && mv sd.img.gz $IMAGE && chmod a+rw $IMAGE

if [ -n "$DEVICE" ] ; then
        zcat $IMAGE | pv > $DEVICE ; eject $DEVICE
fi

That fix the rootfs partition so an fsck isn't needed on first boot. I'll talk to the systemd/udev people about that timout, it makes no sense to break udev if your fsck takes longer than ~2 minutes.

regards,

Koen

Things are mostly working, but there are a couple minor unresolved
issues:

The ULCD7 display is up and running with Angstrom oe-dev, but the
touchpad is reflected vertically around the center of the display.
I'm using the uEnv.txt from the ESC image, for which the pointer
behaves correctly. Based on an earlier thread about a mirroring
problem fixed in u-boot, I'm guessing the i2c commands in uEnv.txt are
relevant. Any suggestions?

I haven't been able to track down why both the ESC ULCD7 image and the
one I built boot with a cpuinfo bogoMIPS of about 597, instead of the
998 or so I get with the xMTEST beta 4-25 that came with the xM.
Using "cpufreq-set -g performance" brings it back up, but something
must be running that automatically in the xMTEST image. Setting
mpurate=1000 in uEnv.txt didn't help.

Am I correct that gstreamer-ti, and hence the DSP demos, are part of
what's not ready for use with the current Angstrom oe-dev? It
requires ti-cgt6x from meta-ti/recipes-ti/devtools, for which the
recipe checksums don't match the current downloads, and when that's
corrected still doesn't work because do_install actually puts the
toolchain in /opt/TI instead of under ${installdir} where ti-paths.inc
expects it. The LIC_FILES_CHKSUM value was reverted to a wrong
checksum when it got moved to the recipe file. I suspect this recipe
hasn't been checked yet, or that somebody at TI updated
ti_cgt_c6000_6.1.17_setup_linux_x86.bin and the recipe is now broken.

vmserver[52]$ cd Downloads/
vmserver[53]$ md5sum ti_cgt_c6000_6.1.17_setup_linux_x86.bin
5ee5c8e573ab0a1ba1249511d4a06c27
ti_cgt_c6000_6.1.17_setup_linux_x86.bin
vmserver[54]$ sha256sum ti_cgt_c6000_6.1.17_setup_linux_x86.bin
0cb99e755f5d06a74db22d7c814e4dfd36aa5fcb35eeab01ddb000aef99c08c1
ti_cgt_c6000_6.1.17_setup_linux_x86.bin

Thanks to Joel, Jason, and Koen for your help.

Peter

Things are mostly working, but there are a couple minor unresolved
issues:

The ULCD7 display is up and running with Angstrom oe-dev, but the
touchpad is reflected vertically around the center of the display.
I'm using the uEnv.txt from the ESC image, for which the pointer
behaves correctly. Based on an earlier thread about a mirroring
problem fixed in u-boot, I'm guessing the i2c commands in uEnv.txt are
relevant. Any suggestions?

The i2c commands in uEnv.txt impact the display orientation.

To flip the touch, simply run 'ts_calibrate'. The /etc/pointercal
data should fix it.

If you are using the event X11 driver rather than the tscal X11
driver, there might be a different calibration that needs to be done.
I'm not sure which is being used right now.

There's no uEnvt.txt needed with the latest angstrom, it does the i2c by itself when detecting the uLCD board. I'm working with other people using xinput-calibrator to come up with a better way of launching it.

regards,

Koen