oem-logo creation how-to

1. Introduction

This how-to guides you through the process of preparing your own oem-logo to include in the bootup screen of your sparcstation, using Linux/Sparc.

Disclaimer

Fiddling with the settings of some prom variables may render your sparc unbootable. Any kind of damage to your system is your own responsability. If you're not comfortable performing this kind of procedure, then don't do it, or have someone else do it for you.
All I can guarantee is that it worked for me, and even the testing before everything was right didn't do any damage to my sparc. Your mileage may vary.

Distribution policy

Copyright (c) 1999-2004 by Bert de Bruijn <bert@debruijn.be>.
This document may be distributed under the terms set forth in the LDP license at http://www.linuxdoc.org/COPYRIGHT.html.

Feedback

If you have additional info on this subject, or if you want to include this info in a larger documentation effort or structure, feel free to contact me (e-mail address in the previous paragraph).

2. Requirements

A Sparcstation, or maybe any other workstation with a similar openboot prom.
ATTENTION: I've received a report from someone with a SparcStation4 saying this procedure didn't work on the onboard TCX8 framebuffer (but did work when using a cgsix sbus card). And someone with an Ultrasparc 5 machine said the kernel crashed after he performed this procedure. Always mount a scratch monkey.
I used a RedHat installation on my Sparcstation IPC, but any Linux distribution will do.
You'll need the "convert" program from the ImageMagick package. If you can run that on another platform and you can transfer files to your Linux/Sparc box, that's OK too.
If you compiled your own Linux/Sparc kernel, make sure you have openpromfs support, because we will use that to transfer the image to the prom. A standard kernel on a RedHat distribution includes this driver.

3. Procedure

The (monochrome) oem-logo is stored in a 1_bit_per_pixel stream. The memory layout was designed for the earliest sparcstations, so even though newer sparcs have built-in color logo's, an oem-logo can still only be monochrome.
An oem-logo is a 64x64 image, so it will take 512 bytes to store it.

First of all, create an image that you want to use as oem-logo. Any format supported by convert will do.
Then, use convert to save the image as a 64x64 monochrome Sun Raster image:

$ convert -monochrome -geometry 64x64\! my_image.png sun:my_oem-logo.ras Preview the rescaled monochrome image using your favorite image viewer (e.g. xv).
The Sun Raster image file format is what we need, except for the 32-byte header. To crop the last 512 bytes from the file, use $ tail --bytes=512 my_oem-logo.ras > my_oem-logo.data

Now you're ready to write the image data to the prom. This is where you'll need the openpromfs support in your Linux/Sparc kernel.
You will need to login as root to execute the following steps.
Check for the existence of the necessary files in the /proc/openprom subtree:

# ls /proc/openprom/options/oem-logo* /proc/openprom/options/oem-logo /proc/openprom/options/oem-logo? The next steps are trivial: # cat my_oem-logo.data > /proc/openprom/options/oem-logo # echo true > /proc/openprom/options/oem-logo\? Note that you can also use the openpromfs to set an oem-banner and enable it, without actually rebooting and entering the prom from the console..

4. Examples

You could try the following examples to examine the results. (Read the convert man-page to inspect the options I used. The logo.gif file may reside in /usr/doc/kernel-*/logo.gif.)

# convert -pen \#FFFFFF -opaque \#0000F8 -monochrome -geometry 64x64\! /usr/src/linux/Documentation/logo.gif sun:/root/tux.ras # tail --bytes=512 /root/tux.ras > /proc/openprom/options/oem-logo # shutdown -r now Which give you this image as boot-logo:

If you have the redhat-logos package,

# convert -monochrome /usr/share/pixmaps/redhat/shadowman-64.png sun:/root/shadowman.ras # tail --bytes=512 /root/shadowman.ras > /proc/openprom/options/oem-logo # shutdown -r now this will give you

5. Extra info

5.1. Your own color logo

If you are really determined to replace the built-in color logo on your sparc with another _color_ logo, that is possible. However, it's a _lot_ harder than making an oem-logo. The color logo is stored on the framebuffer card, and can only be replaced by physically replacing the chip that contains the logo.
Eddie C. Dost (one of the Linux/Sparc kernel developers) posted the following info: : : To clearify this: : : The OBP looks for a logo in this places: : : 1. OEM logo (if defined, always bw) : 2. The installed graphics card (if it defines a logo, uses it's own display : routine, thus can do colour). : 3. The default OBP Sun logo. : : If you want a different colour logo, you need to patch the contents of the : EEPROM on your cg6 or whatever. If you have enough knowledge, you can read : out the framebuffers EEPROM contents under Linux, find the logo in there : (it will be an 8 bit Sun rasterfile on a cg6 for example). After that you : need to patch the EEPROM with a new logo of the same size. Now you can : unsolder the EEPROM from the framebuffer card, and reprogram it with your : favorite programmer. It might be an OTP, so you need to buy a new one for : this step. Last you solder it back on an see your own colour logo. : : Yes, I do have a cg6 with Tux logo on it ;-) : : : Eddie C. Dost : ecd_at_skynet.be : In other words: it's possible, but it's difficult. YMMV.

Eddie C. Dost has kindly provided a .tar.gz with tools he wrote to change the built-in logo on a cg6. You can read the README file, and download the .tar.gz here.

5.2. What if your sparc runs NetBSD

Well, Florian Echtler has written a tool to replace the oem-logo under NetBSD. Get it at http://www.matrixindustries.de/software/oem-logo/. Moreover, Matt Dainty succeeded in changing the colour logo of the onboard cg6 in his IPX, and documented it at http://www.bodgit-n-scarper.com/ipx.html.