Monthly Archives: April 2009

Linuxulator to the rescue

As I usually have a few classes at school which requires special software, I wanted to be able to run some of this software on my own computer, as there are student versions of some of the software. One of these is ModelSim from MentorGraphics. ModelSim is basically a simulator for hardware designs, and I use it to simulate VHDL. Unfortunately, ModelSim only comes for Windows, Linux and Solaris. As I only run FreeBSD on my laptop, no software for me :( But wait, FreeBSD have the linuxulator!, which allows Linux binaries to be run unmodified on a FreeBSD host (It is basically an implementation of Linux syscalls within the FreeBSD kernel). The steps I needed to go through to install the Linux version of ModelSim was pretty easy.

First of all, one of the emulators/linux_base* ports needs to be installed. I chose linux_base-fc6, as I'd like the Linux 2.6 support (although I'm not sure if that is actually needed). After installing the port, a linux userland appears in /compat/linux. To make sure I don't get any problems with programs needing procfs, I mount linprocfs(5) as well.

There, easy! Ready to run linux programs. Now, ModelSim comes with its own installer, which needs a few additional files that you can get at their web-site. However, programs may depend on additional libraries, and this is IMO the most tricky part about the linuxulator. In my case, I got some errors complaining about not finding libXsomething. Luckily, there are a few ports that you can install for the most common libraries. In this case, I had to install x11/linux-xorg-libs. Although a very old version, I was able to run the ModelSim installer and the installed binaries afterwards. Awesome!

ExpressCard

Now that I've managed to knock down the number of bugs in NEWCARD to a more reasonable level, I've started looking at ExpressCard again.As you may know, FreeBSD supports ExpressCard right now for usb devices. They all work, and there's no additional work needed here, except maybe to make more drivers. In fact, I recently purchased an ExpressCard to CardBus adapter (one that lets me plug in an expressCard into a CardBus slot) and it worked with all the usb-based ExpressCards that I have laying around with no changes.The problem with ExpressCard for PCIe-based devices is one of resource allocation. If the BIOS allocates the resource, then the ExpressCard works without hot-plug. If the BIOS doesn't, then we can see the device with pciconf -l, as well as probe the device. However, since there's no resources setup for the PCI bridge, attempts for the driver to allocate them fail. There's also some bus numbering issues as well.I've started to attack the resource problem. I'll keep people posted

ExpressCard

Now that I've managed to knock down the number of bugs in NEWCARD to a more reasonable level, I've started looking at ExpressCard again.

As you may know, FreeBSD supports ExpressCard right now for usb devices. They all work, and there's no additional work needed here, except maybe to make more drivers. In fact, I recently purchased an ExpressCard to CardBus adapter (one that lets me plug in an expressCard into a CardBus slot) and it worked with all the usb-based ExpressCards that I have laying around with no changes.

The problem with ExpressCard for PCIe-based devices is one of resource allocation. If the BIOS allocates the resource, then the ExpressCard works without hot-plug. If the BIOS doesn't, then we can see the device with pciconf -l, as well as probe the device. However, since there's no resources setup for the PCI bridge, attempts for the driver to allocate them fail. There's also some bus numbering issues as well.

I've started to attack the resource problem. I'll keep people posted

50th BSD Video Posted: All DCBSDCon ’09 Videos Live

Jason Dixon has made available the last 4 videos from DCBSDCon 2009. The last video marks the 50th video uploaded to the BSDConferences YouTube channel. This channel was created less than 5 months ago and now has 924 subscribers from authenticated YouTube users, and the videos have been viewed over 76,000 times by users from around the world (includes partial views).The newest 4 videos are :The average number of daily views is around 500, with significant spikes above 1,500 in the days after a popular new video is announced:And the top 10 videos sorted by views (biased towards older videos that have been available longer) are :

50th BSD Video Posted: All DCBSDCon ’09 Videos Live

Jason Dixon has made available the last 4 videos from DCBSDCon 2009. The last video marks the 50th video uploaded to the BSDConferences YouTube channel. This channel was created less than 5 months ago and now has 924 subscribers from authenticated YouTube users, and the videos have been viewed over 76,000 times by users from around the world (includes partial views).

The newest 4 videos are :
The average number of daily views is around 500, with significant spikes above 1,500 in the days after a popular new video is announced:
And the top 10 videos sorted by views (biased towards older videos that have been available longer) are :

Partial ports thaw

The ports tree is now tagged and partially thawed. Until 7.2 is released, sweeping commits still need explicit approval from portmgr to assure that tags can be slipped for potential security issues. For more information what constitutes a sweeping change, see the portmgr web pages.

PmcTools talk at the Bangalore chapter of the ACM

In April 2009 I was invited to speak on FreeBSD/PmcTools by the Bangalore chapter of the ACM. The slides for this talk are available at: http://people.freebsd.org/~jkoshy/download/acm-apr-09.pdf (550KB, PDF).

This was an overview talk. The talk briefly touched upon: the motivations and goals of the project, the programming APIs, some aspects of the implementation and on possible future work.

PmcTools talk at the Bangalore chapter of the ACM

In April 2009 I was invited to speak on FreeBSD/PmcTools by the Bangalore chapter of the ACM. The slides for this talk are available at: http://people.freebsd.org/~jkoshy/download/acm-apr-09.pdf (550KB, PDF).

This was an overview talk. The talk briefly touched upon: the motivations and goals of the project, the programming APIs, some aspects of the implementation and on possible future work.

JTAG, OpenOCD & FreeBSD

As it was mentioned earlier 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 devel/openocd 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:
[gonzo@figaro:][~/FreeBSD] % telnet localhost 4444Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.Open On-Chip Debugger> halttarget state: haltedtarget halted due to debug-request, pc: 0x8023b974> reg(0) zero (/32): 0x00000000 (dirty: 0, valid: 1)(1) at (/32): 0x802c0000 (dirty: 0, valid: 1)(2) v0 (/32): 0x00000001 (dirty: 0, valid: 1)(3) v1 (/32): 0x00000000 (dirty: 0, valid: 1)(4) a0 (/32): 0x00000000 (dirty: 0, valid: 1)(5) a1 (/32): 0x00000000 (dirty: 0, valid: 1)(6) a2 (/32): 0x80280b28 (dirty: 0, valid: 1)(7) a3 (/32): 0x00000602 (dirty: 0, valid: 1)(8) t0 (/32): 0x802c10b0 (dirty: 0, valid: 1)(9) t1 (/32): 0x00000000 (dirty: 0, valid: 1)(10) t2 (/32): 0x00000000 (dirty: 0, valid: 1)(11) t3 (/32): 0x00000000 (dirty: 0, valid: 1)(12) t4 (/32): 0x00000000 (dirty: 0, valid: 1)(13) t5 (/32): 0x00000001 (dirty: 0, valid: 1)(14) t6 (/32): 0x00000000 (dirty: 0, valid: 1)(15) t7 (/32): 0x00000000 (dirty: 0, valid: 1)(16) s0 (/32): 0xc082abe0 (dirty: 0, valid: 1)(17) s1 (/32): 0x801312a8 (dirty: 0, valid: 1)(18) s2 (/32): 0x00000000 (dirty: 0, valid: 1)(19) s3 (/32): 0xc0828b20 (dirty: 0, valid: 1)(20) s4 (/32): 0xc0793ea0 (dirty: 0, valid: 1)(21) s5 (/32): 0x00000000 (dirty: 0, valid: 1)(22) s6 (/32): 0x00000000 (dirty: 0, valid: 1)(23) s7 (/32): 0x00000000 (dirty: 0, valid: 1)(24) t8 (/32): 0x02887fa0 (dirty: 0, valid: 1)(25) t9 (/32): 0x00000002 (dirty: 0, valid: 1)(26) k0 (/32): 0x8024e3a0 (dirty: 0, valid: 1)(27) k1 (/32): 0x00000000 (dirty: 0, valid: 1)(28) gp (/32): 0x00000000 (dirty: 0, valid: 1)(29) sp (/32): 0xc0793e30 (dirty: 0, valid: 1)(30) fp (/32): 0x00000000 (dirty: 0, valid: 1)(31) ra (/32): 0x8023b964 (dirty: 0, valid: 1)(32) status (/32): 0x0000ff01 (dirty: 0, valid: 1)(33) lo (/32): 0x0000001c (dirty: 0, valid: 1)(34) hi (/32): 0x00000020 (dirty: 0, valid: 1)(35) badvaddr (/32): 0xc0797dc8 (dirty: 0, valid: 1)(36) cause (/32): 0x40008000 (dirty: 0, valid: 1)(37) pc (/32): 0x8023b974 (dirty: 0, valid: 1)>

JTAG, OpenOCD & FreeBSD

As it was mentioned earlier 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 devel/openocd 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:


[gonzo@figaro:][~/FreeBSD]
% telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> halt
target state: halted
target halted due to debug-request, pc: 0x8023b974

> reg
(0) zero (/32): 0x00000000 (dirty: 0, valid: 1)
(1) at (/32): 0x802c0000 (dirty: 0, valid: 1)
(2) v0 (/32): 0x00000001 (dirty: 0, valid: 1)
(3) v1 (/32): 0x00000000 (dirty: 0, valid: 1)
(4) a0 (/32): 0x00000000 (dirty: 0, valid: 1)
(5) a1 (/32): 0x00000000 (dirty: 0, valid: 1)
(6) a2 (/32): 0x80280b28 (dirty: 0, valid: 1)
(7) a3 (/32): 0x00000602 (dirty: 0, valid: 1)
(8) t0 (/32): 0x802c10b0 (dirty: 0, valid: 1)
(9) t1 (/32): 0x00000000 (dirty: 0, valid: 1)
(10) t2 (/32): 0x00000000 (dirty: 0, valid: 1)
(11) t3 (/32): 0x00000000 (dirty: 0, valid: 1)
(12) t4 (/32): 0x00000000 (dirty: 0, valid: 1)
(13) t5 (/32): 0x00000001 (dirty: 0, valid: 1)
(14) t6 (/32): 0x00000000 (dirty: 0, valid: 1)
(15) t7 (/32): 0x00000000 (dirty: 0, valid: 1)
(16) s0 (/32): 0xc082abe0 (dirty: 0, valid: 1)
(17) s1 (/32): 0x801312a8 (dirty: 0, valid: 1)
(18) s2 (/32): 0x00000000 (dirty: 0, valid: 1)
(19) s3 (/32): 0xc0828b20 (dirty: 0, valid: 1)
(20) s4 (/32): 0xc0793ea0 (dirty: 0, valid: 1)
(21) s5 (/32): 0x00000000 (dirty: 0, valid: 1)
(22) s6 (/32): 0x00000000 (dirty: 0, valid: 1)
(23) s7 (/32): 0x00000000 (dirty: 0, valid: 1)
(24) t8 (/32): 0x02887fa0 (dirty: 0, valid: 1)
(25) t9 (/32): 0x00000002 (dirty: 0, valid: 1)
(26) k0 (/32): 0x8024e3a0 (dirty: 0, valid: 1)
(27) k1 (/32): 0x00000000 (dirty: 0, valid: 1)
(28) gp (/32): 0x00000000 (dirty: 0, valid: 1)
(29) sp (/32): 0xc0793e30 (dirty: 0, valid: 1)
(30) fp (/32): 0x00000000 (dirty: 0, valid: 1)
(31) ra (/32): 0x8023b964 (dirty: 0, valid: 1)
(32) status (/32): 0x0000ff01 (dirty: 0, valid: 1)
(33) lo (/32): 0x0000001c (dirty: 0, valid: 1)
(34) hi (/32): 0x00000020 (dirty: 0, valid: 1)
(35) badvaddr (/32): 0xc0797dc8 (dirty: 0, valid: 1)
(36) cause (/32): 0x40008000 (dirty: 0, valid: 1)
(37) pc (/32): 0x8023b974 (dirty: 0, valid: 1)
>

AVR32 port

After Arnar Mar Sig posted his patchset for an initial skeleton of the AVR32 port almost a year ago, things started to catch speed in the beginning of this year. The work is done in perforce, and is progressing well. Currently, the system boots and recognizes most of the hardware, but linker work is required to be able to run init.

So far, I've been working on busdma support, grabbing the source from the mips port and adjusting it as well as implementing support for cache operations on the AVR32. It seems to work for now, as Arnar was able to get the ate(4) device driver to work with it.

The last work have been to design and implement a generic device clock framework. This is supposed to be used with devices in an architecture independent way, so that devices can be associated with a clock without knowing what clock it is (assigned internally for each architecture). This is necessary for a few devices to avoid #ifdefs all over the place. For instance, the at91_mci device is identical to the one used in AVR32, and it gets the clock frequency based on at91 machine dependant defines. Another property of this would be to export clocks using this interface to userland (AVR32 have a set of generic clocks as well).

SysInfo: a set of scripts which document your FreeBSD system

Hello guys,

As part of my bachelor thesis, I am developing a script that automatically documents settings of particular FreeBSD box.

The point of this script is to provide some descriptive information about unknown system’s configuration (hardware and software) for administrator who has no idea about the given system.

I would greatly appreciate if you guys could test it in your environment and provide some feedback.  I would also like to hear your opinions on what kind of information would you be interested in, in the above described situation. If your ideas happen to be reasonable, I will gladly implement them and include in the next release of SysInfo.


You may be also interested in the Forums thread I have created for this tool at the FreeBSD forums:
https://forums.freebsd.org/showthread.php?p=19321


And finally, the latest version of this script can be found at:
http://danger.rulez.sk/projects/sysinfo/

You can also conveniently install it from the official FreeBSD port using the sysutils/sysinfo port.


Thank you.

Ports tree frozen in preparation for 7.2-RELEASE

The ports tree is now frozen for the 7.2 release cycle.

No commits will be allowed without explicit portmgr approval. We hope we can keep the freeze short and go into slush after two weeks. The tree will be completely unfrozen after the release is announced. For the full schedule, see the release schedule.

As always, only commit that fix existing breakage will be allowed during the freeze and we encourage everyone will help fix as many ports as possible for this release. For more information about what kinds of commits are allowed during which period, please see the portmgr policies webpage.

Related posts:

  1. Ports freeze schedule for FreeBSD 8.0-RELEASE Below is the tentative schedule for the ports freeze in...
  2. Ports feature freeze now enforced As an experiment, there will not be a complete ports...
  3. Ports freeze to start April 13 The ports freeze for the upcoming release of 7.2 will...

Related posts brought to you by Yet Another Related Posts Plugin.

FreeBSD SLiM Themes

Kaum hab ich einmal Urlaub vergeude ich meine Zeit gleich mit Dingen die ich eigentlich garnicht kann. Dafür gibt es jetzt einen FreeBSD Theme für SLiM den ich seit Jahren zufrieden als Login Manager verwende.

Entpacken in /usr/local/share/slim/themes und danach in /usr/local/etc/slim.conf den Wert current_theme = freebsd-beastie oder freebsd-simple einstellen.





GNOME updated to 2.26 in FreeBSD Ports


The FreeBSD GNOME ports have been updated to GNOME 2.26.

A recent update of my laptop pulled in the new GNOME version:

FreeBSD GNOME 2.26 Screenshot

Version 2.26 of the GNOME desktop includes many updates:

  • Improved support for multiple monitors
  • Many enhancements to CD burning
  • Better support for live messaging (text, or audio & video) in the Empathy messaging client
  • And lots more…

For the full list of changes, please refer to the GNOME 2.26 release notes at:

http://library.gnome.org/misc/release-notes/2.26/

Posted in Computers, Free software, FreeBSD, GNOME, Open source, Software Tagged: Computers, Free software, FreeBSD, GNOME, Open source, Software

svk & vim

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 this. 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).

svk & vim

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 this.

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).

Announcing GNOME 2.26.0 for FreeBSD!

The FreeBSD GNOME team is proud to announce the release of GNOME 2.26.0 for FreeBSD. The official release notes can be found at http://library.gnome.org/misc/release-notes/2.26/ . On the FreeBSD front, we introduced a port of libxul 1.9 as an alternative for Firefox 2.0 as a Gecko provider. Almost all of the Gecko consumers can make use of this provider by setting: WITH_GECKO=libxul The GNOME 2.26 port was done by ahze, kwm, marcus, and mezz with contributions by Joseph S. Atkinson, Peter Wemm, Eric L. Chen, Martin Matuska, Craig Butler, and Pawel Worach.