?

Log in

No account? Create an account
One bit of techy networking stuff. - The tissue of the Tears of Zorro [entries|archive|friends|userinfo]
tearsofzorro

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

One bit of techy networking stuff. [Feb. 11th, 2009|10:02 am]
tearsofzorro
[Tags|, , ]

Opensolaris stuff below.

I got my atge driver working for Opensolaris!

By the way, this means that I'm actually able to go online with Opensolaris, which is a plus.

You see, when I ran the opensolaris livecd on my desktop I noticed that it couldn't use my wired network connection. The funny thing is, apparently, out of the box wireless support on Opensolaris is much better than wired, but I don't have a wireless card on my desktop, nor do I particularly want one. So a little bit of hunting led me to the Opensolaris HCL (Hardware compatibility list) which said, "Yeah, it works, just use this 3rd party driver". I reckon it can't be included in the distribution because even though the license is BSD (i.e. do what you want, just give some credit), the author clearly states that he was porting from Linux drivers - which would be GPL by nature. As a result, the BSD license probably doesn't hold, so the legal folk at Sun would not want the code in the source tree.

I thought "Fair enough, let's get to making it". So I sent myself a link to the driver page so I could look at it in work, and I compiled it. Took it home and it didn't work. At this point I was still trying it out on the LiveCD.

Now, here's a great big WTF moment for folk who understand how install CDs work: I was trying out my driver, and it broke. It didn't crash anything, but the driver just didn't bind (because of problems). I decided that I could work on the problem a lot better if I installed Opensolaris to my machine. So I did that, and when I rebooted into it I noticed that the failed driver was also on the install. It seems that "installation" is copying the live OS to the partition in question - it's not package based. So any changes I'd make to the filesystem in memory (at least surrounding /kernel and /etc) would be copied over. My one consolation was that when I was telling this to other engineers in Sun, they raised their eyebrows too. Hell, at least it makes for a 20 minute installation.

After a few journeys into and out of work, carrying different versions of the compiled driver, I finally googled "Opensolaris atge". It turns out that the problem was insanely simple. You see, because I work in Sun, I have a certain "Sun on Sun" approach, so I used the Sun Studio compilers to make my driver (also I have had trouble in the past compiling stuff for Solaris in gcc and having problems - like making plugins and stuff - as a result I tend to feel that gcc is a bit "dirty" sometimes). Turns out, it doesn't work in Sun Studio - sure, it compiles fine, but it doesn't load, with dmesg giving errors about how arguments are passed. Apparently, I had to use gcc. Once I did that, the driver worked fine on the LiveCD.

So, the driver worked on the LiveCD, but then I found that there were problems getting it into my installed version. Now, it has been a mark of honour that there was no problem so severe with a unix that I had to reinstall. Unfortunately, I've now had to do that. I'm sure I could have fixed it otherwise, but I just decided that it was too much hassle to try and fix live, and I had no real data on that partition yet, so I booted up the LiveCD again, installed the driver, and installed the system.

Now, it works beautifully, and it works faster now - probably because it doesn't have a broken driver trying to do silly things.

Still, what a bloody epic to get it to work.
linkReply