summaryrefslogtreecommitdiff
path: root/emulators/gxemul
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2006-09-17 19:53:05 +0000
committerhe <he@pkgsrc.org>2006-09-17 19:53:05 +0000
commit5db6a62873a1c8a67d2e6b33ca24a1adde0e4561 (patch)
tree547445a6e773e58ce495b05333c2474808af2e03 /emulators/gxemul
parentdcd792c56bc1173c7f0922aaee3814e3fb6790ea (diff)
downloadpkgsrc-5db6a62873a1c8a67d2e6b33ca24a1adde0e4561.tar.gz
Add patches to implement the SCSI commands READ_DISCINFO and
READ_TRACKINFO, sufficient to get a NetBSD/cats kernel mount a cd-rom image. I still get ""cd_setblksize: trying to change bsize, but no blk_desc" but it seems to be a benign warning. Pkgrevision bumped to 1.
Diffstat (limited to 'emulators/gxemul')
-rw-r--r--emulators/gxemul/Makefile3
-rw-r--r--emulators/gxemul/distinfo4
-rw-r--r--emulators/gxemul/patches/patch-ab94
-rw-r--r--emulators/gxemul/patches/patch-ac13
4 files changed, 112 insertions, 2 deletions
diff --git a/emulators/gxemul/Makefile b/emulators/gxemul/Makefile
index 2221549ab81..19bcf4087a5 100644
--- a/emulators/gxemul/Makefile
+++ b/emulators/gxemul/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.23 2006/08/20 16:27:44 xtraeme Exp $
+# $NetBSD: Makefile,v 1.24 2006/09/17 19:53:05 he Exp $
#
DISTNAME= gxemul-0.4.2
+PKGREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://gavare.se/gxemul/src/
diff --git a/emulators/gxemul/distinfo b/emulators/gxemul/distinfo
index 08572b95f12..bdada608395 100644
--- a/emulators/gxemul/distinfo
+++ b/emulators/gxemul/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.15 2006/09/17 16:38:12 he Exp $
+$NetBSD: distinfo,v 1.16 2006/09/17 19:53:05 he Exp $
SHA1 (gxemul-0.4.2.tar.gz) = d912b4a38cf892d6f3e89c71195d6c52bb3718ca
RMD160 (gxemul-0.4.2.tar.gz) = dcffd9a3d8de93e935a0f2802c1a0aa60c462693
Size (gxemul-0.4.2.tar.gz) = 1909826 bytes
SHA1 (patch-aa) = d320c625149490ec190b1201bfe94e4ee3692bbf
+SHA1 (patch-ab) = 74cf9f44bd6577e120a1cafb532588a8280681e7
+SHA1 (patch-ac) = 6eae02b6dd162a907abbf9f84ca1c7949eb90bc8
diff --git a/emulators/gxemul/patches/patch-ab b/emulators/gxemul/patches/patch-ab
new file mode 100644
index 00000000000..b83b0e781e9
--- /dev/null
+++ b/emulators/gxemul/patches/patch-ab
@@ -0,0 +1,94 @@
+$NetBSD: patch-ab,v 1.1 2006/09/17 19:53:05 he Exp $
+
+--- src/diskimage.c.orig 2006-08-14 19:46:45.000000000 +0200
++++ src/diskimage.c
+@@ -1185,6 +1185,89 @@ xferp->data_in[4] = 0x2c - 4; /* Additi
+ diskimage__return_default_status_and_message(xferp);
+ break;
+
++ case SCSICDROM_READ_DISCINFO:
++ debug("CDROM_READ_DISCINFO, cmd[1]=0x%02x", xferp->cmd[1]);
++
++ retlen = 34;
++
++ scsi_transfer_allocbuf(&xferp->data_in_len,
++ &xferp->data_in, retlen, 1);
++
++ xferp->data_in[0] = retlen - 2; /* length of info, excl len */
++ xferp->data_in[1] = 0; /* length of info, excl len field, msb */
++ xferp->data_in[2] = 0xE; /* 11 = complete ses, 10 = fin disc */
++ xferp->data_in[3] = 0; /* First track on disc */
++ xferp->data_in[4] = 1; /* Number of sessions, lsb */
++ xferp->data_in[5] = 0; /* first_track_last_session_lsb */
++ xferp->data_in[6] = 0; /* last_track_last_session_lsb */
++ xferp->data_in[7] = 0x20; /* various flags */
++ xferp->data_in[8] = 0; /* CD-ROM disc */
++ xferp->data_in[9] = 1; /* num sessions, msb */
++ xferp->data_in[10] = 0; /* first_track_last_session_msb */
++ xferp->data_in[11] = 0; /* last_track_last_session_msb */
++ {
++ int i;
++ /* Lead-in data, for completed cd-rom */
++ for (i=16; i<=23; i++) {
++ xferp->data_in[i] = 0xff;
++ }
++ }
++
++ diskimage__return_default_status_and_message(xferp);
++ break;
++
++ case SCSICDROM_READ_TRACKINFO:
++ debug("CDROM_READ_TRACKINFO");
++
++ retlen = 36;
++
++ scsi_transfer_allocbuf(&xferp->data_in_len,
++ &xferp->data_in, retlen, 1);
++
++ diskimage_recalc_size(d);
++
++ size = d->total_size / d->logical_block_size;
++ if (d->total_size & (d->logical_block_size-1))
++ size ++;
++
++ xferp->data_in[0] = retlen - 2; /* length of info, excl len */
++ xferp->data_in[1] = 0; /* length of info, msb */
++ xferp->data_in[2] = 1; /* track#, lsb */
++ xferp->data_in[3] = 1; /* session#, lsb */
++ xferp->data_in[4] = 0; /* reserved */
++ xferp->data_in[5] = 0x6; /* trk mode: unintr. data, copyable */
++ xferp->data_in[6] = 0x81; /* trk info: RT + trk mode */
++ xferp->data_in[7] = 0x2; /* last rec=valid, next w=not valid */
++
++ {
++ int i;
++ /*
++ * track start, next writable, free blcks,
++ * blocking factor
++ */
++ for(i=8; i<=23; i++)
++ xferp->data_in[i] = 0;
++ }
++
++ /* Track size */
++ xferp->data_in[24] = (size >> 24) & 0xff;
++ xferp->data_in[25] = (size >> 16) & 0xff;
++ xferp->data_in[26] = (size >> 8) & 0xff;
++ xferp->data_in[27] = size & 0xff;
++
++ {
++ int i;
++ /*
++ * Last recorded address, only for dvd;
++ * zero out rest.
++ */
++ for(i=28; i<=35; i++)
++ xferp->data_in[i] = 0;
++ }
++
++ diskimage__return_default_status_and_message(xferp);
++ break;
++
+ case SCSICDROM_READ_SUBCHANNEL:
+ /*
+ * According to
diff --git a/emulators/gxemul/patches/patch-ac b/emulators/gxemul/patches/patch-ac
new file mode 100644
index 00000000000..07ba76d3f2b
--- /dev/null
+++ b/emulators/gxemul/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2006/09/17 19:53:05 he Exp $
+
+--- src/include/diskimage.h.orig 2005-11-13 03:22:01.000000000 +0100
++++ src/include/diskimage.h
+@@ -150,6 +150,8 @@ void diskimage_dump_info(struct machine
+ /* SCSI CD-ROM commands: */
+ #define SCSICDROM_READ_SUBCHANNEL 0x42
+ #define SCSICDROM_READ_TOC 0x43
++#define SCSICDROM_READ_DISCINFO 0x51
++#define SCSICDROM_READ_TRACKINFO 0x52
+
+ /* SCSI tape commands: */
+ #define SCSICMD_REWIND 0x01