<?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-648914743219937380</id><updated>2011-11-27T17:07:19.421-08:00</updated><category term='module parameters'/><category term='bugbusting'/><category term='driver'/><category term='Flyswatter'/><category term='routerboard'/><category term='Atheror'/><category term='mikrotik'/><category term='taskqueue'/><category term='ohloh'/><category term='intro'/><category term='tunables'/><category term='os x'/><category term='FreeBSD'/><category term='zaptel'/><category term='avr32'/><category term='m4b'/><category term='blog'/><category term='EJTAG'/><category term='AR71XX'/><category term='SVK'/><category term='cocoa'/><category term='LLVM'/><category term='thinkpad'/><category term='openocd'/><category term='PR'/><category term='xcode'/><category term='MIPS'/><category term='NIC'/><category term='drivers'/><category term='iPod'/><category term='rb532'/><category term='kernel'/><category term='Juniper'/><category term='vim'/><category term='JTAG'/><category term='octeon'/><category term='t400'/><category term='sitrep'/><category term='audiobook'/><category term='RouterStation'/><title type='text'>FreeBSD developer's notebook</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-648914743219937380.post-8678060321355861428</id><published>2010-08-08T21:21:00.005-07:00</published><updated>2010-08-08T21:31:20.206-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JTAG'/><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='Flyswatter'/><category scheme='http://www.blogger.com/atom/ns#' term='avr32'/><title type='text'>Flyswatter JTAG and AVR32</title><content type='html'>Today I soldered AVR32 adapter for Flyswatter JTAG. Actually it's very simple task - just connect respective pins and make common ground wire. No capacitors, resistors or MOSFETs. Idea was to make it nice and neat but having bought wrong breadboard and soldered first headers in a wrong place I just let it flow and here it is:&lt;br /&gt;&lt;img src="http://lh6.ggpht.com/_bTtZWrFtKsc/TF9749h_xnI/AAAAAAAAFYI/NgKmDdyq0_8/IMGP9940.JPG" border=0&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;img src="http://lh3.ggpht.com/_bTtZWrFtKsc/TF975cHy0SI/AAAAAAAAFYM/Uy6SNPtWw8Q/IMGP9941.JPG" border=0&gt;&lt;br /&gt;&lt;br /&gt;From aesthetics point of view suck, but it also works and it's everything I need:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Info : JTAG tap: avr32.cpu tap/device found: 0x21e8203f (mfg: 0x01f, part: 0x1e82, ver: 0x2)&lt;br&gt;&lt;br /&gt;Warn : JTAG tap: avr32.cpu       UNEXPECTED: 0x21e8203f (mfg: 0x01f, part: 0x1e82, ver: 0x2)&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-8678060321355861428?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/8678060321355861428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=8678060321355861428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/8678060321355861428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/8678060321355861428'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2010/08/flyswatter-jtag-and-avr32.html' title='Flyswatter JTAG and AVR32'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_bTtZWrFtKsc/TF9749h_xnI/AAAAAAAAFYI/NgKmDdyq0_8/s72-c/IMGP9940.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-648914743219937380.post-6216948205632284149</id><published>2010-07-05T20:00:00.003-07:00</published><updated>2010-07-05T20:14:36.720-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JTAG'/><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='openocd'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><category scheme='http://www.blogger.com/atom/ns#' term='octeon'/><title type='text'>Minor OpenOCD fixes</title><content type='html'>Back from the land of GUI software. I have bought one more Flyswatter JTAG recently and now have two boards connected to my home box. Unfortunately both Flyswatters got the same USB serial number so stock openocd opens only the first device it stumbles upon. Here is &lt;a href="http://people.freebsd.org/~gonzo/openocd/ftdi_index.diff"&gt;small patch&lt;/a&gt; that adds ft2232_index command to OpenOCD FTDI driver that allows to point at specific device to open. Works only with libftdi.  In the same directory you can find my configs for AR71XX-based RouterStation Pro and Portwell's CAM-0010 device based on Octeon CN3010&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-6216948205632284149?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/6216948205632284149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=6216948205632284149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/6216948205632284149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/6216948205632284149'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2010/07/minor-openocd-fixes.html' title='Minor OpenOCD fixes'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-5876058202173678256</id><published>2010-02-18T22:22:00.002-08:00</published><updated>2010-02-18T22:41:00.037-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NIC'/><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='driver'/><title type='text'>Writing FreeBSD NIC driver</title><content type='html'>I've been through writing NIC driver 2.5 times. 0.5 was porting ADM5120 switch driver by Ruslan Ermilov and Vsevolod Lobko from NetBSD. The usual routine for this kind of thing is "take existing driver and rewrite it", e.g. copy selected parts or remove unnecessary ones. So I decided that it would be nice to skip "remove" part of procedure next time. &lt;br /&gt;&lt;br /&gt;All cards I had to deal with ("both" wouldn't be that impressive here) had similar design save for registers layout and some quirks. I believe that vast majority of NICs have the same design to some extent: there are circular RX/TX rings of more or less similar structure, interrupt status/mask register, media settings registers, you name it. Not a rocket science. &lt;br /&gt;&lt;br /&gt;So I took if_arge driver from Atheros AR71XX SoC and replaced hardware-dependent parts  with FIXME comments. Also string "ARGE" was replaced to "ADAPTER" and "arge" to "adapter" so simple s/adapter/xyz/g and s/ADAPTER/XYZ/g would give us a half-baked source base for if_xyz driver.  &lt;br /&gt;&lt;br /&gt;It's yet to be tested whether this approach would be of any good. I'm planning to try it in next few days :) Meanwhile you can check sources &lt;a href="http://people.freebsd.org/~gonzo/if_adapter/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-5876058202173678256?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/5876058202173678256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=5876058202173678256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5876058202173678256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5876058202173678256'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2010/02/writing-freebsd-nic-driver.html' title='Writing FreeBSD NIC driver'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-5208839547751874425</id><published>2010-01-18T13:49:00.004-08:00</published><updated>2010-02-18T22:51:41.493-08:00</updated><title type='text'>FReeBSD/MIPS &amp; clang/LLVM</title><content type='html'>Now I know a little bit more about clang. I can't say it's quite useful for MIPS yet, but it's nice to see some progress in this field.  My findings might be inaccurate and any corrections are welcome.&lt;br /&gt;&lt;br /&gt;- No proper cross-compilation so far. Clang team plans to do it "right way" but so far it's just an item on their ToDo list: &lt;a href="http://clang.llvm.org/UniversalDriver.html"&gt;Universal driver&lt;/a&gt;. There are command-line options like -ccc-host-triple  to get target assembler code, but names for assembler/linker are hardcoded to as/ld, which puts some restriction on building target toolchain &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;UPD: -ccc-host-triple does the trick OK&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;- No proper march/mabi handlers for MIPS platform. Only ARM and x86 are supported. &lt;br /&gt;&lt;br /&gt;I managed to build hello world application in semi-automatic mode on RouterStation booted over NFS:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[root@ /llvm/llvm]# clang -v -fPIC  -Wa,-mabi=32,-EB,-KPIC hello.c&lt;br /&gt;clang version 1.1 (trunk)&lt;br /&gt;Target: mips-unknown-freebsd9.0&lt;br /&gt;Thread model: posix&lt;br /&gt; "/opt/bin/clang" -cc1 -triple mips-unknown-freebsd9.0 -S -disable-free -main-file-name hello.c -pic-level 2 -mdisable-fp-elim -v -resource-dir /opt/lib/clang/1.1 -fmessage-length 0 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-tuAxTl.s -x c hello.c&lt;br /&gt;clang -cc1 version 1.1 based upon llvm 2.7svn hosted on mips-unknown-freebsd9.0&lt;br /&gt;#include "..." search starts here:&lt;br /&gt;#include &amp;lt;...&amp;gt; search starts here:&lt;br /&gt; /opt/lib/clang/1.1/include&lt;br /&gt; /usr/local/include&lt;br /&gt; /usr/include&lt;br /&gt;End of search list.&lt;br /&gt; "/usr/bin/as" -mabi=32 -EB -KPIC -o /tmp/cc-LZzHnl.o /tmp/cc-tuAxTl.s&lt;br /&gt; "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 -o a.out /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o /tmp/cc-LZzHnl.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o&lt;br /&gt;[root@ /llvm/llvm]# ./a.out&lt;br /&gt;Hello world!&lt;br /&gt;[root@ /llvm/llvm]# uname -a&lt;br /&gt;FreeBSD  9.0-CURRENT FreeBSD 9.0-CURRENT #28: Fri Jan 15 16:50:23 PST 2010     gonzo@figaro.bluezbox.com:/src/FreeBSD/obj/head-mips/mips/src/FreeBSD/head/sys/AR71XX  mips&lt;br /&gt;[root@ /llvm/llvm]#&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;So it seems to be nice starting point for some minor compiler hacking :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-5208839547751874425?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/5208839547751874425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=5208839547751874425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5208839547751874425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5208839547751874425'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2010/01/freebsdmips-clangllvm.html' title='FReeBSD/MIPS &amp; clang/LLVM'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-5722751307269190061</id><published>2010-01-11T11:45:00.002-08:00</published><updated>2010-01-11T11:51:19.946-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><title type='text'>projects/mips RIP</title><content type='html'>All changes from projects/mips has been merged to HEAD. Kudos go to imp@ for sieving through mergeinfo mess projects/mips has been.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-5722751307269190061?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/5722751307269190061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=5722751307269190061' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5722751307269190061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5722751307269190061'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2010/01/projectsmips-rip.html' title='projects/mips RIP'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-5703525161792521485</id><published>2010-01-08T15:12:00.002-08:00</published><updated>2010-01-08T15:14:24.278-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='LLVM'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><title type='text'>FreeBSD/mips and LLVM</title><content type='html'>Good news: LLVM builds fine on RouterStation Pro with root mounted over NFS. &lt;br /&gt;Bad news: it segfaults on some tests and when trying to build hello world application.&lt;br /&gt;&lt;br /&gt;Stay tuned&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-5703525161792521485?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/5703525161792521485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=5703525161792521485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5703525161792521485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5703525161792521485'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2010/01/freebsdmips-and-llvm.html' title='FreeBSD/mips and LLVM'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-5426409471008453115</id><published>2009-11-23T11:33:00.004-08:00</published><updated>2009-11-23T11:49:01.871-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JTAG'/><category scheme='http://www.blogger.com/atom/ns#' term='os x'/><category scheme='http://www.blogger.com/atom/ns#' term='Flyswatter'/><title type='text'>OS X: Flyswatter, JTAG &amp; RS232</title><content type='html'>Since I lent my RS232/USB adapter to a friend it was nice opportunity to experiment with Flyswatter on-board RS232 port. OS X does not support FTDI devices out of the box, but it's not a problem for OpenOCD, which uses generic interface to communicate JTAG board. Things get a little bit more complicated when you're trying to get on-board RS232 port working.&lt;br /&gt;&lt;br /&gt;I started with installing stock drivers from &lt;a href="http://www.ftdichip.com/Drivers/VCP.htm"&gt;FTDI site&lt;/a&gt;. Current version supports Snow Leopard. With these drivers installed system started to detect two COM ports but JTAG part stopped to work as OpenOCD failed to claim USB device. &lt;br /&gt;&lt;br /&gt;Long story short: you'll need to edit kext content to prevent first usb device from being recognized as a virtual COM port. Nothing fancy, simple text editor would do the trick for all you need to edit is plain XML file. Find line &lt;b&gt;&amp;lt;key&amp;gt;FT2232C_A&amp;lt;/key&amp;gt;&lt;/b&gt; and delete it along with following &lt;b&gt;&amp;lt;dict&amp;gt;&lt;/b&gt; element. Reload kext using kextunload/kextload and voila - JTAG works, "cu -s 115200 -l cu.usbserial-FS000000B" works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-5426409471008453115?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/5426409471008453115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=5426409471008453115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5426409471008453115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5426409471008453115'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/11/os-x-flyswatter-jtag-rs232.html' title='OS X: Flyswatter, JTAG &amp; RS232'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-4250524663273810764</id><published>2009-11-10T14:49:00.002-08:00</published><updated>2009-11-10T14:51:22.436-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='os x'/><title type='text'>OS X 10.6.2</title><content type='html'>MBP started overheating after this update. PRAM resetting, as google suggested, helped. No other significant damages detected.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-4250524663273810764?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/4250524663273810764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=4250524663273810764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/4250524663273810764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/4250524663273810764'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/11/os-x-1062.html' title='OS X 10.6.2'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-8698879557559954414</id><published>2009-08-10T00:31:00.004-07:00</published><updated>2009-08-10T00:42:35.413-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='audiobook'/><category scheme='http://www.blogger.com/atom/ns#' term='m4b'/><category scheme='http://www.blogger.com/atom/ns#' term='iPod'/><category scheme='http://www.blogger.com/atom/ns#' term='cocoa'/><title type='text'>Tasting Cocoa</title><content type='html'>The best way to learn new technology is to use it. Here is a small project I've put together while learning Mac OS X/Cocoa development: &lt;a href="http://gonzo.kiev.ua/projects/audiobookbinder/"&gt;AudioBookBinder&lt;/a&gt;, may be someone will find it useful. This utility takes collection of mp3 files (or any other audio format recognizable by OS X) and binds it to one audiobook(m4b file) suitable for listening on iPod. The initial idea was to make it a GUI app, but I've been spoiled with command line power for too long.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-8698879557559954414?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/8698879557559954414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=8698879557559954414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/8698879557559954414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/8698879557559954414'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/08/tasting-cocoa.html' title='Tasting Cocoa'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-7436732972127495495</id><published>2009-07-08T10:18:00.004-07:00</published><updated>2009-07-08T11:22:05.905-07:00</updated><title type='text'>Is it self-hosted yet?</title><content type='html'>Good news everyone! Last two days I've been testing FreeBSD/mips by running buildworld on netbooted &lt;a href="http://wiki.freebsd.org/FreeBSD/mips/UBNT-RouterStation"&gt;RouterStation&lt;/a&gt; with root mounted over NFS. So far so good, it successfully completed twice. &lt;br /&gt;&lt;br /&gt;A couple of weeks ago arch-dependent part of libthr (both kernel and userland) was implemented and it seems to work. "Seems to work" means that it passes thr1 and thr2 tests from stress2 and python's test_thread[ing].py. And yes, python and perl build fine on the same board from the ports do work. As bash et al :) Though perl should be built without Perl malloc but it's on my ToDo list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-7436732972127495495?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/7436732972127495495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=7436732972127495495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/7436732972127495495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/7436732972127495495'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/07/is-it-self-hosted-yet.html' title='Is it self-hosted yet?'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-9036381425997581830</id><published>2009-05-06T16:12:00.003-07:00</published><updated>2009-05-06T16:31:06.031-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><title type='text'>vim &amp; xcodebuild</title><content type='html'>Small hint to those rare birds who (like me) want to work on his Xcode projects over ssh connection and uses vim for this purpose. Usually I use quickfix mode but there is no compiler file for Xcode in vim distribution. Luckily there is obsolete pbx.vim (compiler file for Apple Project Builder, predecessor of Xcode) that could be easily converted to support modern tools. Of course, writing xcode.vim from scratch would take only a couple of minutes but who wants to make it manually if it's possible to automate this process? &lt;br /&gt;&lt;br /&gt;Here is magic command: &lt;br /&gt;&lt;blockquote&gt;cat /usr/share/vim/vim72/compiler/pbx.vim | sed s/pbx/xcode/g  &gt; /usr/share/vim/vim72/compiler/xcode.vim&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Stay tuned. Next week I'll teach you how to control Death Star with simple perl script.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-9036381425997581830?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/9036381425997581830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=9036381425997581830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/9036381425997581830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/9036381425997581830'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/05/vim-xcodebuild.html' title='vim &amp; xcodebuild'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-6122330383202008407</id><published>2009-05-05T13:37:00.002-07:00</published><updated>2009-05-05T13:42:13.278-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='ohloh'/><title type='text'>ohloh and FreeBSD</title><content type='html'>ohloh seems to be unable to grind FreeBSD's svn repo. I've been watching for its efforts for several days now and commits progress meter resets from time to time: &lt;br /&gt;https://www.ohloh.net/p/freebsd/enlistments&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-6122330383202008407?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/6122330383202008407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=6122330383202008407' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/6122330383202008407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/6122330383202008407'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/05/ohloh-and-freebsd.html' title='ohloh and FreeBSD'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-7103475565786476903</id><published>2009-04-30T22:23:00.002-07:00</published><updated>2009-04-30T22:30:39.570-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='RouterStation'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><title type='text'>singleuser on routerstation</title><content type='html'>&lt;a href="http://people.freebsd.org/~gonzo/mips/routerstation.log"&gt;http://people.freebsd.org/~gonzo/mips/routerstation.log&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some issues still pending though. Cache management is major one. Things seemed to work fine in emulation but backfired into face with real hardware. I ran into several "random" bugs that were narrowed down to caches. More to go :( Also ethernet driver performance is low but it's easier then hunting down ethereal cache matters. Or so I think.&lt;br /&gt;&lt;br /&gt;This weekend will be dedicated to making openocd work with routerstation, learning debugging and profiling techniques for MIPS hardware and improving FreeBSD/MIPS pieces of DDB.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-7103475565786476903?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/7103475565786476903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=7103475565786476903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/7103475565786476903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/7103475565786476903'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/04/singleuser-on-routerstation.html' title='singleuser on routerstation'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-6027367384579819492</id><published>2009-04-27T15:36:00.005-07:00</published><updated>2009-04-27T15:43:18.741-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openocd'/><category scheme='http://www.blogger.com/atom/ns#' term='EJTAG'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><title type='text'>More on OpenOCD and MIPS/EJTAG</title><content type='html'>Well, I was overly optimistic. OpenOCD can halt CPU, reset, examine registers and perform software breakpoints. Trying to figure out what's wrong with EJTAG support I skimmed the code and the state of it is, well, poor. Current implementation assumes that target is of the same endianness as host. That's why number of HW breakpoints/watchpoints was detected wrong. But even fixing (endianness and breakpoints) and implementing(watchpoints) in hack'n'slash mode didn't help. I still can't get bp/wp to work. But I'll definitely try. May be next weekend.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-6027367384579819492?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/6027367384579819492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=6027367384579819492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/6027367384579819492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/6027367384579819492'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/04/more-on-openocd-and-mipsejtag.html' title='More on OpenOCD and MIPS/EJTAG'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-53008915897577392</id><published>2009-04-19T11:51:00.007-07:00</published><updated>2009-04-19T14:28:32.226-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='openocd'/><category scheme='http://www.blogger.com/atom/ns#' term='EJTAG'/><category scheme='http://www.blogger.com/atom/ns#' term='Flyswatter'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><title type='text'>JTAG, OpenOCD &amp; FreeBSD</title><content type='html'>As it was &lt;a href="http://bsddev.blogspot.com/2009/02/wip-ubiquitys-router-station.html"&gt;mentioned earlier&lt;/a&gt; now I have new cool toy to play with. Flyswatter JTAG with MIPS14 adapter. Though Tin Can Tools kindly warned me that OpenOCD did not support EJTAG/MIPS I decided to order it and it turned to be a good deal. Why? Because there is EJTAG/MIPS support for OpenOCD as of 0.1.0. Moreover it works really nice with FreeBSD port of libftdi. So all I had to do was to make &lt;a href="http://people.freebsd.org/~gonzo/ports/openocd.tar"&gt;devel/openocd&lt;/a&gt; port and tweak some configs. And that's it. Stock gdb for MIPS is not ready yet, but one can attach, examine registers, single step using telnet interface to daemon: &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;[gonzo@figaro:][~/FreeBSD] &lt;br /&gt;% telnet localhost 4444&lt;br /&gt;Trying 127.0.0.1...&lt;br /&gt;Connected to localhost.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;Open On-Chip Debugger&lt;br /&gt;&amp;gt; halt&lt;br /&gt;target state: halted&lt;br /&gt;target halted due to debug-request, pc: 0x8023b974&lt;br /&gt;&lt;br /&gt;&amp;gt; reg&lt;br /&gt;(0) zero (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(1) at (/32): 0x802c0000 (dirty: 0, valid: 1)&lt;br /&gt;(2) v0 (/32): 0x00000001 (dirty: 0, valid: 1)&lt;br /&gt;(3) v1 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(4) a0 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(5) a1 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(6) a2 (/32): 0x80280b28 (dirty: 0, valid: 1)&lt;br /&gt;(7) a3 (/32): 0x00000602 (dirty: 0, valid: 1)&lt;br /&gt;(8) t0 (/32): 0x802c10b0 (dirty: 0, valid: 1)&lt;br /&gt;(9) t1 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(10) t2 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(11) t3 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(12) t4 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(13) t5 (/32): 0x00000001 (dirty: 0, valid: 1)&lt;br /&gt;(14) t6 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(15) t7 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(16) s0 (/32): 0xc082abe0 (dirty: 0, valid: 1)&lt;br /&gt;(17) s1 (/32): 0x801312a8 (dirty: 0, valid: 1)&lt;br /&gt;(18) s2 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(19) s3 (/32): 0xc0828b20 (dirty: 0, valid: 1)&lt;br /&gt;(20) s4 (/32): 0xc0793ea0 (dirty: 0, valid: 1)&lt;br /&gt;(21) s5 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(22) s6 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(23) s7 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(24) t8 (/32): 0x02887fa0 (dirty: 0, valid: 1)&lt;br /&gt;(25) t9 (/32): 0x00000002 (dirty: 0, valid: 1)&lt;br /&gt;(26) k0 (/32): 0x8024e3a0 (dirty: 0, valid: 1)&lt;br /&gt;(27) k1 (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(28) gp (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(29) sp (/32): 0xc0793e30 (dirty: 0, valid: 1)&lt;br /&gt;(30) fp (/32): 0x00000000 (dirty: 0, valid: 1)&lt;br /&gt;(31) ra (/32): 0x8023b964 (dirty: 0, valid: 1)&lt;br /&gt;(32) status (/32): 0x0000ff01 (dirty: 0, valid: 1)&lt;br /&gt;(33) lo (/32): 0x0000001c (dirty: 0, valid: 1)&lt;br /&gt;(34) hi (/32): 0x00000020 (dirty: 0, valid: 1)&lt;br /&gt;(35) badvaddr (/32): 0xc0797dc8 (dirty: 0, valid: 1)&lt;br /&gt;(36) cause (/32): 0x40008000 (dirty: 0, valid: 1)&lt;br /&gt;(37) pc (/32): 0x8023b974 (dirty: 0, valid: 1)&lt;br /&gt;&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-53008915897577392?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/53008915897577392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=53008915897577392' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/53008915897577392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/53008915897577392'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/04/jtag-openocd-freebsd.html' title='JTAG, OpenOCD &amp;amp; FreeBSD'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-648914743219937380.post-223378485464686269</id><published>2009-04-10T09:45:00.001-07:00</published><updated>2009-04-10T21:46:17.064-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='SVK'/><title type='text'>svk &amp; vim</title><content type='html'>My SCM of choice for FreeBSD-related projects is SVK (it's much faster then subversion and provides offline access to repo history, easy branching/merging and so on). And my editor of choice is vim. And it turns out vim doesn't highlight svk commit files. What a shame. No bright colors for happy hacker who is about to commit clean and robust code (or break buildworld, whatever).  So I spent 20 minutes of tweaking svn.vim and produced &lt;a href="http://www.vim.org/scripts/script.php?script_id=2604"&gt;this&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;It's a syntax file for svk-commit* and two functions to place file under/out of SVK control (just like in perforce one can tweak commit file to select which files will be committed and which won't).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-223378485464686269?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/223378485464686269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=223378485464686269' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/223378485464686269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/223378485464686269'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/04/svk-vim.html' title='svk &amp; vim'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-5044285979521229165</id><published>2009-02-26T13:30:00.005-08:00</published><updated>2009-02-26T13:56:02.427-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JTAG'/><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='Flyswatter'/><category scheme='http://www.blogger.com/atom/ns#' term='RouterStation'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><title type='text'>WIP: Ubiquity's router station</title><content type='html'>So it has been a month since last post about this device and I think it's time to announce current state of affairs.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt; UART: just works&lt;br /&gt;  &lt;li&gt; PCI controller: kind of works. Proper interrupt handling/routing required.&lt;br /&gt;  &lt;li&gt; On-board ethernet controller: WAN port works fine. Mounts NFS root/loads init. Some minor work should be done in order to get both ports working. &lt;br /&gt;  &lt;li&gt; Integrated OHCI controller: kernel detects and initializes it. Need USB cable to connect something to headers on the board and test if it actually works. &lt;br /&gt;  &lt;li&gt; Integrated EHCI controller: in progress. Some refactoring of current MIPS bus_space implementation required. &lt;br /&gt;  &lt;li&gt; GPIO: to be done&lt;br /&gt;  &lt;li&gt; Flash memory: to be done&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;At the moment further progress was blocked with something that looks like memory corruption. It's hard to trace with ktr(4) and printf(9) so I ordered &lt;a href="http://www.tincantools.com/product.php?productid=16134"&gt;Flyswatter JTAG adapter&lt;/a&gt; and &lt;a href="http://www.tincantools.com/product.php?productid=16145&amp;cat=251&amp;page=1"&gt;MIPS14 adapter&lt;/a&gt; from Tin Can Tools. I was warned that Flyswatter/MIPS combination is not supported by OpenOCD but I'd better spend some time making it work then tracing obscure memory corruptions in the wild.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-5044285979521229165?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/5044285979521229165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=5044285979521229165' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5044285979521229165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5044285979521229165'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/02/wip-ubiquitys-router-station.html' title='WIP: Ubiquity&apos;s router station'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-8763723936948532450</id><published>2009-02-23T16:33:00.011-08:00</published><updated>2009-03-06T11:01:57.222-08:00</updated><title type='text'>Scheduled for reading</title><content type='html'>Has just received two books from Amazon. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.amazon.ca/Beautiful-Architecture-Diomidis-Spinellis/dp/059651798X/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1235435653&amp;sr=8-3"&gt;&lt;img style="float:left; margin:0px auto 10px; cursor:pointer; cursor:hand;width: 180px; height: 180px;" src="http://ecx.images-amazon.com/images/I/311e-9x8UQL._SL500_AA180_.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first one is Beautiful Architecture by fellow FreeBSD developer Diomidis Spinellis and Georgios Gousios. I bought it because software design is not my strongest skill and there is a lot of place for improvement. And learning from real life examples is always better then reading pure theory.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.amazon.ca/Productive-Programmer-David-Bock/dp/0596519788/ref=pd_bxgy_b_img_b?ie=UTF8&amp;qid=1235435653&amp;sr=8-3"&gt;&lt;img style="float:right; margin:0px auto 10px; cursor:pointer; cursor:hand;width: 240px; height: 240px;" src="http://ecx.images-amazon.com/images/I/61dx4Iu-fyL._SL500_AA240_.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The other one is The Productive Programmer by David Bock. Productivity is my sweet spot (well, it's more about cool tips then real productivity boost). This had nice reviews so I decided to give it a try.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-8763723936948532450?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/8763723936948532450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=8763723936948532450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/8763723936948532450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/8763723936948532450'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/02/scheduled-for-reading.html' title='Scheduled for reading'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-3591026257228821926</id><published>2009-01-26T13:46:00.004-08:00</published><updated>2009-01-27T18:38:28.081-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Atheror'/><category scheme='http://www.blogger.com/atom/ns#' term='AR71XX'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><title type='text'>FreeBSD/mips: what's cooking</title><content type='html'>In last two months I've got two new toys: WGT634U from bms@ and Ubiquity Networks' Router Station 2 provided by manufacturer. The first one is Broadcom's Sentry5 based and the second one is built on Atheros' AR7100 chip. As AR7100 is more advanced technology (and has less obscure design, at least it seams less obscure to me) I decided to pick up this low hanging fruit. So far so good: kernel boots, PCI bridge detects Atheros miniPCI wireless card. GigE driver is on its way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-3591026257228821926?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/3591026257228821926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=3591026257228821926' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/3591026257228821926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/3591026257228821926'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/01/freebsdmips-whats-cooking.html' title='FreeBSD/mips: what&apos;s cooking'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-648914743219937380.post-4556725460181399146</id><published>2009-01-21T17:12:00.002-08:00</published><updated>2009-12-08T10:29:41.037-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='thinkpad'/><category scheme='http://www.blogger.com/atom/ns#' term='t400'/><title type='text'>Thinkpad T400 and FreeBSD</title><content type='html'>Finally I got my hands on new and shiny Lenovo Thinkpad T400. What can I say? It's cool. My only complaint about T60 was its somewhat dim display (yes, I tried to save some money on this vital part and got punished). This time I ordered model with LED backlight and it's worth every dime spent :) &lt;br /&gt;&lt;br /&gt;My configuration also included Atheros wifi, built-in bluetooth, Intel GMA X4500 graphics (I'm not in games, really). Unfortunately 7.1 was able to run wifi. Newer HAL did the trick though and here I am: eating my own dog food - running -CURRENT on a workhorse. &lt;br /&gt;&lt;br /&gt;Intel graphics was kind of disappointment. I expected no problems with this integrated chipset but there were a lot. "Ghost" video output (or companion display) that was causing mplayer not to run in fullscreen mode (fixed with xrandr). With SWCursor option off text console is garbled when switching to it from X. mplayer is somewhat laggish in full screen mode :( I hope intel driver will be updated soon, meanwhile I'll refrain from watching movies (it should boost my productivity :))&lt;br /&gt;&lt;br /&gt;UPD: It seems that Intel Video artifacts is due to unsymmetrical memory layout (I have 2G + 1G). Windows 7 is affected as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-4556725460181399146?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/4556725460181399146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=4556725460181399146' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/4556725460181399146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/4556725460181399146'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2009/01/thinkpad-t400-and-freebsd.html' title='Thinkpad T400 and FreeBSD'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-5310219641405918626</id><published>2008-11-03T20:01:00.005-08:00</published><updated>2008-11-03T21:10:04.254-08:00</updated><title type='text'>FreeBSD/MIPS: something lost, something gained</title><content type='html'>And again long pause in blogging. In this 4 months several things happened to me: I relocated to Vancouver, was interviewed and rejected by Microsoft (don't know why they contacted me in the first place), met new people (philip@ and thompa@ among them), saw new places and even got some free time and learned to cook (it turned out to be fun!).&lt;br /&gt;&lt;br /&gt;Being close(geographically) to PMC-Sierra, major MIPS vendor, I tried to contact them and ask for a donation for FreeBSD/MIPS project. Got no reply, though. Predictable result, but it's better to try and fail then have never try at all. &lt;br /&gt; &lt;br /&gt;Relocations is ideal way to get rid of garbage that has been accumulated through years. Unfortunately Mikrotik RB532, ADM5120-based Edimax device and Linksys WRT54GL were in the "garbage" I had to left. So it's kind of a loss. But life without wireless AP is miserable (don't blame me, I'm just a geek) so new and shiny &lt;a href="http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;childpagename=US%2FLayout&amp;cid=1175239516849&amp;pagename=Linksys%2FCommon%2FVisitorWrapper"&gt;Linksys wrt160n&lt;/a&gt; was bought from nearest Future Shop. And I even managed to solder serial console to it. And it works. I'm really bad with soldering iron so it's something I'm going to be proud of for the next two years. By the way the process &lt;a href="http://gonzo.kiev.ua/?page_id=256"&gt;has been documented&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Though it took some efforts FreeBSD was successfully booted on it! Well, &lt;a href="http://people.freebsd.org/~gonzo/bcm47xx.log"&gt;sort of successfully&lt;/a&gt;. But I'm making progress and going to keep you informed! Stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-5310219641405918626?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/5310219641405918626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=5310219641405918626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5310219641405918626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5310219641405918626'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2008/11/freebsdmips-something-lost-something.html' title='FreeBSD/MIPS: something lost, something gained'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-6056551174260261914</id><published>2008-06-11T07:11:00.002-07:00</published><updated>2008-06-11T07:43:30.744-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='bugbusting'/><category scheme='http://www.blogger.com/atom/ns#' term='PR'/><title type='text'>The Joy of Bugbusting</title><content type='html'>While waiting for MIPS toolchain import to happen I entertain myself with bugbusting. You should try it sometime. GNATS jungle, small and large bugs are sneaking around, scent of rotten emails in the air. I don't feel like hunting down large bugs. They're dangerous beasts. It's much better to deal with small ones. Pick a (one|two|three|up-to-twenty)-liner and fix it. Then you can bring it home, varnish it and eventually MFC it. Nice outdoor activity for developers :) &lt;br /&gt;PS&lt;br /&gt;The first PR I've nailed: &lt;a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=123685"&gt;kern/123685&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-6056551174260261914?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/6056551174260261914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=6056551174260261914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/6056551174260261914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/6056551174260261914'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2008/06/joy-of-bugbusting.html' title='The Joy of Bugbusting'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-3327180615824702651</id><published>2008-05-29T07:36:00.004-07:00</published><updated>2008-05-29T08:28:05.243-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='sitrep'/><title type='text'>bsddev blog SitRep</title><content type='html'>Long time no blog. Many things have happened during last 6 months: I got a commit bit, FreeBSD/MIPS reached multiuser and started migration from P4 to CVS. Right now we're waiting for toolchain patches to be imported to contrib/binutils properly. So let's prepare to celebrate buildable FreeBSD/MIPS world in a couple of weeks! Meanwhile I'm busy with getting latest zaptel (they changed name to DAHDI, actually) drivers to FreeBSD and a couple of side aсtivities like digging into aio code from OpenSolaris/Linux/FreeBSD. Hope to blog more regularly now. Stay tuned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-3327180615824702651?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/3327180615824702651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=3327180615824702651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/3327180615824702651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/3327180615824702651'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2008/05/bsddev-blog-sitrep.html' title='bsddev blog SitRep'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-3050483446321954132</id><published>2007-12-28T06:57:00.000-08:00</published><updated>2007-12-28T07:07:48.604-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><category scheme='http://www.blogger.com/atom/ns#' term='Juniper'/><title type='text'>NY gift from Juniper</title><content type='html'>Juniper released FreeBSD/MIPS port to public. There are no references to JNPR-specific hardware pieces but a lot of mature code for generic MIPS devices that mips2 tree lacks: VM/pmap, libc, FPU support. Nice gift, thanks JNPR!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-3050483446321954132?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/3050483446321954132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=3050483446321954132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/3050483446321954132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/3050483446321954132'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2007/12/ny-gift-from-juniper.html' title='NY gift from Juniper'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-40408879002020905</id><published>2007-12-09T11:37:00.000-08:00</published><updated>2007-12-09T11:46:52.898-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rb532'/><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='mikrotik'/><category scheme='http://www.blogger.com/atom/ns#' term='drivers'/><title type='text'>RB532 progress</title><content type='html'>This weekend I spent writing driver for IDT RC32434 on-board Ethernet adapter. Weird hobby, isn't it? Writing NIC drivers is new to me so I shared my time between reading if_XX sources, reading IDT specs and writing my own code. Task turned out easier then it appeared and 15 minutes ago I managed to mount root over NFS using kr0 interface. Time to get some beer and celebrate!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-40408879002020905?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/40408879002020905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=40408879002020905' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/40408879002020905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/40408879002020905'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2007/12/rb532-progress.html' title='RB532 progress'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-2903140644445029498</id><published>2007-12-01T15:38:00.000-08:00</published><updated>2007-12-01T16:28:01.322-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='MIPS'/><category scheme='http://www.blogger.com/atom/ns#' term='routerboard'/><title type='text'>Mikrotik RB532 - single user mode.</title><content type='html'>Today I managed to get shell prompt on Mikrotik's Routerboard 532. So now we have 3 platforms with single user mode for FreeBSD/mips, not very useful :)  The last problem was getting high-level console interface working. I always fell lost when it comes to resource allocation and uart stuff. I should write a couple of posts on these subjects to memorize all details better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-2903140644445029498?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/2903140644445029498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=2903140644445029498' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/2903140644445029498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/2903140644445029498'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2007/12/mikrotik-rb532-single-user-mode.html' title='Mikrotik RB532 - single user mode.'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-5078145622768139670</id><published>2007-11-25T05:22:00.000-08:00</published><updated>2007-11-28T10:50:12.675-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='zaptel'/><category scheme='http://www.blogger.com/atom/ns#' term='taskqueue'/><title type='text'>INTR_FAST and selwakeup</title><content type='html'>I stumbled over this problem a couple of years ago, ignored it, was punished for my carelessness, came out with hackerish solution and now I know "The Right Way" to solve this issue. So, the headache starts when you're trying to wakeup userland application polling on a descriptor from INTR_FAST IRQ handler (for 7.X and later that would be interrupt filter). INTR_FAST/interrupt filter  routines are usually used for timing-critical tasks and run in IRQ dispatcher context, so no operations that may cause context switch are allowed in this code. Unfortunately &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=selwakeup&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+7-current&amp;format=html"&gt;selwakeup(9)&lt;/a&gt; tries to acquire sellock that leads to a possible context switch and leaves us in a total mess. My solution was handmade kernel thread that has been running through list of channels and performed all dirty work, not the cleanest and easiest to maintain code. "Zaptel-bsd take 2" utilizes &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=taskqueue&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+7-current&amp;format=html"&gt;taskqueue(9)&lt;/a&gt; interface to work around IRQ handler limitations. There is handler routine:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;static void &lt;br /&gt;handle_selwakeup(void *context, int pending) &lt;br /&gt;{&lt;br /&gt;    struct selinfo *sel = context;&lt;br /&gt;    selwakeup(sel);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;then selinfo/task structures for every channel:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;...&lt;br /&gt;    /* thingy for select stuff */&lt;br /&gt;    struct selinfo  sel;    &lt;br /&gt;    struct task     selwakup_task;&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;which should be initialized during channel allocation:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;...&lt;br /&gt;    TASK_INIT(&amp;chan-&gt;selwakup_task, 0, &lt;br /&gt;        handle_selwakeup, &amp;chan-&gt;sel);&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and used anytime we'd like to call selwakeup:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;...&lt;br /&gt;    taskqueue_enqueue_fast(taskqueue_fast, &lt;br /&gt;        &amp;timer-&gt;selwakup_task);&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-5078145622768139670?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/5078145622768139670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=5078145622768139670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5078145622768139670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/5078145622768139670'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2007/11/intrfast-and-selwakeup.html' title='INTR_FAST and selwakeup'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-9063330924153813768</id><published>2007-11-20T12:58:00.000-08:00</published><updated>2007-11-20T13:00:04.083-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='module parameters'/><category scheme='http://www.blogger.com/atom/ns#' term='tunables'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>Module/kernel parameters</title><content type='html'>Sometimes it's desirable to pass some arguments to module to customize its behavior, e.g.: to set/unset verbosity level of debug output, set operation mode etc... Linux modules can get this information from insmod utility, but kldload is not capable of doing such kind of things. What a pity. But don't get desperate - tunables to the rescue!&lt;br /&gt;&lt;br /&gt;Just like an ordinary command shell (bash, csh, sh) kernel has its own environment, the set of &amp;lt;name, value&amp;gt; pairs. You can get, set, test, unset these variables using &lt;b&gt;getenv&lt;/b&gt;, &lt;b&gt;setenv&lt;/b&gt;, &lt;b&gt;testenv&lt;/b&gt;, &lt;b&gt;unsetenv&lt;/b&gt; functions in the kernel and &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=kenv&amp;sektion=2&amp;apropos=0&amp;manpath=FreeBSD+7-current"&gt;&lt;b&gt;kenv(2)&lt;/b&gt;&lt;/a&gt; syscall or &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=kenv&amp;sektion=1&amp;apropos=0&amp;manpath=FreeBSD+7-current"&gt;&lt;b&gt;kenv(1)&lt;/b&gt;&lt;/a&gt; command in userland. So if you want to set verbosity level for module, you would do something like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    # kenv zaptel.debug=1&lt;br /&gt;    # kldload ./zaptel.ko&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and then in module initialization routine:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    static int debug = 0; /* Hush-hush */&lt;br /&gt;    ...&lt;br /&gt;    char * value = getenv("zaptel.debug");&lt;br /&gt;    if (value) {&lt;br /&gt;        debug = strtol(value, NULL, 10);&lt;br /&gt;        freeenv(value);&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;Too much code for such a simple task, don't you think? Yeah, like for every common task there are useful macroses defined in kernel headers, you should just find them. &lt;a href="http://www.userfriendly.org/cartoons/archives/00sep/uf002235.gif"&gt;Heavy coffeinated kernel hackers&lt;/a&gt; knew most of them. In this particular case neat code would look something like that (for statically initialized variable):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    static int debug = 0; /* Hush-hush */&lt;br /&gt;    TUNABLE_INT("zaptel.debug", &amp;debug);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;or, if debug is the member of structure or local variable:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    sc-&gt;debug = 0;&lt;br /&gt;    TUNABLE_INT_FETCH("zaptel.debug", &amp;sc-&gt;debug);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;TUNABLE_XXX macroses exist for INT, LONG, ULONG and STR types. TUNABLE_STR unlike the others requires third parameter - maximum size of the string. For a dynamic value retrieval every type has TUNABLE_XXX_FETCH macro defined. Nota bene: if there is no environent variable set with requested name, the value of acceptor variable remains untouched.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-9063330924153813768?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/9063330924153813768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=9063330924153813768' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/9063330924153813768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/9063330924153813768'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2007/11/modulekernel-parameters.html' title='Module/kernel parameters'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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-648914743219937380.post-4064282434764762806</id><published>2007-10-29T14:04:00.000-07:00</published><updated>2007-11-13T08:27:42.826-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='intro'/><title type='text'>Introduction</title><content type='html'>Hello. My name is Oleksandr Tymoshenko. I'm a software developer. My involvement in FreeBSD project started in 1998 by making static entries in ARP table really static. Though patch hasn't made out of my university's network it was "the beginning of a beautiful friendship". My first significant contribution to FreeBSD community (or so I'd like to think) was porting of  &lt;a href="http://www.voip-info.org/wiki/view/Zaptel"&gt;Zaptel drivers&lt;/a&gt; from Linux to FreeBSD. About two years ago I happened to work with a MIPS board and got some interest to the architecture. Since then I've been doing my best trying to bring FreeBSD to this platform and, actually, succeeded to some extent with a help from developers crowd.&lt;br /&gt;&lt;br /&gt;In this blog I'm going to make notes on drivers development and porting process. Mostly for myself - to memorize  gotchas and  pitfalls which happen  from time to time. But I hope that these notes will be of some use to other kernel hacker wannabes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/648914743219937380-4064282434764762806?l=bsddev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bsddev.blogspot.com/feeds/4064282434764762806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=648914743219937380&amp;postID=4064282434764762806' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/4064282434764762806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/648914743219937380/posts/default/4064282434764762806'/><link rel='alternate' type='text/html' href='http://bsddev.blogspot.com/2007/09/introduction.html' title='Introduction'/><author><name>Oleksandr Tymoshenko</name><uri>http://www.blogger.com/profile/03645081747877285217</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>
