linux

Gentoo/MIPS: A note about the PlayStation, PS2 and PSP

Hi all…

There seems to be a little confusion as to whether the PS2 is supported by Gentoo. To clarify, it isn’t. There was never any effort to officially support the PS2. Some unofficial work did begin some years ago, however that work ceased fairly early on, and there has been no interest in continuing it.

There are a number of technical reasons why the PS2 is not supported.

First and foremost, the CPU is a real bastardised piece of work. It implements a custom instruction set, which is a hodge podge of MIPS I, MIPS II, MIPS III and MIPS IV, with some special instructions thrown in. It doesn’t fully implement any of the aforementioned instruction sets. So binaries such as my mipsel1 stages, will not work — you’ll hit illegal instruction errors fairly early on.

Secondly, the patches necessary for the kernel, and toolchain, are based on a really ancient set of packages. The kernel released with the PlayStation II Linux kit (2.2.1), was a year old when the first PS2 hit the shelves. Not so bad then, but the kernel was never properly maintained. Even today, unofficial efforts have only gotten as far as 2.4.3x-series. The toolchain is still quite ancient, at best, gcc-3.3 from what I recall, is the best they’ve got. Maybe they’ve got as far as 3.4… who knows…

Thirdly, the memory on the PS2 is restricted to 32MB. This is soldered on-board, can’t be upgraded. Gentoo/MIPS will not build most packages with 32MB RAM. Once upon a time, I could just build stages with 64MB on my Qube2, if I shut down things like MySQL — not anymore, I need 128MB to do this today. uClibc could be feasible, but you’d still have problems with the “special” CPU. Virtual memory doesn’t help — even if you had 2YB of swap, it wouldn’t stop builds dying.

Other MIPS-based consoles, such as the original PlayStation (MIPS R3000-based) and the PlayStation Pocket (MMU-less MIPS32r2) are also not supported for similar reasons.  And we (MIPS team) don’t support the PlayStation 3 either — for that, you should talk to the PowerPC team.

Now… I have no complaints about answering questions about what we support/don’t support… but a few points… (this is where my rant starts by the way)

  1. Write properly when in the IRC channel. If it’s one thing that’ll quickly get my back up, it’s SMS-like chat on IRC. I’m tolerant of spelling errors and grammatical mistakes, but I won’t tolerate laziness. If a word has vowels in it, include them! It’s not like it’s significantly more effort to press an additional button on a keyboard. If you’re using morse to drive the computer, or have a physical disability that makes typing difficult, fine, declare this up front, and all will be okay, but otherwise, there’s no excuse.
  2. Read the documentation! It tells you what we support, and what we don’t. It’s likely your question is answered there already.
  3. If we can’t help you with some non-supported platform, we mean it… don’t pester us about it, we’re not going to start supporting a new platform in 5 minutes flat.

Gentoo/MIPS for Cobalt: mips-sources

Hi All…

Whilst building a new netboot image for Cobalt systems, I discovered there’s a bug relating to the PCI handling in the latest kernel ebuild. In short, the pata_via driver is broken out-of-the-box, it’ll complain about being unable to register I/O resources, and the disks will be inaccessible.

To fix — download this patch, and apply it to your source tree using patch -p1 < patchfile, then rebuild your kernel (it’ll take a few seconds). You’ll notice the new kernel should boot successfully.

When Kumba returns, I’ll get him to add it to the mips-sources patchset so this is done automatically. 🙂

Gentoo/MIPS Netboot Images to be updated

Hi All…

Those who have been trying out the 2008.0 beta stages I put out recently, probably will have ran into problems with tools like rm and touch not working properly.  It turns out, a series of kernel updates between 2.6.16 (what most of the netboot images are based on, except Cobalt which uses 2.6.13), and 2.6.19-rc5 (what my O2 runs), there have been changes to some of the system calls.  So the newer coreutils breaks on the older kernels.

I’m now in the process of updating the kernels used.  As I type this, I’m recompiling the Cobalt netboot image (same userland tools, just a newer kernel … at some point I’ll recompile the userland too), downloading the 2.6.20 kernel for IP28 users, and I’ll look into IP22 (r4k), IP30 and IP32 as well.

Sadly, R5k IP22 and IP27 will get ignored here — because I don’t have any suitable hardware to test them on.  Otherwise I’d update those too.

I’ll let you all know when the newer netboot images are available.

Getting the Broadcom BCM2035B to play ball

Well, I’ve tinkered today with the headset and this Bluetooth dongle, and got a little further. Still can’t actually connect to anything, but I am seeing devices pop up in Konqueror under the bluetooth:/ kioslave and hcitool scan actually reports some devices.wander ~ # hcitool scan --flush
Scanning ...
20:07:35:xx:xx:xx KF-700
00:1E:E1:xx:xx:xx SGH-A412

I have no idea what the SGH device is … someone’s mobile phone apparently (this dongle has a 100m range). The other device, is my headset. However, hitting the MFB (Mobile Find) button on the headset, does not yield a pin entry request in KDEBluetooth. I’m no closer to actually being able to use this as a means of wireless VoIP.

To reiterate what I have tried:

  • Upgraded to latest vanilla kernel: 2.6.25-rc6
  • Running latest BlueZ tools in portage: bluez-firmware-1.2 bluez-bluefw-1.0 bluez-libs-3.28 bluez-utils-3.28 bluez-hciemu-1.2
  • Using hciconfig to bring the device down, back up, and reset it, enabling various modes (e.g. page scan, inquiry scan, page+inquiry scan)

The following is seen in dmesg when the dongle is plugged in (proceeding text snipped):
[ 2560.963622] usb 5-1: new full speed USB device using ohci_hcd and address 3
[ 2561.133938] usb 5-1: configuration #1 chosen from 1 choice
[ 2561.151391] usb 5-1: New USB device found, idVendor=0a5c, idProduct=2035
[ 2561.151403] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2561.151409] usb 5-1: Product: BCM2035B
[ 2561.151414] usb 5-1: Manufacturer: Broadcom Corp

And hciconfig shows:
wander ~ # hciconfig
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:982 acl:0 sco:0 events:28 errors:0
TX bytes:610 acl:0 sco:0 commands:28 errors:0

I’m guessing the address is the problem. And this issue seems to rest with the kernel driver itself, hci-usb. I’ve tried forcing bcm203x to take custody of the device, this doesn’t work at all — the device doesn’t even initialise. So clearly hci-usb is responsible for setting things up — but it isn’t. In sysfs:

wander ~ # cat /sys/bus/bluetooth/devices/hci0/address
00:00:00:00:00:00

Allegedly, the BCM2033 works rather well with Linux, and I see no reason why the BCM2035 shouldn’t, when the code is clearly present. I’d say there’s some edge case that isn’t handled. I’ll ask a little later on the BlueZ mailing lists and see what I can come up with … but I’m posting this here for others’ reference. Later down the track I plan to repeat this exercise on the Lemote boxes (and maybe my O2 as well, if I get a USB card for it) — presently though, I’m doing this on my laptop (which is x86-based).

Again, if anyone has an idea what’s going wrong… I’m all ears. 🙂

Bluetooth dramas continue

On my recent experiments with Bluetooth on my father’s laptop, I decided I’d go and get a dongle to experiment with it on my own laptop. So today I popped into Jaycar and picked up a $30 Bluetooth dongle.

The unit is based on the Broadcom BCM2035 chipset. On the train heading home, I plugged it in, and noticed that after compiling the required drivers into the kernel, hci-usb popped up, and created a hci0 device. So I guessed that meant everything was working. Of course, I knew I’d still need the BlueZ stack installed, so I waited until I got home before doing further experiments.

Well… I’m home now, got BlueZ installed (v3.28, and firmware v1.1) along with KDEBluetooth (1.0 beta8). Then I dug out the headset, switched it on, and tried to associate the pair. Nothing. Tried again, and again… unplugging and replugging in the dongle, restarting the daemons… Nada… Zilch.

Hmmm… So I look around, there was mention of the hciconfig command, in particular using it to enable the device. Either my device is in a coma, or something is wrong with the software. I haven’t got Windows installed on this laptop to experiment (I managed to hose it the other day when I accidentally typed sudo mkdosfs /dev/sda whilst formatting a floppy on sdb… Ooops!). Anyway…

This is how the device identifies itself…

wander ~ # cat /proc/bus/usb/devices
[...]
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0a5c ProdID=2035 Rev= 1.00
S: Manufacturer=Broadcom Corp
S: Product=BCM2035B
C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
[...]

On plugging the device in, the dmesg prints:
wander ~ # dmesg
[ 7039.423795] usb 1-1: new full speed USB device using uhci_hcd and address 7
[ 7039.635328] usb 1-1: configuration #1 chosen from 1 choice
[ 7039.952188] Bluetooth: HCI USB driver ver 2.9
[ 7039.954436] usbcore: registered new interface driver hci_usb

hciconfig shows:
wander ~ # hciconfig
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 16:0
UP RUNNING PSCAN
RX bytes:4630 acl:0 sco:0 events:107 errors:0
TX bytes:2409 acl:0 sco:0 commands:106 errors:0

If I try the trick of bringing the device down, then back up again, I get the following:
wander ~ # hciconfig hci0 down
wander ~ # hciconfig hci0 up
wander ~ # hciconfig
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 16:0
UP RUNNING PSCAN
RX bytes:5582 acl:0 sco:0 events:131 errors:0
TX bytes:3001 acl:0 sco:0 commands:130 errors:0
wander ~ # dmesg
wander ~ # tail /var/log/everything/current
Mar 20 22:24:46 [hcid] HCI dev 0 down
Mar 20 22:24:46 [hcid] Stopping security manager 0
Mar 20 22:24:46 [hcid] Device hci0 has been disabled
Mar 20 22:24:48 [hcid] HCI dev 0 up
Mar 20 22:24:48 [hcid] Device hci0 has been added
Mar 20 22:24:48 [hcid] Starting security manager 0
Mar 20 22:24:48 [hcid] Device hci0 has been activated

This doesn’t fix the issue, and I’m left exactly where I started.  I’m not sure what’s going on… at the moment I don’t have the time to debug the situation, but if anyone has any suggestions (no, I’m not buying another Bluetooth dongle) — I’d happily give them a try.

Camping this long-weekend

Hi all,
Just to let you all know, I’ll be camping over the Easter long-weekend (Good Friday through to Easter Monday), on a private property outside Tenterfield, NSW.

There’s no internet link or mobile phone coverage here, so I won’t be online. If you happen to be around the Tenterfield area, you might get me on the 2m standard simplex frequency, 146.500MHz. (There aren’t any repeaters in the area at all, let alone IRLP/EchoLink connected ones.)

If you strike problems, best to contact me by email, and I’ll get back to you when I return on Monday. If release engineering put out another snapshot before Thursday evening (UTC+10) then I’ll try to get the boxes here building it whilst I’m away.

Both Loongson boxes will remain online, vapier has root access to both, so after getting approval from the senior MIPS devs, see him for actual access to the boxes in my absence.

Anyway… there will of course, be the obligatory posts with pics of the trip when I return. 😉

Happy Easter all.

Gentoo/MIPS: 2008.0 Beta1 Stages available for testing

Hi All,

I have made available, stages based on the Gentoo 2008.0 Beta1 snapshot, for you to test on your hardware.  New in this release, is the introduction of big-endian stages compiled for MIPS1, as well as little-endian stages for MIPS3.  This should suit generic big-endian users, and Loongson users respectively.  (Of course, if you’re using hardware other than SGI, Cobalt or Lemote hardware, you’ll have to figure out most things yourself — we can’t offer support for other hardware.)

For now, you’ll find them on my devspace.  If you strike problems, please let me know and I’ll try to get the problems fixed for the final 2008.0 snapshot. 🙂

I’ll be taking them for a spin to make sure everything is fine, but I’d appreciate any feedback from users.  These stages are experimental, as they’re based on a beta snapshot — if you’re setting something up for a production environment (if you are, you’re braver than I am), I’d recommend using the older 2007.1 stages instead.

Open Standards

People who know me, will know I’m quite a keen supporter of open source projects. I’m not nearly as fanatical about it as others, such as Richard Stallman, but I try to support open source as much as I can.

However, I suppose I’m a much bigger supporter, of open standards, than open source. I don’t mind if a project implementing a standard is proprietary commercial software — if the underlying standards it is built on, are open, that makes it possible for an open source implementation to be created. This gives users a choice — they may choose for various reasons to go for a commercial solution, or they may choose open source, it’s entirely up to them.

Now I realise that many of you will be reading this on planet.gentoo.org, and thus I’m likely preaching to the converted. I’m mainly aiming this at organisations that are completely blind to the issues faced. I’m hoping some of those might see this post.

Some might ask, what’s wrong with closed standards? There are a number of issues regarding closed standards.

  • Vendor lock-in: it locks people in to buying from particular vendors, for better or worse.
  • Inflexibility: If you don’t know how it works, how can you modify it to make it do what you want?
  • Control: Who controls what you do with the application? Or the data produced?

If you’re using some closed system, and you run into technical difficulties, the only people who can help, are the makers of that product. You can’t easily switch to another product, and you’re completely at that vendor’s mercy. Some charge extortionate rates to fix even trivial problems, if they help at all. Now granted, there are some good players out there, and if you strike one, great… but if things change for the worse, you’re stuffed.

The ability to understand how a system works is particularly important. Not just with troubleshooting… but also with experiments. Users of a system may have ideas that you as a company have not even considered. Now if it’s open, they can either modify themselves, or hire someone to modify, the system to suit their needs.

Experimentation in one’s spare time is a great way to learn too — university can’t teach you everything. But if the system is closed, how can they experiment? The ability to learn about a system is greatly stifled, when you can’t play with the deep internals at the protocol level.

Control over what you can do with the data produced by a system is a hassle. Remember that you, as the vendor, do not own the data produced by someone using your product. As far as the user is concerned, it’s their data. If I put an audio or video clip of my own work up on my site (which I have done on occasions), it’s not companies like Fraunhofer, or Microsoft, or Apple that own the content, it’s me. And I want the right to be able to share that clip under my terms.

The only reason why the Internet is popular today, is because of open standards. You would likely not be reading this, had it not been due to open protocols such as IEEE802.11b, OpenVPN, Ethernet, TCP/IP and HTTP, and open formats such as HTML. Look at what happened to Compuserve… The Microsoft Network… AOL… Ring a bell? They were all closed networks, that died out because the open wild of the Internet was more appealing to their users.

It isn’t just an issue in the information technology realm. Allow me to look at the problem in another context. Amateur radio, would not exist today as a hobby, if it were not for open communications standards.

If you look past the obvious social and competitive aspects of amateur radio, you see there’s another aspect, the experimentation side. As defined by the ACMA LCD (I’m sure it’s similar in other countries) …

6. Use of an amateur station

The licensee:

  1. must use an amateur station solely for the purpose of:
    1. self training in radiocommunications; or
    2. intercommunications; or
    3. technical investigations into radiocommunications; or
    4. transmitting news and information services related to the operation of amateur stations, as a means of facilitating intercommunication

The two points I’ve highlighted in bold above, are rather important. Put in layman’s terms… if you’re not in the hobby to talk to people, it’s mainly there for experimenting with the technology.

There’s another restriction here too … we’re not allowed to use cryptography, or any kind of secret code, it must be public domain. (e.g. I could, for instance, theoretically use UTF-8 on CW, encoding ones as a dash, zeros as a dot, and using RS-232-like encapsulation. Morse users would get confused however.)

Now suppose FM, for example, were a closed standard — that is, you had to pay some company royalty fees to use them. (Yes, I know that almost did happen way back in the 1930s, but anyway.) How well do you think that’d sit with radio amateurs, who typically like to build homebrew equipment? I don’t think it’d be liked much at all. In fact, if it were secret, it may very well be illegal in some countries. Thankfully this isn’t the case, and even emerging standards like D-Star, are fully open.

Now… back to the IT situation. We can see that a system where the protocols and standards used are fully open, can work. I have to ask why IT thinks it’s special, and insists on closed standards?

Looking at the educational environment … it’s here more than any other place, where we need open standards. How can students be expected to learn about something, if they can’t conduct their own experiments? Experimenting in one’s own time is a good way to gain a better understanding of the topic of study. It’s people graduating from these universities, that will be carrying the industry forward, and I really do think the present industry, should assist by being as open as possible.

Why is it, that universities like inflicting this poor choice of closed systems on its students? Yes, I’m looking at you, Queensland University of Technology, with your extensive use of Microsoft Office, Windows Media codecs (for recorded lectures), Cisco VPNs, Microsoft .NET framework, and numerous proprietary apps/standards.

QUT have a number of labs for each faculty, but also central labs. The central labs have OpenOffice installed, however the labs for Faculty of Engineering, and Faculty of IT, do not. So sure, I can work on some assignment on my personal laptop (running Gentoo Linux of course) — but if I have to email it to the lecturer, I have to either convert it to a PDF (my preferred method), or some have the gaull to ask for it in Microsoft Office formats.

If I comment that I don’t have the money to purchase Microsoft Office, the comment usually is something along the lines of, “Ohh, well you’ll just have to use the computers here.” Yeah well… how about I email my stuff in OpenDocument (ISO26300) format, and see how YOU like walking out of your cozy little office, into the library, and using a computer other than your own to view some file you’re expected to read. Exactly, you don’t like it … why should we be expected to put up with it?!

If that isn’t bad enough, they’ve now dropped using Java apparently for a teaching language. They instead use Scheme for the first years, then go throw them in the deep end with .NET. Way to go for consistency! Probably worth noting that they know nothing about Mono, and expect everyone to use VisualStudio.NET.

I really do think this is highly hypocritical of the university, and it’s an attitude that really disgusts me. Sadly I know they’re not the only ones doing this — some are even worse in this regard. (Then again, some are really open source friendly.) I have good reasons for using the software I do. I at least give you, the choice of using anything that opens OpenDocument formats — which is quite a lot — just sad that your office suite of choice isn’t among them by default. That’s not my fault, and you shouldn’t blame me for that.

I’ve complained directly to them about this before … so I’m now taking this complaint onto the world stage. Don’t like it? Tough.

I try to practice what I preach. One site I maintain, the Asperger Services Australia site, does make use of open standards. Sure Microsoft Office is used internally to write the documents that get uploaded (I’m working on that, give me time), they are converted to PDF. PDF of course is another open standard, ISO32000.

Any multimedia on the site, uses the XIPH foundation codecs Theora and Vorbis. Sure, I get the odd question from a Windows or Mac user about how to play the files, but thanks to the Cortado player applet, and ITheora, I’m able to make the video play for 99% of users out-of-the-box, and cater for the other 1% by allowing them to download the file and play it any number of players that support Theora and Vorbis.

This is handled automatically in most cases, the user isn’t even aware of the underlying architecture. However, if curious, the underlying architecture is open and present for them to look at.

I think it somewhat ridiculous, when looking at science fiction shows such as Star Trek, depicting (fictional) alien craft, produced by completely different lifeforms, are somehow 100% compatible at every layer of the OSI stack. We haven’t even got this today, and every computer on this planet was built by the same species!

I really do think this closed-standards war is hurting more than it’s helping. It’s about time we cut the nonsense, and actually started working together. Protocols and formats, used by systems really should be open for anyone to implement. I don’t mind closed implementations of those standards, that’s fine, but the standards themselves should be open.

Anyway… that’s enough of my ranting… glad to get that out of my system. 🙂

Gentoo/MIPS: 2008.0 Builds begin

I’ve now began building stages for the upcoming 2008.0 release.  This release will see the introduction of MIPS3 stages for little endian targets (ideal for Loongson 2E users).

In addition, I have my O2 compiling the big endian stages, for MIPS4, MIPS3 and MIPS1 (in that order), so this will also see the introduction of generic MIPS1 stages for big endian systems.

I’ll try to provide these where I can, however there’s no guarantee that these generic stages will continue, nor is there any support provided for non-SGI/Cobalt hardware at this time.

Apparently there’s going to be a shake-up regarding the profiles too.  The profiles used in the snapshots are completely different in structure — whether this will reflect what users see in the Portage tree or not, I’m unsure.  I’ll let you know what the deal is there in due course when I find out myself.

Gentoo/MIPS for Loongson — LiveUSB image is here

Hi all…

With the help of robbat2, I’ve released the full LiveUSB Image of Gentoo Linux for the Lemote Fulong, and similar systems. It consists of two parts…

  • The kernel image, which can be used alone to boot the system and perform an installation, or rescue an installation.
  • The live system image, in the form of a 870MB SquashFS image.

If you just want to install Gentoo, you can download the kernel image on its own, and either load it from a USB disk or TFTP server.

However, if you want a full blown desktop, you need this kernel image, plus the LiveUSB system image, which you’ll find on the mirrors under the experimental/mips/livecd/loongson-2007.1 directory. I’ve pushed this straight out, due to its considerable size. (For me anyway… remember that my ADSL link pushes data up at a whopping 128Kbps… yes… “broadband” in Australia officially sucks!)

To boot the live environment, download both to a EXT2 or EXT3 formatted partition on a USB disk (FAT32 may work, but you’ll need to tweak the URL passed to PMON2000 when loading the kernel). For simplicity, place them in the root of the directory, with the kernel named “gentoo“, and the live system named “gentoo-liveusb.sqfs“.

Boot the Lemote box up and hit DELETE when prompted. You’ll be greeted by a PMON> prompt… Enter the commands as you see below…

PMON> load /dev/fs/ext2@usb0/gentoo
PMON> g console=tty0 liveusb

The highlights…

The following are some screenshots of the desktop in action. The desktop is based on the latest 2007.1 stages, and KDE 3.5.8. When it first boots, you’re greeted by the following screen:

LiveUSB login prompt

The desktop is provided in two languages, English (UK) and Simplified Chinese — decided according to the account you login as. Both accounts are set up in KDE as passwordless, so just click on the desired account and press ENTER. If you do happen to be asked for a password, the password on all accounts (including root) is gentoo. Once logged in, you’re greeted with a largely default KDE desktop (click to enlarge). The background image is a departure from traditional Gentoo desktops — based on a photo taken by my father whilst camping up at Biggenden.

LiveUSB Desktop

The latest stable Mozilla browser, Bon Echo (Firefox) is included. Note that due to licensing, I’m not able to use the Firefox branding that people would be more familiar with (click to enlarge). The default homepage and bookmarks have been tweaked to have some useful relevant links for Gentoo/MIPS. The Chinese version links to versions of the documentation in Chinese where available.

LiveUSB Bon Echo 2.0.0.11 included

Should you have a query, or wish to chat to people whilst waiting for things to install, a full IRC client and instant messenger package are provided.

LiveUSB Messaging

A full copy of the KOffice productivity suite is included…

LiveUSB KOffice

Multimedia playback applications such as KMPlayer, Kaffeine Player and Amarok are provided…

LiveUSB Multimedia

And last but not least… if you get bored… Quake II with qmax goodness, is available… (but bring your own game files) Sadly, hardware OpenGL isn’t working yet, but despite this, Quake II is still quite playable.

LiveUSB Quake II