Kristoffer has put first patches into Russell's patch tracking system. I will wait with further development of that features until all of these patches get accepted or rejected.
Today I am working on CPUfreq support. Firstly, I had to enable sa1110 driver for Jornada 720 (in Kconfig). Of course it didn't work - the kernel froze on bootup. After some playing with the code I uncommented some dram timing recalculations in sa1110_target() in arch/arm/mach-sa1100/cpu-sa1110.c and it booted fine.
Then I learned that changing cpu frequency causes the system to freeze.
2.4.32 kernel with Michael Gernoth's jornada 720 patch did cpufreq fine, so I decided to make a comparison. I built 2.4.32 and tried to boot it. For some reason it didn't like the initrd. I tried to force it to use the initrd, but after some time I got bored of it and just did cpufreq calls in init/main.c ;).
I have narrowed down the freeze to some assembly code in arch/arm/mach-sa1100/cpu-sa1110.c. I've printk'ed all values used by this code in both kernels. They appeared different. I forced 2.6 values to 2.4 ones, and voila! 2.6 kernel has slown the cpu down to 59MHz.
Now I just need to determine what causes those changes in values (source data is identical for both kernels). Off to work ;).
2006-11-18 15:43:23
Edytuj
- fix cpufreq so that it doesn't freeze the Jornada on boot
- determine why fb notifier chain is not launched on timeout blanking of console
- check IrDA support
- add apm events support
- fix wired ethernet (mess goes from/to the cable for 3c589 and ne2000)
- 2D acceleration on framebuffer
- port the OSS sound driver to 2.6
- write a complete alsa sound driver
- add notification button support to keyboard (or maybe somewhere else?)
- add leds (notification and the one next to the microphone) support
- prove that there is no possibility to wake into linux (implement suspend if it cannot be proven)
- usb slave functionality
- SmartCard slot driver
- write a proggie for "hardware icons" support (evdev client)
- Check feasibility of powering down the epson chip while copying framebuffer
to system memory when display is blanked.
Anybody cares to do something ;)?
2006-11-12 14:01:32
Edytuj
Now s1d13xxxfb is the official framebuffer driver for Jornada 7xx devices :).
I got it all together and cleaned up a bit. It will be submitted to Russel King soon.
Stuff for testing purposes:
2006-11-12 13:05:32
Edytuj
I have decided to redesign things a bit. jornada720_mcu is now a bus driver, and devices utilizing MCU are now attached to this bus. That builds a bit more complex picture, but it's better managed and compatible with rest of the kernel.
Every MCU device is ported to a bus model now.
Check this out:
root@jornada7xx:/sys/bus/jornada720_mcu_bus# ls devices/ drivers/
devices/:
jornada720_apm jornada720_bl jornada720_kbd jornada720_lcd jornada720_ts
drivers/:
jornada720_bl jornada720_kbd jornada720_lcd jornada720_ts
root@jornada7xx:/sys/bus/jornada720_mcu_bus#
There's a funny bug in linux console handling. TIOCLINUX ioctl for blanking the display requested on a tty never gets neither to framebuffer driver nor to backlight/lcd driver (they are together in framebuffer notifier chain for events, where blank requests land). It actually gets... ignored :). As soon as I am done with basic jornada stuff, I'll look into this.
For further power savings, I not only turn off the backlight as previous patches did, but I also turn off the LCD panel, and drive the epson gpu into standby mode with its output disabled.
Todo for nearest future: kick out our custom epson1256fb.c framebuffer driver, use s1d13xxxfb.c already present in kernel instead.
2006-11-11 22:03:35
Edytuj
I have just done a great thing :/.
I have declared an input device name as __initdata. Imagine the oopses when udevd tried to read device name from /sys some time after module loading ;).
I have a problem with the touchscreen driver, tslib doesn't recognize touch events. It used to with almost identical code... weird...
EDIT: HP documentation told me to trigger interrupt on falling edge, when in fact I should use a rising one. After fixing this touchscreen works like charm :).
As you can see, jornada 7xx support in kernel is progressing :).
2006-11-09 22:47:16
Edytuj
Yes, it works :).
I use standard kernel interfaces:
root@jornada7xx:~# find /sys/ -name '*jornada*'
/sys/module/jornada720_bl
/sys/module/jornada720_lcd
/sys/module/jornada720_apm
/sys/module/jornada720_kbd
/sys/module/jornada720_mcu
/sys/class/backlight/jornada720_bl
/sys/class/lcd/jornada720_lcd
root@jornada7xx:~# ls /sys/class/backlight/jornada720_bl
actual_brightness brightness max_brightness power subsystem uevent
root@jornada7xx:~# ls /sys/class/lcd/jornada720_lcd
contrast max_contrast power subsystem uevent
root@jornada7xx:~#
This means that any /sys compatible software will be able to control it. Opie for example :). Now time to clean up the touschreen driver and remove blanking code from the framebuffer driver. Off to work :)
2006-11-09 18:53:34
Edytuj
Today I have completed a rewrite of MCU and keyboard drivers. Both are loadable modules now. MCU driver uses functions (read/write/flush/init/exit) from ssp.c.
It still needs some testing, because I have removed Michael Gernoth's usleep()'s and double register setting to check how the device will cope without them. I've cut out backlight/contrast code from jornada720.c and will try to create a separate driver for them this afternoon.
2006-11-09 12:15:44
Edytuj
It started when Kristoffer Ericsson (main person behind jlime) gave me some broken, not finished patches for 2.6 kernel. I cleaned them up, changed input device registration, and got them to work.
Our current effort is to get our code into official kernel, so it will continue living with linux. ARM branch leader, Rusty Russel is a bit fascist about patches, so we have to be very careful ;). It ensures that linux will continue to be a high quality kernel.
I had prepared those first patches for 2.6.17, and many things have changed in git since then. Now I am working with a current git repository on patches, which will be sent to Russel.
Today I made keyboard driver module removable (by adding jornada720_kbd_remove() function executed on module removal). I had a problem with it, because I haven't noticed that request_irq()'s last argument (dev_id, which is an arbitrary argument passed to interrupt handler) was NULL, and free_irq()'s dev_id argument was driver's input_device structure. I've set them both to point at this structure and everything is fine now :).
Another problem I had to deal with was a bug in recent patches Kristoffer has prepared. Jornada contains a chip called Microprocessor Control Unit (MCU), which is a device we should talk to when we read keyboard keys, touchscreen coordinates, battery status and such things.
To properly read the MCU, one needs to wait for GPIO 10 to go low, according to HP's documentation. Well, that patch lacked this condition. The effect was that kernel got flooded with keyboard interrupts. I have fixed it (and Kristoffer has done it in parallel, so still need to get in sync better) and now we have a nice removable registering/deregistering keyboard driver.
The problem with GPIO 10 came from our move to using generic SSP code in kernel, to minimize customidity of our code. We still have some of our own code, which probably can be removed in favor of functions from arch/arm/mach-sa1100/ssp.c (git)
Kristoffer wanted me to write a patch that would make kernel emulate suspending (we cannot currently truly suspend right now, because we would return to Windows CE in ROM, so we just slow down the CPU, shut PCMCIA down and turn off the display).
I opted for a different solution - use the esekeyd daemon to launch shutdown script. I have prepared a draft of my proposal.
Plans for nearest future: use more generic SSP functions, fix the touchscreen driver, move backlight/contract code out of arch/arm/mach-sa1100/jornada720.c, write APM emulation module with battery status support.
PS. Serial console saves lives ;P
2006-11-05 22:17:43
Edytuj
Yes, one can run linux kernel and arm userspace on a Jornada 720 :).
This is a short description of things one needs to do:
- Get a CF card
Size depends on your needs. If you just want to play with it, you could even play with a 4MB card. I use a 1GB PQI 100x CF card.
- Partition it
Jornada 720 has its operating system stored on ROM memory, so it cannot be overwritten permanently. Fortunately there is a straightforward way to make it overwrite itself in RAM with linux image :) (BEWARE: this will evaporate all your data on the handheld!). But to do that it needs to read the image first. So we will need at least a FAT partition on the CF card. I prefer to have a small (10MB) FAT16 (type 6) partition for booting and Linux partition (type 83) for userspace storage:
cacko ~ # fdisk -l /dev/sdb
Disk /dev/sdb: 1039 MB, 1039933440 bytes
32 heads, 63 sectors/track, 1007 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 11 11056+ 6 FAT16
/dev/sdb2 12 1007 1003968 83 Linux
cacko ~ #
If you are desperate, you may build your userspace on a FAT16 filesystem :).
I do the partitioning from my laptop with attached universal USB card reader. Kernel allocated sdb device for the card. It depends on you previous scsi layer devices and reader type (check dmesg command output to determine device name).
- Make filesystems
Use mkdosfs and/or mkfs.ext2 commands to create filesystems. Do not use journaling filesystem (ext3/xfs/reiser etc) for userspace partition. Journal updating will kill your flash card pretty soon. Journalling Flash File System (JFFS) is unfortunately useless for us, because it operates on memory-mapped flash chips, not ones accessible through block device nodes in Linux.
- Copy kernel image and bootloader onto a FAT partition
You will need a kernel, bootloader and bootloader config file. Put them on a FAT16 filesystem without any subdirectories. Don't rename bootloader config file, because boot.exe is looking for it under this name. This file is a regular dos (CRLF line endings) text file. First line contains kernel filename (absolute path, may be other than Storage Cardkernel if you have some weird language pack on your Jornada), second points to initrd filename (we don't need initrd with 2.6 kernel, so we leave it empty - 2.4 used userspace utilities for PCMCIA initialization), and third contains kernel parameters. CF card is hda, because on a jornada it works in pcmcia-ide mode (CF is electrically PCMCIA in this case). If you use your first FAT16 partition as the root filesystem, change hda2 to hda1.
- Build your userspace
You will need some userspace stuff. You can use Jlime's experimental donkey bootstrap image. Just unpack it onto your root filesystem:
tar -C /where/you/mounted/userspace/fs -jxf bootstrap-image-Donkey-jornada7xx.rootfs.tar.bz2
- Launch it!
Go to "My Handheld PC" on your Jornada, then "Storage Card" and run boot.exe. Everything will freeze for a while (writing kernel to memory), and then kernel should start booting. Enjoy :).
Watch Jlime project homepage, we should release an user friendly version of GNU/Linux for a Jornada soon :). I am responsible for 2.6 kernel branch development in this project.
2006-11-04 14:54:08
Edytuj
For about two years I have been looking for a perfect personal (really personal) computer. I had some weird requirements (they seem weird if we look at current laptop computer market, full of crazy 20" wide screen beasts):
- weight - it had to be lightweight
- size - as small as possible
- no removable media drives - I can connect to almost any computer via ethernet, so why would I want to transfer data with removable media? In rare cases when I get a CD/DVD, I just instert it into a nearby desktop PC and transfer stuff through ethernet.
- screen pixels - I wanted to have at least 1024*768 pixels on the display
- battery life - preferably more than 4 hours of usage
First laptop I got was an iBook G3 800. It wasn't that popular back then. It had some advantages:
- battery life - with two second hand batteries it lasted for six hours of usage
- CPU - this processor behaved really nice. 800MHz performed like a 1.2-1.4GHz x86.
- linux support - that was just awesome. Everything I checked - worked. I haven't tested the modem, because I never needed it. WiFi, power management, CPU frequency setting, display brightness level, non-keyboard buttons (like power, lid) handling, GPU (radeon 7500). It basically just worked.
- alternative architecture - I had the first opportunity to run a general purpose operating system on an arch different than x86.
It had some serious drawbacks though:
- poor quality - yes, a thing hard to believe by some hardcore apple fanboys. It was just badly designed and built. Holding it by one side and carrying around caused the base of computer to bend. It royally sucked. Not only did it look weird, but caused the next major problem:
- GPU desolderation - bending of iBook's body caused some tension on the logic board (motherboard). The result was that radeon fell off! It was a known problem with G3 (and some G4) iBooks.
- LCD wires breakage - a classical problem with poor quality laptops - LCD wires tend to break after some time.
- power connector breakage - this jack was just too delicate - it was similar to plain old chinch jack, but had more sections on the central rod. I had problems with powering my iBook.
- weight - it was heavy. 2.2kg for a 12.1" laptop? It's just pathetic. It was also quite thick.
So I bought my iBook for 2400 zl, and sold it a year later for about 1400 zl. I don't get in touch with apple products anymore.
After selling the iBook I have bought a next interesting computer - a Toshiba Portege 2000. It's a kind of legend - one of the lightest 12.1" notebooks existing.
Let's sum up its advantages:
- weight - it's VERY nice to use a 1.15kg computer. One can easily carry it with one hand. I even had it hanging on ethernet wire on several occasions.
- size - it's so slim that it fits in accessories compartment in my iBook bag.
- durability - I dropped it a couple of times and nothing bad happened to it. Very high quality machine.
- cool looks - It's a very good looking computer, nobody manages to pass without glancing on it ;).
And problems:
- poor upgradeability - propiertary RAM and 1.8" hard disk drive (compatible with iPods) are hard to upgrade. Upgrades are very expensive.
- SLOW hard disk drive - both transfer (14MB/s) and seek times. It kills peformance of the whole machine
- LCD spots - after some time a dirt-like spots showed on my LCD backlight. They don't affect usage for me, but it just looks bad. I know about several other Porteges with this problem.
I have had my Portege for about a year, but I wanted something more portable. It made people around me laugh, but I just wanted more portability. Some people told me a few times: "why don't you just get a PDA?". I didn't consider it seriously initially. But after some time I saw a Sharp Mobilon. And that's what I wanted. A PDA with qwerty keyboard, linux compatibility and some expansion slots. I've searched around, and found those candidates:
- Sharp Mobilon HC-4600 - Small, light, cheap. Runs on two AA batteries. MIPS architecture. PCMCIA slot. It won't play mp3/ogg though - not enough CPU power and lack of audio jack.
- Nec MobilePro 790 - more powerful than Sharp Mobilon, also MIPS, but just too heavy - 780g is way too much for a PDA.
- HP Jornada 6xx - Hitachi SH3 architecture. Lacks audio jack.
- HP Jornada 720 - it's a StrongARM machine. Has everything I need.
The choice was simple. I found a new Jornada on Polish eBay equivalent - Allegro. I got a PDA, docking cradle, stylus, RS232 wire, power supply, a windows CD and some papers. It has some very nice features:
- comfortable keyboard - I am able to touchtype on it without problems. my WPM on it is smaller than on a regular keyboard, but it's still satisfying.
- battery life - 8 hours of usage. Can be cheaply upgraded (standard laptop Li-Ion cells)
- CF slot - I keep my 1GB CF card with GNU/linux system on it.
- PCMCIA slot - a very cool thing to have in a PDA. I can utilize Ethernet, WIFI, second CF card and much more. Any 16bit PCMCIA card with linux drivers will work.
- linux compatibility - there is a linux bootloader for it, working 2.4 port, a WIP port of 2.6 and good hardware documentation.
I'll post soon about my fiddling with this cute box :).
2006-11-01 21:10:15
Edytuj