public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Ash execution and VTs
@ 2006-08-20 22:12 Claudio Matsuoka
  2006-08-24  8:50 ` [PATCH] Ash execution and VTs (error building elkscmd) Eddy
  0 siblings, 1 reply; 3+ messages in thread
From: Claudio Matsuoka @ 2006-08-20 22:12 UTC (permalink / raw)
  To: linux-8086

Hi,

I'm commiting these to the CVS repository. Previous code had the
strange effect of starting the console at the second VT and not
executing the shell. The first problem was caused because ELKS wants
tty1 to be minor 0 and not minor 1 like Linux, and the other because
the Minix file loader was not able to load files with total size
(minus 32 byte header) larger than a 16-bit integer -- I wonder how it
worked in older versions.

Here are the patches:

To elks:

Index: fs/minix/file.c
===================================================================
RCS file: /cvsroot/elks/elks/fs/minix/file.c,v
retrieving revision 1.11
diff -u -r1.11 file.c
--- fs/minix/file.c	22 Jun 2002 09:28:20 -0000	1.11
+++ fs/minix/file.c	20 Aug 2006 22:02:59 -0000
@@ -87,8 +87,8 @@
 			   char *buf, size_t icount)
 {
     struct buffer_head *bh;
-    loff_t offset, size;
-    size_t chars, count = (icount % 65536), left;
+    loff_t offset, size, left;
+    size_t chars, count = (icount % 65536);
     int read;
     block_t block, blocks;

@@ -99,7 +99,7 @@
      *      Amount we can do I/O over
      */

-    left = (offset > size) ? 0 : (size_t) (size - offset);
+    left = (offset > size) ? 0 : size - offset;

     if (left > count)
 	left = count;
Index: init/main.c
===================================================================
RCS file: /cvsroot/elks/elks/init/main.c,v
retrieving revision 1.25
diff -u -r1.25 main.c
--- init/main.c	31 May 2004 13:49:25 -0000	1.25
+++ init/main.c	20 Aug 2006 22:02:59 -0000
@@ -106,7 +106,7 @@
 #ifdef CONFIG_CONSOLE_SERIAL
 	num = sys_open("/dev/ttyS0", 2, 0);
 #else
-	num = sys_open("/dev/tty0", 2, 0);
+	num = sys_open("/dev/tty1", 2, 0);
 #endif

 	if (num < 0)


To elkscmd:

Index: rootfs_template/dev/MAKEDEV
===================================================================
RCS file: /cvsroot/elks/elkscmd/rootfs_template/dev/MAKEDEV,v
retrieving revision 1.7
diff -u -r1.7 MAKEDEV
--- rootfs_template/dev/MAKEDEV	28 Jul 2004 13:58:35 -0000	1.7
+++ rootfs_template/dev/MAKEDEV	20 Aug 2006 22:11:32 -0000
@@ -109,7 +109,14 @@
 # used to use the node numbers these now use. However, it is expected that
 # this restriction can be removed in the near future.

-	$MKSET  0 3  $MKDEV tty c 4	# Currently
+# CM: ELKS wants tty1 to be minor 0, so we can't use $MKSET
+
+	mknod tty1 c 4 0
+	mknod tty2 c 4 1
+	mknod tty3 c 4 2
+	mknod tty4 c 4 3
+
+#	$MKSET  0 3  $MKDEV tty c 4	# Currently
 #	$MKSET  0 15 $MKDEV tty c 4	# Soon to be

 # Serial ports, as detected by the ROM BIOS.
@@ -134,6 +141,11 @@
 #	$MKSET  0 15 $MKDEV loop c 7

 ##############################################################################
+# TCPDEV, used by ktcp
+
+	mknod tcpdev c 8 0
+
+##############################################################################
 # SCSI disks. These are not yet supported.

 #	$MKSET   0 15 $MKDEV sda b 8
Index: rootfs_template/etc/rc.d/rc.sysinit
===================================================================
RCS file: /cvsroot/elks/elkscmd/rootfs_template/etc/rc.d/rc.sysinit,v
retrieving revision 1.3
diff -u -r1.3 rc.sysinit
--- rootfs_template/etc/rc.d/rc.sysinit	15 Jul 2002 05:26:36 -0000	1.3
+++ rootfs_template/etc/rc.d/rc.sysinit	20 Aug 2006 22:11:32 -0000
@@ -9,7 +9,7 @@
 #

 localip=192.168.1.100
-sliptty=/dev/ttys0
+sliptty=/dev/ttyS0
 ttybaud=4800

 if test -f /bin/ktcp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-25  1:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-20 22:12 [PATCH] Ash execution and VTs Claudio Matsuoka
2006-08-24  8:50 ` [PATCH] Ash execution and VTs (error building elkscmd) Eddy
2006-08-25  1:17   ` Claudio Matsuoka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox