Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: dupuy@douglass.cs.columbia.edu (Alexander Dupuy) Newsgroups: comp.sys.sun Subject: How to change the SUN logo in the eeprom (sou Message-ID: <6050@columbia.edu> Date: 9 Dec 88 14:47:16 GMT References: <8811141130.AA22318@rice.edu> Sender: usenet@rice.edu Organization: Rice University, Houston, Texas Lines: 79 Approved: Sun-Spots@rice.edu Original-Date: 23 Nov 88 20:37:57 GMT X-Sun-Spots-Digest: Volume 7, Issue 39, message 13 of 13 The following program will do this. [[ Use at your own risk! It diddles with the eeprom. I checked it on a 3/60 and it seems to work, but still.... --wnl ]] : This is a shar archive. Extract with sh, not csh. : The rest of this file will extract: : : booticon.c : echo x - booticon.c sed 's/^X//' > booticon.c << '//go.sysin dd *' X#includeX#include X#include X#include X#include X#include X X#ifdef lint X#ifndef NBBY X#define off_t long X#endif X#endif X Xmain (argc, argv) Xint argc; Xchar **argv; X{ X int eeprom; X char message[256]; X Pixrect *icon; X extern off_t lseek (); X X if (argc != 2) X { X (void) fprintf (stderr, "usage: %s default|iconfile\n", argv[0]); X exit (1); X } X X if ((eeprom = open ("/dev/eeprom", O_WRONLY)) < 0) X perror ("/dev/eeprom"), exit (1); X X if (!strcmp ("default", argv[1])) X { X if (lseek (eeprom, (off_t) 0x18f, L_SET) < 0) X perror ("seek"), exit (1); X if (write (eeprom, "", 1) < 1) X perror ("write"), exit (1); X exit (0); X } X X if ((icon = icon_load_mpr (argv[1], message)) == NULL) X (void) fprintf (stderr, "%s", message), exit (1); X X if (icon->pr_depth != 1) X (void) fprintf (stderr, "Not a monochrome icon!\n"), exit (1); X X if (icon->pr_width != 64 || icon->pr_height != 64) X (void) fprintf (stderr, "Not a 64 x 64 icon!\n"), exit (1); X X if (lseek (eeprom, (off_t) 0x18f, L_SET) < 0) X perror ("seek"), exit (1); X if (write (eeprom, "\022", 1) < 1) X perror ("write"), exit (1); X X if (lseek (eeprom, (off_t) 0x290, L_SET) < 0) X perror ("seek"), exit (1); X if (write (eeprom, (char *) mpr_d (icon)->md_image, 0x200) < 0x200) X perror ("write"), exit (1); X X (void) system ("/usr/etc/eeprom -c >/dev/null 2>&1"); /* the lazy way */ X X exit (0); X} //go.sysin dd * exit -- inet: dupuy@columbia.edu uucp: ...!rutgers!columbia!dupuy