summaryrefslogtreecommitdiff
path: root/sys/dev/microcode/daic
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2001-01-05 12:49:52 +0000
committermartin <martin@NetBSD.org>2001-01-05 12:49:52 +0000
commitc3cb638bcaf3ab422b9fbdaa4552afd21a817f40 (patch)
tree739005e0a66c10d03cc90d4791b5e1597b016670 /sys/dev/microcode/daic
parentf60c2ea4df70477bade4f1c69ac781c95f862a0c (diff)
Initial import of ISDN4BSD release 0.96
Diffstat (limited to 'sys/dev/microcode/daic')
-rw-r--r--sys/dev/microcode/daic/Makefile31
-rw-r--r--sys/dev/microcode/daic/dnload.h-dist42
-rw-r--r--sys/dev/microcode/daic/gendnloadh47
3 files changed, 120 insertions, 0 deletions
diff --git a/sys/dev/microcode/daic/Makefile b/sys/dev/microcode/daic/Makefile
new file mode 100644
index 00000000000..ef250072b5b
--- /dev/null
+++ b/sys/dev/microcode/daic/Makefile
@@ -0,0 +1,31 @@
+# The Microcode for the Eicon.Diehl active ISDN cards comes in two parts.
+# A tiny bootstrap loader delivered by Diehl as "dnload.bin" and a
+# D-channel protocol specific file, e.g. "te_etsi.sx" for the SX card
+# running E-DSS1.
+# We can not deliver either of these files. The user is assumed to use
+# the ones distributed with his card or download the newest version from
+# http://www.diehl.de.
+# The bootstrap loader is compiled into the kernel, as it is needed to
+# identify the card. The protocol specific part is later downloaded by
+# the ISDN management daemon.
+
+.NOPATH: dnload.bin
+.if exists(dnload.bin)
+# Real part - the bootstrap image is available. We convert it into a
+# static byte array via the "gendnloadh" shell script.
+dnload.h: dnload.bin
+ @rm -f dnload.h
+ @sh ./gendnloadh
+.else
+# Fake part - user did not copy the necessary file here. Compilation will
+# fail with an error explaining his fault.
+dnload.h: dnload.h-dist
+ cp dnload.h-dist dnload.h
+.endif
+
+clean:
+ rm -f dnload.h
+
+cleandir: clean
+
+includes: dnload.h
diff --git a/sys/dev/microcode/daic/dnload.h-dist b/sys/dev/microcode/daic/dnload.h-dist
new file mode 100644
index 00000000000..11f3fbf6217
--- /dev/null
+++ b/sys/dev/microcode/daic/dnload.h-dist
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 1997,2001 Martin Husemann <martin@duskware.de>
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ */
+/*
+ * File: dnload.h
+ * This file is usualy generated from the binary bootstrap image
+ * delivered with the ISDN controller. Just copy the file "dnload.bin"
+ * to this directory, run "make" here and the kernel will compile fine.
+ * If you don't have this software, download the newest version of
+ * the DOS driver software for your card from http://www.diehl.de,
+ * extract the archive and copy "dnload.bin" here.
+ */
+
+#error "You did not copy 'dnload.bin' to sys/dev/microcode/daic and ran 'make' there"
+
+/* ------------------------------------------------------------------------- */
+static u_int8_t dnload[] = {
+ 0
+};
+
+/* ------------------------------------------------------------------------- */
diff --git a/sys/dev/microcode/daic/gendnloadh b/sys/dev/microcode/daic/gendnloadh
new file mode 100644
index 00000000000..29e8b1b8d00
--- /dev/null
+++ b/sys/dev/microcode/daic/gendnloadh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Copyright (c) 1997,2001 Martin Husemann <martin@duskware.de>
+# All rights reserved.
+#
+# 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. The name of the author may not be used to endorse or promote products
+# derived from this software withough specific prior written permission
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+
+echo "Generating dnload.h from dnload.bin"
+
+cat << EOF > dnload.h
+/*
+ * File: dnload.h
+ * Generated from: `ls -lT dnload.bin | awk '{print $10, $6, $7, $8, $9}'`
+ * By: `id -un`@`hostname`, `date`
+ *
+ * DO NOT EDIT THIS FILE!
+ */
+
+/* ------------------------------------------------------------------------- */
+static u_int8_t dnload[] = {
+EOF
+
+hexdump -v -e '" /* %04.4_ax */\t" 8/1 "0x%02x, " "\n"' -s 0x200 dnload.bin >> dnload.h
+
+cat << EOF >> dnload.h
+ 0
+};
+
+/* ------------------------------------------------------------------------- */
+EOF