Browse Source

First commit

master
Dashie der otter 7 months ago
commit
d9ec96fac4
6 changed files with 2726 additions and 0 deletions
  1. +35
    -0
      README.md
  2. +1575
    -0
      config_5.5-rc1.ultraslim
  3. +261
    -0
      elftoaout-2.3-64bit_fixes-1.patch
  4. +21
    -0
      sparc-utils-1.9-no-implicit.patch
  5. +834
    -0
      sparc-utils_1.9-4.diff
  6. BIN
      sparc-utils_1.9.orig.tar.gz

+ 35
- 0
README.md View File

@@ -0,0 +1,35 @@
# sparc32

# Files
- sparc-utils_1.9.orig.tar.gz
Contains elftoaout (needed for sparc32 netboot)

- sparc-utils_1.9-4.diff (p0)
- sparc-utils-1.9-no-implicit.patch (p1)
- elftoaout-2.3-64bit_fixes-1.patch (p0)
Various patches to apply

- config_5.5-rc1.ultraslim
Very slim config, no IPv6, no SCSI, pretty much nothing

# It boots
```
PROMLIB: obio_ranges 1
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 5.5.0-rc1 (dashie@potato) (gcc version 9.2.0 (crosstool-NG 1.24.0.37-3f461da)) #11 Thu Dec 12 09:01:07 CET 2019
printk: bootconsole [earlyprom0] enabled
ARCH: SUN4M
TYPE: SPARC CPU-5CE
Ethernet address: 00:80:42:0b:0b:5e
OF stdout device is: /obio/zs@0,100000:a
PROM: Built device tree with 33336 bytes of memory.
Booting Linux...
Power off control detected.
Built 1 zonelists, mobility grouping off. Total pages: 7151
Kernel command line:
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
Sorting __ex_table...
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 26280K/28860K available (2877K kernel code, 123K rwdata, 312K rodata, 116K init, 113K bss, 2580K reserved, 0K cma-reserved, 0K highmem)
```

+ 1575
- 0
config_5.5-rc1.ultraslim
File diff suppressed because it is too large
View File


+ 261
- 0
elftoaout-2.3-64bit_fixes-1.patch View File

@@ -0,0 +1,261 @@
Submitted By: Jim Gifford (patches at jg555 dot com)
Date: 2006-01-03
Initial Package Version: 2.3
Origin: Dave Miller
Upstream Status: Unknown
Description: Fixes 64 Bit Issues with Elftoaout

http://marc.theaimsgroup.com/?l=linux-sparc&m=113617505627794&w=2
diff -Naur elftoaout-2.3.orig/elftoaout.c elftoaout-2.3/elftoaout.c
--- elftoaout-2.3.orig/elftoaout.c 2000-06-03 20:20:12.000000000 +0000
+++ elftoaout-2.3/elftoaout.c 2006-01-03 22:33:28.000000000 +0000
@@ -20,16 +20,36 @@
*/
#include <stdio.h>
#include <stdlib.h>
-#ifdef linux
#include <linux/elf.h>
-#define ELFDATA2MSB 2
-#else
-#include <sys/elf.h>
-#endif
-
-#define swab16(x) (((x)<<8&0xFF00)|((x)>>8&0x00FF))
-#define swab32(x) (((x)<<24&0xFF000000)|((x)<<8&0x00FF0000)|((x)>>24&0x000000FF)|((x)>>8&0x0000FF00))
-#define swab64(x) ((((unsigned long long)(swab32((unsigned int)x))) << 32) | (swab32(((unsigned long long)x)>>32)))
+#include <sys/types.h>
+
+static inline u_int16_t swab16(u_int16_t x)
+{
+ return (((x << 8) & 0xFF00) |
+ ((x >> 8) & 0x00FF));
+}
+
+static inline u_int32_t swab32(u_int32_t x)
+{
+ return (((x << 24) & 0xFF000000) |
+ ((x << 8) & 0x00FF0000) |
+ ((x >> 24) & 0x000000FF) |
+ ((x >> 8) & 0x0000FF00));
+}
+
+static inline u_int64_t swab64(u_int64_t x)
+{
+ return ((u_int64_t)
+ ((u_int64_t)(((u_int64_t)x & (u_int64_t)0x00000000000000ffULL) << 56) |
+ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x000000000000ff00ULL) << 40) |
+ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x0000000000ff0000ULL) << 24) |
+ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x00000000ff000000ULL) << 8) |
+ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x000000ff00000000ULL) >> 8) |
+ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x0000ff0000000000ULL) >> 24) |
+ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x00ff000000000000ULL) >> 40) |
+ (u_int64_t)(((u_int64_t)x & (u_int64_t)0xff00000000000000ULL) >> 56)));
+}
+
/* We carry a.out header here in order to compile the thing on Solaris */
@@ -37,14 +57,14 @@
#define CMAGIC 0x01030108
typedef struct {
- unsigned long a_magic; /* magic number */
- unsigned long a_text; /* size of text segment */
- unsigned long a_data; /* size of initialized data */
- unsigned long a_bss; /* size of uninitialized data */
- unsigned long a_syms; /* size of symbol table || checksum */
- unsigned long a_entry; /* entry point */
- unsigned long a_trsize; /* size of text relocation */
- unsigned long a_drsize; /* size of data relocation */
+ u_int32_t a_magic; /* magic number */
+ u_int32_t a_text; /* size of text segment */
+ u_int32_t a_data; /* size of initialized data */
+ u_int32_t a_bss; /* size of uninitialized data */
+ u_int32_t a_syms; /* size of symbol table || checksum */
+ u_int32_t a_entry; /* entry point */
+ u_int32_t a_trsize; /* size of text relocation */
+ u_int32_t a_drsize; /* size of data relocation */
} Exec;
@@ -56,17 +76,16 @@
int swab;
int sparc64;
int csum;
- /* friend void Usage(void); */
} Application;
typedef struct {
Elf32_Phdr *tab;
- unsigned len;
+ unsigned int len;
} ProgTable;
typedef struct {
Elf64_Phdr *tab;
- unsigned len;
+ unsigned int len;
} ProgTable64;
void get_ptab(ProgTable *t, FILE *inp, const Elf32_Ehdr *h);
@@ -75,9 +94,9 @@
void print_ptab64(ProgTable64 *t);
typedef struct {
- char *buf; /* Image data */
- unsigned len; /* Length of buffer */
- unsigned bss; /* Length of extra data */
+ unsigned char *buf; /* Image data */
+ unsigned int len; /* Length of buffer */
+ unsigned int bss; /* Length of extra data */
} Segment;
void load_image(Segment *t, const ProgTable *h, FILE *inp);
@@ -105,7 +124,8 @@
parse_args(&prog, argc, argv);
- if (prog.version) Version();
+ if (prog.version)
+ Version();
if (freopen(prog.iname, "r", stdin) == NULL) {
fprintf(stderr, "Cannot open \"%s\"\n", prog.iname);
@@ -141,7 +161,8 @@
exit(0);
}
-void parse_args( Application *t, unsigned argc, const char **argv ){
+void parse_args( Application *t, unsigned argc, const char **argv )
+{
const char *arg;
union {
char c[4];
@@ -185,8 +206,8 @@
if (t->csum && t->sun4_mode) Usage (); /* Checksum lives in header. */
}
-void get_header(Elf32_Ehdr *t, FILE *inp) {
-
+void get_header(Elf32_Ehdr *t, FILE *inp)
+{
if (fread((void*) t, sizeof(Elf64_Ehdr), 1, inp) != 1) {
fprintf(stderr, "Read error on header\n");
exit(1);
@@ -249,8 +270,9 @@
}
}
-void get_ptab(ProgTable *t, FILE *inp, const Elf32_Ehdr *h) {
- unsigned x;
+void get_ptab(ProgTable *t, FILE *inp, const Elf32_Ehdr *h)
+{
+ unsigned int x;
/** fprintf(stderr, "Program header table off = 0x%x\n",
(unsigned) h->e_phoff); **/
@@ -294,8 +316,9 @@
}
}
-void get_ptab64(ProgTable64 *t, FILE *inp, const Elf64_Ehdr *h) {
- unsigned x;
+void get_ptab64(ProgTable64 *t, FILE *inp, const Elf64_Ehdr *h)
+{
+ unsigned int x;
if (h->e_phoff == 0) {
fprintf(stderr, "No Program Header Table\n");
@@ -332,8 +355,9 @@
}
}
-void print_ptab(ProgTable *t) {
- unsigned x;
+void print_ptab(ProgTable *t)
+{
+ unsigned int x;
const Elf32_Phdr *p;
for (x = 0; x < t->len; x++) {
@@ -374,8 +398,9 @@
}
}
-void print_ptab64(ProgTable64 *t) {
- unsigned x;
+void print_ptab64(ProgTable64 *t)
+{
+ unsigned int x;
const Elf64_Phdr *p;
for (x = 0; x < t->len; x++) {
@@ -387,8 +412,11 @@
break;
case PT_LOAD:
printf("Loadable to 0x%Lx[0x%Lx] from 0x%Lx[0x%Lx] align 0x%Lx",
- p->p_vaddr, p->p_memsz, p->p_offset, p->p_filesz,
- p->p_align);
+ (unsigned long long) p->p_vaddr,
+ (unsigned long long) p->p_memsz,
+ (unsigned long long) p->p_offset,
+ (unsigned long long) p->p_filesz,
+ (unsigned long long) p->p_align);
break;
case PT_DYNAMIC:
printf("Dynamic");
@@ -416,9 +444,10 @@
}
}
-void load_image(Segment *t, const ProgTable *tp, FILE *inp) {
+void load_image(Segment *t, const ProgTable *tp, FILE *inp)
+{
Elf32_Phdr *p, *q;
- unsigned x;
+ unsigned int x;
unsigned long off, len;
p = 0;
@@ -484,9 +513,10 @@
}
}
-void load_image64(Segment *t, const ProgTable64 *tp, FILE *inp) {
+void load_image64(Segment *t, const ProgTable64 *tp, FILE *inp)
+{
Elf64_Phdr *p, *q;
- unsigned x;
+ unsigned int x;
unsigned long long off, len;
p = 0;
@@ -547,7 +577,8 @@
}
}
-void store_image(Segment *t, FILE *out) {
+void store_image(Segment *t, FILE *out)
+{
Exec ohdb;
if (prog.swab) {
@@ -585,13 +616,15 @@
return;
}
-void Usage(){
+void Usage()
+{
if (prog.version) Version();
fprintf(stderr, "Usage: elftoaout [-o output] [-c|-b] [-V] input\n");
exit(1);
}
-void Version(){
+void Version()
+{
printf("elftoaout 2.3: ELF to a.out convertor for SPARC and SPARC64 bootstraps\n");
}

+ 21
- 0
sparc-utils-1.9-no-implicit.patch View File

@@ -0,0 +1,21 @@
diff --git a/prtconf-1.3/eeprom.c b/prtconf-1.3/eeprom.c
index b801f95..b15e74c 100644
--- a/prtconf-1.3/eeprom.c
+++ b/prtconf-1.3/eeprom.c
@@ -33,4 +33,6 @@
#include <dirent.h>
#include <pwd.h>
+#include <ctype.h> /* isdigit() */
+#include <sys/ioctl.h> /* ioctl() */
#include <asm/openpromio.h>
diff --git a/prtconf-1.3/prtconf.c b/prtconf-1.3/prtconf.c
index b9d8c89..c9b54be 100644
--- a/prtconf-1.3/prtconf.c
+++ b/prtconf-1.3/prtconf.c
@@ -30,4 +30,5 @@
#include <sys/stat.h>
#include <sys/utsname.h>
+#include <sys/ioctl.h> /* ioctl() */
#include <asm/openpromio.h>

+ 834
- 0
sparc-utils_1.9-4.diff View File

@@ -0,0 +1,834 @@
--- 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/prtconf-1.3/prtconf.c
+++ sparc-utils-1.9/prtconf-1.3/prtconf.c
@@ -1,4 +1,4 @@
-/* $Id: prtconf.c,v 1.3 1998/03/03 08:41:42 jj Exp $
+/* $Id: prtconf.c,v 1.4 2001/11/22 13:30:55 davem 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.c
+++ sparc-utils-1.9/prtconf-1.3/eeprom.c
@@ -54,7 +54,7 @@
int prom_root_node, prom_current_node;
#define MAX_PROP 128
#define MAX_VAL (4096-128-4)
-char buf[4096];
+char buf[4096] __attribute__ ((aligned(4)));
#define DECL_OP(size) struct openpromio *op = (struct openpromio *)buf; op->oprom_size = (size)
void (*prom_walk_callback)(int node);
char prom_path[1024];
@@ -653,7 +653,7 @@
static void print_all_options(void)
{
- char buf2[4096];
+ char buf2[4096] __attribute__ ((aligned(4)));
struct openpromio *op = (struct openpromio *)buf2;
int len, string;
char *prop;
--- 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/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/changelog
+++ sparc-utils-1.9/debian/changelog
@@ -0,0 +1,192 @@
+sparc-utils (1.9-4) unstable; urgency=low
+
+ * Remove sparc32/sparc64, since they are now provided by
+ util-linux. Closes: #441859
+ * Remove DH_COMPAT setting from debian/rules, add debian/compat
+ instead (lintian warning).
+
+ -- Jurij Smakov <jurij@debian.org> Sat, 22 Sep 2007 11:40:55 +0100
+
+sparc-utils (1.9-3) unstable; urgency=low
+
+ * Gratefully acknowledge previous NMUs.
+ Closes: #216131, #246879, #346584, #379414
+ * Force 4-byte alignment of global array buf and array buf2 in
+ print_all_options() of prtconf-1.3/eeprom.c. That ensures that
+ when we cast struct openpromio into such a buffer, oprom_array
+ ends up at a properly aligned location, and we don't catch a
+ SIGBUS when trying to assign an int to it. Closes: #388315
+ * Use syscall() interface in sparc32.c to perform the personality
+ setting instead of _syscall1() which is no longer exposed to
+ userland starting with linux-kernel-headers 2.6.18-1.
+ * Disable installation of /etc/default/audioctl, as we no longer
+ provide audioctl utility. Disable installation of /etc/init.d
+ and /etc/default directories, since they are empty now. Remove
+ debian/conffiles, where /etc/default/audioctl was the only
+ entry.
+ * Fix CFLAGS:
+ - set the correct default (-g -O2).
+ - implement logic to honor the 'nostrip' and 'noopt' settings
+ in DEB_BUILD_OPTIONS.
+ - make sure that CFLAGS are passed correctly to all sub-makes.
+ - tweak sparc32 Makefile to honor CFLAGS we pass to it, instead
+ of using hardcoded ones.
+ * Do not end the Description with full stop (lintian warning).
+ * Update and expand the copyright file.
+ * Add myself to Uploaders, with maintainer's permission.
+
+ -- Jurij Smakov <jurij@debian.org> Mon, 25 Sep 2006 00:27:34 -0700
+
+sparc-utils (1.9-2.5) unstable; urgency=low
+
+ * NMU
+ * Disable build of audioctl. closes: #379414.
+ * Bump Standards-Version to 3.7.2.
+
+ -- Clint Adams <schizo@debian.org> Sun, 23 Jul 2006 14:44:32 -0400
+
+sparc-utils (1.9-2.4) unstable; urgency=low
+
+ * Non Maintainer Upload.
+ * Update debhelper compatibility to 5.
+ * Add udeb containing prtconf for use in Debian Installer (closes: #346584).
+
+ -- Frans Pop <fjp@debian.org> Thu, 19 Jan 2006 14:09:28 +0100
+
+sparc-utils (1.9-2.3) unstable; urgency=low
+
+ * NMU.
+ * Fix badly formatted description. (Closes: #246879)
+
+ -- Nicolas Boullis <nboullis@debian.org> Thu, 19 Aug 2004 02:49:51 +0200
+
+sparc-utils (1.9-2.2) unstable; urgency=low
+
+ * Look people. If you aren't willing to test shit, don't change it, or
+ upload it for that matter.
+ * Fix sparc32, which Wilmer broke. This caused us great pain, such as the
+ buildd starting to build 64-bit by default. What fun to have things like
+ that happen.
+
+ -- Ben Collins <bcollins@debian.org> Thu, 13 Nov 2003 22:51:36 -0500
+
+sparc-utils (1.9-2.1) unstable; urgency=low
+
+ * Added debhelper build dependency. (Closes: #216131)
+ * Fixed build problem in sparc32. (personality syscall already exists
+ in Linux these days, so redefining it breaks stuff)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 1 Nov 2003 19:10:54 -0500
+
+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/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/compat
+++ sparc-utils-1.9/debian/compat
@@ -0,0 +1 @@
+5
--- sparc-utils-1.9.orig/debian/copyright
+++ sparc-utils-1.9/debian/copyright
@@ -0,0 +1,132 @@
+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
+various sources:
+
+src/piggyback*:
+ Linux kernel source versions 2.2.x, under arch/{sparc,sparc64}/boot
+elftoaout-2.3:
+ Originally from
+ ftp://sunsite.mff.cuni.cz/OS/Linux/Sparc/local/elftoaout/elftoaout-2.3.tgz
+ This address is no longer active.
+prtconf-1.3:
+ Originally from
+ http://vger.samba.org/cgi-bin/cvsweb/prtconf/?cvsroot=vger
+ This address is no longer active.
+audioctl-1.3:
+ Originally from
+ ftp://ftp.dementia.org/pub/linux/sparcaudio/
+ This address is no longer active.
+
+Copyright Information for the Debian GNU/Linux sparc-utils package
+==================================================================
+
+The files in src directory are
+
+ Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ Additionally, Pete Zaitcev <zaitcev@yahoo.com> has contributed
+ endian fixes for cross-compiles to piggyback.c in 2000.
+
+and are distributed under the terms of the following license:
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+The files in elftoaout-2.3 directory are
+
+ Copyright (C) 1995,1996 Pete A. Zaitcev (zaitcev@vger.rutgers.edu)
+ Copyright (C) 1997 Jakub Jelinek (jj@ultra.linux.cz)
+ Copyright 2000 by Jakub Jelinek. All Rights Reserved.
+
+and are distributed under the terms of the following license:
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+The files in the prtconf-1.3 directory are
+
+ Copyright 1998 by Jakub Jelinek. All Rights Reserved.
+ Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
+ Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com)
+ Copyright 1999 by Jakub Jelinek. All Rights Reserved.
+
+and are distributed under the terms of the following license:
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+Files in the audioctl-1.3 directory are
+
+ Copyright (c) 1997 The NetBSD Foundation, Inc.
+ All rights reserved.
+ Author: Lennart Augustsson
+ SparcLinux audio modifications by Derrick J Brashear, shadow@dementia.org
+
+and are distributed under the terms of the following license:
+
+ 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.
+
+The full text of the GNU General Public Licence is available on any Debian
+installation as /usr/share/common-licenses/GPL.
+
--- 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" ] && [ ! -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/rules
+++ sparc-utils-1.9/debian/rules
@@ -0,0 +1,76 @@
+#! /usr/bin/make -f
+# (C) 1998-2001, Eric Delaunay
+
+CFLAGS = -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+STRIP = -s
+ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ STRIP =
+endif
+
+a=$(shell dpkg --print-architecture)
+p=sparc-utils
+u=sparc-utils-udeb
+
+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 CFLAGS="$(CFLAGS)"
+# $(MAKE) -C audioctl-1.3 CFLAGS="$(CFLAGS)"
+ 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 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 -p$(p) usr/bin usr/sbin
+ dh_installdirs -p$(u) usr/sbin
+ install $(STRIP) elftoaout-2.3/elftoaout debian/$(p)/usr/bin
+ install $(STRIP) src/piggyback src/piggyback64 debian/$(p)/usr/bin
+ install $(STRIP) prtconf-1.3/prtconf debian/$(p)/usr/sbin/prtconf
+ install $(STRIP) prtconf-1.3/prtconf debian/$(u)/usr/sbin/prtconf
+ install $(STRIP) prtconf-1.3/eeprom debian/$(p)/usr/sbin/eeprom
+# install $(STRIP) audioctl-1.3/audioctl debian/$(p)/usr/bin
+ # install /etc/init.d script & /etc/default scripts
+# install -d -m 755 debian/$(p)/etc debian/$(p)/etc/init.d debian/$(p)/etc/default
+# install -m 755 debian/audioctl debian/$(p)/etc/init.d
+# install -m 644 debian/audioctl.def debian/$(p)/etc/default/audioctl
+ # install documentation
+ dh_installman
+ 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/sparc-utils.manpages
+++ sparc-utils-1.9/debian/sparc-utils.manpages
@@ -0,0 +1,6 @@
+#audioctl-1.3/audioctl.1
+elftoaout-2.3/elftoaout.1
+debian/piggyback.1
+debian/piggyback64.1
+prtconf-1.3/eeprom.8
+prtconf-1.3/prtconf.8
--- 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/control
+++ sparc-utils-1.9/debian/control
@@ -0,0 +1,32 @@
+Source: sparc-utils
+Section: misc
+Priority: extra
+Maintainer: Eric Delaunay <delaunay@debian.org>
+Uploaders: Jurij Smakov <jurij@debian.org>
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 5.0)
+
+Package: sparc-utils
+Architecture: sparc
+Depends: makedev (>= 2.3.1-45), ${shlibs:Depends}
+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.
+
+Package: sparc-utils-udeb
+XC-Package-Type: udeb
+Section: debian-installer
+Priority: extra
+Architecture: sparc
+Depends: ${shlibs:Depends}
+Description: sparc-utils package for the Debian installer
+ This is a stripped-down version of the sparc-utils package, suitable
+ for use in Debian-installer. It provides only the prtconf binary which
+ is required to adequately detect the SBUS hardware, commonly found on
+ sparc32 and some sparc64 (Ultra1, Ultra2) machines.
--- 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/debian/README.debian
+++ sparc-utils-1.9/debian/README.debian
@@ -0,0 +1,26 @@
+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.
+
+audioctl:
+---------
+audioctl controls audio device on SparcLinux.
+
--- 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/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)) {

BIN
sparc-utils_1.9.orig.tar.gz View File


Loading…
Cancel
Save