Alan Perry's Blog

All | Firewire | General | Puget Sound OpenSolaris User Group | Stage Rally
20080106 Sunday January 06, 2008

Kablamo on the MacBook

In the immortal words of David Hobbs (SpeedTV F1 commentator - sorry can't find a good link), Solaris on the MacBook went kablamo not once but twice this past week.

The first time was when I tried to add_drv(1M) the ndis wrappered version of driver for the Broadcom BCM4328, the wifi hardware in the newer MacBooks. Followed the instructions to build the new binaries based on the Windows driver. Installed the binaries in their proper location. Ran add_drv as directed by the instructions. And panic.

The stack track showed cominttrap, trap, die. Very repeatable.

Just what I need - another panic to figure out!

The second time was when I tried to mount a IEEE-1394 HD containing a Solaris Nevada workspace and the build environment. I tried to use format(1M) to figure out what controller number the IEEE-1394 HD was assigned and, in the process, the system panicked. I work on the IEEE-1394 drivers and had seen that panic for the first time a couple of says earlier on the same drive when trying to configure it for ZFS.

I was able to successfully write about 10G of Nevada source and object code as well as build tools to the drive on one system and read them off onto the MacBook, so the crash is odd. Something to figure out in the coming week. At least figuring this one out is part of my day job.

Things weren't all bad. I was able to get the build environment set-up and the workspace copied over. A Solaris build is running at the moment and no problems so far.

I have noticed one dumb thing about the MacBook. The edge of the outer shell of the notebook is rather sharp. The base of my palms rest one either side of the touchpad and my wrist hangs over that sharp edge. After using the MacBook for a while, it looks like I have been trying to cut my wrists (no jokes from the anti-Mac crowd, please).

That's it for now.

I hope to get some time to work on MythTV this week. One of the toys that I got for Christmas is a Hauppauge HVR-950 NTSC/ATSC USB tuner. It would be fun to make that work with OpenSolaris!

( Jan 06 2008, 11:52:26 PM PST ) Permalink

20080102 Wednesday January 02, 2008

Updates on the MacBook and MythTV fronts

Well, the end of the holiday break is almost here and I figured that I would give an update to the ongoing OpenSolaris on MacBook and MythTV on OpenSolaris sagas.

OpenSolaris on MacBook

Well, it is mostly up and running.

I got the wired networking problem figured out. Added yet another PCI ID to postinstall script for the Yukon ethernet driver from Marvell (and patched up the checksums in the package so pkgadd wouldn't puke) and it worked. Having working networking makes installation of a lot of other things go much easier.

Don't have wifi working. Since they made my Mac Mini, Apple has switched to a Broadcom part, which is even harder to get a driver for than the Atheros wifi part in the Mac Mini. I don't need wifi working on the MacBook in the lab, but it would be nice to have when I give an OpenSolaris talk at WSU in a couple of weeks (A couple of weeks? Yikes!)

Audio is also not working. I installed OSS and it didn't even recognize that the system had audio hardware, even though the hdaudio driver was attached to it. After I removed the OSS package, the audio apps go through the motions of playing, but no sound comes from the speakers (or headphone jack). I guess I don't need audio for now.

One weird thing that happened after I installed build 80 was that the hald service was not enabled out of the box. After I enabled the service, everyone associated with it worked fine. Maybe as I start installing build 80 on the other systems in my lab, I might find that OpenSolaris has some new defaults as far as what services are enabled.

Tomorrow, I am gonna copy over an OpenSolaris build environment and workspace and trying building the system.

Just have to get used to only one mouse button!

MythTV on OpenSolaris

I am almost back to where I was months ago when I had all of the code compiled and was just starting to run and test it.

However, I really didn't want to be the guy responsible for a MythTV on OpenSolaris port. I just wanted to make a set-top box out of my Mac Mini. So, I kept putting the porting work off, hoping that someone would step forward to take my initial work and run with it. The problem was, no longer how long I waited, trying to convince myself that there was someone else out who really want to work on the port, no one else stepped forward. Since I had a bunch of people asking how the work was going, I decided to go ahead and finish the myself.

So, getting back to that "almost back to where I was" remark? Well, after meeting one of the Sun guys who works on the compilers and tools last spring, I decided to switch from building the code with GCC to using Sun Studio instead. Unfortunately, the MythTV codebase is full of gcc-isms.

After spending the last couple of weeks, making small changes in the code for the Sun Studio compiler (for example, unlike GCC, it doesn't like use of the ?: operator without the second argument). The big problem right now is that I am trying to resolve a conflict between a compiler setting that I think may correct a bunch of warnings that I am seeing and an incompatible setting in the version of the QT3 package that I got from blastwave. I am also trying to figure out how to convince the MythTV configure script mechanism to let the program building Makefiles that I want to link them with the Sun mlib library. If one enables mlib, the libraries get built presuming that mlib will be linked in, but the program Makefiles don't get the -lmlib linker argument.

So, that's where things are at. I'll posted another update in a week or so. I promise.

And I promise to keep this blog more up-to-date. Honest. It will happen this time.

( Jan 02 2008, 12:45:48 AM PST ) Permalink Comments [2]

20071223 Sunday December 23, 2007

Wasn't I doing this same thing a year ago?

Last year, I bought myself a Mac Mini was spending the winter break (Sun shuts down between the Christmas and New Year holidays) getting Solaris running on it. With some help from BootCamp, this mostly involved looking for drivers, writing drivers and porting applications.

Oh, and also spending hour upon hour trying to figure out how to set up dual-boot (Solaris and MacOS) in a manner that was reproducible and didn't depend on old data being left on the disk from a previous attempt to set it up.

This year, on the Thursday before the winter break, a new MacBook showed up on my doorstep and I found myself trying to get Solaris running on it.

So, was it any easier than a year ago?

Surprisingly, at least initially, it was not. I was trying to install Solaris Nevada build 76 on the MacBook. I found an updated blog by Paul Mitchell describing how he installed build 76 on a MacBook Pro. His work on this was based on a blog that I wrote describing the process that I came up with a year ago working with the Mac Mini. I figured that I was set.

However, it didn't work.

Before I found Paul's blog, I found another blog that described how to install Solaris on a Mac. If you plan on dual-booting the system, I would not recommend following the procedure describing in it, because it blew away the disk's GPT and I had to reinstall the MacBook from scratch.

Paul's instructions consist of creating a Solaris2 partition in the MBR, changing the tag on the EFI partition so that Solaris thinks that it is something else, applying the CR6413235 workaround and running the Solaris install program. When I did this, I still had issues, but it was less destructive than the first time through.

Instead of strictly doing as Paul indicated, I used BootCamp to repartition the disk. I did use his instructions to allocate the Solaris2 partition while preserving the unallocated space after the HFS+ partition. However, Solaris would always use the MBR partition table as the VTOC.

For some reason, I figured that I would download build 80 (not sure if that is available outside of Sun as I write this) and give that a try. I had no particular reason to believe that it would work any differently than build 76. It was just something to try. And it worked!

I booted build 80 and ran prtvtoc and it showed an empty VTOC, not the MBR partition table contents. I was encouraged. I ran format and was able to configure the VTOC as I had planned. I installed the CR6413235 workaround and restarted install-solaris and it ran to completion.

Actually, it seems as if build 80 would have worked as described in Paul's blog. I wonder if he was using a later build.

Now if I could only find a Marvell Yukon driver that works with the Ethernet part in my MacBook ...

( Dec 23 2007, 09:46:13 AM PST ) Permalink Comments [5]

20070514 Monday May 14, 2007

No MythTV work until June

I have received multiple requests for updates on the status of my MythTV under OpenSolaris work since I presented on it last March in Berlin. Well, here it is ...

I have done nothing since Berlin. Good thing I wasn't planning on doing anything.

The plan all along was to shelf everything until June. This work is a side project and is subject to time availability issues that any side project is subject to. I have a lot of personal stuff that comes up in April and May, so I figured that it would be better to just sit on things until after then. In the meantime, I have been looking closely at the Apple TV to try and determine if I want to try to make OpenSolaris run on that.

( May 14 2007, 12:05:44 PM PDT ) Permalink

20070221 Wednesday February 21, 2007

Setting up a Mac Mini for dual booting Solaris and MacOS X

As I mentioned in an earlier blog, I have been working with Solaris on an Apple Mac Mini. Once you get Solaris installed, it works pretty well, but, in my experience, getting Solaris installed (or, more specifically, getting the disk set-up before the install) was fairly awkward.

Before I get too far into this, I would like to point out that I am not an expert in almost any of the topics involved here. I read up on a lot of new topics as I encountered problems. I spent a lot of time on trial and error experiments, trying to determine which steps I could leave out. I would get Solaris installed, then scrub the hard disk and try it again. Unfortunately, each iteration took around 3-4 hours.

What I am saying is there could be a better way to do all of this.

So, what do you need? Obviously, you need a Mac Mini. I am using the current 1.66MHz Intel Core Duo base model. You also need an external hard disk with MacOS X installed because you are going to be booting up in MacOS a few times. Since you will be messing with the MBR on the internal disk, I wouldn't bet on being able to boot MacOS from it. You need a Solaris Express installation DVD, preferably a recent build.

1. Install MacOS on the internal HD. If MacOS is not already installed and you have to reformat the drive, make sure to zero out the drive (a formatting option with the MacOS Disk Utility). Some of the later steps may interpret whatever happens to be on the disk as valid data and complicate things.

2. Make sure that your Mac Mini has the latest firmware installed and then install Apple's Boot Camp application. You can get it from the Apple Web Site.

3. Run Boot Camp Assistant. This will set up your Mac Mini so that it can boot Windows (and other operating systems like Solaris), allow you to repartition the internal hard disk with a "Windows" partition and start "Windows" installation. The "Windows" partition is where you will install Solaris. I repartition what will be the Solaris partition to 32G. Before hitting the button to "Start Installation", be sure that the Solaris install DVD has been inserted in the drive and recognized by MacOS. After hitting the button, the Mac will reboot from the DVD drive.

4. Boot into Solaris from the installation DVD. At this point, prtvtoc(1m) and format(1m) both report the contents of the MBR as the VTOC. Exit from Solaris installation and confirm this for yourself.

5. Boot into MacOS from the external hard disk. Unmount the internal hard disk. Change the Win32 MBR partition into a Solaris2 MBR partition using fdisk. It should be the third entry, but look for the one with partition type 0B, labelled Win95 FAT-32, to be safe. Edit the entry to change the partition type to BF (Solaris2). fdisk does not recognize the type and labels it as <unknown ID>.

6. Boot into Solaris from the installation DVD. Attempt to install Solaris. It should fail when it tries to partition and label the internal hard disk. However, somewhere during the process enough information is written to allow you to proceed. Without this step, prtvtoc continues to report the MBR info as the VTOC. With this step, if you reboot into Solaris, you can see that prtvtoc acts as if the EFI partition on the internal hard disk is the Solaris partition.

7. Boot into MacOS from the external hard disk and then unmount the internal hard disk. Using fdisk, change type of the EFI partition to something that Solaris doesn't understand (such as AF (HFS+)).

8. Boot into Solaris from the installation DVD. Exit from Solaris installation and run format from a terminal shell. Use format's type command to enter the geometry info for the Solaris partition. After that, you need to reboot for some reason in order for the geometry info to stick.

9. Reboot into Solaris from the installation DVD. You should be able to run through Solaris installation. Just to be safe, before running installation, I set up the VTOC using fmthard(1M).

And it is all that simple.

When you reboot, if you hold down the option key as the Mac Mini comes back up, you will be presented with a couple of disk icons, one labelled Mac OS and the other labelled Windows. The Windows one is actually Solaris.

That's it. Have fun.

( Feb 21 2007, 08:16:20 AM PST ) Permalink Comments [1]

20061229 Friday December 29, 2006

Getting things rolling again

So, I have this problem when I start writing a blog entry with any substance to it. When I start writing the blog, I am usually very exciting to write about the topic and let the world know what is going on in Solaris with Firewire. In response to my blogs, folks who are trying to use the stuff contact me directly and getting that feedback (good and bad) helps focus me on what needs to be done.

The problem is around the time I get halfway done with the blog entry, I am so bored with the topic that I look at what I have written and think "who is going to want to read this junk?" and set the blog entry aside. My "Drafts" folder on the blog tool is full of unfinished entries.

So, I am gonna trying really hard to blog more in the upcoming year. I have a backlog of interesting 1394 topics. For example, my realization that using DCAM1394_CMD_REG_READ/DCAM1394_CMD_REG_WRITE is better than DCAM1394_CMD_PARAM_GET/DCAM1394_CMD_PARAM_SET for doing IIDC device control and interesting things that you can do with the hci1394 using unsupported IOCTLs (isn't opensource wonderful?). I have also been working on new stuff like trying to make a set-top box out of a Mac Mini. I also have some 1394-based audio mixers. Would anyone like me to make them work with Solaris?

Let me know what Solaris Firewire topics that you want to hear about.

( Dec 29 2006, 07:26:06 PM PST ) Permalink

20060114 Saturday January 14, 2006

Watch Arrested Development on Feb 10

A two-hour long season finale (yes, Fox is called it a season finale, not a series finale) for Arrested Development will air on your local FOX affiliate on Friday, February 10th, starting at 8pm ET/PT. It will not interfere with you watching Battlestar Galactica.

The last four episodes shot will make up the finale. Part of the storyline concerns Michael Bluth (played by Jason Bateman) discovering that he has a long-lost sister (played by Justine Bateman, Jason's real-life sister).

After this, the future of Arrested Development is not known.

( Jan 14 2006, 11:20:00 PM PST ) Permalink

20050511 Wednesday May 11, 2005

Who am I and what am I doing here?

Hi,

My name is Alan Perry and I am a software engineer in the Solaris x86 kernel group. I work on the Firewire support in Solaris. Firewire is the Apple tradename for a serial bus protocol described by IEEE standard 1394. Right now, that means working on the dcam1394, av1394, scsa1394 and hci1394 drivers and the underlying framework driver (s1394) and drivers to support protocols (like sbp2). Firewire support for x86 and SPARC is available in Solaris 10. For more information about Firewire, check out the 1394 Trade Association website.

I also compete in a form of motorsports called stage rally. In stage rally, cars race against the clock on roads that have been closed. The driver has typically not seen the road before and is driving by what he sees and what he is being told by his co-driver. I am a co-driver. For a rally, I am given a book containing a detailed set of directions for all of the roads and that I use that to let the driver know what is coming up next on the road. Stage rally has an international following and is sanctioned in the US by Rally America and NASA.

Hope this ends up being interesting. ( May 11 2005, 01:15:00 PM PDT ) Permalink Comments [2]

Calendar

RSS Feeds

Search

Links

Navigation

Referers