From: "Claudio Matsuoka" <cmatsuoka@gmail.com>
To: linux-8086@vger.kernel.org
Subject: [PATCH] Ash execution and VTs
Date: Sun, 20 Aug 2006 19:12:41 -0300 [thread overview]
Message-ID: <5f52f6d70608201512x556833f6rebe00b587ae6fae@mail.gmail.com> (raw)
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
next reply other threads:[~2006-08-20 22:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-20 22:12 Claudio Matsuoka [this message]
2006-08-24 8:50 ` [PATCH] Ash execution and VTs (error building elkscmd) Eddy
2006-08-25 1:17 ` Claudio Matsuoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f52f6d70608201512x556833f6rebe00b587ae6fae@mail.gmail.com \
--to=cmatsuoka@gmail.com \
--cc=linux-8086@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox