ipaq-36xx-Flameman

Introduction

describe how to build a jtag cable (to debug and recover from "Brickage")

describe something useful with you can do with the PDA

logical steps about installing gentoo

add the JTAG connector at ipaq-36**

build the JTAG cable (you could skip it, it is suggested))

study the bootloader

make partitions on the microdrive

populate them

set the bootloader environment to boot from the microdrive

People you could contact if you need help

flameman, I'm currently use this board for a project

msn daredevil-coder@hotmail.it

email flamemaniii@gmail.com

irc.nick flameman (channel #edev, #gentoo-ppc)

you ... if you want ;-)

About the board

ipaq PDA is a shortened name for Pesktop Personal Computer developed by Compact & HP.

iPAQ presently refers to a Pocket PC and personal digital assistant first unveiled by Compaq in April 2000; the name was borrowed from Compaq's earlier iPAQ Desktop Personal Computers. Since Hewlett-Packard's acquisition of Compaq, the product has been marketed by HP. The device is the main competition to the Palm, but provides more multimedia capabilities using a Microsoft Windows interface. In addition to this, there are several Linux distributions that will also operate on some of these devices. Earlier, units were modular. "Sleeve" accessories, technically called jackets, which slide around the unit and add functionality such as a card reader, wireless networking, GPS, and even extra batteries were used. Current iPAQs have most of these features integrated into the base device itself.

Hewlett-Packard introduced the first SmartPhone iPaq Pocket PC that looks like a regular cell phone and has VoIP capability. The series is the HP iPAQ 500 Series Voice Messenger

Compaq iPAQ H3600 series

Compaq's flagship iPAQs were the 3600 series models. Originally running the Microsoft Windows for Pocket PC 2000 OS, these devices featured 12-bit color displays, 32/64 MB of RAM, and 16 MB ROM.

Models in the 3600 series are:

3630, 3635, 3650 - which are identical models with 16 MB ROM and 32 MB RAM sold via different marketing channels. The 3635 was accompanied by a CF expansion sleeve that was sold separately with the other 2.

3660, 3670 - 64MB RAM. The 3670 was distributed in the US while the 3660 was distributed in Europe.

A Pocket PC 2002 OS upgrade is available, but the smaller ROM requires some software such as the media player to install in volatile RAM instead of the ROM as in the previous Pocket PC 2000.

As used units are low price, they are a great way to inexpensively get started with a PDA.

While limited by no on-board expansion slot, the iPAQ 3600 series memory and functionality can still be expanded by optional Compact Flash and PCMCIA sleeves, which allow users to add memory and peripherals. Some of these sleeves contain extra batteries to extend the iPAQ's battery life under the strain of added devices.

Clock generators

SA-1110 uses only two crystals, 32.768 KHz and 3.6864 MHz, to generate all frequency needed.

Please check SA-1110 Developer's Manual section 8.3 and Appendix B and C on the requirements of these two crystals. The frequency column using 3.579545 MHz crystal is for reference only, the iPAQ H3600 does not use this crystal in its design.

The default PCMCIA/CF slot is slot 0 and supports external connections. The second PCMCIA/CF is slot 1 and is for embedded slot only.

Memory Locations

memory map of the board will be added as soon as possible

addr begin

addr end

area

...

??

ram, userspace

****

??

ram, userspace

Open questions

1) how/where is ram mapped ?

2) how/where is microdrive mapped ?

3) how/where is pci mapped ?

3) what is the bootstrap addr of the flash ?

...

Problems

about sleeve 2xpcmcia:
card inserted detection(CARD_IND#) seems to have success, while Card IRQ(CARD_IRQ#) has failure

anyway the higher layer dosn't attach: the real reason why it happens is obscure and need to be debugged a bit ... NO ONE KERNEL FROM THE HH CVS IS ABLE TO HANDLE THE SLEEVE 2 x PCMCIA

so from my point of view, there is nothing working in the 36** archive: i mean the sleeve 2xpcmcia has never worked with any kernel 2.6 !

i have to investigate the reason why, but ... i need a real working machine, so i think i will switch myself to h55** that should work: in this case, if i would have a confirm the h55** is really working with such a sleeve ... i will have a look in his specific kernel sources tree, just to understood and compare what is the specific problem of the h36** support !

good dmesg (1x pcmcia sleeve)

coming soon

what/where

kernels 2.6

Using the bootldr there is the possibility to boot from the pcmcia sleeves in where it can be allocated a microdrive (CF2). it's not possible to maintain the windows CE on the iPAQ with a sort of dual boot. As far as i know there is no 2.6 kernel used at this time (that means no support), there is only 2.4 cause most of developers are working on the openmoko project which is a full open source mobile phone.

Feel free to take a look there, that's interesting, anyway if you are still interested about iPAQ: these are my experimental results about iPAQ 3630-3660 and the 2.6

studying how to write kernel drivers

The socket controller

The socket controller serves as a bridge between PC Card devices and the system bus. There are several varieties of controllers, but all share the same basic functionality. The Socket Services software layer takes care of all the details of how to program the host controller.

The socket controller has the job of mapping windows of addresses in the host memory and IO spaces to windows of addresses in card space. All supported controllers support at least four independent memory windows and two IO windows per socket.

Each memory window is defined by a base address in the host address space, a base address in the card address space, and a window size. Some controllers differ in their alignment rules for memory windows, but all controllers will support windows whose size is at least 4K and also a power of two, and where the base address is a multiple of the window size. Each window can be programmed to point to either attribute or common memory.

IO windows differ from memory windows in that host addresses that fall within an IO window are not modified before they are passed on to an IO card. Effectively, the base addresses of the window in the host and card address spaces are always equal. IO windows also have no alignment or size restrictions; an IO window can start and end on any byte boundary in the 64K IO address space.

The PC Card bus defines a single interrupt signal from the card to the controller. The controller then has the responsibility of steering this interrupt to an appropriate interrupt request (``irq) line. All controllers support steering card IO interrupts to essentially any free interrupt line. Because steering happens in the controller, the card itself is unaware of which interrupt it uses.

All PC Card controllers can generate interrupts in response to card status changes. These interrupts are distinct from the IO interrupts generated by an IO card, and use a separate interrupt line. Signals that can generate interrupts include card detect, ready/busy, write protect, battery low, and battery dead

pcmcia sleeve

There is an issue with pcmcia sleeve: the problem doesn't occur with single slot sleeves with part number 173396-001 but does occur in dual slot sleeves with part number
216198-B21. And we have only today found that the problem also occurs
with new (?) model single slot sleeves with part number 249704-B22.

bootblaster

kexecboot

idea

"boot ide" doesn't use a filesystem at all. I suspect that what you
really want is "boot vfat", which uses a VFAT filesystem. The disk can
(indeed, probably should) have a partition table.

Bootldr can't read ext2, so you would need to create a special /boot
partition as VFAT. Other than that, and the normal drama relating to
having the root partition on a PCMCIA device, it should boot Debian just
fine.

proof fix up

I have been trying to boot Intimate off of a 2GB
Kingston PCMCIA hard drive. It looks like the boot
vfat function is not reading the partition table on
the drive correctly. I have found several posts by
other people who have 2GB or 5GB drives that have
identical errors. I would like to know if anyone has
succeeded in working around this problem.

Hmm...I wrote that wiki based on my own experience getting it going.

Unless the 4GB card is just too big for the sleeve or some other
unidentified problem, it should work.

So I believe I located the problem. This line from the mkdosfs man page:

-F FAT-size
Specifies the type of file allocation tables used (12, 16 or 32
bit). If nothing is specified, mkdosfs will automatically
select between 12 and 16 bit, whatever fits better for the
filesystem size. 32 bit FAT (FAT32 format) must (still) be
selected explicitly if you want it.

Running "mkdosfs -F16 /dev/hde1" on a 256 MB vfat partition created a bootable CF microdrive. My guess is that for most of the partition sizes I chose, it defaulted to FAT12 when I didn't specify that option, even though I selected FAT16 in fdisk. Thanks again for your help.

issue

[*] BootBlaster locks up WinCE as soon as I run it!
-> If you are running BootBlaster from an SD card, try copying it to a location on the iPAQ itself eg. the "iPAQ file store"

The most common problem I am running into is the "filename too long" error. There was a quick fix posted online that failed for me (remounting the vfat partition as msdos and recopying initrd, param and zimage in). There was also a suggestion that bootldr cannot handle large vfat partitions (> 32 MB), but the post was years old. Is this still the case?

cross emerge

Qt-embedded-interest, X-Server over qt-embedded?

Qt/Embedded

Qt/embedded is a version of the Qt™ library that does not use the X window system, but draws directly to the framebuffer on Linux® systems. It is therefore interesting for embedded systems which have tight restrictions on the memory usage of the whole system. Its API is fully compatible with the one of the X11 version.

A great lack of qte is that you cannot run all the useful X applications that have been
developed all over the years.

The major selling point of qt-embedded is to avoid using the X-Server to
save memory and disk space on an embedded platform. If you want to use an
existing X-Server to run Qt applications then use Qt/X11, not Qt/Embedded.

About stage4

X11

intro

Microwindows is an Open Source project aimed at bringing the features of modern graphical windowing environments to smaller devices and platforms. Microwindows allows applications to be built and tested on the Linux desktop, as well as cross-compiled for the target device.

Microwindows' genesis was with the NanoGUI project, and has now been combined into a single distribution. The Win32 API implementation is known as Microwindows, and the Xlib-like API implementation is known as Nano-X.

Since the WinCE API is mostly a subset of the Win32 API for graphics-related functions, the Microwindows API is also WinCE compatible, and can be used to implement WinCE graphics functions on platforms Microwindows is running on.

What is Microwindows?

Microwindows is an Open Source project that brings some of the features of modern graphical windowing systems to the programming community not wanting or requiring the large disk and ram requirements of higher-end windowing systems like Microsoft Windows or the X Window System. Microwindows does not require any operating system or other graphics system support, as it writes directly to the display hardware, although it runs well on Linux framebuffer systems. Microwindows is designed to be portable, and can run in a wide variety of hardware and software environments. One the of more interesting targets is the emerging market of portable handheld and pocket PC's running Linux, also known as LinuxCE.

What does Microwindows run on?

Microwindows currently runs on 32-bit Linux systems with kernel framebuffer support, or through the popular SVGAlib library. In addition, it has been ported to 16-bit Linux ELKS, and real-mode MSDOS. Microwindows screen drivers for 1, 2, 4, 8, 16 and 32 bits-per-pixel have been written, as well as a VGA 16 color 4 planes driver. Microwindows has been ported to a number of Handheld and Pocket PC's, as well. The Microwindows graphics engine is capable of running on any system that supports readpixel, writepixel, drawhorzline and drawvertline, and setpalette. Blitting support is optional, but if implemented allows enhanced functionality. All bitmap, font, cursor and color support is implemented on top of these routines. Support for 8, 15, 16 and 32 bit truecolor systems as well as 1, 2, 4 and 8bpp palletized systems is implemented.

Recently, an X11 driver was completed that allows Microwindows applications to be run on top of the X Window desktop. This driver emulates all of Microwindows' truecolor and palette modes so that an application can be previewed using the target system's display characteristics directly on the desktop display, regardless of the desktop display characteristics.

What CPU's are supported?

Microwindows is extremely portable, and completely written in C, although some routines have been recoded in assembly for speed. It has been ported to the Intel 16 and 32 bit cpu's, as well as MIPS R4000 (NEC Vr41xx) and ARM chips found on popular handheld and pocket PC's.

How big is Microwindows?

On 16 bit systems, the entire system, including screen, mouse and keyboard drivers runs in less than 64k. On 32-bit systems, support includes proportional fonts and applications are typically less than 100k.

What is Microwindows' architecture and what API's are supported?

Microwindows is essentially a layered design that allows different layers to be used or rewritten to suite the needs of the implementation. At the lowest level, screen, mouse/touchpad and keyboard drivers provide access to the actual display and other user-input hardware. At the mid level, a portable graphics engine is implemented, providing support for line draws, area fills, polygons, clipping and color models. At the upper level, various API's are implemented providing access to the graphics applications programmer. These APIs may or may not provide desktop and/or window look and feel. Currently, Microwindows supports the Win32 and Nano-X APIs. These APIs provide close compatibility with the Win32 and X Window systems, allowing programs to be ported from other systems easily.

fbdev

On my:

links -g -driver fb
returns:
Could not initialize graphics driver fb:
Could not get VT mode

(This one looks to me like stock /etc/fb.modes limitation, like I need to add
my mode there. right?)

nano X11 on iPAQ

so the nano-X does not provide X, it's rather a desktop environment

What are Nano-X's graphics features?

Nano-X features full RGB color support, color mapping, optimized palette bitmap drawing, true color and palletized displays, and a 3d look-and-feel. Overlapped and child windows are supported, with complete window and client area clipping. Proportional and fixed fonts are supported, along with utilities for converting fonts or bitmap files. Optimized painting algorithms are used to allow maximum response while the user is moving windows on the screen. Off screen drawing and bit-blit routines are implemented for flicker-free drawing and animation. Polygon draws, fills and arbitrary region clipping are also supported.

so the first right choice seems to be nano-X, that means http://www.microwindows.org, that in my actual branch ... that will be supported by a specific gentoo overlay ... well it has a bit of issues that require me to compile it with the most extremely essential support i can do in order to have it running

IPAQ_KB requires you have the tiny plastic keyboard attached on the back of your iPAQ ... if you have such an extra stuff (you could buy on ebay for 15 euro or less) ... well the software driver has a bit of issue with IPAQ_KB_OPEN, so i am considering to use TTYKBD

TTYKBD uses a very simple ascii-only return values, and won't return function key values correctly. ... on iPAQ it needs the CONSOLE set

The mouse type is setup in the Nano-X configuration file, src/config. The mouse type to be used with Nano-X is set in the config file and the specified mouse driver is then compiled in. Touch panel drivers use the mouse interface with a specific driver. Following are the currently supported mouse types settable in the config file:

All you have to kwnow about The pcmcia

About devtools

be inspired

http://familiar.handhelds.org/http://freshmeat.net/projects/familiar/
The Familiar Project is composed of a group of loosely knit developers all contributing to creating the next generation of PDA OS. Currently, most development time is geared towards producing a stable, and full featured Linux distribution for the Compaq iPAQ h3600-series of handheld computers, as well as apps to run on top of the distribution. Familiar v0.5.3 was released July 11, 2002. Familiar v0.8.2 was released April 13, 2005. Familiar v0.8.4 was released August 20, 2006.