Subject: [E3-hacking] Amstrad E3 support status for 2.6.32

From: Janusz Krzysztofik <[email-masked]>
Date: Fri, 13 Nov 2009 05:14:14 +0100

Hi,

The kernel release 2.6.32 is almost out. I have just downloaded and tested 
2.6.32-rc7 successfully (I hope there will be no more fixes required).

After unpacking it, I run:

	ARCH=arm make ams_delta_defconfig

then build the kernel in a usual way.

Using old E3_release_v2.tar.gz with uImage replaced with the one just built 
(arch/arm/boot/uImage), I was able to boot the machine, log into the 
install-initrd, both from ttyS0 and framebuffer console, get access to a USB 
stick, verify on-board flash is accessible. I did not proceed with 
ams_delta_install, but I think it would run without problems.

Compared to that old 2.6.16-omap1 with ams_delta patches, 2.6.32 mainline 
kernel doesn't yet support the detachable keyboard (mailboard) and doesn't 
provide a driver for LCD contrast and backlight setting, but it has LED 
support introduced in 2.6.17. There is still no support for the camera (it 
was present once in 2.6.19). Full framebuffer/LCD driver, frozen in the OMAP 
tree for a long time, finally found it's wat into the mainline.

Old sound driver has been replaced with a new one, ASoC based. Both ALSA and 
OSS interface are fully usable. The new driver supports full duplex and 
handset/speakerphone switching using the hook switch and/or a mixer control. 
To get those features working, ldattach utility (sadly not present on the old 
initramfs) must be used in order to load a line discipline #19 onto the modem 
line (has been moved to ttyS3). The hook switch state can be simply detrmined 
by examining /sys/class/gpio/gpio4/value file contents, it also generates 
regular input events over the /dev/input/event1 device interface.

The kernel with ams_delta_defconfig applied supports both old distributions, 
like Familiar that E3_release_v2 was based on, and new, like Angstrom, that 
may require EABI + Thumb instructions turned on. Power management is turned 
on by default with not much visible results yet.

Starting with this kernel release, the machine, equipped with a network 
adapter and a suitable userspace software, can ultimately be used as an IP 
phone. Personally, I use asterisk combined with lirc for the purpose.

Thanks,
Janusz

---

From: Janusz Krzysztofik <[email-masked]>
Date: Sun, 15 Nov 2009 15:43:32 +0100

Hi,

Just a few updates.

Friday 13 November 2009 05:14:14 Janusz Krzysztofik wrote:
> kernel ... doesn't
> provide a driver for LCD contrast and backlight setting,

Actually, it's possible to turn the backlight off/on. Try using

	setterm -blank [force|poke] </dev/tty1
or
	echo [4|0] >/sys/class/graphics/fb0/blank

or arrange for auto powerdown while blanking with:

	setterm -powersave powerdown </dev/tty1

> ... The hook switch state can be
> simply detrmined by examining /sys/class/gpio/gpio4/value file contents, it
> also generates regular input events over the /dev/input/event1 device
> interface.

I was told by the input subsystem maintainer, Dmitry Torokhov, that 
applications should use EVIOCGSW ioctl to query the initial state of 
switches. Sadly, there is no utiliti available for doing this from scripts. 
Thanks to ASoC subsystem maintainer, Mark Brown, I managed to get the hook 
switch (as well as other GPIO-based ASoC jacks found on other boards) being 
exported over gpiolib sysfs for debugging purposes.

> The kernel with ams_delta_defconfig applied supports both old
> distributions, like Familiar that E3_release_v2 was based on, and new, like
> Angstrom, that may require EABI + Thumb instructions turned on.

If you are using OpenEmbedded (like me) for building the kernel, please note 
that simply using a copy of the kernel arch/arm/config/ams_delta_defconfig 
source file as defconfig for linux.bb recipe may give a different result, 
with support for old ABI possibly missing. The resulting kernel may not be 
usable for old install-initrd. To get old ABI compatible kernel, I run:

	bitbake -c clean linux
	bitbake -c configure linux

then from the kernel sources root:

and finally (while back in OpenEmbedded build root):

	bitbake -c compile linux

Thanks,
Janusz