summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Thibaut <murphy@gentoo.org>2002-04-16 01:49:36 +0000
committerMaarten Thibaut <murphy@gentoo.org>2002-04-16 01:49:36 +0000
commit7aea4bfa9e87785290222f4926032ba394710526 (patch)
tree8482cbaf7dc583ad0eeb743f898ff0391a733784 /sys-apps/sparc-utils
parenttypo fix (diff)
downloadhistorical-7aea4bfa9e87785290222f4926032ba394710526.tar.gz
historical-7aea4bfa9e87785290222f4926032ba394710526.tar.bz2
historical-7aea4bfa9e87785290222f4926032ba394710526.zip
Utilities specific to SPARC architectures
Diffstat (limited to 'sys-apps/sparc-utils')
-rw-r--r--sys-apps/sparc-utils/files/sparc-utils_1.9-2.diff782
-rw-r--r--sys-apps/sparc-utils/sparc-utils-1.9.ebuild47
2 files changed, 829 insertions, 0 deletions
diff --git a/sys-apps/sparc-utils/files/sparc-utils_1.9-2.diff b/sys-apps/sparc-utils/files/sparc-utils_1.9-2.diff
new file mode 100644
index 000000000000..178102c8e126
--- /dev/null
+++ b/sys-apps/sparc-utils/files/sparc-utils_1.9-2.diff
@@ -0,0 +1,782 @@
+--- sparc-utils-1.9.orig/src/piggyback64.c
++++ sparc-utils-1.9/src/piggyback64.c
+@@ -56,6 +56,10 @@
+ end = strtoul (buffer + 8, NULL, 16);
+ }
+ fclose (map);
++ if (!start || !end) {
++ fprintf (stderr, "Could not determine start and end from System.map\n");
++ exit(1);
++ }
+ if ((image = open(argv[1],O_RDWR)) < 0) die(argv[1]);
+ if (read(image,buffer,512) != 512) die(argv[1]);
+ if (!memcmp (buffer, "\177ELF", 4)) {
+--- sparc-utils-1.9.orig/prtconf-1.3/prtconf.8
++++ sparc-utils-1.9/prtconf-1.3/prtconf.8
+@@ -87,7 +87,7 @@
+ has been written by Jakub Jelinek <jj@ultra.linux.cz>.
+ .SH AVAILABILITY
+ .B prtconf
+-is available for anonymous ftp from sunsite.mff.cuni.cz in
+-/OS/Linux/Sparc/local/prtconf/.
++is available for anonymous download at
++http://vger.samba.org/cgi-bin/cvsweb/prtconf/?cvsroot=vger.
+ .SH SEE ALSO
+ .B /proc/openprom/, /dev/openprom, eeprom(8)
+--- sparc-utils-1.9.orig/prtconf-1.3/prtconf.c
++++ sparc-utils-1.9/prtconf-1.3/prtconf.c
+@@ -1,4 +1,4 @@
+-/* $Id: sparc-utils_1.9-2.diff,v 1.1 2002/04/16 01:49:36 murphy Exp $
++/* $Id: sparc-utils_1.9-2.diff,v 1.1 2002/04/16 01:49:36 murphy Exp $
+ * prtconf.c: OpenPROM dump utility.
+ *
+ * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
+@@ -274,7 +274,7 @@
+ if (string)
+ printf("%s: '%s'\n", op->oprom_array, prop);
+ else {
+- printf("%s: ");
++ printf("%s: ", op->oprom_array);
+ while (len > sizeof(int)) {
+ printf("%08x.", *(int *)prop);
+ prop += sizeof(int);
+--- sparc-utils-1.9.orig/prtconf-1.3/eeprom.8
++++ sparc-utils-1.9/prtconf-1.3/eeprom.8
+@@ -345,7 +345,7 @@
+ has been written by Jakub Jelinek <jakub@redhat.com>.
+ .SH AVAILABILITY
+ .B eeprom
+-is available for anonymous ftp from sunsite.mff.cuni.cz in
+-/OS/Linux/Sparc/local/prtconf/.
++is available for anonymous download at
++http://vger.samba.org/cgi-bin/cvsweb/prtconf/?cvsroot=vger.
+ .SH SEE ALSO
+ .B /proc/openprom/, /dev/openprom, prtconf(8)
+--- sparc-utils-1.9.orig/audioctl-1.3/audioctl.c
++++ sparc-utils-1.9/audioctl-1.3/audioctl.c
+@@ -149,6 +149,7 @@
+ { "speaker", AUDIO_SPEAKER },
+ { "headphone", AUDIO_HEADPHONE },
+ { "line out", AUDIO_LINE_OUT },
++ { "line_out", AUDIO_LINE_OUT },
+ { 0 }
+ };
+
+@@ -158,8 +159,11 @@
+ } iports[] = {
+ { "microphone", AUDIO_MICROPHONE },
+ { "line in", AUDIO_LINE_IN },
++ { "line_in", AUDIO_LINE_IN },
+ { "internal cd", AUDIO_CD },
++ { "internal_cd", AUDIO_CD },
+ { "analog loopback", AUDIO_ANALOG_LOOPBACK },
++ { "analog_loopback", AUDIO_ANALOG_LOOPBACK },
+ { 0 }
+ };
+
+@@ -338,7 +342,7 @@
+ int pos, i;
+
+ if (ioctl(fd, AUDIO_GETDEV, &adev) < 0) {
+- fprintf(stderr, "AUDIO_GETDEV\n");
++ perror("ioctl(getdev)");
+ exit(1);
+ }
+ #if 0
+@@ -358,7 +362,7 @@
+ sprintf(encbuf, "not yet implemented");
+ #endif
+ if (ioctl(fd, AUDIO_GETINFO, &info) < 0)
+- fprintf(stderr, "AUDIO_GETINFO\n");
++ perror("ioctl(getinfo)");
+ }
+
+ void
+@@ -413,17 +417,19 @@
+ fd = open(file, O_WRONLY);
+ if (fd < 0)
+ fd = open(file, O_RDONLY);
+- if (fd < 0)
+- fprintf(stderr, "%s\n", file);
++ if (fd < 0) {
++ perror(file);
++ exit(0);
++ }
+
+ /* Check if stdout is the same device as the audio device. */
+ if (fstat(fd, &dstat) < 0) {
+- fprintf(stderr, "fstat au\n");
++ perror("fstat(au)");
+ exit(0);
+ }
+
+ if (fstat(STDOUT_FILENO, &ostat) < 0) {
+- fprintf(stderr, "fstat stdout\n");
++ perror("fstat(stdout)");
+ exit(0);
+ }
+ #if 1
+@@ -475,7 +481,7 @@
+ argv++;
+ }
+ if (ioctl(fd, AUDIO_SETINFO, &info) < 0) {
+- fprintf(stderr, "set failed\n");
++ perror("ioctl(setinfo)");
+ exit(1);
+ }
+ if (sep) {
+--- sparc-utils-1.9.orig/audioctl-1.3/audioctl.1
++++ sparc-utils-1.9/audioctl-1.3/audioctl.1
+@@ -91,11 +91,14 @@
+ .Bl -tag -width /dev/audioctl
+ .It Pa /dev/audioctl
+ audio control device
++.It Pa /etc/default/audioctl
++default configuration loaded at boot time if any (Debian centric)
+ .El
+ .Sh ENVIRONMENT
+ .Bl -tag -width AUDIOCTLDEVICE
+ .It Pa AUDIOCTLDEVICE
+ the audio control device to use.
++.El
+ .Sh SEE ALSO
+ .Xr mixerctl 1 ,
+ .Xr audio 4 ,
+--- sparc-utils-1.9.orig/debian/changelog
++++ sparc-utils-1.9/debian/changelog
+@@ -0,0 +1,112 @@
++sparc-utils (1.9-2) unstable; urgency=high
++
++ * Fixed a printf bug in prtconf. Closes: #121814.
++ * Updated location of prtconf source in copyright file.
++ * Updated maintainer address.
++
++ -- Eric Delaunay <delaunay@debian.org> Thu, 6 Dec 2001 19:05:57 +0100
++
++sparc-utils (1.9-1) unstable; urgency=low
++
++ * removed ethtool. Now built as standalone package. Closes: #113322.
++
++ -- Eric Delaunay <delaunay@lix.polytechnique.fr> Tue, 2 Oct 2001 21:55:12 +0200
++
++sparc-utils (1.8-2) unstable; urgency=low
++
++ * Added init script for audioctl. Closes: #95148.
++ * audioctl: better error reporting using perror().
++
++ -- Eric delaunay <delaunay@lix.polytechnique.fr> Sun, 9 Sep 2001 17:17:57 +0200
++
++sparc-utils (1.8-1) unstable; urgency=low
++
++ * NMU
++ * Remove tilo, since it is now in the silo package.
++
++ -- Ben Collins <bcollins@debian.org> Fri, 25 May 2001 20:48:07 -0400
++
++sparc-utils (1.7-1) unstable; urgency=low
++
++ * NMU, to fix up some issues for boot-floppies
++ * Updated piggyback.c and piggyback64.c to latest version from kernel
++ source (fixes some issues)
++ * Lots of work on tilo to get it working with Ultra III's and to make
++ some nice output during boot
++
++ -- Ben Collins <bcollins@debian.org> Wed, 16 May 2001 11:52:47 -0400
++
++sparc-utils (1.6-1) unstable; urgency=low
++
++ * Added audioctl. Closes #76568.
++ * Depends on makedev >= 2.3.1-45 for audioctl support.
++ * Updated to elftoaout 2.3 (new -c option).
++
++ -- Eric delaunay <delaunay@lix.polytechnique.fr> Mon, 12 Feb 2001 22:49:50 +0100
++
++sparc-utils (1.5-1) frozen unstable; urgency=low
++
++ * Enhanced tilo to allow it building tftpboot images targeted for one subarch
++ at a time. Thanks to Ben Collins <bcollins@debian.org> for the patch.
++ * Added piggyback64 to create ultrasparc tftpboot images like piggyback does
++ for old 32 bit sparc.
++ * This upload is needed for potato boot-floppies.
++
++ -- Eric delaunay <delaunay@lix.polytechnique.fr> Mon, 27 Mar 2000 21:33:50 +0200
++
++sparc-utils (1.4-1) frozen unstable; urgency=low
++
++ * fixed missing manpages
++ * now lintian (1.11.2) compliant
++ * added ethtool 1.0 for configuring Happy Meal ethernet cards
++ (closes: #59505)
++
++ -- Eric delaunay <delaunay@lix.polytechnique.fr> Fri, 3 Mar 2000 22:44:55 +0100
++
++sparc-utils (1.3-1) frozen unstable; urgency=low
++
++ * added prtconf 1.3
++ * added sparc32/64 1.1
++ * updated to elftoaout 2.2
++ * fixed a bug in tilo when compiling with potato binutils
++
++ -- Eric delaunay <delaunay@lix.polytechnique.fr> Sun, 29 Dec 1999 22:09:04 +0100
++
++sparc-utils (1.2-1) frozen unstable; urgency=low
++
++ * removed clock package
++ (put back patches to the hwclock program from util-linux 2.9g-6)
++ * added tilo boot loader used to build multi-targets TFTP images
++ (sun4cdm + sun4u).
++
++ -- Eric delaunay <delaunay@lix.polytechnique.fr> Mon, 15 Feb 1999 20:58:15 +0100
++
++sparc-utils (1.1-2) frozen unstable; urgency=low
++
++ * provides hwclock.sh for the clock package to replace the sysvinit's
++ version which doesn't support `clock' anymore.
++ Thanks to Joel Klecker <jk@espy.org>
++
++ -- Eric delaunay <delaunay@lix.polytechnique.fr> Sun, 20 Dec 1998 21:24:14 +0100
++
++sparc-utils (1.1-1) unstable; urgency=low
++
++ * Provides a clock package
++ (from ftp://vger.rutgers.edu/pub/linu/Sparc/userland/clock.c)
++
++ -- Eric delaunay <delaunay@lix.polytechnique.fr> Mon, 22 Jun 1998 21:54:30 +0200
++
++sparc-utils (1.0-1) unstable; urgency=low
++
++ * Initial release.
++ * provide elftoaout (2.1) and piggyback tools to create tftpboot images for
++ sparc workstations.
++ * Added manpage for piggyback.
++ * Added usage message to piggyback.
++ * Built with debhelper 0.63.
++
++ -- Eric delaunay <delaunay@lix.polytechnique.fr> Sat, 21 Feb 1998 16:25:17 +0100
++
++Local variables:
++mode: debian-changelog
++End:
+--- sparc-utils-1.9.orig/debian/audioctl
++++ sparc-utils-1.9/debian/audioctl
+@@ -0,0 +1,53 @@
++#!/bin/sh
++#
++# Set some audio parameters at boot time.
++#
++# This file is part of sparc-utils package.
++#
++# Written by Eric Delaunay <delaunay@debian.org> based on example
++# from Adam Di Carlo <aph@debian.org>.
++#
++# Licensed under GPL.
++
++test -x /usr/bin/audioctl || exit 0
++
++setaudio () {
++ if [ -n "$DEVICE" ]; then
++ optdev="-f $DEVICE"
++ fi
++ /usr/bin/audioctl -nw $optdev $PARAMS
++}
++
++# Source defaults file
++PARAMS=
++DEVICE=
++if [ -f /etc/default/audioctl ]; then
++ . /etc/default/audioctl
++fi
++
++case "$1" in
++start)
++ echo -n "Setting audio parameters..."
++ if [ -n "$PARAMS" ]; then
++ setaudio
++ echo "done."
++ else
++ echo "none."
++ fi
++ ;;
++stop)
++ ;;
++reload|reload|force-reload)
++ $0 start
++ ;;
++restart)
++ $0 stop
++ $0 start
++ ;;
++*)
++ echo "Usage: $0 {start|stop|restart|reload|force-reload}"
++ exit 1
++ ;;
++esac
++
++exit 0
+--- sparc-utils-1.9.orig/debian/postinst
++++ sparc-utils-1.9/debian/postinst
+@@ -0,0 +1,15 @@
++#!/bin/sh
++
++set -e
++
++#DEBHELPER#
++
++if [ "$1" = "configure" -a ! -e /dev/audioctl ]; then
++ # regen audio device list to install new /dev/audioctl entry
++ cd /dev && /sbin/MAKEDEV audio
++fi
++
++if [ "$1" = "configure" ]; then
++ update-rc.d audioctl start 75 S . >/dev/null
++fi
++
+--- sparc-utils-1.9.orig/debian/audioctl.def
++++ sparc-utils-1.9/debian/audioctl.def
+@@ -0,0 +1,35 @@
++#
++# Defaults for audiocl
++#
++# This file is part of sparc-utils package.
++
++# List of fields to be tuned:
++#
++# monitor_gain input to output mix (0-255)
++# output_muted 1=muted, 0=not muted
++#
++# play.gain gain level (0-255)
++# play.balance stereo channel balance
++# play.port 'speaker', 'headphone', 'line_out'
++# play.pause 1=pause, 0=resume
++# play.buffer_size input buffer size in bytes
++#
++# Note that some field values are reset on device open and/or close. It is
++# especially true for play.encoding, play.sample_rate, play.channels and
++# play.precision, therefore setting them at boot time is not very useful.
++# Same apply on record fields.
++#
++# record.gain gain level (0-255)
++# record.balance stereo channel balance
++# record.port 'microphone', 'line_in', 'internal_cd', 'analog_loopback'
++# record.pause 1=pause, 0=resume
++# record.buffer_size output buffer size in bytes
++#
++# Fill in PARAMS variable with a set of field=value assignments.
++#
++# Example:
++#
++#PARAMS="play.port=line_out record.port=line_in"
++
++#DEVICE=/dev/audioctl
++
+--- sparc-utils-1.9.orig/debian/README.debian
++++ sparc-utils-1.9/debian/README.debian
+@@ -0,0 +1,31 @@
++This package is a collection of tools specific to Linux/Sparc:
++
++elftoaout:
++----------
++elftoaout is designed to convert an ELF Linux kernel to a.out format required
++by Sun "boot net" command.
++
++piggyback:
++----------
++piggyback is designed to attach an initial ramdisk to such kernel image.
++
++tilo:
++-----
++
++TILO is now part of the SILO package, and not included in this one.
++
++prtconf:
++--------
++this package provides 2 tools: prtconf & eeprom.
++prtconf prints the SPARC OpenPROM tree in a nicely readable format.
++eeprom displays and/or modifies SPARC OpenPROM options.
++
++sparc32:
++--------
++sparc32 & sparc64 set linux personality accordingly to the request and inherit
++it to the program it will launch.
++
++audioctl:
++---------
++audioctl controls audio device on SparcLinux.
++
+--- sparc-utils-1.9.orig/debian/conffiles
++++ sparc-utils-1.9/debian/conffiles
+@@ -0,0 +1 @@
++/etc/default/audioctl
+--- sparc-utils-1.9.orig/debian/copyright
++++ sparc-utils-1.9/debian/copyright
+@@ -0,0 +1,74 @@
++This is the Debian Linux prepackaged version of several tools required to
++build tftpboot images for Debian S/Linux (S stands for Super !).
++
++This package was put together by Eric Delaunay <delaunay@debian.org> from
++sources obtained from various Internet sites (see below).
++
++Copyright Information for the Debian GNU/Linux sparc-utils package
++==================================================================
++
++The following tools may be redistributed under the terms of the GNU GPL
++Version 2 or later found on Debian systems in the file
++/usr/share/common-licenses/GPL
++
++piggyback, piggyback64:
++-----------------------
++ kernel-source-2.2.x under arch/{sparc,sparc64}/boot/.
++
++elftoaout:
++----------
++ ftp://sunsite.mff.cuni.cz/OS/Linux/Sparc/local/elftoaout/elftoaout-2.3.tgz
++ (it is the developer's ftp site).
++
++prtconf:
++--------
++ http://vger.samba.org/cgi-bin/cvsweb/prtconf/?cvsroot=vger
++
++sparc32:
++--------
++ ftp://ftp.redhat.com/redhat/redhat-6.2/SRPMS/SRPMS/sparc32-1.1-2.src.rpm
++
++
++
++The following tool may be redistributed under the terms of the next license.
++
++audioctl:
++---------
++ ftp://ftp.dementia.org/pub/linux/sparcaudio/
++
++/*
++ * Copyright (c) 1997 The NetBSD Foundation, Inc.
++ * All rights reserved.
++ *
++ * Author: Lennart Augustsson
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. All advertising materials mentioning features or use of this software
++ * must display the following acknowledgement:
++ * This product includes software developed by the NetBSD
++ * Foundation, Inc. and its contributors.
++ * 4. Neither the name of The NetBSD Foundation nor the names of its
++ * contributors may be used to endorse or promote products derived
++ * from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
++ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
++ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ * POSSIBILITY OF SUCH DAMAGE.
++ */
++/* SparcLinux audio modifications by Derrick J Brashear, shadow@dementia.org */
++
+--- sparc-utils-1.9.orig/debian/postrm
++++ sparc-utils-1.9/debian/postrm
+@@ -0,0 +1,10 @@
++#!/bin/sh
++
++set -e
++
++#DEBHELPER#
++
++if [ "$1" = "purge" ] ; then
++ update-rc.d audioctl remove > /dev/null
++fi
++
+--- sparc-utils-1.9.orig/debian/rules
++++ sparc-utils-1.9/debian/rules
+@@ -0,0 +1,67 @@
++#! /usr/bin/make -f
++# (C) 1998-2001, Eric Delaunay
++
++CFLAGS=-O2
++
++a=$(shell dpkg --print-architecture)
++p=sparc-utils
++
++build: build-stamp
++build-stamp:
++ dh_testdir
++ $(MAKE) -C elftoaout-2.3 CFLAGS="$(CFLAGS)"
++ $(MAKE) -C src piggyback piggyback64 CFLAGS="$(CFLAGS)"
++ $(MAKE) -C prtconf-1.3 all
++ $(MAKE) -C sparc32-1.1
++ $(MAKE) -C audioctl-1.3
++ touch $@
++
++clean:
++ dh_testdir
++ dh_testroot
++ rm -f build-stamp
++ rm -f elftoaout-2.3/elftoaout src/piggyback src/piggyback64
++ $(MAKE) -C prtconf-1.3 clean
++ rm -f sparc32-1.1/sparc32
++ rm -f audioctl-1.3/audioctl audioctl-1.3/*.o
++ dh_clean
++
++binary: binary-arch binary-indep
++
++binary-indep:
++# nothing to do for arch independent binary packages
++
++binary-arch: build
++ dh_testdir
++ dh_testroot
++ dh_clean -k
++ # install binaries
++ dh_installdirs usr/bin usr/sbin
++ install -s elftoaout-2.3/elftoaout debian/tmp/usr/bin
++ install -s src/piggyback src/piggyback64 debian/tmp/usr/bin
++ install -s prtconf-1.3/prtconf debian/tmp/usr/sbin/prtconf
++ install -s prtconf-1.3/eeprom debian/tmp/usr/sbin/eeprom
++ install -s sparc32-1.1/sparc32 debian/tmp/usr/bin
++ ln -sf sparc32 debian/tmp/usr/bin/sparc64
++ install -s audioctl-1.3/audioctl debian/tmp/usr/bin
++ # install /etc/init.d script & /etc/default scripts
++ install -d -m 755 debian/tmp/etc debian/tmp/etc/init.d debian/tmp/etc/default
++ install -m 755 debian/audioctl debian/tmp/etc/init.d
++ install -m 755 debian/audioctl.def debian/tmp/etc/default/audioctl
++ # install documentation
++ dh_installmanpages
++ dh_installdocs
++ dh_installexamples prtconf-1.3/examples/*
++ dh_installchangelogs
++ dh_compress
++ dh_fixperms
++ dh_installdeb
++ dh_shlibdeps
++ dh_gencontrol
++ dh_md5sums
++ dh_builddeb
++
++source diff:
++ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
++
++.PHONY: binary-arch binary-indep binary build clean
+--- sparc-utils-1.9.orig/debian/control
++++ sparc-utils-1.9/debian/control
+@@ -0,0 +1,23 @@
++Source: sparc-utils
++Section: misc
++Priority: extra
++Maintainer: Eric Delaunay <delaunay@debian.org>
++Standards-Version: 3.1.1
++
++Package: sparc-utils
++Architecture: sparc
++Pre-Depends: ${shlibs:Depends}
++Depends: makedev (>= 2.3.1-45)
++Description: Miscellaneous tools useful for sparc systems.
++ This package provides the following tools:
++ .
++ - elftoaout,
++ piggyback, to build bootable kernel images over the net for Sparc
++ workstations. They are mainly used by the boot-floppies
++ package to create the tftpboot image of the Debian
++ installation subsystem.
++ - prtconf, eeprom to dump and modify contents of OpenPROM.
++ - sparc32, sparc64 to set linux personality for one program and its children
++ (useful to enforce a 32 bit environment on 64 bit system).
++ - audioctl to control the audio device on Sparc/Linux workstations.
++
+--- sparc-utils-1.9.orig/debian/piggyback.1
++++ sparc-utils-1.9/debian/piggyback.1
+@@ -0,0 +1,50 @@
++.\" -*- nroff -*-
++.\"
++.TH PIGGYBACK 1 "March 1998" "piggyback"
++.SH NAME
++piggyback \- add initial ramdisk to a tftpboot kernel image
++.SH SYNOPSIS
++.B piggyback
++.I vmlinux
++.I System.map
++.I ramdisk
++.P
++.B piggyback64
++.I vmlinux
++.I System.map
++.I ramdisk
++.SH DESCRIPTION
++.BI piggyback
++is a simple utility to make a single-image install kernel with initial
++ramdisk for Sparc tftpbooting without need to set up nfs.
++.P
++.BI piggyback64
++is the same for Ultra-Sparc workstations (those using a 64 bit kernel).
++.PP
++.SH OPTIONS
++.TP
++.I vmlinux
++the kernel on which the ramdisk will be appended. It must be an
++.B a.out
++kernel (use elftoaout for it), as PROM looks for
++.B a.out
++image only.
++.TP
++.I System.map
++the kernel map.
++.TP
++.I ramdisk
++the initial ramdisk image to append to the kernel image. It could be
++compressed as well.
++.SH AUTHOR
++.B piggyback
++has been written by Jakub Jelinek <jj@ultra.linux.cz>.
++.SH AVAILABILITY
++.B piggyback
++and
++.B piggyback64
++are available in kernel-source-2.2.x package, under arch/sparc/boot and
++arch/sparc64/boot.
++.SH SEE ALSO
++.BR elftoaout (1),
++.BR tilo (1)
+--- sparc-utils-1.9.orig/debian/piggyback64.1
++++ sparc-utils-1.9/debian/piggyback64.1
+@@ -0,0 +1,3 @@
++.\" -*- nroff -*-
++.\"
++.so man1/piggyback.1
+--- sparc-utils-1.9.orig/sparc32-1.1/sparc32.c
++++ sparc-utils-1.9/sparc32-1.1/sparc32.c
+@@ -0,0 +1,58 @@
++/* (C) 1998,1999 Jakub Jelinek under terms of GPL */
++#include <linux/personality.h>
++#include <linux/unistd.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <string.h>
++#include <sys/utsname.h>
++
++#ifndef PER_LINUX32
++#define PER_LINUX32 8
++#endif
++#ifndef PER_LINUX_32BIT
++#define PER_LINUX_32BIT 0x0800000
++#endif
++
++_syscall1(int, personality, long, pers);
++
++int main(int argc, char **argv)
++{
++ char *p = strrchr(argv[0], '/');
++ int quiet = 0;
++
++ p = p ? p+1 : argv[0];
++ if (argc <= 1) {
++ fprintf (stderr, "Usage: %s [-q] program arguments\n", p);
++ exit(1);
++ }
++ if (!strcmp (argv[1], "-q")) {
++ quiet = 1;
++ argv++;
++ argc--;
++ }
++ if (!strcmp (p, "sparc32")) {
++ if (personality(PER_LINUX32) == -1) {
++ if (!quiet) perror ("Error setting personality");
++ exit(1);
++ }
++ } else if (!strcmp (p, "sparc64")) {
++ struct utsname un;
++
++ if (personality(PER_LINUX_32BIT) == -1 ||
++ personality(PER_LINUX) == -1) {
++ if (!quiet) perror ("Error setting personality");
++ exit(1);
++ }
++ uname(&un);
++ if (strcmp(un.machine, "sparc64")) {
++ if (!quiet) fprintf (stderr, "sparc64: Not a 64bit host\n");
++ exit(2);
++ }
++ } else {
++ fprintf (stderr, "sparc32/sparc64 has identity crisis\n");
++ exit(3);
++ }
++ if (quiet && argv[1] == NULL)
++ exit(0);
++ execvp(argv[1], argv+1);
++}
+--- sparc-utils-1.9.orig/sparc32-1.1/sparc32.8
++++ sparc-utils-1.9/sparc32-1.1/sparc32.8
+@@ -0,0 +1,21 @@
++.TH SPARC32 8 "Sep 1999" local "Linux Programmer's Manual"
++.SH NAME
++sparc32 \- create a 32bit sparc environment on sparc64
++.SH SYNOPSIS
++.B sparc32
++.IR program
++.SH DESCRIPTION
++.B sparc32
++creates a 32bit sparc environment for specified program, usually shell.
++The environment is inherited by all child processes of that program, unless
++they set a different personality.
++The 32bit sparc environment currently only means all uname system calls (and
++thus also outputs of the uname(1) program with -m or -a options) will return
++.IR sparc
++instead of
++.IR sparc64
++as machine type. sparc64(8) can be used to temporarily switch back.
++.SH EXAMPLES
++sparc32 /bin/sh
++.SH SEE ALSO
++sparc64(8)
+--- sparc-utils-1.9.orig/sparc32-1.1/Makefile
++++ sparc-utils-1.9/sparc32-1.1/Makefile
+@@ -0,0 +1,8 @@
++sparc32: sparc32.c
++ $(CC) -O2 -o sparc32 sparc32.c
++
++install:
++ install -s -m 0755 sparc32 $(PREFIX)/usr/bin
++ ln -f $(PREFIX)/usr/bin/sparc32 $(PREFIX)/usr/bin/sparc64
++ install -m 0644 sparc32.8 $(PREFIX)/usr/man/man8
++ install -m 0644 sparc64.8 $(PREFIX)/usr/man/man8
+--- sparc-utils-1.9.orig/sparc32-1.1/sparc64.8
++++ sparc-utils-1.9/sparc32-1.1/sparc64.8
+@@ -0,0 +1,29 @@
++.TH SPARC64 8 "Sep 1999" local "Linux Programmer's Manual"
++.SH NAME
++sparc64 \- create a 64bit sparc environment on sparc64
++.SH SYNOPSIS
++.B sparc64
++.IR [ " -q " ] " program " [ " arguments " ]
++.SH DESCRIPTION
++.B sparc64
++creates a 64bit sparc environment for specified program, usually shell.
++The environment is inherited by all child processes of that program, unless
++they set a different personality.
++This can be useful for temporarily enabling 64bit environment from within
++a 32bit sparc environment created by sparc32(8).
++.SH COMMAND-LINE OPTIONS
++.TP
++.B -q
++Suppresses error messages. Can be used to test whether the machine has 64bit
++CPU (no matter if it is running in sparc32(8) environment or not).
++If
++.B -q
++is given, then you don't have to specify the program. In this case
++.B sparc64
++will return 0 if it would succeed to switch into the 64bit sparc environment.
++.SH EXAMPLES
++sparc64 /bin/sh
++
++if sparc64 -q; echo 64bit CPU; fi
++.SH SEE ALSO
++sparc32(8)
diff --git a/sys-apps/sparc-utils/sparc-utils-1.9.ebuild b/sys-apps/sparc-utils/sparc-utils-1.9.ebuild
new file mode 100644
index 000000000000..a89fad9f95a3
--- /dev/null
+++ b/sys-apps/sparc-utils/sparc-utils-1.9.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Maarten Thibaut <murphy@gentoo.org>
+
+A=`echo ${P}|sed 's/sparc-utils-/sparc-utils_/'`.orig.tar.gz
+S=${WORKDIR}/${P}.orig
+DESCRIPTION="SPARC/UltraSPARC Improved Loader, a boot loader for sparc"
+SRC_URI="http://http.us.debian.org/debian/pool/main/s/sparc-utils/${A}"
+HOMEPAGE="http://www.debian.org"
+RDEPEND="virtual/glibc"
+
+src_unpack() {
+ unpack ${A}
+ cat ${FILESDIR}/sparc-utils_1.9-2.diff | patch -p0 -l || die
+}
+
+src_compile() {
+
+ CFLAGS="-O2"
+ cd ${S}
+ emake -C elftoaout-2.3 CFLAGS="$CFLAGS"
+ emake -C src piggyback piggyback64 CFLAGS="$CFLAGS"
+ emake -C prtconf-1.3 all
+ # Not compiling at this time
+ #emake -C sparc32-1.1
+ emake -C audioctl-1.3
+
+}
+
+src_install() {
+
+ mkdir -p ${D}/usr/bin ${D}/usr/sbin ${D}/etc/init.d ${D}/etc/default
+ dodir /usr/bin
+ install -s elftoaout-2.3/elftoaout ${D}/usr/bin
+ install -s src/piggyback src/piggyback64 ${D}/usr/bin
+ #install -s sparc32-1.1/sparc32 ${D}/usr/bin
+ dodir /usr/sbin
+ install -s prtconf-1.3/prtconf ${D}/usr/sbin/prtconf
+ install -s prtconf-1.3/eeprom ${D}/usr/sbin/eeprom
+ #ln -sf sparc32 ${D}/usr/bin/sparc64
+ install -s audioctl-1.3/audioctl ${D}/usr/bin
+ # install /etc/init.d script & /etc/default scripts
+ install -d -m 755 ${D}/etc ${D}/etc/init.d ${D}/etc/default
+ #install -m 755 debian/audioctl ${D}/etc/init.d
+ install -m 755 debian/audioctl.def ${D}/etc/default/audioctl
+
+}