Flameman/ipaq

= ipaq-36xx-Flameman =

Introduction
The Target-goal of this page is
 * install gentoo-arm into microdrive
 * make the board able to boot from it
 * 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.

Overview
The main board of the iPAQ H3660 consists of the SA-1110 CPU, flash ROM, SDRAM, serial port (RS-232C), USB client port, FIR, touch panel interface, stereo audio codec, audio in/out circuit, microcontroller, and the expansion pack interface and connector.

The board consists of:


 * CPU StrongARM core: 150 Dhrystone 2.1 MIPS @ 133 MHz, 235 Dhrystone 2.1 MIPS @ 206 MHz. The arm SA-1100 is a solid & smart implementation of the arm v4 little endian architecture
 * RAM soldered 64MB DDR onboard memory chip
 * CACHE 32-way set-associative caches
 * 16 kilobyte instruction cache, 8 kilobyte write-back data cache
 * 32-entry MMUs
 * read/write buffer
 * LAN On-Sleeve ethernet: pcmcia 3com*** 10/100 Mbit/s Fast Ethernet
 * UART On-board SA-1100-uart mini-to-DB9 RS232C asynchronous serial port, speeds up to 230k, tested up to 115200bps
 * CF iPAQ pcmcia sleeve has support for IBM/Hitachi Microdrive (/dev/cfa)
 * ROM 16MB flash where it is stored the bootloader
 * '''System PCB __.0 cm x __.0 cm
 * RTC the real time clock chip is missing???
 * LED Power, 2 LED pairs
 * Watchdog hardware watchdog timer???
 * Power Power-management features: normal (full-on) mode, idle (power-down) mode, sleep (power-down) mode
 * < 240mW @ 1.55V core/133 MHz(TBC)
 * < 400mW @ 1.75V core/206 MHz(TBC)
 * PLL Integrated clock generation, Internal phase-locked loop (PLL), 3.6864-MHz oscillator, 32.768-kHz oscillator
 * Display Transflective TFT liquid crystal display, 12bit color, 240x320
 * I/O Sleeve connector, USB/serial connector, IrDA/CIR
 * Battery 950 mAh Lithium Polymer rechargeable
 * Additional features built into SA-1110 chipset
 * Memory controller supporting ROM, synchronous mask ROM (SMROM), flash, DRAM, synchronous DRAM (SDRAM), SRAM, and SRAM-like variable latency I/O
 * LCD controller: 1-, 2-, or 4-bit gray-scale levels, 8-, 12-, or 16-bit color levels
 * Serial communications module supporting: SDLC, 230-Kbps UART
 * Touch-screen, audio, telecom port
 * Infrared data (IrDA) serial port: 115 Kbps, 4 Mbps
 * Six-channel DMA controller
 * Integrated two-slot PCMCIA controller
 * Twenty-eight general-purpose I/O ports
 * Real-time clock with interrupt capability
 * On-chip oscillators for clock sources
 * Interrupt controller
 * Power-management features
 * Four general-purpose interruptible timers
 * 12-Mbps USB device controller
 * Synchronous serial port (UCB1100, UCB1200, SPI, TI, Wire)
 * 256 mini-ball grid array (mBGA)


 * Intel StrongARM SA-1100
 * Microprocessor Developer's Maniual - August 1999 http://www.lartmaker.nl/278088.pdf
 * Microprocessor Specification Update - February 2000 http://www.lartmaker.nl/27810525.pdf
 * LCD bandwidth http://www.lartmaker.nl/27827001.pdf
 * embedded applications http://nihilisme.ca:8080/arm/doc/strongARM-cpu.pdf


 * ARM
 * Arm Architecture Reference Manual book edited by Dave Jagger (get it from Amazon.com)
 * ARM System Architecture book by Steve Furber (get it from Amazon.com or Barnes & Noble)
 * ARM *NIX doc http://www.arm.linux.org.uk/

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 core frequency can be programmed to the values in table below.

CCF<4..0>

Core Clock Frequency w/3.6864 MHz X'tal

Core Clock Frequency w/3.579545 MHz X'tal

00000

59.0 MHz

57.3 MHz

00001

73.7 MHz

71.6 MHz

00010

88.5 MHz

85.9 MHz

00011

103.2 MHz

100.2 MHz

00100

118.0 MHz

114.5 MHz

00101

132.7 MHz

128.9 MHz

00110

147.5 MHz

143.2 MHz

00111

162.2 MHz

157.5 MHz

01000

176.2 MHz

171.8 MHz

01001

191.7 MHz

186.1 MHz

01010

206.4 MHz

200.5 MHz

01011

221.2 MHz

214.8 MHz

01100 - 11111

Not Supported

Memory Map
Address range

Function

Description 1 	0h0000 0000 - 0h07FF FFFF 	Static Bank Select 0 (128 MB) 	iPAQ H3600 onboard flash (MCS0#) 2 	0h0800 0000 - 0h0FFF FFFF 	Static Bank Select 1 (128 MB) 	Reserved (MCS1#) 3 	0h1000 0000 - 0h17FF FFFF 	Static Bank Select 2 (128 MB) 	Expansion pack (MCS2#) 4 	0h1800 0000 - 0h1FFF FFFF 	Static Bank Select 3 (128 MB) 	Expansion pack (MCS3#) 5 	0h2000 0000 - 0h2FFF FFFF 	PCMCIA Socket 0 Space (256 MB) 	Expansion pack PCMCIA/CF slot 0 Interface 6 	0h3000 0000 - 0h3FFF FFFF 	PCMCIA Socket 1 Space (256 MB) 	Expansion pack PCMCIA/CF slot 1 Interface 7 	0h4000 0000 - 0h47FF FFFF 	Static Bank Select 4 (128 MB) 	Static Memory or Variable Latency I/O Interface, 256 MB(MCS4#, MCS5#)

(Expansion pack MCS4#) 8 	0h4800 0000 - 0h4FFF FFFF 	Static Bank Select 5 (128 MB) 	Extended I/O and PPSH use (MCS5#) 9 	0h5000 0000 - 0h7FFF FFFF 	Reserved (768 MB) 10 	0h8000 0000 - 0h8FFF FFFF 	Peripheral Control Module Registers

(256 MB) 11 	0h9000 0000 - 0h9FFF FFFF 	System Control Module Registers

(256 MB) 12 	0hA000 0000 - 0hAFFF FFFF 	Memory and Expansion Registers

(256 MB) 13 	0hB000 0000 - 0hBFFF FFFF 	LCD and DMA Registers (256 MB) 14 	0hC000 0000 - 0hC7FF FFFF 	DRAM Bank 0 (128 MB) 	512 MB. The iPAQ H3600 uses bank 0 only. 15 	0hC800 0000 - 0hCFFF FFFF 	DRAM Bank 1 (128 MB) 	Reserved 16 	0hD000 0000 - 0hD7FF FFFF 	DRAM Bank 2 (128 MB) 	Reserved 17 	0hD800 0000 - 0hDFFF FFFF 	DRAM Bank 3 (128 MB) 	Reserved 18 	0hE000 0000 - 0hE7FF FFFF 	Zeros Bank (128 MB) 	Cache flush replacement data.

Reads return zero, 128 MB 19 	0hE800 0000 - 0hFFFF FFFF 	Reserved (384 MB)

Supporting two-channel CF/PCMCIA expansion pack
The iPAQ H3600 supports two-channel CF/PCMCIA expansion pack decode, but needs special handling on Card inserted detection(CARD_IND#) and Card IRQ(CARD_IRQ#). On the expansion pack connector, the PSKTSEL signal can be used to decode which CF/PCMCIA slot is selected for two-channel CF/PCMCIA expansion packs. PSKTSEL=0 selects channel 0, PSKTSEL=1 selects channel 1.

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

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 !

anybody working with h55** and sleeve 2xpcmcia ? please report your experience @ flamemaniii@gmail.com

HW table
http://www.elinux.org/Flameman/ipaq/hw

Jtag
http://openwince.sourceforge.net/jtag/iPAQ-3600/

news about
http://kernelnewbies.org/LinuxChanges

news for iPAQ
you can read about kernel status and user land @ http://www.elinux.org/Flameman/ipaq/status

any suggestion, testing, such a collaboration is pretty welcome !

.

poor dmesg (dual pcmcia sleeve)
boot> ser_con serial console at your service... boot> boot vfat h3600_sleeve_init_module h3600_generic_pcmcia_init_module: registering sleeve drivers registering sleeve driver 0003ACF4 registering sleeve driver 0003AD44 registering sleeve driver 0003ACA4 h3600_sleeve_insert: no spi read, defaulting sleeve vendor h3600_sleeve_insert: no spi read, defaulting sleeve deviceid sleeve vendorid=00001125 sleeve deviceid=0000D7C3 pcmcia_probe_sleeve probing for dual pcmcia sleeve dual_pcmcia_linkup[0]->prc=000019B0 dual_pcmcia_probe_sleeve h3600_sleeve_insert: matched driver Compaq PC Card Sleeve pcmcia_init_module cis[0] =00000001 01 04 DF 12 01 FF 1C 05 03 DF 12 01 FF  18 02 DF 01 21 02 04 01 funcid=00000004 fixed disk 22 02 01 01 22 03 02 08 0F 1A 05 01 07 00 02 0F 1B 0B C0 C0 A1 27 55 4D 5D 4E 08 00 20 1B 06 00 01 21 B5 1E 3E 1B 0D C1 41 99 27 55 4D 5D 4E 64 F0 FF FF 20 1B 06 01 01 21 B5 1E 3E 1B 12 C2 41 99 27 55 4D 5D 4E EA 61 F0 01 07 F6 03 01 EE 20 1B 06 02 01 21 B5 1E 3E 1B 12 C3 41 99 27 55 4D 5D 4E EA 61 70 01 07 76 03 01 EE 20 1B 06 03 01 21 B5 1E 3E 20 04 19 03 00 00 manfid[0]=00000019 manfid[1]=00000003 15 16 04 01 48 49 54 41 43 48 49 00 6D 69 63 72 6F 64 72 69 76 65 00 FF end pcmcia_insert: funcid = 00000004 serial_number:            N2H2ZDBA firmware_revision: DNBOCA2A model_number: HMS360402D5CF00 n_sectors_user_addressable=00000000 bytes_per_sector=00000200 major_version=00007068 minor_version=0000500C flags=0000848A ACTUAL bytes_per_sector=00000200 cis[0] =00000001 01 03 00 00 FF 17 03 12 00 FF  15 39 04 01 41 64 61 70 74 65 63 2C 20 49 6E 63 2E 00 41 50 41 2D 31 34 36 30 20 53 43 53 49 20 48 6F 73 74 20 41 64 61 70 74 65 72 00 56 65 72 73 69 6F 6E 20 30 2E 30 31 00 FF  20 04 2F 01 02 00 manfid[0]=0000002F manfid[1]=00000001 1A 05 01 08 00 20 01 1B 0F C9 01 19 49 55 65 06 CA 60 40 03 1F 30 00 1E 1B 07 08 08 CA 60 40 01 1F end pcmcia_insert: funcid = 00000000 ptable signature=0000AA55 Mounting vfat on partition 00000000 cmd vfat mount: partid=00000000 vfat mount: reading bpb_info oemname=MSDOS5.0 Reading params from file: /boot/params vfat_find_file_entry: fname='boot/params' dirname='boot' basename='PARAMS' vfat_find_dir_entry: fname='boot' dirname='' basename='boot' searching root_dir_entries vfat_read_clusters_offset: reached VFAT_EOC at bytes_read=00000200 find_file_in_dir: READt"ŸÁh"ŸÁ,ë attr=00000010 first_cluster=00000003 n_bytes=00000000 find_file_in_dir: READt"ŸÁh"ŸÁ,ë attr=00000010 first_cluster=00000000 n_bytes=00000000 find_file_in_dir: GENTOO attr=00000020 first_cluster=00000004 n_bytes=002680B1 find_file_in_dir: GENTOO attr=00000020 first_cluster=00000004 n_bytes=002680B1 find_file_in_dir: ZIMAGE attr=00000020 first_cluster=00001345 n_bytes=00120790 find_file_in_dir: ZIMAGE attr=00000020 first_cluster=00001345 n_bytes=00120790 find_file_in_dir: PARAMS attr=00000020 first_cluster=00001ACC n_bytes=00000099 + set linuxargs "root=/dev/hda3 init=/bin/bash console=ttySA0,115200" setting param to value  + set kernel_filename boot/zimage setting param  to value  + set initrd_filename boot/initrd setting param  to value  + set rootfstype ext3 setting param to value Reading kernel from file: boot/zimage vfat_find_file_entry: fname='boot/zimage' dirname='boot' basename='ZIMAGE' vfat_find_dir_entry: fname='boot' dirname='' basename='boot' searching root_dir_entries vfat_read_clusters_offset: reached VFAT_EOC at bytes_read=00000200 find_file_in_dir: PARAt"ŸÁh"ŸÁ,ë attr=00000010 first_cluster=00000003 n_bytes=00000000 find_file_in_dir: PARAt"ŸÁh"ŸÁ,ë attr=00000010 first_cluster=00000000 n_bytes=00000000 find_file_in_dir: GENTOO attr=00000020 first_cluster=00000004 n_bytes=002680B1 find_file_in_dir: GENTOO attr=00000020 first_cluster=00000004 n_bytes=002680B1 find_file_in_dir: ZIMAGE attr=00000020 first_cluster=00001345 n_bytes=00120790 Reading initrd from file: boot/initrd vfat_find_file_entry: fname='boot/initrd' dirname='boot' basename='INITRD' vfat_find_dir_entry: fname='boot' dirname='' basename='boot' searching root_dir_entries vfat_read_clusters_offset: reached VFAT_EOC at bytes_read=00000200 find_file_in_dir: ZIMAt"ŸÁh"ŸÁ,ë attr=00000010 first_cluster=00000003 n_bytes=00000000 find_file_in_dir: ZIMAt"ŸÁh"ŸÁ,ë attr=00000010 first_cluster=00000000 n_bytes=00000000 find_file_in_dir: GENTOO attr=00000020 first_cluster=00000004 n_bytes=002680B1 find_file_in_dir: GENTOO attr=00000020 first_cluster=00000004 n_bytes=002680B1 find_file_in_dir: ZIMAGE attr=00000020 first_cluster=00001345 n_bytes=00120790 find_file_in_dir: ZIMAGE attr=00000020 first_cluster=00001345 n_bytes=00120790 find_file_in_dir: PARAMS attr=00000020 first_cluster=00001ACC n_bytes=00000099 find_file_in_dir: PARAMS attr=00000020 first_cluster=00001ACC n_bytes=00000099 find_file_in_dir: README.TXT attr=00000020 first_cluster=00002236 n_bytes=000000CC find_file_in_dir: README.TXT attr=00000020 first_cluster=00002236 n_bytes=000000CC Could not find file.cmd vfat mount: partid=00000000 vfat mount: reading bpb_info oemname=MSDOS5.0 pcmcia_remove_sleeve Booting vfat... kernel partition base C0008000 kernel_magic=E1A00000 kernel_region_words[9]=016F2818 Linux ELF flash_imgstart=C0008000 size=00000000 dest=C0000000 offset=00008000 MMU Control=C19F4071 MMU PIDVAM=00000000 Skipping kernel copy by request. C0008000: E1A00000 C0008004: E1A00000 C0008008: E1A00000 C000800C: E1A00000 C0008010: E1A00000 C0008014: E1A00000 C0008018: E1A00000 C000801C: E1A00000 C0008020: EA000002 C0008024: 016F2818 root_filesystem_name=ide Grabbed linuxargs, argc = 00000000 Using mach_type 00000016 setting boot parameters to root=/dev/hda3 init=/bin/bash console=ttySA0,115200 mdcnfg=0000F367 Making core tag at C0000100 Making cmdline tag at C0000114 Making mem32 tag at C00001AC Making initrd tag at C00001BC initrd.start=C0800000 initrd.size=00000000 command line is: mtdparts=ipaq:0x00040000@0x00000000(bootldr)ro,0x00FC0000@0x00040000(root) root=/dev/hda3 init=/bin/bash console=ttySA0,115200 rootfstype=ext3 Disabling LCD controller linuxEntryPoint=C0008000 Booting Linux image Uncompressing Linux............................................................................ done, booting the kernel. Linux version 2.6.21-hacked-ipaq-3660 (root@queen-vittoria) (gcc version 4.1.0) #6 Sun Feb 15 20:22:10 CET 2009 CPU: StrongARM-1110 [6901b118] revision 8 (ARMv4), cr=c000717f Machine: Compaq iPAQ H3600 Memory policy: ECC disabled, Data cache writeback Built 1 zonelists. Total pages: 16384 Kernel command line: mtdparts=ipaq:0x00040000@0x00000000(bootldr)ro,0x00FC0000@0x00040000(root) root=/dev/hda3 init=/bin/bash console=ttySA0,115200 rootfstype=ext3 � PID hash table entries: 512 (order: 9, 2048 bytes) start_kernel: bug: interrupts were enabled early Console: colour dummy device 80x30 Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 64MB = 64MB total Memory: 62464KB available (1918K code, 427K data, 96K init) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 SCSI subsystem initialized NET: Registered protocol family 2 IP route cache hash table entries: 512 (order: -1, 2048 bytes) TCP established hash table entries: 2048 (order: 1, 8192 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 2048 bind 1024) TCP reno registered NetWinder Floating Point Emulator V0.97 (double precision) io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) pccard: PCMCIA card inserted into slot 0 pccard: PCMCIA card inserted into slot 1 Serial: SA11x0 driver $Revision: 1.50 $ sa11x0-uart.3: ttySA0 at MMIO 0x80050000 (irq = 17) is a SA1100 loop: loaded (max 8 devices) Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx SCSI Media Changer driver v0.25 Intel ISA PCIC probe: <1>Unable to handle kernel NULL pointer dereference at virtual address 000003e0 pgd = c0004000 [000003e0] *pgd=00000000 Internal error: Oops: c0007805 [#1] Modules linked in: CPU: 0 PC is at i365_get+0x48/0x60 LR is at identify+0x7c/0x1d8 pc : [ ]   lr : [ ]    Not tainted sp : c0317f44 ip : 60000013  fp : c0317f50 r10: 00000000 r9 : 00000000  r8 : 00000000 r7 : 000003e0 r6 : c0316000  r5 : c025f640  r4 : c0217824 r3 : 00000000 r2 : 000003e0  r1 : 00000000  r0 : 00000000 Flags: nZCv IRQs off  FIQs on  Mode SVC_32  Segment kernel Control: C000717F Table: C000717F  DAC: 00000017 Process swapper (pid: 1, stack limit = 0xc0316250) Stack: (0xc0317f44 to 0xc0318000) 7f40:         c0317f70 c0317f54 c0016af4 c0143a78 c0217824 c025f640 c0316000 7f60: 00000000 c0317fac c0317f74 c0017810 c0016a84 c0317f80 c01030f8 c0143a1c 7f80: c001b1c4 c001b1c4 c001ac9c c0316000 00000000 00000000 00000000 00000000 7fa0: c0317ff4 c0317fb0 c00200b4 c001779c 00000000 00000000 c002002c c0037fe4 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7fe0: 00000000 00000000 00000000 c0317ff8 c0037fe4 c0020038 71657220 65726975 Backtrace: [ ] (i365_get+0x0/0x60) from [ ] (identify+0x7c/0x1d8) [ ] (identify+0x0/0x1d8) from [ ] (init_i82365+0x80/0x454) r7 = 00000000 r6 = C0316000  r5 = C025F640  r4 = C0217824 [ ] (init_i82365+0x0/0x454) from [ ] (init+0x88/0x264) [ ] (init+0x0/0x264) from [ ] (do_exit+0x0/0x74c) r7 = 00000000 r6 = 00000000  r5 = 00000000  r4 = 00000000 Code: e1d330b0 e5922228 e0811303 e20110ff (e5c21000) <0>Kernel panic - not syncing: Attempted to kill init!

the dual pcmcia sleeve is not working

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

http://www.elinux.org/Flameman/ipaq/kernel

studying how to write kernel drivers
http://lwn.net/Kernel/LDD3/

also

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.

sources fix up is required

how to write a pcmcia kernel driver http://www.linux-mag.com/id/1981


 * sa11xx_drv_pcmcia_probe -> soc_common_drv_pcmcia_probe


 * drivers/pcmcia/cs.c: socket_insert
 * drivers/pcmcia/pcmcia_ioctl.c: p_dev = pcmcia_device_add(s, bind_info->function);
 * drivers/pcmcia/ds.c: "pcmcia: registering new device %s\n" -> struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int function)

dmesg
on 04-12-2009

nothing

gentoo, booting from the CF
initialize it

1. boot> sleeve insert 2. boot> pcmcia insert

http://handhelds.org/moin/moin.cgi/BootingLinuxFromCF

http://blog.lsweb.eu/index.php?itemid=2

compact keyboard
Manufacture's Part# B50111-001, 250111-001, 250110-001, 251274-001



Micro Keyboard for iPaq H3800 series (3830, 3835, 3850, 3870, 3875, etc...) H3900 series (3950, 3955, 3970, 3975, etc), H5400 series (5450, 5455, etc), and H5500 series (5550, 5555) Looking for a small and lightweight keyboard for your iPAQ? This micro keyboard fits seamlessly and securely to your iPAQ Pocket PC with or without an Expansion Pack attached. Its ergonomic design and standard layout let you conveniently type quickly and comfortably anywhere.

it needs to be adapted to h36**, or it will be good in case i will switch to h5500

X11: emerging x11-base/kdrive --> USE=kdrive cross-emerge xorg

image of the previous kernel 2.4 rootfs and such a stuff
[[Media:old-roofs.jffs2|old-rootfs.jffs2]]

About stage3

 * to be checked: http://mirror.mcs.anl.gov/pub/gentoo/experimental/arm/
 * to be checked: http://gentoo.osuosl.org/experimental/arm/stages/arm/
 * bin packages http://tinderbox.dev.gentoo.org/default-linux/arm/armv5tel-softfloat-linux-gnueabi/stable/
 * gentoo arm handbook http://www.gentoo.org/doc/en/handbook/handbook-arm.xml?full=1#book_part1

what is the difference between arm and arm41 ? arm and armeb ?

is the (iPAQ 36** CPU) arm-sa1100 big or little endian ?

as far as i understand
 * stage3-armeb mean big endian
 * stage3-arm  is little endian
 * sa-1100 should be an arm.v4 ... so stage3-arm41 should be fine

cross emerge
http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1&chap=5

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.

Chi si occupa dello sviluppo di applicazioni per piccoli schermi, conosce molto bene le difficoltà nel realizzare un software che sia multipiattaforma senza stravolgere diverse parti del codice scritto. Fino a oggi l’unica scelta praticabile era, forse, Java, che con le sue librerie assicurava una qualche forma di portabilità, purtroppo non totale per applicativi che fanno un uso avanzato di grafica, multimedia e funzionalità del “device”. Fino a oggi, dicevo.

Esiste infatti una seconda via, ancora poco conosciuta, ma che secondo me riserva grandi potenzialità: quella di usare le QT Embedded, un potente framework applicativo sviluppato in C++, che attualmente gira su sistemi Windows CE ed embedded Linux. Basta guardare un video per capire cosa sia possibile fare già a partire da adesso.

Sono supportate nativamente funzioni quali l’antialiasing, la gestione del formato SVG, trasformazioni vettoriali, alpha cannel e molto altro.

Per chi si sta chiedendo che tipo di azienda sia questa Trolltech, vi posso dire che le sue librerie QT sono uno standard grafico sotto GNU/Linux, che vengono usate da KDE, che programmi sviluppati con questo framework possono funzionare anche sotto Windows e sotto Mac e che recentemente è stata acquistata dalla Nokia.

idea of kernel 2.4 familiar
http://www.brucalipto.org/linux/linux-su-ipaq

idea of BinaryGentoo
be inspired be this article http://lesinigo.it/BinaryGentoo

irda ppp
Installation

To install IrDA-Utils: emerge -a irda-utils [edit] Start /etc/init.d/irda start

Put device near Ir port and check: cat /proc/net/irda/discovery

If log is not empty everything is OK. [edit] Settings

* /etc/irda

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:


 * IPAQMOUSE - touch panel driver for iPAQ/Assabet (mknode /dev/h3600_ts c 11 0)
 * NOMOUSE - no mouse/touch panel in system

/* * Microwindows keyboard driver for Compaq iPAQ * * Copyright (c) 2000, 2003 Century Software Embedded Technologies * Written by Jordan Crouse */
 * 1) include 
 * 2) include 
 * 3) include 
 * 4) include 
 * 5) include 
 * 6) include "device.h"


 * 1) define IPAQ_SCANCODE_RECORD   129
 * 2) define IPAQ_SCANCODE_CALENDAR 130
 * 3) define IPAQ_SCANCODE_CONTACTS 131
 * 4) define IPAQ_SCANCODE_Q       132
 * 5) define IPAQ_SCANCODE_START   133
 * 6) define IPAQ_SCANCODE_UP      134 /* keycode up */
 * 7) define IPAQ_SCANCODE_RIGHT   135 /* keycode right */
 * 8) define IPAQ_SCANCODE_LEFT    136 /* keycode left */
 * 9) define IPAQ_SCANCODE_DOWN    137 /* keycode down */
 * 10) define IPAQ_SCANCODE_ACTION  138
 * 11) define IPAQ_SCANCODE_SUSPEND 139


 * 1) ifdef __ECOS
 * 2) define KEYBOARD "/dev/kbd"
 * 3) else
 * 4) define KEYBOARD "/dev/h3600_key"
 * 5) endif

static int IPAQ_Open(KBDDEVICE *pkd); static void IPAQ_Close(void); static void IPAQ_GetModifierInfo(MWKEYMOD *modifiers, MWKEYMOD *curmodifiers); static int IPAQ_Read(MWKEY *kbuf, MWKEYMOD *modifiers, MWSCANCODE *scancode);

KBDDEVICE kbddev = { IPAQ_Open, IPAQ_Close, IPAQ_GetModifierInfo, IPAQ_Read, NULL };

static int fd;

/* From the kernel - this maps a single index into */ /* the correct scancode */ static unsigned char scancodes[] = { 0, 			/* unused */ IPAQ_SCANCODE_RECORD, 	/* 1 -> record button */ IPAQ_SCANCODE_CALENDAR, /* 2 -> calendar */ IPAQ_SCANCODE_CONTACTS, /* 3 -> contact */ IPAQ_SCANCODE_Q, 	/* 4 -> Q button */ IPAQ_SCANCODE_START, 	/* 5 -> start menu */ IPAQ_SCANCODE_UP, 	/* 6 -> up */ IPAQ_SCANCODE_RIGHT, 	/* 7 -> right */ IPAQ_SCANCODE_LEFT, 	/* 8 -> left */ IPAQ_SCANCODE_DOWN, 	/* 9 -> down */ IPAQ_SCANCODE_ACTION, 	/* 10 */ IPAQ_SCANCODE_SUSPEND };

static int IPAQ_Open(KBDDEVICE * pkd) {       /* Open the keyboard and get it ready for use */ fd = open(KEYBOARD, O_RDONLY | O_NONBLOCK);

if (fd < 0) { DPRINTF("%s - Can't open keyboard!\n", __FUNCTION__); return -1; }

return fd; }

static void IPAQ_Close(void) {       close(fd); fd = -1; }

static void IPAQ_GetModifierInfo(MWKEYMOD * modifiers, MWKEYMOD * curmodifiers) {       if (modifiers) *modifiers = 0;	/* no modifiers available */ if (curmodifiers) *curmodifiers = 0; }

static int IPAQ_Read(MWKEY * kbuf, MWKEYMOD * modifiers, MWSCANCODE * scancode) {       int keydown = 0; int cc = 0; char buf[1];

cc = read(fd, &buf, 1);

if (cc < 0) { if ((errno != EINTR) && (errno != EAGAIN)                   && (errno != EINVAL)) { perror("IPAQ KEY"); return (-1); } else { return (0); }       }        if (cc == 0) return (0);

/* If the code is less than 127, then we know that */ /* we have a key down. Figure out what we've got */

*modifiers = 0;

if (*buf < 127) { keydown = 1;	/* Key pressed but not released */

if (*buf > 9) return (0);

*scancode = scancodes[(int) *buf]; } else { keydown = 2;	/* key released */ *scancode = *buf; }

switch (*scancode) { case IPAQ_SCANCODE_RECORD: *kbuf = MWKEY_RECORD; break;

case IPAQ_SCANCODE_CALENDAR: *kbuf = MWKEY_APP1; break;

case IPAQ_SCANCODE_CONTACTS: *kbuf = MWKEY_APP2; break;

case IPAQ_SCANCODE_Q: *kbuf = MWKEY_MENU; break;

case IPAQ_SCANCODE_START: /*     	*kbuf = MWKEY_LAST;*/ *kbuf = MWKEY_CANCEL; break;

case IPAQ_SCANCODE_UP: *kbuf = MWKEY_UP; break;

case IPAQ_SCANCODE_DOWN: *kbuf = MWKEY_DOWN; break;

case IPAQ_SCANCODE_LEFT: *kbuf = MWKEY_LEFT; break;

case IPAQ_SCANCODE_RIGHT: *kbuf = MWKEY_RIGHT; break;

case IPAQ_SCANCODE_ACTION: *kbuf = MWKEY_ENTER; break;

case IPAQ_SCANCODE_SUSPEND: *kbuf = MWKEY_SUSPEND; break;

default: DPRINTF("Ipaq - Unknown scancode %d\n", *scancode); return 0; }

return keydown; }

All you have to kwnow about The pcmcia
http://www.elinux.org/Flameman/pcmcia

About devtools
.....

be inspired
http://www.angstrom-distribution.org/

http://www.hamster.dk/~purple/robot/iBOT/weblog/

Handhelds/PDAs

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.
 * 1) Familiar (iPAQ)

http://gentooforzaurus.opensistemas.com/ http://www.opensistemas.com/Gentoo_for_Zaurus.715.0.html http://freshmeat.net/projects/gentooforzaurus/ Gentoo For Zaurus is a port of the Gentoo Distribution to the Zaurus PDA, based on Cacko X11 Rom and The Emerde Project. It can be mounted over NFS so no changes to a current configuration are needed. It includes a native gcc environment for ARM, the zgcc-3.3.1 cross compiler for the main PC with distcc configured so that the main PC does the actual compiling, and X11 for testing applications. The first public release was version 0.1.1, dated January 6, 2004. Version 0.2.2 was released February 2, 2004.
 * 1) Gentoo For Zaurus