diff --git a/mindstab.net_blog/2007-11-07-making-familiar-0.8.4-linux-useful-on-the-ipaq-hx4700.md b/mindstab.net_blog/2007-11-07-making-familiar-0.8.4-linux-useful-on-the-ipaq-hx4700.md new file mode 100644 index 0000000..476a7ba --- /dev/null +++ b/mindstab.net_blog/2007-11-07-making-familiar-0.8.4-linux-useful-on-the-ipaq-hx4700.md @@ -0,0 +1,326 @@ +# Making Familiar 0.8.4 Linux useful on the IPaq hx4700 # +*Nov 9, 2007* + +These are notes and utilities and files I've gathered together to make my IPaq hx4700 useful to me, and setting it up decently easy. I know it took forever to type them up and finally publish them, but better late than never. + +## Mission ## + +To turn basic Familiar 0.8.4 on the IPaq hx4700 into something useful. More specifically, to make IR and Bluetooth work, to make my Belkin IR Keyboard (F8U1500-E) work, and then to install a Debian chroot on an SD card (via the cross install technique) where we can then install, for example, every programming language and text editor we could want for portable programming purposes. + +## Getting Started ## + +So, first things first, you need an IPaq hx4700. Or at least an IPaq, and hopefully one [supported](http://www.handhelds.org/moin/moin.cgi/SupportedHandheldSummary) by [Familiar Linux](http://familiar.handhelds.org/). As you can see from the [list](www.handhelds.org/moin/moin.cgi/SupportedHandheldSummary) the hx4700 is supposed to have A+ support. It turns out that's kind of a lie. But we can do surprisingly well with some work. First off, throw away the Familiar Installation guide, it doesn't apply to the hx4700. They put together a different one on the wiki at [handhelds.org/moin/moin.cgi/HpIpaqHx4700HowtoInstallLinux](http://www.handhelds.org/moin/moin.cgi/HpIpaqHx4700HowtoInstallLinux). Read it. + +## Files and Filesystems ## + +So now's as good a time as any to mention that I've collected all the files you'll need and put them on my FTP at [resources/ipaq-hx4700](resources/ipaq-hx4700). + +First off you need a SD card and you need to write the bootloader all over it so whip out DD and does as the [instructions](http://www.handhelds.org/moin/moin.cgi/HpIpaqHx4700HowtoInstallLinux) say. Then when that's done toss an ext2 file system on your SD card, we'll need it later. + +Now for some work with the CF card. Since we're flashing from it I'd suggest using the FAT filesystem. We'll stash all our system stuff on it here's a quick list of what you should grab from the FTP and put on it. + +* zImage-2.6.15-hh2-ipaq-pxa270: kernel +* zImage-2.6.17-hh3: exciting new and more useful kernel, but we can't install it until the system is up and we copy it's modules over to the ipaq. +* bootgpe-v0.8.4-ipaq-pxa270.jffs2: Root filesystem with GPE installed. I'd recommend GPE over OPIE. +* reflash.ctl: Control file for the bootloader to know what it can flash. This one is updated with an option for the new kernel. +* RADIO0d.BIN: Firmware driver +* radio11.bin: Firmware driver +* wlangen.bin: Firmware driver +* 2.6.17-hh3.tar.gz: Kernel modules for a newer kernel. Untar it in place. +* install-firmware.sh: Shell script to install the firmware. The names are case sensitive so depending on how your FAT filesystem performs this might not work :/. +* install-modules.sh: Install the kernel modules for the 2.6.17 kernel. Assumes it's running with the untarred file 2.6.17-hh3.tar.gz. Copies the modules to /lib/modules on the ipaq. + +And now is a good time to mention that I got an IR keyboard with my IPaq, specifically a Belkin F8U1500-E, which didn't work with the IPaq for a number of reasons at first. I solved them all. If you have this key board you'll also want the following files. If you have any IR keyboard you still might want at least the init.d file from the list. + +* install-kbdd.sh: Shell script to install the files +* init.d.kbdd: Adds lines to the start function to remove extra IR kernel modules that prevent simply IR keyboards from working. Also kill irattach. +* kbdd.conf: Config file that just says use a belkinir keyboard on /dev/tts/2. +* kbdd: My patched kbdd program with proper support for my keyboard. + +I also put up `kbd.c` which is the file I modified from the kbdd source for anyone who wanted to see what I'd done (also, I suppose, to comply with the GPL ;)). I know it's a hideous mess and hack, but using a case statement was easier initially in order for me to figure out how to get the keyboard working. I fully intended to turn it into an array latter, but once it worked I got lazy and left it. Meh. + +## Getting Familiar up and Running ## + +Ok, you now have the CF card with all the files you need. Toss it in the IPaq and follow the [flashing instructions](http://www.handhelds.org/moin/moin.cgi/HpIpaqHx4700HowtoInstallLinux) on the wiki. Flash the 2.6.15 kernel, and then the GPE root filesystem. Then you can let GPE boot. It might take a bit. + +Also, the boot loader and possibly the IPaq itself are kind of finicky. If it just won't turn on, don't worry, you probably haven't bricked it, its just in a funk. Let it sit for like 5 minutes. Also try pulling its battery for a bit, putting it back in and then putting it on AC power. Eventually it'll decide that the time is right to try booting again. + +So, once GPE is up, there are a few change that we need to make to make life easier and better. First, go to "Setup->Login Setup" and set "Automatic Login" to yes. This will automatically log you on as root, instead of asking you for user name and password of some non root user. Really much beter in the long run for this device. Then log out and you should automatically be logged back in as root. + +Now we can proceed. + +We'll need to do some typing to get the necessary files installed, so you'll need to bring up the on screen keyboard. It kind of sucks, but I've seen worse. It is usable. Also, I've tried to write scripts to automate a bunch of stuff to keep the typing to a minimum until a real key board can be used. + +So, bring up a root console from "Others->Root Console". "cd" onto the CF card, "/media/cf". + +First we'll install the firmware, so run `sh install-firmware`. Ideally this will work but you should double check and fix if it doesn't. What should happen is the 3 ".bin" files are copied into "/lib/firmware" and their names are all uppercase except the "d" in RADIO0d.BIN. + +Next run `sh install-modules` which should copy the 2.6.17 kernel module directory (you untared the .tar.gz right :)) into /lib/modules. Now when we flash our new kernel it'll find it's kernel modules installed and actually work, as opposed to choking in boot, or booting but being generally useless. + +If you have a Belkin IR Keyboard (F8U1500-E) then you'll also want my kbdd, and if you have any IR keyboard you might want my init.d.kbdd file. + +So run `sh install-kbdd`. It should copy kbdd to /usr/sbin/kbdd (saving the old one as /usr/sbin/kbdd.old), copy kbdd.conf to /etc and copy init.d.kbdd to /etc/init.d/kbdd. + +Now you should have your base system much closer to ready. Now that the firmware is installed if you were to reboot your Bluetooth should work. However the kernel that shipped with Familiar 0.8.4 had broken IR support, so we need to upgrade to the 2.6.17 kernel I compiled for the IPaq. If you have a different piece of hardware there are instructions in the handhelds.org wiki for getting and compiling kernel source. Ignore the part about them making their own configs, it didn't work for me, instead just copy /proc/config.gz to your sd/cf card and use that. + +So to flash the new kernel after the modules are installed, reboot the IPaq holding the two upper keys (as the instructions said) as well to bring up the boot flasher and this time pick the 2.6.17 kernel. + +Now it should boot up and Bluetooth and IR should work and your Belkin IR keyboard should work. Like magic. I still haven't gotten wireless to work but I'll update this if/when I do. + +## Wired USB internet ## + +Next? We need connectivity. I still haven't gotten the wireless to work, but you can easily do ethernet-over-usb and use a desktop as a router. My instructions are Linux specific but I'm sure other OS specific instructions can easily be found by Google. + +I already wrote instruction on how to get a mobile Linux device online with Linux so check out the instructions at [TODO#gp2x_networking](TODO#gp2x_networking). + +The `net.sh` script for the IPaq has an extra line and looks like + + #!/bin/sh + + ifconfig usb0 up 10.1.0.2 + route add default gw 10.1.0.1 + +and you can get it at [resources/ipaq-hx4700/net.sh](resources/ipaq-hx4700/net.sh). + +## Native Video ## + +So the IPaq can play video. It's a smidgen of a hack for GPE because the version with familiar doesn't actually have a mplayer compiled for it so I nicked the one for OPIE and flubbed one of the dependancies: instead of using the SDL 1.2.7 compiled for OPIE and depending on OPIE on used the 1.2.4 version compiled for GPE. This might be why the video is currently choppy until I can find a better solution because there might be a much faster rendering path on OPIE for SDL than there is under GPE. Still, this will work if you don't mind choppy video (but at least the audio is 100% solid). What I think I really need to do is find a way to make XV work on GPE and get mplayer to use it. + +As for getting this working, all you need are some packages I've collected. Just grab the following from my iipkg collection at [resources/ipaq-hx4700/ipkg](resources/ipaq-hx4700/ipkg): + +* libmad.ipk +* libpostproc.ipk +* libsdl.ipk +* mplayer.ipk + +I think that's all you need. Either way, if it asks for other dependancies they are in the folder, so just grab everything. I think you have to force one of them to install ignoring it's dependancies with the '-nodeps' flag. Anyway, once you get mplayer installed, it uses the SDL video output plugin. In order to make video and audio sync and not play laggy or slow I recomend the following flags: + + mplayer -framedrop -nocache $MOVIE + +As I said, it's currently laggy, but it works, and I'm looking for a better solution. + +## Making an ARM Debian Chroot## + +**Note**: *For anyone who has been waiting for almost a year for my promised guide on how to make a Debian chroot for the GP2X, this is it. The instructions are the same. I originally did this on my GP2X until I got netwokring working on the IPaq, and shared the chroot SD card between them.* + +Now the IPaq only has limited space and only a limited number of programs compiled for it. If you want access to absolutely all software, then we need another source. The answer is a Debian chroot. Debian has great arm support so about 99% (Not Java) of stuff in the Debian repository will be accessible to you. All you need is space. So grab a decently sized SD card and put a reasonable filesystem on it, like ext2. Now, in order to install Debian we need Debootstrap, their utility for installing Debian from anywhere. You could try and install it on the IPaq but it'd be a hassle. I found the best solution was to download the ARM install disks (or minimal CD) and just copy off the entire filesystem. It's only a few MB. You can get my copy at [resources/ipaq-hx4700/deboot.tar.gz](resources/ipaq-hx4700/deboot.tar.gz) Untar it on the SD card. + +For this to work you'll need a network connection on the IPaq so make sure that's setup and working. + +(For GP2X users, for each chroot (the debootstrap one, and the final one) you'll also want to run `cp /lib/libiconv_plug.so lib` where lib is what will be the root lib directory in the chroot.) + +Then on the IPaq execute the following to set up the environment to chroot into the Debian install environment. + + cd deboot + cp /etc/resolve.conf etc + mount -t proc none proc + mount -o bind /dev dev + chroot . + +Now you're in the actual minimal Debian install environment that is really only capable of doing one thing: running Debootstrap. So go for it. Install it in the chroot for now, you can always move it out once done. + + debootstrap --verbose --arch arm etch /mnt/etch http://gulus.usherbrooke.ca/debian + +Keeping in mind to change the Debian release name to what you want and to change the mirror to something appropriate to you. For a full list of Debian mirrors look at [www.debian.org/mirror/list](http://www.debian.org/mirror/list). + +When it's done, you'll have your very own Debian chroot in /mnt/etch under the chroot or /media/card/deboot/mnt/etch in the IPaq filesystem. + +You'll probably want to move the chroot to either the root of the SD card or just a subdirectory, so exit the chroot and then + + mv /media/card/deboot/mnt/etch /media/card/etch + +Now you have your very own Debian chroot. A few last things need to be set up before using it. Again, it will need internet too if you want to be able to install software, so run + + cp /etc/resolve.conf /media/card/etch/etc + +Next you need to add a few things so the environment will be have as Debian expects, and not inherit the slightly different IPaq environment, so grab [profile](resources/ipaq-hx4700/profile) and [profile.ipaq](resources/ipaq-hx4700/profile.ipaq) and put them in the /etc directory of your chroot. Mostly it just sets your home directory to /root instead of /home/root and a few other minor things but important things. + +Finally, get the [chrootme.sh](resources/ipaq-hx4700/chrootme.sh) script and put it in the root of your chroot. + +Now all you should need to do to use your chroot is + + cd /media/card/etch + ./chrootme.sh + source /etc/profile + +Now you are in your live Debian chroot! Congrats! So why did we go to all this effort to just get another Linux environment when IPaq already has one? Well, this one can now install any software that Debian supports, which is pretty much all software :). But first, at least in my case, we have to do a few things for apt so it will be happy. Run + + touch /root/.gnupg/trustedkeys.gpg + + gpg --keyserver subkeys.pgp.net --no-default-keyring --primary-keyring /etc/apt/trusted.gpg --recv 359AAB34 + + wget http://ftp-master.debian.org/ziyi_key_2006.asc + gpg --no-default-keyring --primary-keyring /etc/apt/trusted.gpg --import ziyi_key_2006.asc + +This install the required gpg trust info so that you can securely talk to the Debian package server. +You can also select a mirror by editing `etc/apt/sources.list`. Now just + + apt-get update + +and then you can `apt-get install` any piece of software you want. I'd recommend starting off with a text editor like vim and/or emacs, and the some programming languages like Python, Ruby, Lisp, or C. Now you have a mobile coding environment that fits in your pocket! + +## Conclusion ## + +Well, now you have an ultra portable computer that can run any piece of Linux software. I turned mine into a portable development machine. I've been using it at University in my CS classes, but you can do what ever you want with yours. + +As for the future, the only real things this tutorial still need are ways to get the WiFi working and usable, and a way to squeeze better framerate out of MPlayer. If anyone has any ideas, please get in touch and let me know :) + +I hope this set of notes/tutorial/howto is useful to anyone. + +## Comments ## + +**ajehuk** Says: + +December 14th, 2007 + +The wifi works (for me at least) with any of the 2.6.21 kernels. You need the acx / hx4700_Acx kernel module and firmware for the card (available within the Angstrom/Gentoo/Qt images for the HX4700). + +Its as simple as dropping the firmware into /lib/firmware (maintaining the correct file names), modifying the /etc/network/interfaces file to reflect your network (the card is wifi0 under most things, wifi2 under gentoo) and then inserting the relevant modules (modprobe hx4700, modprobe acx). It works a charm. + +As for mplayer.. I have been playing with Gentoo on the hx4700 and mplayer works neatly without tweaking so the hardware is definitely capable, but I haven’t manages to get it working nicely using Familiar/GPE (or opie). + +**digitaller** Says: + +December 30th, 2007 + + debootstrap –verbose –arch arm etch /mnt/etch http://gulus.usherbrooke.ca/debian + +When i do the above step, after downloading and extracting all the packages, I get an error saying can’t find /usr/lib/debootstrap/devices.tar.gz. Then the process stopped. Any idea? Thanks in advance. + +**hakujin** Says: + +January 14th, 2008 + +Just so I understand it when you chroot over to the debian you don’t have X right? Or can the deb chroot use GPE’s X server? Sorry for the lame questions but I am really still hopelessly mired in the intricacies of desktop debian. + +**Dan Ballard** Says: + +January 14th, 2008 + +No X installed in the chroot, however you can install X apps that pull in X libs. You can access X from with in the chroot by running + + mount -o /tmp /mnt/card/etch/tmp + +outside of the chroot. The X socket is in tmp and so apps from within the chroot can then talk to the IPaq’s X. The chrootme.sh script already handles this, + +**hakujin** Says: + +January 15th, 2008 at 6:58 am [edit] + +So that’s like running X client apps on one machine using a server on a different machine? So when you chroot you need to build a whole new system within the chroot’s filesystem? Your kernel never changes though right, you still need to have the same kernel modules (version wise I mean) on the chroot filesystem as on the base root? Not to get off topic but wouldn’t it be possible to install a bootstrap image and then chroot to a debian root filesystem? Thanks for the info. + +**Dan Ballard** Says: + +January 15th, 2008 + +Yep, I think what you describe is fine. But the chroot doesn’t need a kernel at all, since it’s being run under the system kernel. The kernel is just a program apps talk to, generally through /dev or libc, to get things done. One needs to be in memory. You certainly couldn’t have two kernels in memory at the same time (well, monolithic ones at least…), so yeah, the chroot uses the system kernel and thats the only way that can work. + +As for digitaller’s problem, I’m not sure what’s happened but I’d try to find a copy of devices.tar.gz either on your system or the net and place it where requested I guess. + +**hakujin** Says: + +January 15th, 2008 + +How about when you need to do dynamically load a kernel module? Like say you are in your chroot environment and you want to start you wifi whose kernel is not built in. Do you have to chroot back to the boot environment and then chroot back in to the alternate environment? Cuz when you modprobe it looks for modules in a certain directory and chrooting effectively puts your / to an entirely different effective filesystem right? + +**Dan Ballard** Says: + +January 15th, 2008 + +you can’t load a kernel module from with in a chroot. If you really need the module copy it to the real kernel’s module directory and load it from there. But it has to be a module for that kernel which you’re unlikely to find else where. + +**patrick deschastres** Says: + +May 18th, 2008 + +All is working fine, even WiFi (but I had to give an ESSID, “any” does not allow you to see all WiFi hostspots around. Seems normal). +But I could not chroot. When I do: + + … + mount -o bind /dev dev + chroot . + +I get: chroot: cannot execute /bin/sh: no such file or directory +Do you have any idea on what was wrong ? +Thanks. +patrick + +**Dan Ballard** Says: + +May 18th, 2008 + +Could be a number of things I guess. I mean the obvious is you are in the wrong directory or you didn’t get everything installed properly. Check that there is a bin/sh releative to you. Might try + + chroot . /bin/bash + +to specify another shell. Also possible, are you using a FAT filesystem on the SD card. It shouldn’t make a difference but maybe that lack of attribute bits means that bin/sh can’t be set as exectureable? + +**patrick deschastres** Says: + +May 21st, 2008 + +Thank you Dan. I formated the SD card yesterday with an ext2 filesystem and now it works. You were right about attribute bits. +4 packages were not installed from debian repository because of an error. I’ll retry tonight. + +**Mike** Says: + +July 17th, 2008 + +Dan, + +Thanks so much for this tutorial. I have familiar working find (minus wireless) and am enjoying seeing linux on my 4700 instead of the memory-leaking OS that came on it. (I know you said shut this program down, but I’ll just minimize it instead ;v) + +I did have a problem with when I fired up debootstrap. I get the following (excluding a bunch of download/extraction messages): + + … + I: Extracting sysvinit-utils… + I: Extracting tar… + I: Extracting tzdata… + I: Extracting util-linux… + I: Extracting zlib1g… + E: no /usr/lib/debootstrap/devices.tar.gz. cannot create devices + +I searched the device, card, and files I downloaded from your FTP site, but I don’t see the missing devices.tar.gz. Any ideas how to find/create this file? + +Thanks, +Mike + +P.S. I’m also trying to get the wireless going in the few spare cycles I have. I’ll post how I got it to work if/when I do. + +**Dan Ballard** Says: + +July 17th, 2008 + +@Mike: Yeah, if you download a copy of debootstrap from debian it should be in the tar ball. If you installed it somewhere, it should probably be kicking around. Run a locate for it. Good luck. + +**patrick deschastres** Says: + +July 21st, 2008 + +For those who encounter the “/usr/lib/debootstrap/devices.tar.gz. cannot create devices” problem: +look at this page [http://mail.opensolaris.org/pipermail/brandz-discuss/2006-January/001606.html](http://mail.opensolaris.org/pipermail/brandz-discuss/2006-January/001606.html) in § “Issue with device archive”. +I tried it and it works well. +patrick + +**Dan Ballard** Says: + +July 21st, 2008 + +Ha nice. Thanks for passing it along! + +**David** Says: + +November 5th, 2008 + +Hi Dan. What a wonderful guide. I have no linux experience but I know its power and potential. While browsing the web to learn a bit about the os, I stumbled on linux for handhelds. When I read here that I could turn a cheap obsolete PDA (bad, old wince to blame) into a powerful linux micropc, I decided to grab one and start learning the os. Now I´m beginning the challenge to actually get linux on the thing with the debian chroot, so I have access to almost all desktop software. I will be trying to follow your steps tomorrow. But one question before I start please. Is there any new version or better distro since you wrote this guide or is the familiar/debian chroot still the way to go? + +Best regards, + +David + +**Dan Ballard** Says: + +November 7th, 2008 + +Ha, sorry, haven’t played around with it too much lately. But you might want to look into Angstrom, I think I played around with it a bit, and it’s where all the dev is going on these days. +[http://www.angstrom-distribution.org/](http://www.angstrom-distribution.org/) diff --git a/mindstab.net_blog/2009-08-14-backup-around-firewalls-with-ssh-and-rsync-to-encrypted-destinations.md b/mindstab.net_blog/2009-08-14-backup-around-firewalls-with-ssh-and-rsync-to-encrypted-destinations.md new file mode 100644 index 0000000..b315fef --- /dev/null +++ b/mindstab.net_blog/2009-08-14-backup-around-firewalls-with-ssh-and-rsync-to-encrypted-destinations.md @@ -0,0 +1,64 @@ +# Backup around firewalls with ssh and rsync to encrypted destinations # +*Aug 14, 2009* + +I decided I really needed to work on a server backup system, so here are my notes on the system I have now. + +First things first, the files I want to backup are owned by all different users, so the only user who can run the backup process is root. Therefore I can't just run rsync from my local machine and grab the files from the server, the backup process has to be run on the server and backup to the backup machine. Now in my case this was a bit of a trick because the backup machine was behind a firewall, so the server had no direct line of communication to it. So I wrote a script to turn on a reverse ssh port forward. + +**recv-serv-backup.sh** + + + #!/bin/sh + + ssh -R 8000:127.0.0.1:22 -N user@kvasir.mindstab.net + + +When run on the backup machine behind a firewall, it connects to the server (kvasir) and listens on port 8000. When ssh on kvasir connects to port 8000 it redirects that traffic to local port 22, the ssh port of the backup machine. This is how the firewall is gotten around. Reverse port mapping is a cool trick to master. + +Next as root on kvasir I generated a public ssh key and put it on the backup machine so root could automatically log on repeatedly to the back up machine (think lots of rsync calls) once the key was loaded once. Then I hooked up the key to keychain. That is all better outlined at: +[Gentoo Linux Documentation: OpenSSH key management, Part 1](http://www.gentoo.org/doc/en/articles/openssh-key-management-p1.xml) and +[Gentoo Linux Documentation: OpenSSH key management, Part 2](http://www.gentoo.org/doc/en/articles/openssh-key-management-p2.xml). + +The all I needed to do was poke the rsync syntax to use the nonstandard ssh port for backup. The best method I found was + + rsync -e "ssh -p 8000" -av + +rsync for those of you who don't know is a great little backup tools. It's like a smart (in that it only copies files that have been modified since the last backup) network aware (since it can use ssh) copy tool. Simple but really useful. + +So with that I wrote a backup script on the server + +**server-backup.sh** + + #!/bin/sh + + backup () { + echo "$1..." + DST=`echo "$1" | awk '{split($0,a,"/"); result = "/"; for (i=2 ; i < length(a) ; i++) result = result "/" a[i]; print result; };'` + rsync -e "ssh -p 8000" -acv $1 dan@127.0.0.1:~/kvasir$DST ; + + } + + backup "/svn" + backup "/git" + ... + +There is one caveat, rsync won't create subdirectories on the other side specified in the path so you need to create the basic directory structure. + + rsync -e "ssh -p 8000" -av /git user@127.0.0.1:~/kvasir/git + +is fine because it will create /git just fine, but + + rsync -e "ssh -p 8000" -av /home/user user@127.0.0.1:~/kvasir/home/user + +will fail if `~/kvasir/home` doesn't exist. So you'll need to create the basic directory structure or enhance the backup function to strip out extra directories in the target path. + +Finally, I didn't want anyone and everyone to potentially be able to gain access to private data on the backup machine, so the target directory needed to be encrypted. There are a lot of options, but I opted for the easy encFS route and just installed "cryptkeeper" and had it setup the directory. + +Now all I have to do is mount the encrypted backup directory, run the script to turn on the reverse ssh tunnel, and run the backup script, and I have an encrypted backup solution for my server that gets around firewalls. + +Not bad. + +## References ## + +* [What Goes Out Can Come Back In -- SSH tricks](http://pthree.org/2008/06/05/what-goes-out-can-come-back-in/) +* [Google](http://www.google.com) \ No newline at end of file diff --git a/mindstab.net_blog/2009-08-15-install-lisp-asdf-packages-as-a-user-with-clc.md b/mindstab.net_blog/2009-08-15-install-lisp-asdf-packages-as-a-user-with-clc.md new file mode 100644 index 0000000..a13ea00 --- /dev/null +++ b/mindstab.net_blog/2009-08-15-install-lisp-asdf-packages-as-a-user-with-clc.md @@ -0,0 +1,13 @@ +# Install Lisp ASDF packages as a user with CLC # +*Aug 15, 2009* + +CLC or Common Lisp Controller is a system that other Lisp systems user to keep track of ASDF systems (a mouthful I know). By default, system packages are installed to /usr/share/common-lisp/ but what happens if you don't have root access but still want to leverage the ease of use CLC installed ASDF packages provide? + + clc-register-user-package to the rescue! Create ~/.clc/source and put your ASDF package there, then simply run +
+$ clc-register-user-package ~/.clc/source/package/package.asd 
+
+ +and volia, you can (require :package) from any of your Lisp systems there after. + +It's pretty awesome. :) \ No newline at end of file diff --git a/mindstab.net_blog/resources/ipaq-hx4700/2.6.17-hh3.tar.gz b/mindstab.net_blog/resources/ipaq-hx4700/2.6.17-hh3.tar.gz new file mode 100644 index 0000000..692eb9b Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/2.6.17-hh3.tar.gz differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/RADIO0d.BIN b/mindstab.net_blog/resources/ipaq-hx4700/RADIO0d.BIN new file mode 100644 index 0000000..736078e Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/RADIO0d.BIN differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/bootgpe-v0.8.4-ipaq-pxa270.jffs2 b/mindstab.net_blog/resources/ipaq-hx4700/bootgpe-v0.8.4-ipaq-pxa270.jffs2 new file mode 100644 index 0000000..329033a Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/bootgpe-v0.8.4-ipaq-pxa270.jffs2 differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/bootldr-1.2.5-hp.rom b/mindstab.net_blog/resources/ipaq-hx4700/bootldr-1.2.5-hp.rom new file mode 100644 index 0000000..73220e3 Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/bootldr-1.2.5-hp.rom differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/chroot.static b/mindstab.net_blog/resources/ipaq-hx4700/chroot.static new file mode 100644 index 0000000..546ca8b Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/chroot.static differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/chrootme.sh b/mindstab.net_blog/resources/ipaq-hx4700/chrootme.sh new file mode 100644 index 0000000..382b4c1 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/chrootme.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +mount -t proc none ./proc +mount -o bind /dev ./dev +mount -o bind /dev/pts ./dev/pts +mount -o bind /tmp ./tmp +chroot . + +umount ./tmp +umount ./dev/pts +umount ./dev +umount ./proc diff --git a/mindstab.net_blog/resources/ipaq-hx4700/config b/mindstab.net_blog/resources/ipaq-hx4700/config new file mode 100644 index 0000000..d812374 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/config @@ -0,0 +1,1629 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.15-hh2 +# Tue Aug 15 02:25:00 2006 +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +CONFIG_IKCONFIG=y +# CONFIG_MINIMAL_OOPS is not set +CONFIG_IKCONFIG_PROC=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +# CONFIG_USELIB is not set +CONFIG_CORE_DUMP=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# System Type +# +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +CONFIG_ARCH_PXA=y +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_AAEC2000 is not set + +# +# Intel PXA2xx Implementations +# +# CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_MAINSTONE is not set +# CONFIG_ARCH_PXA_IDP is not set +# CONFIG_ARCH_ESERIES is not set +# CONFIG_MACH_A620 is not set +# CONFIG_MACH_A716 is not set +# CONFIG_ARCH_H1900 is not set +# CONFIG_ARCH_H2200 is not set +# CONFIG_ARCH_H3900 is not set +# CONFIG_MACH_H4000 is not set +CONFIG_MACH_H4700=y +CONFIG_HX4700_NAVPOINT=y +CONFIG_HX4700_CORE=y +CONFIG_HX4700_TS=y +CONFIG_HX4700_BLUETOOTH=m +CONFIG_HX4700_PCMCIA=y +CONFIG_HX4700_LCD=y +CONFIG_HX4700_LEDS=y +# CONFIG_MACH_HX2750 is not set +# CONFIG_ARCH_H5400 is not set +# CONFIG_MACH_HIMALAYA is not set +# CONFIG_ARCH_AXIMX5 is not set +# CONFIG_ARCH_AXIMX3 is not set +# CONFIG_MACH_X30 is not set +# CONFIG_ARCH_ROVERP1 is not set +# CONFIG_ARCH_ROVERP5P is not set +# CONFIG_MACH_XSCALE_PALMLD is not set +# CONFIG_MACH_T3XSCALE is not set +# CONFIG_PXA_SHARPSL is not set +CONFIG_PXA27x=y +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +CONFIG_GPIO_KEYS=y + +# +# Linux As Bootloader +# +# CONFIG_LAB is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +CONFIG_XSCALE_PMU=y + +# +# Compaq/iPAQ Platforms +# +CONFIG_PXA_IPAQ=y + +# +# XScale-based iPAQ +# +CONFIG_IPAQ_HANDHELD=y + +# +# Compaq/iPAQ Drivers +# + +# +# Compaq/HP iPAQ Drivers +# +# CONFIG_IPAQ_SLEEVE is not set +# CONFIG_IPAQ_SAMCOP is not set +# CONFIG_IPAQ_HAMCOP is not set + +# +# Bus support +# +CONFIG_ISA_DMA_API=y + +# +# PCCARD (PCMCIA/CardBus) support +# +CONFIG_PCCARD=y +CONFIG_PCMCIA_DEBUG=y +CONFIG_PCMCIA=y +CONFIG_PCMCIA_LOAD_CIS=y +CONFIG_PCMCIA_IOCTL=y + +# +# PC-card bridges +# +CONFIG_PCMCIA_PXA2XX=y + +# +# Kernel Features +# +CONFIG_PREEMPT=y +# CONFIG_NO_IDLE_HZ is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/mtdblock2 rw rootfstype=jffs2 console=ttyS0,115200n8" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_PXA=y +CONFIG_PXA25x_ALTERNATE_FREQS=y + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_LEGACY=y +# CONFIG_PM_DEBUG is not set +CONFIG_APM=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=m +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +CONFIG_XFRM_USER=m +CONFIG_NET_KEY=m +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +# CONFIG_IPV6 is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CONNTRACK_MARK is not set +# CONFIG_IP_NF_CONNTRACK_EVENTS is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +# CONFIG_IP_NF_NETBIOS_NS is not set +# CONFIG_IP_NF_TFTP is not set +# CONFIG_IP_NF_AMANDA is not set +# CONFIG_IP_NF_PPTP is not set +# CONFIG_IP_NF_QUEUE is not set +# CONFIG_IP_NF_IPTABLES is not set +# CONFIG_IP_NF_ARPTABLES is not set + +# +# Bridge: Netfilter Configuration +# +# CONFIG_BRIDGE_NF_EBTABLES is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +CONFIG_BRIDGE=m +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +CONFIG_IRDA=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +# CONFIG_IRDA_CACHE_LAST_LSAP is not set +# CONFIG_IRDA_FAST_RR is not set +# CONFIG_IRDA_DEBUG is not set + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +CONFIG_IRTTY_SIR=m + +# +# Dongle support +# +# CONFIG_DONGLE is not set + +# +# Old SIR device drivers +# +CONFIG_IRPORT_SIR=m + +# +# Old Serial dongle support +# +# CONFIG_DONGLE_OLD is not set + +# +# FIR device drivers +# +# CONFIG_USB_IRDA is not set +# CONFIG_SIGMATEL_FIR is not set +# CONFIG_NSC_FIR is not set +# CONFIG_WINBOND_FIR is not set +# CONFIG_SMC_IRCC_FIR is not set +# CONFIG_ALI_FIR is not set +# CONFIG_VIA_FIR is not set +CONFIG_PXA_FICP=m +CONFIG_BT=y +CONFIG_BT_L2CAP=y +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIUSB is not set +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIDTL1 is not set +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBLUECARD is not set +CONFIG_BT_HCIBTUART=m +# CONFIG_BT_HCIVHCI is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +# CONFIG_IEEE80211_CRYPT_CCMP is not set +# CONFIG_IEEE80211_CRYPT_TKIP is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +# CONFIG_CONNECTOR is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_CONCAT=y +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=m +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +CONFIG_MTD_CFI_GEOMETRY=y +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_OTP is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_IPAQ is not set +# CONFIG_MTD_SHARP_SL is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=12288 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECS=m +CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEFLOPPY=m +CONFIG_BLK_DEV_IDESCSI=m +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=m +# CONFIG_IDE_ARM is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=m +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=m +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +CONFIG_SCSI_SPI_ATTRS=m +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set + +# +# PCMCIA SCSI adapter support +# +CONFIG_PCMCIA_AHA152X=m +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_SYM53C500 is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_TUN=m + +# +# PHY device support +# + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set +CONFIG_MII=m + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set +# CONFIG_PCMCIA_WAVELAN is not set +# CONFIG_PCMCIA_NETWAVE is not set + +# +# Wireless 802.11 Frequency Hopping cards support +# +# CONFIG_PCMCIA_RAYCS is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +CONFIG_HERMES=m +# CONFIG_ATMEL is not set + +# +# Wireless 802.11b Pcmcia/Cardbus cards support +# +CONFIG_PCMCIA_HERMES=m +# CONFIG_PCMCIA_SPECTRUM is not set +CONFIG_AIRO_CS=m +# CONFIG_PCMCIA_WL3501 is not set +CONFIG_HOSTAP=m +# CONFIG_HOSTAP_FIRMWARE is not set +CONFIG_HOSTAP_CS=m +CONFIG_ACX=m +# CONFIG_ACX_USB is not set +CONFIG_ACX_MEM=y +CONFIG_ACX_HX4700=m +CONFIG_NET_WIRELESS=y + +# +# PCMCIA network device support +# +CONFIG_NET_PCMCIA=y +CONFIG_PCMCIA_3C589=m +CONFIG_PCMCIA_3C574=m +CONFIG_PCMCIA_FMVJ18X=m +CONFIG_PCMCIA_PCNET=m +CONFIG_PCMCIA_NMCLAN=m +CONFIG_PCMCIA_SMC91C92=m +CONFIG_PCMCIA_XIRC2PS=m +CONFIG_PCMCIA_AXNET=m + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=m +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +# CONFIG_MOUSE_PS2 is not set +# CONFIG_MOUSE_SERIAL is not set +CONFIG_MOUSE_NAVPOINT=y +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=y + +# +# Hardware I/O ports +# +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +CONFIG_SERIO_LIBPS2=m +CONFIG_SERIO_RAW=m +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=m +CONFIG_SERIAL_8250_CS=m +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_PXA=y +CONFIG_SERIAL_PXA_CONSOLE=y +CONFIG_SERIAL_PXA_COUNT=4 +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ELV is not set +CONFIG_I2C_PXA=y +# CONFIG_I2C_PXA_SLAVE is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCA9535 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_RTC_X1205_I2C is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# L3 serial bus support +# +CONFIG_L3=m + +# +# Mice +# +# CONFIG_BUSMOUSE is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_SA1100_WATCHDOG=m + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +# CONFIG_NVRAM is not set +CONFIG_SA1100_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# + +# +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set +# CONFIG_CARDMAN_4000 is not set +# CONFIG_CARDMAN_4040 is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# Hardware Monitoring support +# +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# SoC drivers +# +# CONFIG_SOC_MQ11XX is not set +# CONFIG_SOC_T7L66XB is not set +# CONFIG_SOC_TC6387XB is not set +# CONFIG_SOC_TC6393XB is not set +# CONFIG_HTC_ASIC2 is not set +CONFIG_HTC_ASIC3=y +# CONFIG_SOC_TSC2101 is not set + +# +# Misc devices +# +CONFIG_BATTERY_MONITOR=y + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set + +# +# Multimedia Capabilities Port drivers +# + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=m + +# +# Video For Linux +# + +# +# Video Adapters +# +CONFIG_VIDEO_CPIA=m +# CONFIG_VIDEO_CPIA_USB is not set +# CONFIG_VIDEO_SAA5246A is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +# CONFIG_VIDEO_EM28XX is not set +# CONFIG_VIDEO_OVCAMCHIP is not set +# CONFIG_VIDEO_AUDIO_DECODER is not set +# CONFIG_VIDEO_DECODER is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_MAESTRO is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_IMAGEON is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_PXA is not set +CONFIG_FB_W100=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_DEVICE=y + +# +# Sound +# +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_SEQUENCER=m +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_SEQUENCER_OSS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_GENERIC_DRIVER=y + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +CONFIG_SND_VIRMIDI=m +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# ALSA ARM devices +# +# CONFIG_SND_A716 is not set +# CONFIG_SND_H1910 is not set +# CONFIG_SND_H2200 is not set +CONFIG_SND_HX4700=m +# CONFIG_SND_H5XXX_AK4535 is not set +CONFIG_SND_PXA2xx_I2SOUND=m +# CONFIG_SND_PXA2XX_AC97 is not set + +# +# USB devices +# +# CONFIG_SND_USB_AUDIO is not set + +# +# PCMCIA devices +# +CONFIG_SND_AK4641=m + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_SL811_HCD=m +CONFIG_USB_SL811_CS=m + +# +# USB Device Class drivers +# +# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=m +CONFIG_USB_HIDINPUT=y +# CONFIG_HID_FF is not set +# CONFIG_USB_HIDDEV is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_ITMTOUCH is not set +# CONFIG_USB_EGALAX is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set +# CONFIG_USB_VICAM is not set +# CONFIG_USB_DSBR is not set +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_KONICAWC is not set +# CONFIG_USB_OV511 is not set +# CONFIG_USB_SE401 is not set +# CONFIG_USB_SN9C102 is not set +# CONFIG_USB_STV680 is not set +# CONFIG_USB_PWC is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_ZD1201 is not set +CONFIG_USB_MON=y + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_LD is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +CONFIG_USB_GADGET_PXA27X=y +CONFIG_USB_PXA27X=y +# CONFIG_USB_PXA27X_DMA is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_MQ11XX is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +CONFIG_USB_ETH=m +# CONFIG_USB_ETH_RNDIS is not set +# CONFIG_USB_GADGETFS is not set +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set +CONFIG_USB_G_SERIAL=m +# CONFIG_USB_G_CHAR is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=y +# CONFIG_MMC_PXA is not set +# CONFIG_MMC_WBSD is not set +# CONFIG_MMC_TMIO is not set +# CONFIG_MMC_SAMCOP is not set +CONFIG_MMC_ASIC3=y + +# +# LED devices +# +# CONFIG_CLASS_LEDS is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +# CONFIG_EXT2_FS_SECURITY is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=m +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=m +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y +# CONFIG_XFS_QUOTA is not set +CONFIG_XFS_SECURITY=y +CONFIG_XFS_POSIX_ACL=y +# CONFIG_XFS_RT is not set +# CONFIG_MINIX_FS is not set +CONFIG_ROMFS_FS=m +CONFIG_INOTIFY=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +CONFIG_AUTOFS4_FS=m +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=m +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +# CONFIG_NTFS_RW is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_RELAYFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_WRITEBUFFER is not set +CONFIG_JFFS2_SUMMARY=y +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +# CONFIG_NFSD_V4 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +CONFIG_AFS_FS=m +CONFIG_RXRPC=m +# CONFIG_9P_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_MAGIC_SYSRQ is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_VM is not set +CONFIG_FRAME_POINTER=y +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_WAITQ is not set +CONFIG_DEBUG_ERRORS=y +# CONFIG_DEBUG_LL is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_WP512=m +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +CONFIG_CRC_CCITT=m +# CONFIG_CRC16 is not set +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff --git a/mindstab.net_blog/resources/ipaq-hx4700/deboot.tar.gz b/mindstab.net_blog/resources/ipaq-hx4700/deboot.tar.gz new file mode 100644 index 0000000..b80ea30 Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/deboot.tar.gz differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/init.d.kbdd b/mindstab.net_blog/resources/ipaq-hx4700/init.d.kbdd new file mode 100644 index 0000000..e005424 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/init.d.kbdd @@ -0,0 +1,31 @@ +#!/bin/sh +# + +. /etc/profile + +case $1 in +'start') + killall irattach + sleep 1 + rmmod irtty_sir + rmmod sir_dev + rmmod ircomm_tty + sleep 1 + /usr/sbin/kbdd -c /etc/kbdd.conf > /dev/null 2>&1 & + ;; + +'stop') + killall kbdd + ;; + +'restart') + $0 stop + $0 start + ;; + +*) + echo "usage: $0 { start | stop | restart }" + ;; + +esac + diff --git a/mindstab.net_blog/resources/ipaq-hx4700/install-firmware.sh b/mindstab.net_blog/resources/ipaq-hx4700/install-firmware.sh new file mode 100644 index 0000000..6f0f5c5 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/install-firmware.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cp /media/cf/RADIO0d.BIN /lib/firmware +cp /media/cf/radio11.bin /lib/firmware/RADIO11.BIN +cp /media/cf/wlangen.bin /lib/firmware/WLANGEN.BIN diff --git a/mindstab.net_blog/resources/ipaq-hx4700/install-kbdd.sh b/mindstab.net_blog/resources/ipaq-hx4700/install-kbdd.sh new file mode 100644 index 0000000..b7fba83 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/install-kbdd.sh @@ -0,0 +1,5 @@ +#!?bin/sh + +mv /usr/sbin/kbdd /usr/sbin/kbdd.old +cp /media/cf/kbdd /usr/sbin/kbdd +cp /media/cf/kbdd.conf /etc diff --git a/mindstab.net_blog/resources/ipaq-hx4700/install-modules.sh b/mindstab.net_blog/resources/ipaq-hx4700/install-modules.sh new file mode 100644 index 0000000..f6b47fa --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/install-modules.sh @@ -0,0 +1,3 @@ +#!?bin/sh + +cp -r /media/cf/2.6.21-hh17 /lib/modules diff --git a/mindstab.net_blog/resources/ipaq-hx4700/ipkg/epdfview_0.1.6-r1_arm.ipk b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/epdfview_0.1.6-r1_arm.ipk new file mode 100644 index 0000000..2c314a4 Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/epdfview_0.1.6-r1_arm.ipk differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/ipkg/index.html b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/index.html new file mode 100644 index 0000000..3f93602 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/index.html @@ -0,0 +1,36 @@ + + + + Index of /ipaq-hx4700 + + +

Index of /ipaq-hx4700

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[   ] 2.6.17-hh3.tar.gz 11-Jan-2010 17:07 2.8M +[   ] RADIO0d.BIN 11-Jan-2010 17:07 1.9K +[   ] bootgpe-v0.8.4-ipaq-..> 11-Jan-2010 17:07 21M +[   ] bootldr-1.2.5-hp.rom 11-Jan-2010 17:07 200K +[   ] chroot.static 11-Jan-2010 17:07 2.6M +[TXT] chrootme.sh 11-Jan-2010 17:07 188 +[   ] config 11-Jan-2010 17:07 32K +[   ] deboot.tar.gz 11-Jan-2010 17:07 2.0M +[   ] init.d.kbdd 11-Jan-2010 17:07 339 +[TXT] install-firmware.sh 11-Jan-2010 17:07 152 +[TXT] install-kbdd.sh 11-Jan-2010 17:07 109 +[TXT] install-modules.sh 11-Jan-2010 17:07 52 +[DIR] ipkg/ 11-Jan-2010 17:07 - +[TXT] kbd.c 11-Jan-2010 17:07 36K +[   ] kbdd 11-Jan-2010 17:07 26K +[TXT] kbdd.conf 11-Jan-2010 17:07 159 +[TXT] net.sh 11-Jan-2010 17:07 67 +[TXT] profile 11-Jan-2010 17:07 527 +[   ] profile.ipaq 11-Jan-2010 17:07 83 +[   ] radio11.bin 11-Jan-2010 17:07 964 +[   ] reflash.ctl 11-Jan-2010 17:07 169 +[   ] wget 11-Jan-2010 17:07 233K +[   ] wlangen.bin 11-Jan-2010 17:07 43K +[   ] zImage-2.6.15-hh2-ip..> 11-Jan-2010 17:07 1.1M +[   ] zImage-2.6.17-hh3 11-Jan-2010 17:07 1.1M +
+
Apache/2.2.29 (Gentoo) Server at ftp.mindstab.net Port 80
+ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/ipkg/libatk-1.0-0_1.10.3-r0_arm.ipk b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/libatk-1.0-0_1.10.3-r0_arm.ipk new file mode 100644 index 0000000..2deb716 Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/libatk-1.0-0_1.10.3-r0_arm.ipk differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/ipkg/libcairo2_1.0.0-r2_arm.ipk b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/libcairo2_1.0.0-r2_arm.ipk new file mode 100644 index 0000000..88e548b Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/libcairo2_1.0.0-r2_arm.ipk differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/ipkg/libstdc++6_3.4.4-r4_arm.ipk b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/libstdc++6_3.4.4-r4_arm.ipk new file mode 100644 index 0000000..60e05e5 Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/libstdc++6_3.4.4-r4_arm.ipk differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/ipkg/poppler_0.5.4-r1_arm.ipk b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/poppler_0.5.4-r1_arm.ipk new file mode 100644 index 0000000..7028ce5 Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/ipkg/poppler_0.5.4-r1_arm.ipk differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/kbd.c b/mindstab.net_blog/resources/ipaq-hx4700/kbd.c new file mode 100644 index 0000000..1caafc8 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/kbd.c @@ -0,0 +1,1567 @@ +/* + * Copyright (C) 2004,2005,2006 Nils Faerber + * Parts for Stowaway (c) 2005 by Paul Eggleton + * See README for other authors + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef USELIRC +#include +#endif + + +#include "keyboards.h" +#include "dev_uinput.h" + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +#define ARRAY_SIZE(A) (sizeof(A)/sizeof(A[0])) + +char debug = 0; +int uindev = 0; +static int reinit = 0; + +#define DEFAULT_TTS "/dev/ttyS0" +char TTY_PORT[PATH_MAX] = DEFAULT_TTS; + +void handle_sigterm(int signal) +{ + dev_uinput_close(uindev); + exit(EXIT_SUCCESS); +} + +int open_serial(char *port, speed_t baud) +{ +int fd, res; +struct termios ssetup; + + fd=open(port, O_RDWR /*| O_NONBLOCK*/); + if (fd <= 0) { + perror("open serial"); + fprintf(stderr,"opening %s failed\n", port); + return (-1); + } + + res = tcgetattr(fd, &ssetup); + if (res < 0) { + perror("tcgetattr"); + return (-1); + } + + ssetup.c_iflag = 0L; + ssetup.c_oflag = 0L; + ssetup.c_cflag &= ~(CSTOPB|PARENB|CRTSCTS); + ssetup.c_cflag |= (CS8|CLOCAL); + ssetup.c_lflag = 0L; + ssetup.c_cc[VTIME] = 0; + ssetup.c_cc[VMIN] = 1; + cfsetispeed(&ssetup, baud); + cfsetospeed(&ssetup, baud); + + res=tcsetattr(fd, TCSANOW, &ssetup); + if (res < 0) { + perror("tcsetattr"); + return (-1); + } + +return (fd); +} + + +#ifdef USELIRC +int lirc(char *progname) +{ +struct lirc_config *config; + + if (debug) + fprintf(stderr, "progname %s\n",progname); + if (lirc_init(progname,1) == -1) { + printf("failed to init lirc\n"); + exit(EXIT_FAILURE); + } + if (debug) + fprintf(stderr, "in lirc\n"); + if (lirc_readconfig(NULL,&config,NULL) == 0) { + int i, ret; + char *code, *c; + + while (lirc_nextcode(&code) == 0) { + if (code == NULL) + continue; + while ((ret = lirc_code2char(config, code, &c)) == 0 && + c != NULL) { + sscanf(c,"%x",&i); + if (debug) + fprintf(stderr, "%s %u\n",c,i); + dev_uinput_key(uindev, i, KEY_PRESSED); + dev_uinput_key(uindev, i, KEY_RELEASED); + if (debug) + fprintf(stderr, "Code : %s\n",c); + } + free(code); + if (ret == -1) + break; + } + lirc_freeconfig(config); + } + +return lirc_deinit(); +} +#endif + + +int compaq_foldable(void) +{ +int fd; +unsigned char buf[16]; +char fn=0; + + fd = open_serial(TTY_PORT, B4800); + if (fd <= 0) + return (-1); + + while (fd > 0) { + read (fd, buf, 2); + // fprintf(stderr, "0x%02x 0x%02x 0x%02x | ", buf[0], buf[1], ~buf[0]); + if (buf[0] == (unsigned char)~buf[1]) { + if (debug) fprintf(stderr, "press: %d ", buf[0]); + if (buf[0] == 0x02) { + fn=1; + continue; + } + if (fn) + buf[0] = foldable_function[buf[0]]; + else + buf[0] = foldable_normal[buf[0]]; + if (debug) + fprintf(stderr,"= 0x%02x\n", buf[0]); + if (buf[0] > 0) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + } else if (((unsigned char)buf[0] & (unsigned char)~0x80) == (unsigned char)~buf[1]) { + if (debug) + fprintf(stderr, "rel. : %d ", buf[0] & ~0x80); + if ((buf[0] & ~0x80) == 0x02) { + fn = 0; + continue; + } + if (fn) + buf[0] = foldable_function[(unsigned char)buf[0] & (unsigned char)~0x80]; + else + buf[0] = foldable_normal[(unsigned char)buf[0] & (unsigned char)~0x80]; + if (debug) + fprintf(stderr,"= 0x%02x\n", buf[0]); + if (buf[0] > 0) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_RELEASED); + } + } + +return 0; +} + + +int lastChar = 0; +char shiftState = 0; +char altState = 0; +char ctrlState = 0; + +//struct timeval tvlast; +//unsigned char lastkey; + +int belkin_infrared(void) +{ +int fd; +//unsigned char buf[16]; +unsigned char buf; +unsigned char key; +unsigned int key_down; +unsigned int key_state; +unsigned char keycode; +int isChar = 0; +//struct timeval tv; +// gettimeofday(&tv, NULL); + + + fd = open_serial(TTY_PORT, B9600); + if (fd <= 0) + return (-1); + + while (fd > 0) { +// read (fd, buf, 2); +// key = buf[1] & 0x7f; +// key_down = !(buf[1] & 0x80); + + read (fd, &buf, 1); + key = buf & 0x7f; + key_down = !(buf & 0x80); + +// keycode = belkin_irda_normal[key]; + keycode = key; + switch (keycode) { + case 81: keycode = 16; break; //q - + case 87: keycode = 17; break; //w - + case 69: keycode = 18; break; //e - + case 82: keycode = 19; break; //r - + case 84: keycode = 20; break; //t - + case 89: keycode = 21; break; //y - + case 85: keycode = 22; break; //u - + case 73: keycode = 23; break; //i - + case 79: keycode = 24; break; //o - + case 80: keycode = 25; break; //p - + case 91: keycode = 26; break; //[ - + case 93: keycode = 27; break; //] - + case 13: keycode = 28; break; // ret - + + case 94: keycode = 30; break; //a - + case 83: keycode = 31; break; //s - + case 68: keycode = 32; break; //d - + case 70: keycode = 33; break; //f - + case 71: keycode = 34; break; //g - + case 72: keycode = 35; break; //h + case 74: keycode = 36; break; //j - + case 75: keycode = 37; break; //k - + case 76: keycode = 38; break; //l - + case 59: keycode = 39; break; //; + case 44: keycode = 40; break; //' - + + + case 90: keycode = 44; break; //z - + case 88: keycode = 45; break; //x - + case 67: keycode = 46; break; //c - + case 86: keycode = 47; break; //v + case 66: keycode = 48; break; //b + case 78: keycode = 49; break; //n + case 77: keycode = 50; break; //m + case 60: keycode = 51; break; //,< + case 46: keycode = 52; break; //.> + case 47: keycode = 53; break; // /? - + + + case 27: keycode = 1; break; // til + case 49: keycode = 2; break; // 1 + case 50: keycode = 3; break; // 2 + case 51: keycode = 4; break; // 3 + case 52: keycode = 5; break; // 4 + case 53: keycode = 6; break; // 5 + case 54: keycode = 7; break; // 6 + case 55: keycode = 8; break; // 7 + case 56: keycode = 9; break; // 8 + case 57: keycode = 10; break; // 9 + case 48: keycode = 11; break; // 0 + case 45: keycode = 12; break; // - + case 61: keycode = 13; break; //-= + case 8: keycode = 14; break; // bkspace + case 9: keycode = 15; break; // tab + + case 20: keycode = 58; break; // caps lock + case 16: // shift l - + case 18: keycode = 42; + break; // shift r + case 17: keycode = 29; + break; // ctrl + case 29: keycode = 56; + break; // alt + case 32: keycode = 57; break; // space - + case 33: keycode = 57; break; // space - + case 92: keycode = 43; break; // backslash bar - + case 19: keycode = 111; break; // del + case 37: keycode = 103; break; // right + case 38: keycode = 105; break; // up + case 39: keycode = 108; break; // left + case 40: keycode = 106; break; // down + + //default: keycode =0; break; + + + //case 79: keycode = 24; break; + + + } + + if ( /*(keycode >= 2 && keycode <=13) || */(keycode >= 16 && keycode <= 25) + || (keycode >= 30 && keycode <= 38) || (keycode >= 44 && keycode <= 50)) + { + isChar = 1; + if (debug && isChar) fprintf (stderr, "is char\n"); + + } + + + //if (debug) + // fprintf(stderr, "ctrl:%d alt:%d shift:%d\n", ctrlState, altState, shiftState); + +// if (! isChar) { + if ( key_down ) + key_state = KEY_PRESSED; + else + key_state = KEY_RELEASED; + if (lastChar == 64) + key_state = KEY_RELEASED; + + if (debug) + fprintf(stderr,"event %d %d\n", key_state, keycode); + dev_uinput_key(uindev, (unsigned short)keycode, key_state); + lastChar = keycode; +/* } else { + if (! key_down && keycode == lastChar) { + if (shiftState) { + if (debug) fprintf(stderr,"release %d\n", 14); + dev_uinput_key(uindev, (unsigned short)14, KEY_RELEASED); + } else if (ctrlState || altState) { + if (debug) fprintf(stderr,"release %d\n", 19); + dev_uinput_key(uindev, (unsigned short)19, KEY_RELEASED); + } + + if (debug && keycode) + fprintf(stderr,"press %d\n", keycode); + dev_uinput_key(uindev, (unsigned short)keycode, KEY_PRESSED); + if (debug && keycode) + fprintf(stderr,"release %d\n", keycode); + dev_uinput_key(uindev, (unsigned short)keycode, KEY_RELEASED); + if (debug && keycode) + fprintf(stderr,"release %d\n", keycode); + dev_uinput_key(uindev, (unsigned short)keycode, KEY_RELEASED); + } + lastChar = keycode; + }*/ + + } + +return 0; +} + + +int freedom_keyboard(void) +{ +int fd; +unsigned char buf[16]; +unsigned char key; +unsigned int key_down; +unsigned char keycode; + + fd = open_serial(TTY_PORT, B9600); + if (fd <= 0) + return (-1); + + while (fd > 0) { + read (fd, buf, 1); + key = buf[0]; + //keyboard sends n when pressing a key + // and n+63 when releasing the key + key_down = ( key < 63 ); + if (!key_down) + key = (key-63)&0x3F; // convert key code for key up + keycode = freedom_kbd[key]; + if (debug) + fprintf(stdout, "0x%02x 0x%02x\n", buf[0], keycode); + if ( key_down ) { + if (debug) + fprintf(stdout,"press %d\n", keycode); + dev_uinput_key(uindev, (unsigned short)keycode, KEY_PRESSED); + } else { + if (debug) + fprintf(stdout,"release %d\n", keycode); + dev_uinput_key(uindev, (unsigned short)keycode, KEY_RELEASED); + } + } + +return 0; +} + +int select_read(int fd, int timeout_sec, int timeout_us) +{ +fd_set fds; +struct timeval tv; + + FD_ZERO(&fds); + FD_SET(fd, &fds); + tv.tv_sec = timeout_sec; + tv.tv_usec = timeout_us; + return select(fd+1, &fds, NULL, NULL, &tv); +} + + +int stowaway_init(int fd) +{ +int status; +unsigned char buf[16]; + + ioctl(fd, TIOCMGET, &status); + status |= TIOCM_DTR; /* Set DTR */ + status &= ~TIOCM_RTS; /* Clear RTS */ + ioctl(fd, TIOCMSET, &status); + + /* Unfortunately, DCD seems to be high all of the time on H3900, so the following can't be used */ + /* ioctl(fd, TIOCMIWAIT, TIOCM_CAR */ + /* So we just wait instead */ + usleep(1000000); + + ioctl(fd, TIOCMGET, &status); + status |= TIOCM_RTS; /* Set RTS */ + ioctl(fd, TIOCMSET, &status); + /* Stowaway will send back 0xFA 0xFD indicating successful init */ + if (select_read(fd, 2, 0)) { + read(fd, buf, 2); + if ((buf[0] == 0xFA) && (buf[0] == 0xFD)) + if (debug) + fprintf(stderr, "keyboard initialised\n"); + } + + return 0; +} + + +int open_apm(void) +{ +int fd; + + fd = open( "/dev/apm_bios", O_RDONLY | O_NONBLOCK ); + if (fd <= 0) + return -1; + +return fd; +} + + +int check_apm_resume(int fd) +{ +apm_event_t ev; +int resumed; + + resumed = 0; + while (read(fd, &ev, sizeof(apm_event_t)) > 0) { + if (ev == APM_NORMAL_RESUME) + resumed = 1; + } + +return resumed; +} + + +void stowaway_sig(int sig) +{ + reinit = 1; +} + + +int stowaway(void) +{ +int fd, apm_fd; +unsigned char buf[16]; +char fn=0; +struct sigaction act; +int rc; + + fd = open_serial(TTY_PORT, B9600); + if (fd <= 0) + return (-1); + + /* Make SIGHUP cause a reinit of the keyboard */ + act.sa_handler = stowaway_sig; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGHUP, &act, NULL); + + /* Open APM so we can listen for resume events */ + apm_fd = open_apm(); + + while (fd > 0) { + + stowaway_init(fd); + + while (fd > 0) { + rc = select_read(fd, 0, 100000); + if (rc == -1) { + if (reinit) { + reinit = 0; + break; + } else { + perror("select"); + return 1; + } + } else if (rc == 0) { + /* Timeout expired with nothing read, do APM resume check */ + if ((apm_fd > 0) && (check_apm_resume(apm_fd))) + break; + continue; + } + + rc = read (fd, buf, 1); + if (rc == -1) { + if (reinit) { + reinit = 0; + break; + } else { + perror("read"); + return 1; + } + } + + if ( ((unsigned char)buf[0] & (unsigned char)0x80) == 0 ) { + if (debug) + fprintf(stderr, "press: %d\n", buf[0]); + if (buf[0] == 0x08) { + fn = 1; + continue; + } + if (fn) + buf[0] = stowaway_function[buf[0]]; + else + buf[0] = stowaway_normal[buf[0]]; + if (debug) + fprintf(stderr,"= 0x%02x\n", buf[0]); + if (buf[0] > 0) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + } else { + if (debug) + fprintf(stderr, "rel. : %d\n", buf[0] & ~0x80); + if ((buf[0] & ~0x80) == 0x08) { + fn = 0; + continue; + } + if (fn) + buf[0] = stowaway_function[(unsigned char)buf[0] & (unsigned char)~0x80]; + else + buf[0] = stowaway_normal[(unsigned char)buf[0] & (unsigned char)~0x80]; + if (debug) + fprintf(stderr,"= 0x%02x\n", buf[0]); + if (buf[0] > 0) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_RELEASED); + } + } + } + +return 0; +} + + +int stowawayxt(void) +{ +#define STOWAWAYXT_GR_FN 33 +#define STOWAWAYXT_BL_FN 34 + +int fd, apm_fd; +unsigned char buf[16]; +char bluefn=0,greenfn=0; +struct sigaction act; +int rc; + + fd = open_serial(TTY_PORT, B9600); + if (fd <= 0) + return (-1); + + /* Make SIGHUP cause a reinit of the keyboard */ + act.sa_handler = stowaway_sig; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGHUP, &act, NULL); + + /* Open APM so we can listen for resume events */ + apm_fd = open_apm(); + + while (fd > 0) { + stowaway_init(fd); + + while (fd > 0) { + rc = select_read(fd, 0, 100000); + if (rc == -1) { + if (reinit) { + reinit = 0; + break; + } else { + perror("select"); + return 1; + } + } else if (rc == 0) { + /* Timeout expired with nothing read, do APM resume check */ + if ((apm_fd > 0) && (check_apm_resume(apm_fd))) + break; + continue; + } + + rc = read (fd, buf, 1); + if (rc == -1) { + if (reinit) { + reinit = 0; + break; + } else { + perror("read"); + return 1; + } + } + + if ( ((unsigned char)buf[0] & (unsigned char)0x80) == 0 ) { + /* KEY PRESSED */ + if (debug) + fprintf(stderr, "press: %d\n", buf[0]); + if (buf[0] == STOWAWAYXT_BL_FN) { + bluefn = 1; + continue; + } + + if (buf[0] == STOWAWAYXT_GR_FN) { + greenfn = 1; + dev_uinput_key(uindev,42,KEY_PRESSED); + continue; + } + + if (bluefn) + buf[0] = stowawayxt_function[buf[0]]; + else if (greenfn) { + buf[0] = stowawayxt_function[buf[0]]; + /* fixup where green function is not shift blue function */ + switch (buf[0]) { + case KEY_UP: + buf[0] = KEY_PAGEUP; + break; + case KEY_LEFT: + buf[0] = KEY_HOME; + break; + case KEY_DOWN: + buf[0] = KEY_PAGEDOWN; + break; + case KEY_RIGHT: + buf[0] = KEY_END; + break; + case KEY_INTL2: + buf[0] = KEY_INTL3; + break; + } /* /switch */ + } else + buf[0]=stowawayxt_normal[buf[0]]; + + if (debug) + fprintf(stderr,"= 0x%02x\n", buf[0]); + if (buf[0] != KEY_RESERVED) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + + } else { + /* KEY RELEASED */ + if (debug) + fprintf(stderr, "rel. : %d\n", buf[0] & ~0x80); + + if ((buf[0] & ~0x80) == STOWAWAYXT_BL_FN) { + bluefn = 0; + continue; + } + + if ((buf[0] & ~0x80) == STOWAWAYXT_GR_FN) { + greenfn = 0; + dev_uinput_key(uindev,42,KEY_RELEASED); + continue; + } + + if (bluefn) + buf[0] = stowawayxt_function[(unsigned char) buf[0] & (unsigned char)~0x80]; + else if (greenfn) { + buf[0] = stowawayxt_function[(unsigned char) buf[0] & (unsigned char)~0x80]; + + /* fixup where green function is not shift blue function */ + switch(buf[0]) { + case KEY_UP: + buf[0] = KEY_PAGEUP; + break; + case KEY_LEFT: + buf[0] = KEY_HOME; + break; + case KEY_DOWN: + buf[0] = KEY_PAGEDOWN; + break; + case KEY_RIGHT: + buf[0] = KEY_END; + break; + case KEY_INTL2: + buf[0] = KEY_INTL3; + break; + } /* /switch */ + } else + buf[0] = stowawayxt_normal[(unsigned char)buf[0] & (unsigned char)~0x80]; + + if (debug) + fprintf(stderr,"= 0x%02x\n", buf[0]); + if (buf[0] != KEY_RESERVED) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_RELEASED); + } + } + } + +return 0; +} + + +int snapntype(void) +{ +int fd; +unsigned char buf[16]; +char symb=0; + + fd = open_serial(TTY_PORT, B2400); + + while (fd > 0) { + read (fd, buf, 1); + if (debug) + fprintf(stderr, "got %d\n", buf[0]); + if (buf[0] & 0x80) { /* release */ + read(fd,buf+1,1); + buf[0] = buf[0] & 0x7f; + if (buf[0] == 27) { + symb = 0; + continue; + } + if (symb) + buf[0] = snapntype_symbol[buf[0]]; + else + buf[0] = snapntype_normal[buf[0]]; + if (debug) + fprintf(stderr, " release %d\n", buf[0]); + if (buf[0] != 0) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_RELEASED); + } else { /* press */ + if (buf[0] == 27) { + symb=1; + continue; + } + if (symb) + buf[0] = snapntype_symbol[buf[0]]; + else + buf[0] = snapntype_normal[buf[0]]; + if (debug) + fprintf(stderr, " press %d\n", buf[0]); + if (buf[0] != 0) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + } + } + +return 0; +} + + +int snapntypebt(void) +{ +int fd; +unsigned char buf[16]; +unsigned char key, last_key=0; +unsigned char pressed; +unsigned char fn = 0; + + fd = open_serial(TTY_PORT, B9600); + + while (fd > 0) { + read (fd, buf, 1); + read (fd, buf+1, 1); + if (debug) + fprintf(stderr, "got %02x%02x\n", buf[0],buf[1]); + if (buf[1] & 0x80) { /* release */ + key = buf[1] & 0x7F; + + if (key == 30) { + fn = 0; + if (last_key) { + dev_uinput_key(uindev, (unsigned short)snapntypebt_fn[last_key], KEY_RELEASED); + } + continue; + } + + pressed = KEY_RELEASED; + if (debug) + fprintf(stderr, " release:"); + } else { + key = buf[1]; + + if (key == 30) { + fn = 1; + last_key = 0; + continue; + } + + pressed = KEY_PRESSED; + if (debug) + fprintf(stderr, " press: "); + } + if (debug) + fprintf(stderr, " %d (%d)\n",key,snapntypebt_normal[key]); + + if (!fn) + key = snapntypebt_normal[key]; + else { + last_key = key; + key = snapntypebt_fn[key]; + } + if (key != 0 && !debug) + dev_uinput_key(uindev, (unsigned short)key, pressed); + } + +return 0; +} + + +int hpslim(void) +{ +int fd; +unsigned char cin; +unsigned char cnew; +char symb=0; +char shft=0; +char symshft=0; +char numlck=0; + + fd = open_serial(TTY_PORT, B4800); + if (fd < 0) + return -1; + + for (;;) { + if (read (fd, &cin, 1) < 0) { + perror(TTY_PORT); + return -1; + } + if (debug) + fprintf(stderr, "got %d 0x%x\n", cin,cin); + if (cin & 0x80) { /* release */ + cin &= 0x7f; + switch (cin) { + case MKBD_HPS_FNKEY: /* Fn key release */ + symb = 0; + continue; + case KEY_LEFTSHIFT: + case KEY_RIGHTSHIFT: + shft = 0; + break; + } + if (symb) + cnew = hpslim_symbol[cin]; + else { + /* if numlock, convert QWERTYUIOP to 1-9,0 */ + if (numlck && cin >= KEY_Q && cin <= KEY_P) + cnew = cin + KEY_1 - KEY_Q; + else + cnew = hpslim_normal[cin]; + } + if (debug) + fprintf(stderr, " release cnew=%d 0x%x\n", cnew,cnew); + if (cnew != 0) { + dev_uinput_key(uindev, (unsigned short)cnew, KEY_RELEASED); + if (symshft) + dev_uinput_key(uindev, (unsigned short)KEY_RIGHTSHIFT, KEY_RELEASED); + symshft = 0; + // toggle numlck on release + if (cnew == KEY_NUMLOCK) numlck = !numlck; + } + } else { /* press */ + switch (cin) { + case MKBD_HPS_FNKEY: /* Fn key press */ + symb = 1; + continue; + case KEY_LEFTSHIFT: + case KEY_RIGHTSHIFT: + shft = 1; + break; + } + if (symb) { + /* if shift needed to get correct char */ + symshft = hpslim_symshft[cin] && !shft; + cnew = hpslim_symbol[cin]; + } else { + /* if numlock, convert QWERTYUIOP to 1-9,0 */ + if (numlck && cin >= KEY_Q && cin <= KEY_P) + cnew = cin + KEY_1 - KEY_Q; + else + cnew = hpslim_normal[cin]; + } + if (debug) + fprintf(stderr, " press cnew=%d 0x%x\n", cnew,cnew); + if (cnew != 0) { + if (symshft) + dev_uinput_key(uindev, (unsigned short)KEY_RIGHTSHIFT, KEY_PRESSED); + dev_uinput_key(uindev, (unsigned short)cnew, KEY_PRESSED); + } + } + } + +return 0; +} + + +int smartbt(void) +{ +int fd; +unsigned char buf[16]; + + fd = open_serial(TTY_PORT, B2400); + + while (fd > 0) { + read (fd, buf, 1); + if (buf[0] > 126) { + if (debug) + fprintf(stderr, "error: unexpected char %d\n", buf[0]); + continue; + } + if (buf[0] > 63) { + /* release */ + buf[0] = buf[0] - 63; + if (debug) + fprintf(stderr, "rel.: %d\n", buf[0]); + buf[0] = smartbt_normal[buf[0]]; + if (debug) + fprintf(stderr,"= 0x%02x\n", buf[0]); + if (buf[0] > 0) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_RELEASED); + } else { + /* press */ + if (debug) + fprintf(stderr, "press: %d\n", buf[0]); + buf[0] = smartbt_normal[buf[0]]; + if (debug) + fprintf(stderr,"= 0x%02x\n", buf[0]); + if (buf[0] > 0) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + } + } + +return 0; +} + + +int flexis(void) +{ +int fd; +unsigned char buf[16]; +char symb=0; + + fd = open_serial(TTY_PORT, B9600); + + while (fd > 0) { + read (fd, buf, 1); + if (debug) + fprintf(stderr, "got %d\n", buf[0]); + + if (buf[0] & 0x80) { /* key press */ + buf[0] = buf[0] & 0x7f; + + if (symb) + buf[0] = flexis_fx100_function[buf[0]]; + else + buf[0] = flexis_fx100_normal[buf[0]]; + + /* FIXME: function key */ + /* FIXME: this code is a little broken, it should check scancode not keycode for set 1/2 */ + + if (buf[0] == KEY_LEFTSHIFT || buf[0] == KEY_RIGHTSHIFT || + buf[0] == KEY_LEFTCTRL || buf[0] == KEY_RIGHTCTRL || + buf[0] == KEY_LEFTALT || buf[0] == KEY_RIGHTALT ) { + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + } else { + read(fd,buf+1,1); + if (debug) + fprintf(stderr, "got %d\n", buf[1]); + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_RELEASED); + } + } else { /* release of key from Set 2 */ + if (symb) + buf[0] = flexis_fx100_function[buf[0]]; + else + buf[0] = flexis_fx100_normal[buf[0]]; + if (buf[0] != 0) + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_RELEASED); + } + } + + return 0; +} + + +int benqgamepad(void) { +int fd; +unsigned char buf[16]; +int i; +unsigned char keycode; + + fd = open_serial(TTY_PORT, B4800); + + while (fd > 0) { + keycode = 0; + read (fd, buf, 2); + if (buf[0] & 0x80) { /* release */ + if (debug) + fprintf(stderr, "release: %d %d\n", buf[0], buf[1]); + buf[0] = buf[0] & 0x7f; + for (i=0; i<10; i++) { + if (benq_gamepad_map[i][0] == buf[0]) { + keycode = benq_gamepad_map[i][1]; + break; + } + } + if (keycode != 0) + dev_uinput_key(uindev, (unsigned short)keycode, KEY_RELEASED); + + } else { + if (debug) + fprintf(stderr, "press: %d %d\n", buf[0], buf[1]); + for (i=0; i<10; i++) { + if (benq_gamepad_map[i][0] == buf[0]) { + keycode = benq_gamepad_map[i][1]; + break; + } + } + if (keycode != 0) + dev_uinput_key(uindev, (unsigned short)keycode, KEY_PRESSED); + } + } + + return 0; +} + + +int pocketvik(void) +{ +int fd; +unsigned char buf[16]; +unsigned char mods=0; +int res; +struct termios ssetup; +int i; + + fd = open_serial(TTY_PORT, B57600); + + /* PocketVIK needs CRTSCTS */ + res = tcgetattr(fd, &ssetup); + if (res < 0) { + perror("tcgetattr"); + return (-1); + } + ssetup.c_cflag |= CRTSCTS; + res = tcsetattr(fd, TCSANOW, &ssetup); + if (res < 0) { + perror("tcgetattr"); + return (-1); + } + + while (fd > 0) { + read (fd, buf, 1); + if (debug) + fprintf(stderr, "got %d\n", buf[0]); + + if (buf[0] & 0x80) { /* press with modifiers */ + mods = buf[0] & 0x7f; + read (fd, buf, 1); + } else + mods = 0; + + if (mods & POCKETVIK_Fn) + buf[0] = pocketvik_function[buf[0]]; + else + buf[0] = pocketvik_normal[buf[0]]; + + if (buf[0] != 0) { + if (debug) + fprintf(stderr, "press/release %d\n", buf[0]); + + /* Modifiers down */ + for ( i = 0 ; i < ARRAY_SIZE(pocketvik_modifiers) ; i++ ) { + if (pocketvik_modifiers[i].mask & mods) + dev_uinput_key(uindev, pocketvik_modifiers[i].key, KEY_PRESSED); + } + + /* Key down */ + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + /* Key up */ + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_RELEASED); + + /* Modifiers up */ + for (i = 0; i < ARRAY_SIZE(pocketvik_modifiers); i++ ) { + if (pocketvik_modifiers[i].mask & mods) + dev_uinput_key(uindev, pocketvik_modifiers[i].key, KEY_RELEASED); + } + + } + } + + return 0; +} + + +int micro_foldaway(void) { +int fd; +unsigned char buf[16]; +unsigned char lastkey = 0; +// char symb=0; +int checkkey = 0; + + fd = open_serial(TTY_PORT, B9600); + + while (fd > 0) { + read (fd, buf, 1); + if (debug) + fprintf(stderr, "got: %d\n", buf[0]); + if (buf[0] & 0x80) { /* possible release */ + checkkey = (159 - buf[0]); + if (checkkey > 0 && checkkey <= 4) { + buf[0] = micro_foldaway_normal[159 - buf[0]]; + dev_uinput_key(uindev, buf[0], KEY_RELEASED); + } else if (buf[0] == 133 && lastkey > 0) { + dev_uinput_key(uindev, lastkey, KEY_RELEASED); + lastkey = 0; + } + /* Eat repeated code */ + read (fd, buf, 1); + } else { + checkkey = buf[0]; +/* if (symb) + buf[0] = micro_foldaway_function[buf[0]]; + else*/ + buf[0] = micro_foldaway_normal[buf[0]]; + + if (buf[0] != 0) { + if (checkkey > 4) + lastkey = buf[0]; /* Not a modifier, record key */ + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + } + } + } + + return 0; +} + + +int micro_datapad(void) { +int fd; +unsigned char buf[16]; +unsigned char lastkey = 0; +int checkkey = 0; + + fd = open_serial(TTY_PORT, B9600); + + while (fd > 0) { + read (fd, buf, 1); + if (debug) + fprintf(stderr, "got: %d\n", buf[0]); + if (buf[0] & 0x80) { /* possible release */ + checkkey = (159 - buf[0]); + if (checkkey > 0 && checkkey <= 4) { + buf[0] = micro_foldaway_normal[159 - buf[0]]; + dev_uinput_key(uindev, buf[0], KEY_RELEASED); + } else if (buf[0] == 133 && lastkey > 0) { + dev_uinput_key(uindev, lastkey, KEY_RELEASED); + lastkey = 0; + } + /* Eat repeated code */ + read (fd, buf, 1); + } else { + checkkey = buf[0]; +/* if (symb) + buf[0]=micro_datapad_function[buf[0]]; + else*/ + buf[0] = micro_datapad_normal[buf[0]]; + + if (buf[0] != 0) { + if (checkkey > 4) + lastkey = buf[0]; /* Not a modifier, record key */ + dev_uinput_key(uindev, (unsigned short)buf[0], KEY_PRESSED); + } + } + } + +return 0; +} + + +int hp_bt_foldable(void){ +int fd; +unsigned char buf[1]; +unsigned char cnew; +char symb=0; + + fd = open_serial(TTY_PORT, B9600); + if (fd < 0) + return -1; + + for (;;) { + if (read (fd, buf, 1) < 0) { + perror(TTY_PORT); + return -1; + } + if (debug) + fprintf(stderr, "got %d (0x%x)\n", buf[0], buf[0]); + if (buf[0] & 0x80) { /* release */ + buf[0] &= 0x7f; + if (buf[0] == 2) { + symb = 0; + continue; + } + if (symb) + cnew = btfoldable_function[buf[0]]; + else + cnew = btfoldable_normal[buf[0]]; + + if (debug) + fprintf(stderr, " release cnew=%d (0x%x)\n", cnew, cnew); + if (cnew != 0) + dev_uinput_key(uindev, (unsigned short)cnew, KEY_RELEASED); + } else { /* press */ + if (buf[0] == 2) { + symb = 1; + continue; + } + if (symb) + cnew = btfoldable_function[buf[0]]; + else + cnew = btfoldable_normal[buf[0]]; + if (debug) + fprintf(stderr, " press cnew=%d (0x%x)\n", cnew, cnew); + if (cnew != 0) + dev_uinput_key(uindev, (unsigned short)cnew, KEY_PRESSED); + } + } +return 0; +} + + +int compaq_microkbd(void) +{ +int fd; +unsigned char buf[2]; +unsigned char cnew; +char symb=0; + + fd = open_serial(TTY_PORT, B4800); + if (fd < 0) + return -1; + + for (;;) { + if (read (fd, buf, 2) < 0) { + perror(TTY_PORT); + return -1; + } + if (debug) + fprintf(stderr, "got %d %d (0x%x 0x%x)\n", buf[0], buf[1], buf[0], buf[1]); + if (buf[0] & 0x80) { /* release */ + buf[0] &= 0x7f; + if (buf[0] == 2) { + symb = 0; + continue; + } + if (symb) + cnew = compaq_function[buf[0]]; + else + cnew = compaq_normal[buf[0]]; + + if (debug) + fprintf(stderr, " release cnew=%d (0x%x)\n", cnew, cnew); + if (cnew != 0) + dev_uinput_key(uindev, (unsigned short)cnew, KEY_RELEASED); + } else { /* press */ + if (buf[0] == 2) { + symb = 1; + continue; + } + if (symb) + cnew = compaq_function[buf[0]]; + else + cnew = compaq_normal[buf[0]]; + if (debug) + fprintf(stderr, " press cnew=%d (0x%x)\n", cnew, cnew); + if (cnew != 0) + dev_uinput_key(uindev, (unsigned short)cnew, KEY_PRESSED); + } + } + +return 0; +} + + +int targus_infrared(void) +{ +int fd; +unsigned char buf; +unsigned char key; +unsigned int key_down; +unsigned char keycode; + + fd = open_serial(TTY_PORT, B9600); + if (fd <= 0) + return (-1); + + while (fd > 0) { + read (fd, &buf, 1); + key = buf & 0x7f; + key_down = !(buf & 0x80); + // keycode = belkin_irda_normal[key]; + keycode = key; + if (debug) + fprintf(stderr, "0x%02x 0x%02x\n", buf, key); + + if ( key_down ) { + if (debug) + fprintf(stderr,"press %d\n", keycode); + dev_uinput_key(uindev, (unsigned short)keycode, KEY_PRESSED); + } else { + if (debug) + fprintf(stderr,"release %d\n", keycode); + dev_uinput_key(uindev, (unsigned short)keycode, KEY_RELEASED); + } + } + +return 0; +} + + +void print_usage(char *arg0) +{ + fprintf (stderr, "kbdd %s\n", VERSION); + fprintf (stderr, "Usage:\n"); + fprintf (stderr, "%s [-d] [-h] [-c ] -p -t \n", arg0); + fprintf (stderr, "-d\tenable debugging output\n"); + fprintf (stderr, "-h\tprint this help\n"); + fprintf (stderr, "-c \n"); + fprintf (stderr, "\tRead port and type from config file\n"); + fprintf (stderr, "-p \n"); + fprintf (stderr, "\tspecify serial port device, default %s\n", DEFAULT_TTS); + fprintf (stderr, "-t \n"); + fprintf (stderr, "\tspecify the serial keyboard type, supported are:\n"); + fprintf (stderr, "\tfoldable - Compaq/HP foldable keyboard\n"); + fprintf (stderr, "\tstowaway - Targus Stowaway keyboard\n"); + fprintf (stderr, "\tstowawayxt - Stowaway XT\n"); + fprintf (stderr, "\tsnapntype - Snap'n'Type\n"); + fprintf (stderr, "\tsnapntypebt - Snap'n'Type Bluetooth\n"); + fprintf (stderr, "\thpslim - HP Slim keyboard\n"); + fprintf (stderr, "\tsmartbt - Smart Bluetooth keyboard\n"); + fprintf (stderr, "\tlirc - LIRC consumer IR\n"); + fprintf (stderr, "\tbelkinir - Belkin IR (not IrDA)\n"); + fprintf (stderr, "\tflexis - Flexis FX-100 keyboard\n"); + fprintf (stderr, "\tg250 - Benq G250 gamepad\n"); + fprintf (stderr, "\tpocketvik - GrandTec PocketVIK\n"); + fprintf (stderr, "\tmicrofold - Micro Innovations Foldaway keyboard\n"); + fprintf (stderr, "\tmicropad - Micro Innovations Datapad\n"); + fprintf (stderr, "\tmicrokbd - Compaq MicroKeyboard\n"); + fprintf (stderr, "\ttargusir - Targus Universal Wireless keyboard\n"); + fprintf (stderr, "\tbtfoldable - HP iPAQ Bluetooth Foldable Keyboard\n\n"); + fprintf (stderr, "\tfreedom - Freedom keyboard\n"); + fprintf (stderr, "Example:\n\t%s -t foldable\n", arg0); +} + + +#define KBD_TYPE_NONE 0 +#define KBD_TYPE_FOLDABLE 1 +#define KBD_TYPE_SNAPNTYPE 2 +#define KBD_TYPE_STOWAWAY 3 +#define KBD_TYPE_STOWAWAYXT 4 +#define KBD_TYPE_HPSLIM 5 +#define KBD_TYPE_SMARTBT 6 +#define KBD_TYPE_LIRC 7 +#define KBD_TYPE_BELKINIR 8 +#define KBD_TYPE_FLEXIS 9 +#define KBD_TYPE_BENQ_GAMEPAD 10 +#define KBD_TYPE_POCKETVIK 11 +#define KBD_TYPE_MICRO_FOLDAWAY 12 +#define KBD_TYPE_MICRO_DATAPAD 13 +#define KBD_TYPE_COMPAQ_MICROKBD 14 +#define KBD_TYPE_TARGUSIR 15 +#define KBD_TYPE_SNAPNTYPEBT 16 +#define KBD_TYPE_BTFOLDABLE 17 +#define KBD_TYPE_FREEDOM 18 + + +int find_kbd_type(const char *ktype) +{ + if (strncmp("foldable", ktype, 8) == 0) + return KBD_TYPE_FOLDABLE; + else if (strncmp("snapntypebt", ktype, 11) == 0) + return KBD_TYPE_SNAPNTYPEBT; + else if (strncmp("snapntype", ktype, 9) == 0) + return KBD_TYPE_SNAPNTYPE; + else if (strncmp("stowawayxt", ktype, 10) == 0) + return KBD_TYPE_STOWAWAYXT; + else if (strncmp("stowaway", ktype, 8) == 0) + return KBD_TYPE_STOWAWAY; + else if (strncmp("hpslim", ktype, 6) == 0) + return KBD_TYPE_HPSLIM; + else if (strncmp("smartbt", ktype, 7) == 0) + return KBD_TYPE_SMARTBT; + else if (strncmp("flexis", ktype, 6) == 0) + return KBD_TYPE_FLEXIS; + else if (strncmp("lirc", ktype, 4) == 0) + return KBD_TYPE_LIRC; + else if (strncmp("belkinir", ktype, 8) == 0) + return KBD_TYPE_BELKINIR; + else if (strncmp("g250", ktype, 4) == 0) + return KBD_TYPE_BENQ_GAMEPAD; + else if (strncmp("pocketvik", ktype, 9) == 0) + return KBD_TYPE_POCKETVIK; + else if (strncmp("microfold", ktype, 9) == 0) + return KBD_TYPE_MICRO_FOLDAWAY; + else if (strncmp("micropad", ktype, 8) == 0) + return KBD_TYPE_MICRO_DATAPAD; + else if (strncmp("microkbd", ktype, 8) == 0) + return KBD_TYPE_COMPAQ_MICROKBD; + else if (strncmp("targusir", ktype, 8) == 0) + return KBD_TYPE_TARGUSIR; + else if (strncmp("btfoldable", ktype, 10) == 0) + return KBD_TYPE_BTFOLDABLE; + else if (strncmp("freedom", ktype, 7) == 0) + return KBD_TYPE_FREEDOM; + + fprintf(stderr, "unrecognised keyboard type %s\n", ktype); + +return KBD_TYPE_NONE; +} + + +void parse_config(const char *path, int *kbdtype, char port[]) +{ +char *needle; +FILE *fd; +char buf[PATH_MAX]; + + fd = fopen(path, "r"); + if (!fd) { + fprintf(stderr, "could not open config file %s\n", path); + return; + } + + while (!feof(fd)) { + fgets(buf, PATH_MAX, fd); + + if (*buf == '#' || *buf == '\0') { + /* It's a comment or a blank line */ + continue; + } + + if ((needle = strstr(buf, "port:")) != 0) { + needle += 5; + /* Trim whitespaces */ + while (isspace(*needle)) { + needle++; + } + while (isspace(needle[strlen(needle)-1])) { + needle[strlen(needle)-1] = '\0'; + } + strncpy(port, needle, PATH_MAX); + } else if ((needle = strstr(buf, "type:")) != 0) { + needle += 5; + /* Trim whitespaces */ + while (isspace(*needle)) { + needle++; + } + while (isspace(needle[strlen(needle)-1])) { + needle[strlen(needle)-1] = '\0'; + } + *kbdtype = find_kbd_type(needle); + } + } +} + + +int main(int argc, char **argv) +{ +int optc; +int kbdtype=KBD_TYPE_NONE; + + while ((optc = getopt(argc, argv, "c:t:p:dh")) != -1) { + switch ((char)optc) { + case 'h': + print_usage(argv[0]); + exit(1); + break; + case 'd': + debug = 1; + break; + case 't': + kbdtype = find_kbd_type(optarg); + break; + case 'p': + strncpy(TTY_PORT, optarg, PATH_MAX); + break; + case 'c': + parse_config(optarg, &kbdtype, TTY_PORT); + break; + } + } + + if (kbdtype == 0) { + print_usage(argv[0]); + exit(1); + } + + uindev = dev_uinput_init(); + if (uindev <= 0) { + fprintf(stderr, "init uinput failed\n"); + exit (1); + } + + signal(SIGTERM, handle_sigterm); + + if (kbdtype == KBD_TYPE_FOLDABLE) + compaq_foldable(); + else if (kbdtype == KBD_TYPE_BTFOLDABLE) + hp_bt_foldable(); + else if (kbdtype == KBD_TYPE_SNAPNTYPE) + snapntype(); + else if (kbdtype == KBD_TYPE_SNAPNTYPEBT) + snapntypebt(); + else if (kbdtype == KBD_TYPE_STOWAWAY) + stowaway(); + else if (kbdtype == KBD_TYPE_STOWAWAYXT) + stowawayxt(); + else if (kbdtype == KBD_TYPE_HPSLIM) + hpslim(); + else if (kbdtype == KBD_TYPE_SMARTBT) + smartbt(); + else if (kbdtype == KBD_TYPE_FLEXIS) + flexis(); + else if (kbdtype == KBD_TYPE_BENQ_GAMEPAD) + benqgamepad(); + else if (kbdtype == KBD_TYPE_POCKETVIK) + pocketvik(); + else if (kbdtype == KBD_TYPE_MICRO_FOLDAWAY) + micro_foldaway(); + else if (kbdtype == KBD_TYPE_MICRO_DATAPAD) + micro_datapad(); + else if (kbdtype == KBD_TYPE_COMPAQ_MICROKBD) + compaq_microkbd(); + else if (kbdtype == KBD_TYPE_LIRC) +#ifdef USELIRC + lirc(basename(argv[0]); +#else + { + fprintf(stderr, "keyboard type 'lirc' is not supported in this version\n"); + exit(1); + } +#endif + else if (kbdtype == KBD_TYPE_BELKINIR) + belkin_infrared(); + else if (kbdtype == KBD_TYPE_TARGUSIR) + targus_infrared(); + else if (kbdtype == KBD_TYPE_FREEDOM) + freedom_keyboard(); + +return 0; +} diff --git a/mindstab.net_blog/resources/ipaq-hx4700/kbdd b/mindstab.net_blog/resources/ipaq-hx4700/kbdd new file mode 100644 index 0000000..901fb6f Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/kbdd differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/kbdd.conf b/mindstab.net_blog/resources/ipaq-hx4700/kbdd.conf new file mode 100644 index 0000000..5541737 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/kbdd.conf @@ -0,0 +1,6 @@ +# This is the default config file for kbdd +# Only lines starting with "port:" or "type:" are parsed, +# the rest are ignored. + +port: /dev/tts/2 +type: belkinir diff --git a/mindstab.net_blog/resources/ipaq-hx4700/net.sh b/mindstab.net_blog/resources/ipaq-hx4700/net.sh new file mode 100644 index 0000000..5fed02e --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/net.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +ifconfig usb0 up 10.1.0.2 +route add default gw 10.1.0.1 diff --git a/mindstab.net_blog/resources/ipaq-hx4700/profile b/mindstab.net_blog/resources/ipaq-hx4700/profile new file mode 100644 index 0000000..be6025d --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/profile @@ -0,0 +1,26 @@ +# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) +# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). + +if [ "`id -u`" -eq 0 ]; then + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +else + PATH="/usr/local/bin:/usr/bin:/bin:/usr/games" +fi + +if [ "$PS1" ]; then + if [ "$BASH" ]; then + PS1='\u@\h:\w\$ ' + else + if [ "`id -u`" -eq 0 ]; then + PS1='# ' + else + PS1='$ ' + fi + fi +fi + +export PATH + +umask 022 +alias ls='ls --color=auto' +source /etc/profile.ipaq diff --git a/mindstab.net_blog/resources/ipaq-hx4700/profile.ipaq b/mindstab.net_blog/resources/ipaq-hx4700/profile.ipaq new file mode 100644 index 0000000..aac8e85 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/profile.ipaq @@ -0,0 +1,6 @@ +TERM=xterm +USER=root +HOME=/root +PS1="\u@\h \w # " +LOGNAME=root +EDITOR=/usr/bin/vim diff --git a/mindstab.net_blog/resources/ipaq-hx4700/radio11.bin b/mindstab.net_blog/resources/ipaq-hx4700/radio11.bin new file mode 100644 index 0000000..832daaa Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/radio11.bin differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/reflash.ctl b/mindstab.net_blog/resources/ipaq-hx4700/reflash.ctl new file mode 100644 index 0000000..c33f323 --- /dev/null +++ b/mindstab.net_blog/resources/ipaq-hx4700/reflash.ctl @@ -0,0 +1,3 @@ +zImage-2.6.17-hh3 zImage-2.6.17-hh3 - kernel +zImage-2.6.15-hh2 zImage-2.6.15-hh2-ipaq-pxa270 - kernel +bootgpe-v0.8.4-ipaq-pxa270 bootgpe-v0.8.4-ipaq-pxa270.jffs2 - root diff --git a/mindstab.net_blog/resources/ipaq-hx4700/wget b/mindstab.net_blog/resources/ipaq-hx4700/wget new file mode 100644 index 0000000..8287df7 Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/wget differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/wlangen.bin b/mindstab.net_blog/resources/ipaq-hx4700/wlangen.bin new file mode 100644 index 0000000..16c592a Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/wlangen.bin differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/zImage-2.6.15-hh2-ipaq-pxa270 b/mindstab.net_blog/resources/ipaq-hx4700/zImage-2.6.15-hh2-ipaq-pxa270 new file mode 100644 index 0000000..3f8daba Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/zImage-2.6.15-hh2-ipaq-pxa270 differ diff --git a/mindstab.net_blog/resources/ipaq-hx4700/zImage-2.6.17-hh3 b/mindstab.net_blog/resources/ipaq-hx4700/zImage-2.6.17-hh3 new file mode 100644 index 0000000..d479b76 Binary files /dev/null and b/mindstab.net_blog/resources/ipaq-hx4700/zImage-2.6.17-hh3 differ