tag:blogger.com,1999:blog-62738186848314543062024-03-18T11:48:25.542+02:00cat **/*Akshaalhttp://www.blogger.com/profile/05677582369584740657noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6273818684831454306.post-8160793863540759232009-03-22T13:49:00.004+02:002009-03-22T14:41:01.532+02:00CeBootLin - Linux autoloader for WinCE on Loox 5XX (560/550)Here is the "bootloader" for wince to boot linux automatically on startup of PDA. It is not real bootloader because it has nothing to do with boot sectors, it is just a wince program which is able to boot linux as soon as possible. I have implemented it in this way because I didn't want to brick my PDA meddling with boot sectors or something. Also I wanted to have a way to skip loading of linux and let wince load itself. So here we are. It works. The code is based on haret (thanks guys!) but I cut off the parts I not used. Because the laoder uses hardware registers (GPIO/CPLD for leds and keybaord) of Fujitsu Siemens Loox N560/C550, it will not work for other PDAs. When CeBootLin is installed and PDA is turned on, wince begins boot process loading applications defined under the HKEY_LOCAL_MACHINE\init registery key. This way it loads CeBootLin. CeBootLin waits for 1 second, blinking with keyboard led. During the keyboard blinking, user can press any button to stop CeBootLin from loading Linux. If no button has been pressed during keyboard blinking, CeBootLin will search for \CeBootLin\default.txt and use this haret script to load Linux.<br /><br />So, in essence, you should complete the following steps in order to install CeBootLin:<br />1. <a href="http://downloads.akshaal.info/linux-n560-c550/CeBootLin-1.zip?attredirects=0">Download</a> CeBootLin.<ad2></ad2><br />2. Unpack the downloaded archive into the PDA root. The CeBootLin.exe must be reachable with the path \CeBootLin\CeBootLin.exe.<br />3. Place default.txt under the \CeBootLin directory. The default txt might looks like this (if the Andorid is what you are going to load with CeBootLin):<pre><br />set MTYPE 1454<br />set KERNEL "\CeBootLin\zImage"<br />set CMDLINE "root=179:3 mem=62M rootdelay=3 boot_delay=0 init=/init console=tty0 fbcon=rotate:0 androidboot.console=tty0 android.checkjni=1"<br />set RAMADDR 0xA0200000<br />bootlinux<br /></pre><br />4. Place zImage under the directory \CeBootLin\.<br /><a href="http://picasaweb.google.com/lh/photo/11wJSVlZKWbWAN3DhaJXSw?authkey=Gv1sRgCMTt-MKs5cTh6wE&feat=embedwebsite"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdZkRMSUr62jBL1ImUfJijSiLy1sAyMvuJweLyHjt__DZsgJGu3IqK5XugDSAFD9l-l4zwYkF-8SaGBN1MbhWh_3YJ23B4ZGo3nbAyIhIdP1IlmqViNyvkn3I-d-Vw9pPYk3_yyxivlpuZ/s400/CeBootEdit-1.png" /></a><br />5. Modify HKEY_LOCAL_MACHINE\init adding Launch82 ="CeBootLin.exe" and Depend82 = 14 00.<br /><a href="http://picasaweb.google.com/lh/photo/00DSupXz9qiOXs43h5f5cA?authkey=Gv1sRgCMTt-MKs5cTh6wE&feat=embedwebsite"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2MZwhAf19ZPkhV9j-m4gtQF_cMBrMeznzwFzLQii9YHqoEQLPJ2QIoPoWIgLtUmbsYoQGmC8xRLQRHzTwy9OFEujuzUHD8VnPJh0Q5ktDlcnN6x3wrJRYUCU8DU2qXOSmE9Yy5YE0LFZA/s400/CeBootEdit-3.png" /></a><br /><a href="http://picasaweb.google.com/lh/photo/0Rc2C1G2xiQKk5R0RmvaZg?authkey=Gv1sRgCMTt-MKs5cTh6wE&feat=embedwebsite"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3JQlgO-EaIaUIakTQIDY5USc81MrvtjKqNvlzHD-V4FGNw4h5HspvDoC7xL1k1TpHvhnt0kIXfuMvYQtXBIvRDFsJ7oEhjdG9WarTWBdSnylug8LHyxB2I9zGXyw2-HDaCYjm6M92cFyE/s400/CeBootEdit-4.png" /></a><br />6. Modify HKEY_LOCAL_MACHINE\Loader\SystemPath adding a new directory \CeBootLin\ to the multi-string list.<br /><a href="http://picasaweb.google.com/lh/photo/hbLfmcNrlr6RpUPvLX_-5A?authkey=Gv1sRgCMTt-MKs5cTh6wE&feat=embedwebsite"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpiM0VaWjfzE7Bi5tf1yqRESsPgvTNPywQqJID1Kra0bws22Ch58GrCupZo-lPHO4ygmXhyphenhyphenrjO6ABQTE0C08ywidwkle-WHwSpiDRAOFGGc8L2VSK-LJjVQ85oNe4Z2EHuMOHiCuhape5N/s400/CeBootEdit-2.png" /></a><br />7. Wait for 5 minutes (WinCE needs time to persist changes to registry).<br />8. Feel free to reboot your PDA<br /><br />To test that CeBootLin is able to boot linux at all, run CeBootLin.exe manually.<br /><br />It looks little bit complicated but later, setup program might be created to ship automatically bootable Andorid on Loox550. But before, Andorid must be polished.<br /><br /><a href="http://downloads.akshaal.info/linux-n560-c550/CeBootLin-1.tar.gz?attredirects=0">Here</a> is the source code of CeBootLinux. CeBootLinux is licensed with GNU GPL.<ad></ad>Akshaalhttp://www.blogger.com/profile/05677582369584740657noreply@blogger.com10tag:blogger.com,1999:blog-6273818684831454306.post-15534963780288953562009-03-15T16:01:00.004+02:002010-01-26T22:49:23.339+02:00Pictures of Linux and Android on Fujitsu-Siemens Loox N560<a href="http://picasaweb.google.com/lh/photo/CUrNwUv_XICGqKQKeMx6rA?authkey=Gv1sRgCMTt-MKs5cTh6wE&feat=embedwebsite"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHPipxiFLXQ3xA743U47IXU9nsVCefgZ6PkBymR9Slh8R4zp_OxWYogjirzfPkFNXwxAcVaRG24YK41gGn_b5Teiz5Q4c2kHRe22nVyG4nUhuketzY80Eq-vN05xt43ypMj55bmjR3IFHb/s400/n560-1s.jpg" /></a><br />Today the desteny of WM5 is only to be replaced with Linux<br /><br /><a href="http://picasaweb.google.com/lh/photo/Wdt450DQpEcjKa1aIu3iUA?authkey=Gv1sRgCMTt-MKs5cTh6wE&feat=embedwebsite"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Le3lTgew4AIitvwoxRLGr5jN4qeqbuZLlD1pfpZjH2BWk1bnmtPjRGY06TPgop4floQgz4d7T0ypVo1CidHyzvsew5TQgFC8V8wNPn-HHxSo6nFLBD4dm8z4x5GjJA66ewNmyK1oqzYQ/s400/n560-2s.jpg" /></a><br />Haret.. all you need is to press Run<br /><br /><a href="http://picasaweb.google.com/lh/photo/LQ7LXZhb1hXw6cwFARC4pg?authkey=Gv1sRgCMTt-MKs5cTh6wE&feat=embedwebsite"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlozCBxeDrqz9830_QbHaFo8LYsPSVMfPVX8OkHm5EDtV4XNzNGyxxvGTiFiSVbnlrNHlfJxFQfIKdcMi8MCdUUhxJ0jFayy5tc3duNbGf0U15jwKKqIhlLjTbujUyze8f-EFzlZAg-dnC/s400/n560-3s.jpg" /></a><br />Android on Loox N560<br /><br /><a href="http://picasaweb.google.com/lh/photo/K2EytIW2FJWybumV11UTRg?authkey=Gv1sRgCMTt-MKs5cTh6wE&feat=embedwebsite"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOvmMjWCSe0-jN7MRxqKGadD47YvQYMYoTeyAp8CLJdSUzrIbDNn2fAt-w-FNAilCIpearZx66_aqIQSVPCGUBG1MbJxtAVqEmt3TIkYW2F-D9XBR1n8pe23RKy5lEFrHZZ4am1KKQH_Rb/s400/n560-4s.jpg" /></a><br /><a href="http://www.akshaal.info/2009/03/install-emdebian-on-arm-device.html">Installation of debian</a> on Loox N560<br /><br /><a href="http://picasaweb.google.com/lh/photo/ReuuEUcxhZ4y-Es7lRGneQ?authkey=Gv1sRgCMTt-MKs5cTh6wE&feat=embedwebsite"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-6d-XniFGV7jx94znOxlRg-IvxPhHIWAdr7EH4bYrhvQcidLbdGgb2h9-J-VokNJLJ-86sDHr0CAoovBf2sLMqwhcVnUTevuzsF6mxGs1pXMAkAGPjn_G7o-G9XIaoZMyog1CoQxiVUMQ/s400/n560-5s.jpg" /></a><ad></ad><br /><a href="http://www.akshaal.info/2009/03/install-emdebian-on-arm-device.html">Installation of debian</a> on Loox N560Akshaalhttp://www.blogger.com/profile/05677582369584740657noreply@blogger.com21tag:blogger.com,1999:blog-6273818684831454306.post-45732315800437811542009-03-15T15:05:00.003+02:002009-03-15T15:28:00.981+02:00Memory tester for Loox N560/C550Recently I've created a way to test memory for defects on Fujitsu-Siemens Loox N560/C550. Only one who upgraded (or wants to upgrade) PDA's memory from 64M to 128M needs this utility. Using this "util" it is possible to test memory immediately right after memory has been upgraded, without re-flushing WM5/WM6.<br /><br />So do the following to test your PDA's memory:<br />1. Download either <a href="http://downloads.akshaal.info/other-soft-for-pda">LooxMem128-v0.zip</a> (to test 128Mb of memory) or <a href="http://downloads.akshaal.info/other-soft-for-pda">LooxMem64-v0.zip</a> (to test 64Mb of memory).<br />2. Unpack the downloaded archive onto SD.<br />3. Insert SD into your Loox and reboot it.<br />4. Don't let PDA fall asleep, start haret.exe which is in the directory where unpacked the archive to.<br />5. When haret.exe is started press Run.<br />6. Read the caution when Linux is booted.<br />7. Make up your mind and then either press RESET (insert a stylus into a hole on the bottom side of the PDA, if you don't want to test memory) or press enter..<ad2></ad2><br />WARNING: Poor memory chips might be damaged during the test (that is why you want to test your PDA's memory, isn't it?). None will be responsible for your actions except yourself!!<br /><br />Note: You have to press any button during the testing process once per 5 or so minutes.<br />(<i>In a case you need to port the utility on the other platform (not Loox C550/N560) the only thing you have to do is to replace zImage and modify default.txt to let the linux for your platform boot on the target device).</i>)<ad2></ad2>Akshaalhttp://www.blogger.com/profile/05677582369584740657noreply@blogger.com0tag:blogger.com,1999:blog-6273818684831454306.post-20849940761418588312009-03-14T20:36:00.004+02:002009-03-14T21:22:42.397+02:00Linux Kernel for Fujitsu-Siemens Loox N560/C550 with support for CPLD and builtin ledsI've implemented support for CPLD and leds. htc-gpio driver is used with a custom list of CPLD registers/resources for Fujitsu-Siemens Loox 5XX (N560/C550). Now CPLD interface is available for all other drivers (existing and planned) of the linux/android kernel.<br /><br />It is interesting how CPLD is implemented in the linux kernel. Actually CPLD is a chip that supports very simple custom logic (and that is the reason why it is much faster than CPU). CPLD chip has a set of input pins and output pins. All these pins are mapped to a region of memory address space. The most important work with CPLD is that modifying values of pins to control devices. This is done setting a value to 0 or 1. In fact, programming of GPIO (general purpose input/output of CPU) is done in the same way: a programmer writes code that sets a GPIO pin to either 0 or 1. Linux kernel already has support for GPIO which provides a set of functions for platform drivers. In addition, GPIO driver provides a way to map any virtual GPIO pin to some custom code that is responsible for handling of setters and getters for the mapped pins. And indeed, that is how htc-egpio driver does the job. The driver leverages gpiolib mapping CPLD registers to GPIO pins. Thanks to this approach, no addition functions are required to work with CPLD. It is enough to use gpio_set_value/.. methods.<ad2></ad2><br />After the CPLD driver had been implemented, it was possible to implement a driver for the leds of Loox N560/C550. The leds driver, I implemented, exports a set of functions that other drivers (wifi, gps, bluetooth, pm, ...) are supposed to use to control the leds. Also, the leds driver makes it possible to control the leds from userspace (shell scripts, java program, ...) using files under sysfs filesystem.<br /><br />The following is the list of files exported by the leds driver and the possible content values for the each file:<br /><b>/sys/devices/platform/loox5xx-leds.1/keyboard</b>: on, off, any<br />- backlight for keyboard<br /><br /><b>/sys/devices/platform/loox5xx-leds.1/left_green</b>: on, off, any<br />- green led on the left side. WM5 indicates WiFi activity with this led<br /><br /><b>/sys/devices/platform/loox5xx-leds.1/left_blue</b>: on, off, any<br />- blue led on the left side. WM5 indicates Bluetooth activity with this led<br /><br /><b>/sys/devices/platform/loox5xx-leds.1/left_orange</b>: on, off, any<br />- orange led on the left side. WM5 indicates GPS activity with this led on Loox N560<br /><br /><b>/sys/devices/platform/loox5xx-leds.1/right_green</b>: on, off, any<br />- green led on the right side. WM5 allows programs to control this led using winapi.<br /><br /><b>/sys/devices/platform/loox5xx-leds.1/right_orange</b>: on, off, blink, any<br />- orange led on the left side. WM5 indicates charging activity with this led<br /><br />Where:<br /><b>on</b> - the led is on regardless of the kernel activity,<br /><b>off</b> - the led is off regardless of the kernel activity,<br /><b>blink</b> - the led is blinking regardless of the kernel activity,<br /><b>any</b> - the led is controlled by the kernel.<br /><br />For instance, if the content of the right_orange file is set to 'on', then the orange led (on right side of PDA) will be on no matter what you do: plug or unplug your device to/from a cradle. The driver will hold on the state of the led until, you write 'any' into the file right_orange. With 'any' value in file, the first 'power' event will change state of the led. The interface of the driver makes it possible to implement any notification (low battery, new mail..) effects you can imagine involving all leds of the device. The following script demonstrates how to blink with the keyboard backlight led:<pre><br />while true;<br /> do echo on > /sys/devices/platform/loox5xx-leds.1/keyboard;<br /> sleep 0.1;<br /> echo off > /sys/devices/platform/loox5xx-leds.1/keyboard;<br /> sleep 0.1;<br /> # Condition for break...<br />done<br />echo any > /sys/devices/platform/loox5xx-leds.1/keyboard;</pre><br />The current patch for the android cupcake kernel is located <a href="http://downloads.akshaal.info/linux-n560-c550/c550-android-kernel-2009-03-14.patch.gz?attredirects=0">here</a>.<br /><ad></ad>Akshaalhttp://www.blogger.com/profile/05677582369584740657noreply@blogger.com1tag:blogger.com,1999:blog-6273818684831454306.post-82714583204525958002009-03-08T12:56:00.004+02:002009-03-08T13:29:41.873+02:00Linux Kernel for Fujitsu-Siemens Loox N560/C550 with usbnet workingAfter 3 days of struggle I am finally able to build a linux kernel for my PDA Fujitsu-Siemens Loox N560. The kernel has been downloaded from <a href="http://www.asm32.ru">http://www.asm32.ru</a> and patched (pxa27x_udc.c) to support for usbnet (host-to-PDA networking through a usb coard). Also I've made a diff file with differences between the current cupcake kernel and the kernel (by date 02-mar-2009) from asm32.ru site. That will be useful later when I need to apply support for Loox to a new upstream cupcake kernel. <a href="http://downloads.akshaal.info/linux-n560-c550/c550-android-kernel-2009-03-07.patch.gz?attredirects=0">Here is the patch</a> which also includes support for usbnet on Loox C550/N560. The patch already contains a kernel configuration file (.config), but usbnet support is not enabled there. <a href="http://downloads.akshaal.info/linux-n560-c550/linux-config-2009-03-07?attredirects=0">Here is the other .config file</a> which is differ from that included in the patch by supporting usbnet, having power management switched off and configuration for larger fonts in console.<br /><br />It is possible to build the kernel with any toolchain for arm of your choice. I've tried crosstool-ng, emdebian and the one that is included in the android repo. I have decided to leverage emdebian toolchain for I use debian on my PC. The following is the command to build the kernel using emdebian toolchain:<pre>make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-</pre>Of course you have to have emdebian toolchain installed. You can install emdebian something like it is shown below:<pre><br />apt-get install emdebian-tool<br />emsetup --arch arm</pre>Then add:<pre><br />deb http://www.emdebian.org/debian/ unstable main</pre><br />into your /etc/apt/sources.list and run:<br /><pre>apt-get install linux-kernel-headers-arm-cross gcc-4.2-arm-linux-gnu</pre><br />When the kernel is built and ready you can copy it on an SD card and run it with haret with the following default.txt:<pre><br />set MTYPE 1454<br />set KERNEL zImage<br />set CMDLINE "root=179:2 mem=60M rootdelay=3 boot_delay=0 init=/init console=tty0 fbcon=rotate:0 androidboot.console=tty0 android.checkjni=1"<br />set RAMADDR 0xA0200000<br />bootlinux</pre><ad></ad>That is important! When you've placed zImage on an SD card, you will insert the card in your PDA. And then you must reboot your PDA! And only after you have rebooted your PDA with the SD card inside, you should ask haret to boot linux. That is very important because a linux kernel will not be loaded correctly (or it will but with only 10% chances) if one of the following conditions is true:<br />1. PDA has fallen asleep or suspended.<br />2. You have just inserted an SD card in your PDA and not rebooted it yet.<br />It looks like it is a bug in wince...<br /><br />P.S. There you can download cupcake kernel <a href="http://source.android.com/download"> http://source.android.com/download</a><br /><br />P.P.S. When you build kernel with usbnet, don't set CONFIG_USB_ETH_RNDIS to 'y'! Or your PC kernel (2.6.x) will not find your PDA... neither cdc_ether nor cdc_subset will claim your PDA.Akshaalhttp://www.blogger.com/profile/05677582369584740657noreply@blogger.com5