<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8939125534858322326</id><updated>2012-02-17T04:53:49.511+02:00</updated><category term='apache'/><category term='linux'/><category term='macos'/><category term='search engines'/><category term='wifi'/><category term='web'/><category term='apple'/><category term='programming'/><category term='gingerbread'/><category term='libc'/><category term='games'/><category term='u-boot'/><category term='lcdproc'/><category term='misc'/><category term='visual studio'/><category term='android'/><category term='wpa_supplicant'/><category term='hacks'/><category term='python'/><category term='kernel'/><category term='microsoft'/><category term='picolcd'/><category term='qt'/><category term='ubuntu'/><category term='atmel'/><category term='qmake'/><title type='text'>PaNiC Random Rant (or how we used to call it: .plan)</title><subtitle type='html'>Mostly Linux ...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-8681186767728136646</id><published>2011-11-29T16:53:00.001+02:00</published><updated>2011-12-12T12:37:46.274+02:00</updated><title type='text'>Android patches for kernel 3.1</title><content type='html'>Patches are available as either 1 big file or broken down. Patches were tested and found working under Android Gingerbread 2.3.4. &lt;br&gt;To activate adb add these lines in init.rc (or init.rc.&lt;platform&gt;) before &lt;i&gt;class_start default&lt;/i&gt;:&lt;br&gt;&lt;code&gt;# New ADB setup for kernel 3.1                                                                                                                                                                                     write /sys/class/android_usb/android0/enable 0                                                                                                                                                                 write /sys/class/android_usb/android0/functions adb                                                                                                                                                            write /sys/class/android_usb/android0/enable 1          &lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://www.linuxconsulting.ro/android/patches/kernel-3.1/big/"&gt;Single patch&lt;/a&gt;&lt;br&gt;&lt;a href="http://www.linuxconsulting.ro/android/patches/kernel-3.1/broken-down/"&gt;Broken down patches&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-8681186767728136646?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/8681186767728136646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=8681186767728136646' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/8681186767728136646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/8681186767728136646'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2011/11/android-patches-for-kernel-31.html' title='Android patches for kernel 3.1'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-502601600950404869</id><published>2011-06-20T15:02:00.011+03:00</published><updated>2011-06-20T15:09:37.874+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Ethernet patch for Android Gingerbread</title><content type='html'>Finished porting the ethernet patch from android-x86 froyo branch to gingerbread and made them available on picopc android gingerbread repository here:&amp;nbsp;&lt;a href="https://gitorious.org/picopc-android-gingerbread"&gt;https://gitorious.org/picopc-android-gingerbread&lt;/a&gt;&amp;nbsp;(see the commits in &lt;a href="https://gitorious.org/picopc-android-gingerbread/frameworks-base/commit/ea2dad5bba9f6313f63b10affc9ea0b3cf3cdeba"&gt;frameworks-base&lt;/a&gt;, &lt;a href="https://gitorious.org/picopc-android-gingerbread/build/commit/bf8a4b817c2fa0ec2fea2bff266681811c00225f"&gt;build&lt;/a&gt; and &lt;a href="https://gitorious.org/picopc-android-gingerbread/packages-apps-settings/commit/c448eacc868779eecbe6cdf901f2e72edf254a3c"&gt;packages-apps-settings&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Changes from the android-x86 version:&lt;br /&gt;- fixed static ip not being correctly setup&lt;br /&gt;- added new icons for status bar&lt;br /&gt;- changed status bar policy code&lt;br /&gt;&lt;br /&gt;Remember to add dhcpcd_eth0 service in init.rc:&lt;br /&gt;&lt;codei&gt;&lt;br /&gt;service dhcpcd_eth0 /system/bin/dhcpcd -BKL -d eth0 -dd&lt;br /&gt;group system dhcp&lt;br /&gt;disabled&lt;br /&gt;oneshot&lt;br /&gt;&lt;/codei&gt;&lt;br /&gt;&lt;br /&gt;Direct download links to the patches:&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro/android/patches/picopc-build.git-add-ethernet.patch"&gt;patch /build repository&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro/android/patches/picopc-frameworks-base.git-add-ethernet-support-to-android.patch"&gt;patch frameworks/base repository&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro/android/patches/picopc-packages-apps-settings.git-add-ethernet-support.patch"&gt;patch /packages/apps/Settings repository&lt;/a&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-502601600950404869?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/502601600950404869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=502601600950404869' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/502601600950404869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/502601600950404869'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2011/06/ethernet-patch-for-android-gingerbread.html' title='Ethernet patch for Android Gingerbread'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-3678153858925905584</id><published>2011-05-18T09:43:00.015+03:00</published><updated>2011-05-24T11:14:57.139+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gingerbread'/><category scheme='http://www.blogger.com/atom/ns#' term='wifi'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android 2.3.4 gingerbread updated wireless patches</title><content type='html'>Updated wpa_supplicant_6 patch with google private ioctls emulated and other fixes (like no scan results showing issue):&lt;br /&gt;&lt;br /&gt;&lt;a href="https://gitorious.org/picopc-android-gingerbread/external-wpa_supplicant_6/commit/5f5c50d722eedaedd75c1698b79f464310ce6478?format=patch"&gt;https://gitorious.org/picopc-android-gingerbread/external-wpa_supplicant_6/commit/5f5c50d722eedaedd75c1698b79f464310ce6478?format=patch&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Updated patch to use built-in kernel wifi drivers for android:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://gitorious.org/picopc-android-gingerbread/hardware-libhardware_legacy/commit/6bc330e05f5f69e9352e52451f93ca69cfa44d48?format=patch"&gt;https://gitorious.org/picopc-android-gingerbread/hardware-libhardware_legacy/commit/6bc330e05f5f69e9352e52451f93ca69cfa44d48?format=patch&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Patch to prevent enabling of the wifi when no device or driver present:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://gitorious.org/picopc-android-gingerbread/hardware-libhardware_legacy/commit/b7c12215f7aa2176c4636306adcabf1e95624005"&gt;https://gitorious.org/picopc-android-gingerbread/hardware-libhardware_legacy/commit/b7c12215f7aa2176c4636306adcabf1e95624005&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Patch to fix the crash(sigbus on armv5) when starting bluetooth:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://review.source.android.com/#change,22734"&gt;https://review.source.android.com/#change,22734&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-3678153858925905584?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/3678153858925905584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=3678153858925905584' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/3678153858925905584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/3678153858925905584'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2011/05/android-234-gingerbread-updated-wifi.html' title='Android 2.3.4 gingerbread updated wireless patches'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-7825643526087282750</id><published>2010-08-11T11:39:00.009+03:00</published><updated>2011-05-19T09:28:17.469+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpa_supplicant'/><category scheme='http://www.blogger.com/atom/ns#' term='wifi'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Porting WiFi drivers to Android</title><content type='html'>&lt;i&gt;Update(19/05/2011): Verify validity against Gingerbread.&lt;/i&gt;&lt;br /&gt;&lt;i&gt; Update (11/08/2010): Updated patch to fix the loading of awext driver at run time. &lt;br /&gt;Added STOP and RESTART commands. &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;For &lt;a href="http://www.mini-box.com/pico-SAM9G45-X"&gt; mini-box.com picoPC &lt;/a&gt;  we want to support several USB and miniPCI WiFi dongles, this guide provides a step by step explanation of what's involved in adding a new wifi driver and making wifi work in a custom Android build &amp;nbsp;(this guide was written for android 2.1 but should be applicable to previous android releases and hopefully future releases). &lt;br /&gt;&lt;b&gt; Contents&lt;/b&gt;&lt;br /&gt;0. Understand how Android WiFi works. &lt;br /&gt;1. Enable building of wpa_supplicant in your BoardConfig.mk &lt;br /&gt;2. (Optional) Enable debug for wpa_supplicant. &lt;br /&gt;3. Provide a proper wpa_supplicant.conf for your device  &lt;br /&gt;4. Have the correct paths and permissions created from init.rc &lt;br /&gt;5. Make sure your wpa_supplicant and dhcpcd (optional) are starting from init.rc&amp;nbsp;  &lt;br /&gt;6. Provide your driver either as a module or built in kernel and proper kernel support for it and modify Android source code accordingly. &lt;br /&gt;7. Provide a firmware if your module needs it. &lt;br /&gt;8. Make your driver work with Android custom wpa_supplicant commands and SIOCSIWPRIV ioctl &lt;br /&gt;&lt;br /&gt;Now onto details. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; 0. Understand how Android WiFi works.&lt;/b&gt;&lt;br /&gt;Android uses a modified &lt;i&gt; wpa_supplicant&lt;/i&gt;  (&lt;file&gt; external/wpa_supplicant&lt;/file&gt; ) daemon for wifi support which is controlled through a socket by  &lt;file&gt; hardware/libhardware_legacy/wifi/wifi.c &lt;/file&gt;  (WiFiHW) that gets controlled from Android UI through  &lt;i&gt; android.net.wifi &lt;/i&gt;  package from  &lt;file&gt; frameworks/base/wifi/java/android/net/wifi/ &lt;/file&gt;  and it's corresponding jni implementation in  &lt;file&gt; frameworks/base/core/jni/android_net_wifi_Wifi.cpp &lt;/file&gt;  Higher level network management is done in  &lt;file&gt; frameworks/base/core/java/android/net &lt;/file&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; 1. Enable building of wpa_supplicant in your BoardConfig.mk&lt;/b&gt;&lt;br /&gt;This is by simply adding: &lt;codei&gt; BOARD_WPA_SUPPLICANT_DRIVER := WEXT&lt;/codei&gt; to your &lt;file&gt; BoardConfig.mk&lt;/file&gt; . This will set&amp;nbsp;&lt;codei&gt; WPA_BUILD_SUPPLICANT&lt;/codei&gt; to true in &lt;file&gt;external/wpa_supplicant/Android.mk&lt;/file&gt;  enabling building of &lt;file&gt; driver_wext.c&lt;/file&gt;&lt;br /&gt;If you have a custom wpa_supplicant driver (like madwifi or my custom android private commands emulation - see last paragraph) you can replace WEXT with AWEXT or your driver name (MADWIFI, PRISM etc). &lt;br /&gt;&lt;br /&gt;&lt;b&gt; 2. (Optional) Enable debug for wpa_supplicant. &lt;/b&gt; &lt;br /&gt;By default wpa_supplicant is set to  &lt;codei&gt; MSG_INFO &lt;/codei&gt;  that doesn't tell much. &lt;br /&gt;To enable more messages:  &lt;br /&gt;&amp;nbsp; 2.1 modify  &lt;file&gt; common.c &lt;/file&gt;  and set  &lt;codei&gt; wpa_debug_level = MSG_DEBUG &lt;/codei&gt;  &lt;br /&gt;&amp;nbsp; 2.2 modify  &lt;file&gt; common.h &lt;/file&gt;  and change  &lt;codei&gt; #define wpa_printf &lt;/codei&gt; from &lt;codei&gt; if ((level) &amp;gt;= MSG_INFO) &lt;/codei&gt;  to  &lt;codei&gt; if ((level) &amp;gt;= MSG_DEBUG) &lt;/codei&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt; 3. Provide a proper wpa_supplicant.conf for your device &lt;/b&gt; &lt;br /&gt;Providing a wpa_supplicant.conf it's important because the control socket for android is specified in this file (ctrl_interface= ). This file should be copied by your  &lt;file&gt; AndroidBoard.mk &lt;/file&gt;  to  &lt;codei&gt; $(TARGET_OUT_ETC)/wifi &lt;/codei&gt;  (usually  &lt;file&gt; /system/etc/wifi/wpa_supplicant.conf &lt;/file&gt; ). This location will be used on wpa_supplicant service from init.rc.  &lt;br /&gt;There are two different ways in which wpa_supplicant can be configured, one is to use a "private" socket in android namespace, created by  &lt;codei&gt; socket_local_client_connect() &lt;/codei&gt;  function in  &lt;file&gt; wpa_ctrl.c &lt;/file&gt;  and another is by using a standard unix socket. &lt;br /&gt;&lt;br /&gt;Minimum required config options in wpa_supplicant.conf : &lt;br /&gt;&lt;b&gt; - Android private socket &lt;/b&gt; &lt;br /&gt;&lt;codei&gt; &lt;br /&gt;ctrl_interface=wlan0 &lt;br /&gt;update_config=1 &lt;br /&gt;&lt;/codei&gt; &lt;br /&gt;&lt;b&gt; - Unix standard socket &lt;/b&gt;&lt;br /&gt;&lt;codei&gt;&lt;br /&gt;ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi &lt;br /&gt;update_config=1 &lt;br /&gt;&lt;/codei&gt; &lt;br /&gt;&lt;br /&gt;Depending on your driver you might also want to add: &lt;br /&gt;ap_scan=1 &lt;br /&gt;&lt;br /&gt;If you have AP association problems with should change to  &lt;codei&gt; ap_scan=0 &lt;/codei&gt;  to let the driver do the association instead of wpa_supplicant. &lt;br /&gt;If you want to let wpa_supplicant connect to non-WPA or open wireless networks (by default it skips these kind) add: &lt;br /&gt;&lt;br /&gt;&lt;codei&gt;        &lt;br /&gt;network={ &lt;br /&gt;key_mgmt=NONE &lt;br /&gt;} &lt;br /&gt;&lt;/codei&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; 4. Have the correct permissions and paths created from init.rc &lt;/b&gt; &lt;br /&gt;Incorrect permisions will result in wpa_supplicant not being able to create/open the control socket and  &lt;file&gt; libhardware_legacy/wifi/wifi.c &lt;/file&gt;  won't connect. &lt;br /&gt;Since Google modified wpa_supplicant to run as  &lt;b&gt; wifi &lt;/b&gt;  user/group the directory structure and file ownership should belong to wifi user/group (see  &lt;codei&gt; os_program_init() &lt;/codei&gt;  function in  &lt;file&gt; wpa_supplicant/os_unix.c &lt;/file&gt; ).&lt;br /&gt;&lt;br /&gt;Otherwise errors like: &lt;br /&gt;E/WifiHW&amp;nbsp; (&amp;nbsp; ): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory will appear. &lt;br /&gt;&lt;br /&gt;Also wpa_supplicant.conf should belong to wifi user/group because wpa_supplicant will want to modify this file. If your system has /system as read-only use a location like /data/misc/wifi/wpa_supplicant.conf and modify wpa_supplicant service in init.rc with new location. &lt;br /&gt;Make sure the paths are correctly created in init.rc: &lt;br /&gt;&lt;br /&gt;&lt;codei&gt;&lt;br /&gt;mkdir /system/etc/wifi 0770 wifi wifi  &lt;br /&gt;chmod 0770 /system/etc/wifi &lt;br /&gt;chmod 0660 /system/etc/wifi/wpa_supplicant.conf &lt;br /&gt;chown wifi wifi /system/etc/wifi/wpa_supplicant.conf &lt;br /&gt;#wpa_supplicant control socket for android wifi.c (android private socket) &lt;br /&gt;mkdir /data/misc/wifi 0770 wifi wifi &lt;br /&gt;mkdir /data/misc/wifi/sockets 0770 wifi wifi &lt;br /&gt;chmod 0770 /data/misc/wifi &lt;br /&gt;chmod 0660 /data/misc/wifi/wpa_supplicant.conf &lt;br /&gt;chown wifi wifi /data/misc/wifi &lt;br /&gt;chown wifi wifi /data/misc/wifi/wpa_supplicant.conf &lt;br /&gt;&lt;/codei&gt; &lt;br /&gt;&lt;br /&gt;If you use a &lt;b&gt;  Unix standard socket &lt;/b&gt;  in wpa_supplicant.conf (see above) add: &lt;br /&gt;&lt;codei&gt;&lt;br /&gt;# wpa_supplicant socket (unix socket mode) &lt;br /&gt;mkdir /data/system/wpa_supplicant 0771 wifi wifi &lt;br /&gt;chmod 0771 /data/system/wpa_supplicant &lt;br /&gt;chown wifi wifi /data/system/wpa_supplicant &lt;br /&gt;&lt;/codei&gt;       &lt;br /&gt;Do not add these if you use Android private socket because it will make wpa_supplicant non-functional, because  &lt;file&gt; hardware/libhardware_legacy/wifi/wifi.c check for existence of the  &lt;file&gt; /data/system/wpa_supplicant &lt;/file&gt;  folder and will pass a wrong interface name to  &lt;codei&gt; wpa_ctrl_open() &lt;/codei&gt;  function. &lt;/file&gt;   &lt;br /&gt;&lt;br /&gt;&lt;b&gt; 5. Make sure your wpa_supplicant and dhcpcd are starting from init.rc &lt;/b&gt; &lt;br /&gt;&lt;br /&gt;For wpa_supplicant the init.rc startup like should be depending on which path you chosen:  &lt;br /&gt;&lt;b&gt; - Android private socket: &lt;/b&gt; &lt;br /&gt;&lt;codei&gt;&lt;br /&gt;service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -iwlan0 -c /system/etc/wifi/wpa_supplicant.conf &lt;br /&gt;socket wpa_wlan0 dgram 660 wifi wifi &lt;br /&gt;group system wifi inet &lt;br /&gt;disabled &lt;br /&gt;oneshot &lt;br /&gt;&lt;/codei&gt; &lt;br /&gt;&lt;b&gt; - Unix standard socket: &lt;/b&gt; &lt;br /&gt;&lt;codei&gt;&lt;br /&gt;service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -iwlan0 -c /system/etc/wifi/wpa_supplicant.conf &lt;br /&gt;group system wifi inet &lt;br /&gt;disabled &lt;br /&gt;oneshot &lt;br /&gt;&lt;/codei&gt;  &lt;br /&gt;If your wifi driver creates a wifi interface with other name than  &lt;codei&gt; wlan0 &lt;/codei&gt;  you will have to modify the above line accordingly. &lt;br /&gt;You also should have dhcpcd starting from init.rc &lt;br /&gt;&lt;codei&gt;&lt;br /&gt;service dhcpcd /system/bin/dhcpcd wlan0 &lt;br /&gt;group system dhcp &lt;br /&gt;disabled &lt;br /&gt;oneshot &lt;br /&gt;&lt;/codei&gt;     &lt;br /&gt;&lt;br /&gt;Newer AOSP versions after Gingerbread use dhcpcd_wlan0 as service name.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; 6. Provide your driver either as a module or built in kernel and proper kernel support for it. &lt;/b&gt; &lt;br /&gt;&amp;nbsp;First make sure that&amp;nbsp;  &lt;span class="code" dir="ltr"&gt; CONFIG_PACKET and CONFIG_NET_RADIO&lt;/span&gt; (wireless extensions)   &amp;nbsp;are enabled in your kernel. The driver can be built as module (default android way) or built in kernel (if you want to rely in kernel auto probing to support multiple driver eg. USB wifi) but will require source code modifications (see below).  &lt;br /&gt;&lt;b&gt; &amp;nbsp;- As kernel module: &lt;/b&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; Define in your  &lt;file&gt; BoardConfig.mk &lt;/file&gt; : &lt;br /&gt;&amp;nbsp;&amp;nbsp; 1.  &lt;codei&gt; WIFI_DRIVER_MODULE_PATH :=  &lt;/codei&gt;  path to the module to be loaded &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You need to specify module name in that path too, usually should look something like /system/lib/modules/wlan.ko &lt;br /&gt;&amp;nbsp;&amp;nbsp; 2.&amp;nbsp;  &lt;codei&gt; WIFI_DRIVER_MODULE_NAME:= &lt;/codei&gt;  the name of the network interface  that the driver creates, for example wlan0  &lt;br /&gt;&amp;nbsp;&amp;nbsp; 3.  &lt;codei&gt; WIFI_DRIVER_MODULE_ARG:= &lt;/codei&gt;  any arguments that you want to pass to the driver on insmod, for example nohwcrypt &lt;br /&gt;&amp;nbsp;&amp;nbsp;  &lt;br /&gt;&amp;nbsp;&amp;nbsp; Make sure you copy your kernel module when building android to the correct location.  &lt;br /&gt;&lt;b&gt; - As built in kernel: &lt;/b&gt; &lt;br /&gt;&amp;nbsp; - First  &lt;file&gt; init.rc &lt;/file&gt;  needs to be modified to inform  &lt;file&gt; hardware/libhardware_legacy/wifi/wifi.c &lt;/file&gt;  about the name of the interface, that the driver&amp;nbsp; is already loaded and set the status of wpa_supplicant to running:  &lt;br /&gt;&lt;codei&gt;&lt;br /&gt;setprop wifi.interface "wlan0" &lt;br /&gt;setprop wlan.driver.status "ok" &lt;br /&gt;&lt;/codei&gt; &lt;br /&gt;&lt;br /&gt;Do  &lt;b&gt; NOT &lt;/b&gt;  add  &lt;codei&gt; setprop init.svc.wpa_supplicant "running" &lt;/codei&gt;  as I previously mentioned as it will prevent wpa_supplicant from starting from init. &lt;br /&gt;&amp;nbsp;- Secondly   &lt;file&gt; hardware/libhardware_legacy/wifi/wifi.c &lt;/file&gt;  need to be modified so the functions  &lt;codei&gt; insmod() &lt;/codei&gt;  and  &lt;codei&gt; rmmod() &lt;/codei&gt;   &lt;codei&gt; return 0 &lt;/codei&gt;  (simply add  &lt;codei&gt; return 0; &lt;/codei&gt;  as the first line in functions since they are not needed when driver is built in kernel) and return before checking for  &lt;file&gt; /proc/modules &lt;/file&gt;  in&amp;nbsp;  &lt;codei&gt; check_driver_loaded() &lt;/codei&gt;  function. &lt;br /&gt;You might encounter problems with WifiHW module not being able to connect to wpa_supplicant socket even with the correct permisions. Try to turn off / turn on Wifi from the GUI. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; &amp;nbsp;7. Provide a firmware if your driver needs it &lt;/b&gt; &lt;br /&gt;&lt;br /&gt;If your driver needs a firmware you will have to copy this firmware file to  &lt;file&gt; /etc/firmware &lt;/file&gt;  on your android build. Android doesn't use a standard hotplug binary (although there is an implementation available on  &lt;a href="http://www.android-x86.org/"&gt; android-x86 &lt;/a&gt;   &lt;file&gt; system/code/toolbox/hotplug.c &lt;/file&gt; ) instead the init process takes care of firmware events and loads the firmware file from  &lt;file&gt; /etc/firmware &lt;/file&gt;  (see:  &lt;file&gt; system/core/init/devices.c  &lt;/file&gt;   &lt;codei&gt; handle_firmware_event() &lt;/codei&gt;  function). &lt;br /&gt;Firmware file name is defined by the driver and might also contain a folder like: RTL8192SU/rtl8192sfw.bin, entire file path should be available in  &lt;file&gt; /etc/firmware &lt;/file&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; 8. Make your driver work with Android custom wpa_supplicant commands and SIOCSIWPRIV ioctl. &lt;/b&gt; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;Android uses  &lt;codei&gt; SIOCSIWPRIV &lt;/codei&gt;  ioctl to send commands to modify driver behaviour  and receive information like signal strength, mac address of the AP, link speed etc. This ioctl is usually not implemented in any known wireless drivers except bcm4329 which is in google  &lt;a href="http://android.git.kernel.org/?p=kernel/msm.git;a=tree;f=drivers/net/wireless/bcm4329;h=a10842ca196951bc3399a8fa4cff09dce4ac305f;hb=refs/heads/android-msm-2.6.32"&gt; msm kernel branch &lt;/a&gt; . &lt;br /&gt;The errors from not having this ioctl implemented will look like: &lt;br /&gt;E/wpa_supplicant(&amp;nbsp; ): wpa_driver_priv_driver_cmd failed wpa_driver_priv_driver_cmd RSSI len = 4096&amp;nbsp; &lt;br /&gt;E/wpa_supplicant(&amp;nbsp; ): wpa_driver_priv_driver_cmd failed&amp;nbsp; &lt;br /&gt;D/wpa_supplicant(&amp;nbsp; ): wpa_driver_priv_driver_cmd LINKSPEED len = 4096 &lt;br /&gt;E/wpa_supplicant(&amp;nbsp; ): wpa_driver_priv_driver_cmd failed&amp;nbsp; &lt;br /&gt;I/wpa_supplicant(&amp;nbsp; ): CTRL-EVENT-DRIVER-STATE HANGED &lt;br /&gt;&lt;br /&gt;After 4, WEXT_NUMBER_SEQUENTIAL_ERRORS errors, android will abort using the device. &lt;br /&gt;&lt;br /&gt;To quickly test your wifi from interface you can disable error checking in  &lt;file&gt; external/wpa_supplicant/driver_wext.c &lt;/file&gt;  by simply making  &lt;codei&gt; ret = 0; &lt;/codei&gt;  in  &lt;codei&gt; wpa_driver_priv_driver_cmd() &lt;/codei&gt;  function after the SIOCSIWPRIV ioctl call. This will make all access points in android UI appear without signal or MAC address. &lt;br /&gt;To proper implement the ioctl you will need to modify your kernel driver to reply to SIOCSIWPRIV ioctl with RSSI (signal strength) and MACADDR commands being the most important. &lt;br /&gt;A better way is to add a custom driver_xxx.c to google  &lt;file&gt; external/wpa_supplicant/ &lt;/file&gt;  implementing  &lt;codei&gt; wpa_driver_priv_driver_cmd() &lt;/codei&gt;  function that will take care of RSSI, MACADDR and others, through calls to SIOCGIWSTATS, SIOCGIFHWADDR ioctls, with the rest of the functions being called from driver_wext.c. &lt;br /&gt;Below is a link to a patch for wpa_supplicant that I did for  &lt;a href="http://www.mini-box.com/pico-SAM9G45-X"&gt; mini-box.com picoPC &lt;/a&gt;  Android build. It creates a new driver  &lt;codei&gt; awext &lt;/codei&gt;  which "emulates" android driver commands using wireless extensions ioctls. &lt;br /&gt;&lt;br /&gt;How to use the new driver: &lt;br /&gt;&lt;br /&gt;1. In your  &lt;file&gt; BoardConfig.mk &lt;/file&gt;  define:&amp;nbsp; &lt;codei&gt; BOARD_WPA_SUPPLICANT_DRIVER := AWEXT &lt;/codei&gt;  &lt;br /&gt;2. Change  &lt;file&gt; init.rc &lt;/file&gt;  wpa_supplicant service command line by replacind  &lt;codei&gt; -Dwext &lt;/codei&gt;  with  &lt;codei&gt; -Dawext &lt;/codei&gt; &lt;br /&gt;&lt;br /&gt;AWEXT driver patch download: &amp;nbsp; &lt;a href="http://www.linuxconsulting.ro/android/patches/android_wext_emulation_driver_awext.patch"&gt; android_wext_emulation_driver_awext.patch &lt;/a&gt;&lt;br /&gt;For Gingerbread patches see the post above.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-7825643526087282750?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/7825643526087282750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=7825643526087282750' title='27 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/7825643526087282750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/7825643526087282750'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2010/04/porting-wifi-drivers-to-android.html' title='Porting WiFi drivers to Android'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-3634124694010423646</id><published>2010-05-13T13:03:00.006+03:00</published><updated>2010-06-02T12:03:32.543+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='atmel'/><category scheme='http://www.blogger.com/atom/ns#' term='u-boot'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>Using both memory controllers with SPARSE_MEM on Atmel SAM9G45/M10</title><content type='html'>Atmel AT91SAM9G45 and AT91SAM9M10 (AT91SAM9263 has a similar layout) have two memory controllers providing 128Mb at locations &lt;codei&gt;0x20000000&lt;/codei&gt; and &lt;codei&gt;0x70000000&lt;/codei&gt;. To use both banks of memory &lt;codei&gt;SPARSE_MEM&lt;/codei&gt; support must be enabled in kernel and &lt;codei&gt;phys_to_virt()&lt;/codei&gt; and &lt;codei&gt;virt_to_phys()&lt;/codei&gt; macros defined. The actual mapping is configured in kernel by boot params. &lt;br /&gt;&lt;br /&gt;Both banks must be initialized by AT91Bootstrap, if you use AT91Bootstrap from AT91SAM9G45/M10 SDK see the patch below. Also if u-boot is used as bootloader and you want to use second bank it needs to be patched too.&lt;br /&gt;My patches wore made for 2.6.30 kernel updated patches should be available below:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;AT91Bootstrap (from G45 SDK):&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://www.linuxconsulting.ro/atmel/at91sam9g45/dual-memory-bank-support/at91bootstrap/0001-Init-second-bank-of-memory-0x20000000.patch"&gt;0001-Init-second-bank-of-memory-0x20000000.patch&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;U-Boot:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro/atmel/at91sam9g45/dual-memory-bank-support/uboot/0001-add-support-for-both-banks-of-memory-on-Atmel-G45-bo.patch"&gt;0001-add-support-for-both-banks-of-memory-on-Atmel-G45-bo.patch&lt;/a&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Kernel:&lt;/b&gt;&lt;br /&gt;Add to boot params to enable both mem banks(for example on u-boot bootparams=) :&lt;br /&gt;&lt;codei&gt;mem=128M@0x20000000 mem=128M@0x70000000&lt;/codei&gt;&lt;br /&gt;&lt;br /&gt;For kernels &lt;= 2.6.30:&lt;a href="http://www.linuxconsulting.ro/atmel/at91sam9g45/dual-memory-bank-support/kernel/0001-Add-SPARSEMEM-support-for-Atmel-CPU-for-2-banks-of-m.patch"&gt;0001-Add-SPARSEMEM-support-for-Atmel-CPU-for-2-banks-of-m.patch&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro/atmel/at91sam9g45/dual-memory-bank-support/kernel/0010-Fix-memory-mapping-for-SPARSEMEM-to-use-both-banks-o.patch"&gt;0010-Fix-memory-mapping-for-SPARSEMEM-to-use-both-banks-o.patch&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For kernels &gt;2.6.30 (patch is for 2.6.34):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=6143/1"&gt;http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=6143/1&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-3634124694010423646?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/3634124694010423646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=3634124694010423646' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/3634124694010423646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/3634124694010423646'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2010/05/using-both-memory-controller-with.html' title='Using both memory controllers with SPARSE_MEM on Atmel SAM9G45/M10'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-5687198681379534831</id><published>2010-05-03T22:42:00.000+03:00</published><updated>2010-05-03T22:42:45.148+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>HTML5 Hex Grid with mouse mapping</title><content type='html'>A simple hex grid map with mouse mapping just to explore what HTML5 canvas can do (and it looks to me a lot like Cairo).&amp;nbsp; Maybe someone will start a panzer general clone reusing the code from lgeneral ?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro/code-repository/repository/html5-hexgrid/hexgrid.html"&gt;http://www.linuxconsulting.ro/code-repository/repository/html5-hexgrid/hexgrid.html &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-5687198681379534831?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/5687198681379534831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=5687198681379534831' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/5687198681379534831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/5687198681379534831'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2010/05/html5-hex-grid-with-mouse-mapping.html' title='HTML5 Hex Grid with mouse mapping'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-9048541897696163577</id><published>2010-04-16T14:44:00.002+03:00</published><updated>2010-04-16T14:47:02.496+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>TSLib ported to Android for touchscreen calibration.</title><content type='html'>&amp;nbsp;&amp;nbsp; &amp;nbsp; Since Android doesn't provide a calibration tool, &lt;a href="http://tslib.berlios.de/"&gt;tslib&lt;/a&gt; can be used to calibrate the touchscreen . The values obtained from ts_calibrate in pointercal file can be used in android frameworks/services/java/com/android/server/InputDevice.java to have the correct screen coordinates.&lt;br /&gt;&lt;br /&gt;ts_calibrate can be run from a serial console along with android with the proper environment variables set (these variables are documented in Android.mk too), the default values are:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;export TSLIB_CONFFILE=/system/etc/ts.conf&lt;br /&gt;export TSLIB_CALIBFILE=/etc/pointercal&lt;br /&gt;export TSLIB_PLUGINDIR=/system/lib&lt;br /&gt;export TSLIB_CONSOLEDEVICE=/dev/tty&lt;br /&gt;export TSLIB_FBDEVICE=/dev/graphics/fb0&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To compile tslib for your device make  a link for bionic/libc/include/fcntl.h to bionic/libc/include/sys/fcntl.h import build/envsetup.sh and execute make or m.&lt;br /&gt;&lt;br /&gt;To make tslib build everytime you build your android distribution copy the android-tslib folder to android external/ folder.&lt;br /&gt;&lt;br /&gt;Download:&lt;br /&gt;GIT: &amp;nbsp; git clone git://git.linuxconsulting.ro/android-tslib.git&lt;br /&gt;HTTP:&lt;a href="http://git.linuxconsulting.ro/"&gt; http://git.linuxconsulting.ro&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-9048541897696163577?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/9048541897696163577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=9048541897696163577' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/9048541897696163577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/9048541897696163577'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2010/04/tslib-ported-to-android-for-touchscreen.html' title='TSLib ported to Android for touchscreen calibration.'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-1900495138630395219</id><published>2009-11-24T07:44:00.009+02:00</published><updated>2009-11-30T13:49:03.969+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='search engines'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='microsoft'/><title type='text'>The irrepressible ... Bing</title><content type='html'>Rumors grew of a "new" search engine shadowing the internet. It uses the power of &lt;a href="http://www.theregister.co.uk/2009/05/28/microsoft_bing/"&gt;lie&lt;/a&gt;, &lt;a href="http://www.theregister.co.uk/2009/02/04/another_microsoft_cashback_glitch/"&gt;deceit&lt;/a&gt; and &lt;a href="http://news.slashdot.org/story/09/11/23/0644233/Murdoch-Microsoft-Deal-In-the-Works"&gt;bribery&lt;/a&gt; to grow, soon it will engulf everything in predetermined results (we have 1000+ monkeys and we're using them), devious filters (we see no point in indexing open source websites since most of them are out of date) and evil spell checking (Did you mean IIS server ? No? Apache ? Well I still think you are looking for IIS so I'll show you the IIS results).&lt;br /&gt;So how can it be stopped ? Well this is no ordinary (or should I say &lt;a href="http://www.robotstxt.org/"&gt;standard&lt;/a&gt; ?) bad guy, so it won't be &lt;a href="http://www.bing.com/community/forums/t/648889.aspx"&gt;stopped&lt;/a&gt; with your measly robots.txt file by adding:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;User-agent: msnbot&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Disallow: /&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;in it. No, this requires a higher magic, but we can rely on apache &lt;a href="http://httpd.apache.org/docs/2.0/mod/mod_setenvif.html"&gt;mod_setenvif&lt;/a&gt; wisdom by adding:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;BrowserMatchNoCase msnbot goBang&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Order Deny,Allow&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Deny from env=goBang&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;in your .htaccess file.&lt;br /&gt;This should make Bing go with a Bang.&lt;br /&gt;If you're using something light(http)er you might want to check &lt;a href="http://www.laconicsecurity.com/detecting-and-blocking-bad-robots.html"&gt;this&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-1900495138630395219?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/1900495138630395219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=1900495138630395219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/1900495138630395219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/1900495138630395219'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2009/11/irrepressible-bing.html' title='The irrepressible ... Bing'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-1898688261091695753</id><published>2009-08-03T12:44:00.005+03:00</published><updated>2009-11-30T13:49:03.971+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='qmake'/><category scheme='http://www.blogger.com/atom/ns#' term='qt'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>QMake with Visual Studio: Generating debug information (pdb) files</title><content type='html'>Working with multiple libraries on different subdirs in Visual Studio using QMake tools brings a problem when you try to debug code that is contained in those libraries: the debug files (pdb) are generated with same name (vc80.pdb or similar) in libraries dirs which results in visual studio being unable to get the right debug information. To fix this problem pdb files need to be renamed and placed in the location where the executable is run for debugging.&lt;br /&gt;As an example we have a main .pro file which it's a subdirs template to compile code in multiple subdirs:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;TEMPLATE = subdirs&lt;br /&gt;CONFIG += ordered&lt;br /&gt;SUBDIRS += mbl_utils    \&lt;br /&gt;         mbl_usb      \&lt;br /&gt;         mbl_encoder  \&lt;br /&gt;         mbl_renderer \&lt;br /&gt;         nanoGUI&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For each .pro file in the libraries subdirectory we will have to add on a debug:win32 entry the following code:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;debug:win32 {&lt;br /&gt;      # Hack to get pdb files generated with proper name&lt;br /&gt;      QMAKE_CXXFLAGS += -Fd$${TARGET}.pdb&lt;br /&gt;      # Hack to get pdb files copied in Bin folder from where the binary is run&lt;br /&gt;      pdbtarget.files = $${TARGET}.pdb&lt;br /&gt;      pdbtarget.path = $${BINDIR}&lt;br /&gt;      pdbtarget.command = copy /y $${TARGET}.pdb $${BINDIR}&lt;br /&gt;      INSTALLS += pdbtarget   &lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Where TARGET is defined as the library name and BINDIR is where the executable file is copied after compilation. This should create proper debug information files where the project executable is being run.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-1898688261091695753?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/1898688261091695753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=1898688261091695753' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/1898688261091695753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/1898688261091695753'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2009/08/qmake-with-visual-studio-generating.html' title='QMake with Visual Studio: Generating debug information (pdb) files'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-3750140237198308897</id><published>2009-06-22T09:38:00.006+03:00</published><updated>2009-11-30T13:38:21.619+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lcdproc'/><category scheme='http://www.blogger.com/atom/ns#' term='picolcd'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>lcdproc 0.5.3 released and ubuntu package for picoLCD</title><content type='html'>A new version(0.5.3) of lcdproc has been released. This release has a lot of improvements for picoLCD and other drivers.&lt;br /&gt;I made a quick ubuntu package for picoLCD (models 20x2 and 20x4) which can be downloaded from the link below. This package has only the picoLCD driver and the configuration is made for picoLCD (note that ServerScreen is set to off to fix some problems with mythtv).&lt;br /&gt;To start lcdproc execute /etc/init.d/LCDd start and start any client you want (lcdproc, lcdvc etc).&lt;br /&gt;&lt;br /&gt;If you intend to use the IR functionality don't forget to add :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;REMOTE="Network (UDP)"&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;REMOTE_MODULES=""&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;REMOTE_DRIVER="udp"&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;REMOTE_LIRCD_ARGS="--listen=8765"&lt;/span&gt; &lt;br /&gt;to&lt;span style="font-family:courier new;"&gt; /etc/lirc/hardware.conf &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To start lirc manually you can use:&lt;span style="font-family:courier new;"&gt; lircd --driver=udp --listen=8765&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro/uploads-blog/lcdproc_0.5.3-1_i386.deb"&gt;uploads-blog/lcdproc_0.5.3-1_i386.deb&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-3750140237198308897?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/3750140237198308897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=3750140237198308897' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/3750140237198308897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/3750140237198308897'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2009/06/lcdproc-053-released.html' title='lcdproc 0.5.3 released and ubuntu package for picoLCD'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-1542186300695364582</id><published>2009-06-18T19:39:00.010+03:00</published><updated>2009-11-30T13:49:03.973+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>Using video RAM ...</title><content type='html'>Since I was playing with some jffs images, I wanted to quickly write to a "dummy" mtd device and test the image from there. I remembered some time ago on slashdot there was an interesting article on how to use the video ram as storage. As I couldn't find it anymore I decided to try it myself.&lt;br /&gt;&lt;br /&gt;Usually mounting jffs images requires some steps and the mtd2block kernel module:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;losetup /dev/loop0 rootfs.jffs2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;modprobe block2mtd block2mtd=/dev/loop0,131072&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;modprobe jffs2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;modprobe mtdblock&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;mkdir /mnt/loop0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;mount -t jffs2 -o ro /dev/mtdblock0 /mnt/loop0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using the video ram:&lt;br /&gt;&lt;br /&gt;1. Find out &lt;span style="font-family:georgia;"&gt;the starting&lt;/span&gt; address of video memory:&lt;br /&gt;&gt; &lt;span style="font-family:courier new;"&gt;lspci -v &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;2:00.0 VGA compatible controller: nVidia Corporation G94 [GeForce 9600 GT] (rev a1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Subsystem: LeadTek Research Inc. Device 2ac1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Flags: bus master, fast devsel, latency 0, IRQ 18&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Memory at fd000000 (32-bit, non-prefetchable) [size=16M]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;    Memory at d0000000 (64-bit, prefetchable) [size=256M]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Memory at fa000000 (64-bit, non-prefetchable) [size=32M]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    I/O ports at ec00 [size=128]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    [virtual] Expansion ROM at feb80000 [disabled] [size=512K]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As above the video memory starts at 0xd0000000&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;2.&lt;/span&gt; Map the video ram into a mtd block&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;  modprobe slram map=VRAM,0xd2000000,+0x4000000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note that I maped from &lt;span style="font-family: courier new;"&gt;0xd0000000&lt;/span&gt; + 32Mb to let some video memory to be used by framebuffer/X (if you use nv driver you can specify VideoRam 32765 in xorg.conf to limit the memory mappings).&lt;br /&gt;The third parameter (+0x4000000) is the memory size (64Mb)&lt;br /&gt;If everything is ok you should see something like this in dmesg log:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;slram: Mapped from 0xf8f00000 to 0xfaf00000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;slram: devname=VRAM, devstart=0xd2000000, devlength=0x2000000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;devstart and devlength depend on your parameters.&lt;br /&gt;&lt;br /&gt;Doing &lt;span style="font-family:courier new;"&gt;cat /proc/mtd &lt;/span&gt;should output:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mtd0: 02000000 00004000 "VRAM"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. Add the kernel mtd modules and create the mtdblock devices&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;modprobe mtd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;modprobe  mtd_blkdevs&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;modprobe mtdblock&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;mknod /dev/mtdblock0 b 31 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;mknod /dev/mtd0 c 90 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you can use the &lt;span style="font-family: courier new;"&gt;/dev/mtdblock0&lt;/span&gt; to write jffs images or use it as a very fast swap (&lt;span style="font-family: courier new;"&gt;mkswap /dev/mtdblock0&lt;/span&gt;, &lt;span style="font-family: courier new;"&gt;swapon&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;Notice that you can't create partitions directly in &lt;span style="font-family: courier new;"&gt;/dev/mtdblock0&lt;/span&gt; with fdisk and use &lt;span style="font-family: courier new;"&gt;/dev/mtdblock0p1&lt;/span&gt;. Partitions are usually created in a device driver mapping or by specifing mtdparts= parameter at kernel boot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-1542186300695364582?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/1542186300695364582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=1542186300695364582' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/1542186300695364582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/1542186300695364582'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2009/06/using-video-ram.html' title='Using video RAM ...'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-8588335671562017219</id><published>2009-06-18T16:42:00.007+03:00</published><updated>2009-11-30T13:49:03.976+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libc'/><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Hijacking library calls</title><content type='html'>&lt;span style="font-family:georgia;"&gt;From time to time you might want to override a function call by a binary or library with your own supplied code. This might be useful for example binding a program to a certain address considering  that the program doesn't have an option for that. It can also be used for debugging or other obscure tasks.&lt;/span&gt;  &lt;span style="font-family:georgia;"&gt;The attached example it's pretty simple, it saves the real address of connect function from libc to a function pointer named&lt;/span&gt;&lt;span style="font-style: italic;font-family:georgia;" &gt; real_connect&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;, reads the address/port information from environment and issues the new parameters &lt;/span&gt;&lt;span style="font-weight: bold;font-family:georgia;" &gt;after&lt;/span&gt;&lt;span style="font-family:georgia;"&gt; the bind call has been performed to the &lt;/span&gt;&lt;span style="font-style: italic;font-family:georgia;" &gt;real_connect&lt;/span&gt;&lt;span style="font-family:georgia;"&gt; function.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For your "library" to be preloaded it has to be added to /etc/ld.so.preload by simply doing:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;echo "/path/to/libc-highjack.so" &gt; /etc/ld.so.preload&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;To use it, before starting a program, export HIGHHACK_PORT and HIGHJACK_IP to the values that you need.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;The compiling&lt;/span&gt; instructions are in the source code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro/uploads-blog/libc-highjack.c"&gt;uploads-blog/libc-highjack.c&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-8588335671562017219?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/8588335671562017219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=8588335671562017219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/8588335671562017219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/8588335671562017219'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2009/06/highjacking-library-calls.html' title='Hijacking library calls'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-1402324471196933384</id><published>2008-05-11T22:25:00.008+03:00</published><updated>2009-11-30T13:49:03.979+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macos'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>Ubuntu  (8.04) Linux on MacBook Air (updated)</title><content type='html'>&lt;span style="font-size:78%;"&gt;&lt;span style="font-style: italic;"&gt;Ubuntu 9.04 looks like it's working out of the box on MacBook Air. The new intel video card driver in 9.04 it's pretty bad and it's suggested to use the old driver till a fix is issued.  (June 18, 2009)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;As I received a MacBook Air for development "on-the-road", I installed Ubuntu on it.&lt;br /&gt;Installation is pretty easy:&lt;br /&gt;1. Use MacOS BootCamp to create a "Windows" partition.&lt;br /&gt;2. Get a external USB cdrom or use isotostick script to install from a USB stick.&lt;br /&gt;3. Press C to start booting from CDROM and install Ubuntu (don't forget to make the "Windows" partition active after the installation or it won't show up in BootCamp).&lt;br /&gt;&lt;br /&gt;What works:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Video Card&lt;/span&gt;&lt;br /&gt;Works ok without tweaks even with 3D support/Compiz/XV. I noticed some vertical flickering might be from dot clock but till now ModeLine settings didn't help.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Update:&lt;/span&gt;&lt;br /&gt;Flickering is caused by backlight settings a flicker free backlight setting for me is&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;xrandr --output LVDS --set BACKLIGHT 8000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. TouchPad/Multitouch&lt;/span&gt;&lt;br /&gt;Basic TouchPad/1 button click works ok but if you want multitouch for mouse gestures/scroll/right-click you need to get touchd from &lt;a href="http://touchd.sf.net/"&gt;http://touchd.sf.net&lt;/a&gt; and add a&lt;br /&gt;small modification to multitouch.c by changing the USB IDs looked up by openusb_find_dev_* to: &lt;span style="font-style: italic;"&gt;0x05ac, 0x0223&lt;/span&gt;.&lt;br /&gt;The only issue is that touchd has problems comming up from suspend/resume, which can be solved by adding a new script in /etc/acpi/resume.d/ to restart touchd process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Wireless&lt;/span&gt;&lt;br /&gt;Need to install ndiswrapper and use the winxp broadcom drivers supplied on DVD or look-up Apple BootCamp drivers on torrents. Other drivers don't work ok either freeze on suspend/resume or have limited capabilities.&lt;br /&gt;Broadcom drivers seems to work ok and also power_profile can be set (iwpriv wlan0 power_profile 0) along with other powersaving settings.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. Sound&lt;/span&gt;&lt;br /&gt;Works by adding: options snd_hda_intel model=mbp3 to /etc/modprobe.d/options. Microphone might need a little alsa patching but haven't tested yet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. iSight Camera&lt;/span&gt;&lt;br /&gt;Works ok after install the module is uvcvideo&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. CPU Freq Scaling&lt;/span&gt;&lt;br /&gt;Works ok after install. Can be tweaked further from /etc/laptop-mode or powerd&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;7. BlueTooth&lt;/span&gt;&lt;br /&gt;Works ok after install.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;8. LCD Brightness levels.&lt;/span&gt;&lt;br /&gt;This should be handled by pommed/applesmc kernel module but didn't work for me (even tried a 2.6.25 applesmc module with mactel patches) looks like macbook air isn't yet supported by applesmc.&lt;br /&gt;Instead xbacklight (apt-get install xbacklight) works fine which can be binded to F1/F2 keys (I use xmodmap to define keys with scancode 101 and 212 and xbindkeys to bind them to actions like xbacklight +2 or xbacklight -2)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;9. Keyboard Leds&lt;/span&gt;&lt;br /&gt;Works with a small patch to applesmc.c (in drivers/hwmon/applesmc.c). You can set the keyboard leds levels by echoing values here:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness&lt;/span&gt;&lt;br /&gt;This can be done with a small script and xbindkeys to assing the script to F5/F6 keys.&lt;br /&gt;&lt;br /&gt;See below for patch download and a sample script.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10. Multimedia keys&lt;/span&gt;&lt;br /&gt;Sound keys/Eject keys are working by default the rest can be detected/added to keyboard shorcuts by detecting them with xev&lt;br /&gt;&lt;br /&gt;For power saving I recommed using powertop (apt-get install powertop), iwconfig/iwpriv to set wireless power mode, xbacklight and power management tweaks to blank screen faster with DPMS. At this moment battery times in Mac OS X and Ubuntu Hardy are similar (touchd wakes up CPU pretty often but it's not a big drain).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro//applesmc-macbookair-2.6.24-17-patch.txt"&gt;/applesmc-macbookair-2.6.24-17-patch.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxconsulting.ro//keybacklight.sh"&gt;/keybacklight.sh&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-1402324471196933384?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/1402324471196933384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=1402324471196933384' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/1402324471196933384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/1402324471196933384'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2008/05/ubuntu-804-linux-on-macbook-air.html' title='Ubuntu  (8.04) Linux on MacBook Air (updated)'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-2102556316149397674</id><published>2007-10-19T18:44:00.001+03:00</published><updated>2009-11-30T13:49:03.981+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><title type='text'>New monitor, new desktop.</title><content type='html'>&lt;b&gt;&lt;a href="http://www.dict.org/bin/Dict?Form=Dict2&amp;amp;Database=gcide&amp;amp;Query=Although"&gt;&lt;/a&gt;&lt;/b&gt;Although I'm not a big fan of LCD monitors I finally got myself one. It's a Samsung 2232 BW and I'm pretty satisfied by it's quality except that I believe it's too bright on top and bottom parts of the screen and gradients don't look that great. With new monitor came a new desktop based on ubuntu beryl and stuff from gnome-look.org. I got the highest ranked themes (seems that everybody likes the look of vista :P ) and icon packs. I'm not sure that it will have a long life since it's too dark for my taste. Here is a screenshot:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.linuxconsulting.ro/uploaded_images/Screenshot-770054.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www.linuxconsulting.ro/uploaded_images/Screenshot-766133.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-2102556316149397674?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/2102556316149397674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=2102556316149397674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/2102556316149397674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/2102556316149397674'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2007/10/new-monitor-new-desktop.html' title='New monitor, new desktop.'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-4738700794890535335</id><published>2007-08-08T16:08:00.001+03:00</published><updated>2009-11-30T13:49:03.982+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='picolcd'/><title type='text'>Python Wrapper for picoLCD</title><content type='html'>Chris Jones has created a python wrapper for my &lt;a href="http://www.linuxconsulting.ro/picoLCD20x2/"&gt;picoLCD SDK&lt;/a&gt; which is available&lt;br /&gt;for download &lt;a href="http://projects.sucs.org/svn/LiFiPod/pyusblcd/"&gt;here&lt;/a&gt;. You can read more about this at his blog and watch a nice video&lt;br /&gt;of his python application and picoLCD in action &lt;a href="http://sucs.org/blogs/rollercow/entry/the-holiday-project"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-4738700794890535335?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/4738700794890535335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/4738700794890535335'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2007/08/python-wrapper-for-picolcd.html' title='Python Wrapper for picoLCD'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-2537867682912776798</id><published>2007-08-08T14:52:00.001+03:00</published><updated>2009-11-30T13:49:03.984+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='games'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Savage: The Battle For Newerth:  Free and Improved.</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.linuxconsulting.ro/uploaded_images/shot00002-709042.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://www.linuxconsulting.ro/uploaded_images/shot00002-709013.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;While browsing the linux games sites I noticed that Savage: The Battle For Newerth from &lt;a href="http://www.blogger.com/www.s2games.com"&gt;www.s2games.com&lt;/a&gt; it's free and recently received a complete overhaul from the&lt;br /&gt;community put together as Savage: Full Enhancement available to download from &lt;a href="http://www.notforidiots.com/SFE/"&gt;http://www.notforidiots.com/SFE/ &lt;/a&gt;. The enhancements are pretty impressive and include a modified 3D engine which adds raytraced weather effects, real-time commander mini-map drawing etc. The game is multiplayer,looks good, has a lot and fast action and you get addicted pretty fast. There are lots of servers on the internet so it shouldn't be a problem to get into action fast.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.linuxconsulting.ro/uploaded_images/shot00004-786821.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://www.linuxconsulting.ro/uploaded_images/shot00004-786803.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;You can play as a commander which let's you give commands and control the game as in a RTS or as a warrior if you like FPS games. Of course I choose FPS mode since it's not easy to be a commander...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note: &lt;/span&gt;&lt;br /&gt;I installed the game on Ubuntu 7.04 and noticed choppy and distorted sound under ALSA. The game doesn't seem to accept SDL_AUDIODRIVER env variable (which works for other games) and modifying sound_output variable didn't make a difference. My solution was to install OSS (recently open sourced) from &lt;a href="http://www.blogger.com/www.opensound.com"&gt;www.opensound.com&lt;/a&gt; and blacklist alsa devices to make oss load ok.&lt;br /&gt;As usual OSS gives better sound and latency versus ALSA (not to mention the imux device which is very usefull for streaming), but they are a little too late with opensourcing their driver and because of that GStreamer used in&lt;br /&gt;Ubuntu desktop and other application won't work with the latest OSS release because the mixer API changed and there is no release with the latest OSS API for&lt;br /&gt;osssink gstreamer plugin.&lt;br /&gt;If you intend to compile  OSS from source  if might need to modify  &lt;span style="font-style: italic;"&gt;setup/srcconf.c&lt;/span&gt; and add    &lt;span style="font-style: italic;"&gt;-fno-stack-protector &lt;/span&gt;to CFLAGS around lines 652 and 657.&lt;br /&gt;&lt;span class="down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-2537867682912776798?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/2537867682912776798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=2537867682912776798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/2537867682912776798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/2537867682912776798'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2007/08/savage-battle-for-newerth-free-and.html' title='Savage: The Battle For Newerth:  Free and Improved.'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8939125534858322326.post-8379053415477708030</id><published>2007-08-07T19:58:00.001+03:00</published><updated>2009-11-30T13:49:03.985+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Redesigned www.linuxconsulting.ro</title><content type='html'>Welcome to the new layout of my projects page,     although not everything has been finished most of my current work is now public.   &lt;br /&gt;The page is very, very ... lynx/links friendly so browse away.&lt;br /&gt;On the rant section I intend to post my views on interesting linux news from the web.   &lt;br /&gt;Cya soon.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note&lt;/span&gt;: There are still some minor problems with my template for blogger.com.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939125534858322326-8379053415477708030?l=blog.linuxconsulting.ro' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.linuxconsulting.ro/feeds/8379053415477708030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8939125534858322326&amp;postID=8379053415477708030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/8379053415477708030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939125534858322326/posts/default/8379053415477708030'/><link rel='alternate' type='text/html' href='http://blog.linuxconsulting.ro/2007/08/redesigned-wwwlinuxconsultingro.html' title='Redesigned www.linuxconsulting.ro'/><author><name>Nicu Pavel</name><uri>https://profiles.google.com/107922667486773534011</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
