? INSTALL
? Makefile.in
? aclocal.m4
? autom4te.cache
? build
? build-aux
? config.h.in
? configure
? entropy_patch.diff
? mach
? device/.io_req.h.swp
? device/entropy.c
? device/entropy.h
? doc/mach.info
? doc/mach.info-1
? doc/mach.info-2
? doc/stamp-vti
? doc/version.texi
Index: Makefrag.am
===================================================================
RCS file: /sources/hurd/gnumach/Attic/Makefrag.am,v
retrieving revision 1.1.2.12
diff -c -r1.1.2.12 Makefrag.am
*** Makefrag.am	2 Jun 2007 13:23:21 -0000	1.1.2.12
--- Makefrag.am	17 Jun 2007 20:34:24 -0000
***************
*** 292,297 ****
--- 292,305 ----
  	device/kmsg.h
  endif
  
+ #
+ # kernel entrophy generator device
+ 
+ if enable_entropy
+ libkernel_a_SOURCES += \
+ 	device/entropy.c
+ 	device/entropy.h
+ endif
  
  #
  # Version number.
Index: configfrag.ac
===================================================================
RCS file: /sources/hurd/gnumach/Attic/configfrag.ac,v
retrieving revision 1.1.2.6
diff -c -r1.1.2.6 configfrag.ac
*** configfrag.ac	19 Feb 2007 20:09:16 -0000	1.1.2.6
--- configfrag.ac	17 Jun 2007 20:34:24 -0000
***************
*** 124,130 ****
  [else]
    AM_CONDITIONAL([enable_kmsg], [false])
  [fi]
! 
  #
  # Set up `SYSTYPE/SYSTYPE' and `SYSTYPE/include/mach/SYSTYPE' links.
  #
--- 124,141 ----
  [else]
    AM_CONDITIONAL([enable_kmsg], [false])
  [fi]
! 
! 
! AC_ARG_ENABLE([entropy],
!   AS_HELP_STRING([--disable-entropy], [disable use of entropy device]))
! [if [ x"$enable_kmsg" != xno ]; then]
!   AC_DEFINE([MACH_ENTROPY], [], [enable use of entropy device])
!   AM_CONDITIONAL([enable_entropy], [true])
! [else]
!   AM_CONDITIONAL([enable_entropy], [false])
! [fi]
! 
! 
  #
  # Set up `SYSTYPE/SYSTYPE' and `SYSTYPE/include/mach/SYSTYPE' links.
  #
***************
*** 134,140 ****
  # <http://lists.gnu.org/archive/html/bug-automake/2006-11/msg00027.html>.
  AC_CONFIG_LINKS([machine:$systype/$systype
  		 mach/machine:$systype/include/mach/$systype])
! 
  dnl Local Variables:
  dnl mode: autoconf
  dnl End:
--- 145,151 ----
  # <http://lists.gnu.org/archive/html/bug-automake/2006-11/msg00027.html>.
  AC_CONFIG_LINKS([machine:$systype/$systype
  		 mach/machine:$systype/include/mach/$systype])
! 
  dnl Local Variables:
  dnl mode: autoconf
  dnl End:
Index: i386/i386at/conf.c
===================================================================
RCS file: /sources/hurd/gnumach/i386/i386at/Attic/conf.c,v
retrieving revision 1.4.2.15
diff -c -r1.4.2.15 conf.c
*** i386/i386at/conf.c	1 Apr 2007 22:10:40 -0000	1.4.2.15
--- i386/i386at/conf.c	17 Jun 2007 20:34:24 -0000
***************
*** 61,66 ****
--- 61,71 ----
  extern int	kmsgopen(), kmsgclose(), kmsgread(), kmsggetstat();
  #define kmsgname		"kmsg"
  
+ #ifdef MACH_ENTROPY                                                                       
+ extern int	entropyopen(), entropyclose(), entropyread(), entropygetstat();
+ #define entropyname		"entropy"
+ #endif
+ 
  /*
   * List of devices - console must be at slot 0
   */
***************
*** 120,125 ****
--- 125,136 ----
            nodev },
  #endif
  
+ #ifdef MACH_ENTROPY
+ 	{ entropyname, 	entropyopen,	entropyclose,	entropyread,
+ 	  nodev,	entropygetstat,	nodev,		nomap,
+ 	  nodev,	nulldev,	nulldev,	0,
+ 	  nodev },
+ #endif
  };
  int	dev_name_count = sizeof(dev_name_list)/sizeof(dev_name_list[0]);
  
Index: i386/i386at/kd.c
===================================================================
RCS file: /sources/hurd/gnumach/i386/i386at/Attic/kd.c,v
retrieving revision 1.5.2.13
diff -c -r1.5.2.13 kd.c
*** i386/i386at/kd.c	7 May 2007 22:04:53 -0000	1.5.2.13
--- i386/i386at/kd.c	17 Jun 2007 20:34:24 -0000
***************
*** 85,90 ****
--- 85,97 ----
  #include <device/io_req.h>
  #include <device/buf.h>		/* for struct uio (!) */
  #include <vm/vm_kern.h>
+ 
+ #ifdef MACH_KERNEL
+ #ifdef MACH_ENTROPY                                                                       
+ #include <device/entropy.h>
+ #endif /* MACH_KERNEL */
+ #endif /* MACH_ENTROPY */
+ 
  #include <i386/vm_param.h>
  #include <i386/machspl.h>
  #include <i386/pio.h>
***************
*** 811,816 ****
--- 818,835 ----
  		up = TRUE;
  		scancode &= ~K_UP;
  	}
+ 
+ #ifdef MACH_KERNEL
+ #ifdef MACH_ENTROPY                                                                       
+ 	/***
+ 	 * Kirkeby put the get entropy function here, so will I
+ 	 * the OR causes it to only get a some of the keypresses
+ 	 * making this even more random when it fires (he got this
+ 	 * from Linux originally
+ 	 ***/
+ 	entropy_putchar(scancode | (up ? 0200 : 0));
+ #endif /* MACH_ENTROPY */
+ #endif /* MACH_KERNEL */
  	if (scancode < NUMKEYS) {
  		/* Lookup in map, then process. */
  		char_idx = kdstate2idx(kd_state, kd_extended);
Index: i386/i386at/kd_mouse.c
===================================================================
RCS file: /sources/hurd/gnumach/i386/i386at/Attic/kd_mouse.c,v
retrieving revision 1.3.2.8
diff -c -r1.3.2.8 kd_mouse.c
*** i386/i386at/kd_mouse.c	13 Nov 2006 21:30:36 -0000	1.3.2.8
--- i386/i386at/kd_mouse.c	17 Jun 2007 20:34:24 -0000
***************
*** 70,75 ****
--- 70,78 ----
  #ifdef	MACH_KERNEL
  #include <device/errno.h>
  #include <device/io_req.h>
+ #ifdef MACH_ENTROPY
+ #include <device/entropy.h>
+ #endif /* MACH_ENTROPY */
  #else	/* MACH_KERNEL */
  #include <sys/file.h>
  #include <sys/errno.h>
***************
*** 677,682 ****
--- 680,690 ----
  	moved.mm_deltaX = (char)mousebuf[1] + (char)mousebuf[3];
  	moved.mm_deltaY = (char)mousebuf[2] + (char)mousebuf[4];
  
+ #ifdef MACH_ENTROPY
+ 	/* Kick some mouse data to the entropy driver */
+ 	entropy_putchar((buttonchanges + moved.mm_deltaX
+ 			+ moved.mm_deltaY) | 0122);
+ #endif
  	if (moved.mm_deltaX != 0 || moved.mm_deltaY != 0)
  		mouse_moved(moved);
  
Index: linux/configfrag.ac
===================================================================
RCS file: /sources/hurd/gnumach/linux/Attic/configfrag.ac,v
retrieving revision 1.1.2.5
diff -c -r1.1.2.5 configfrag.ac
*** linux/configfrag.ac	2 May 2007 19:47:11 -0000	1.1.2.5
--- linux/configfrag.ac	17 Jun 2007 20:34:25 -0000
***************
*** 601,606 ****
--- 601,615 ----
  		   linux/dev/include/asm:linux/dev/include/asm-$systype])
  [else] AM_CONDITIONAL([CODE_linux], [false])
  [fi]
+ 
+ AC_ARG_ENABLE([entropy],
+ 		  AS_HELP_STRING([--disable-entropy], [disable use of entropy device]))
+ 	[if [ x"$enable_kmsg" != xno ]; then]
+ 	  AC_DEFINE([MACH_ENTROPY], [], [enable use of entropy device])
+ 	  AM_CONDITIONAL([enable_entropy], [true])
+ 	[else]                                                                   
+ 	  AM_CONDITIONAL([enable_entropy], [false])                              	
+ [fi]     
  
  dnl Local Variables:
  dnl mode: autoconf
Index: linux/dev/glue/misc.c
===================================================================
RCS file: /sources/hurd/gnumach/linux/dev/glue/Attic/misc.c,v
retrieving revision 1.2
diff -c -r1.2 misc.c
*** linux/dev/glue/misc.c	18 Sep 2001 21:14:19 -0000	1.2
--- linux/dev/glue/misc.c	17 Jun 2007 20:34:25 -0000
***************
*** 67,72 ****
--- 67,76 ----
  #include <linux/proc_fs.h>
  #include <linux/kernel_stat.h>
  
+ #ifdef MACH_ENTROPY
+ #include <device/entropy.h>
+ #endif
+ 
  extern boolean_t vm_map_lookup_entry (register vm_map_t, register vm_offset_t,
  				      vm_map_entry_t *);
  extern int printf (const char *, ...);
***************
*** 224,229 ****
--- 228,237 ----
  void
  add_blkdev_randomness (int major)
  {
+ #ifdef MACH_ENTROPY
+   /* Linux provides a nice way to get random bits, so lets use it */
+   entropy_putchar(major);
+ #endif
  }
  
  void
