* [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
* Re: [PATCH] Ash execution and VTs (error building elkscmd)
2006-08-20 22:12 [PATCH] Ash execution and VTs Claudio Matsuoka
@ 2006-08-24 8:50 ` Eddy
2006-08-25 1:17 ` Claudio Matsuoka
0 siblings, 1 reply; 3+ messages in thread
From: Eddy @ 2006-08-24 8:50 UTC (permalink / raw)
To: linux-8086
[-- Attachment #1: Type: text/plain, Size: 5427 bytes --]
Very good work! But I can't build any image of elkscmd, because it give
this error:
"/bin/sh: compress: command not found".. I could not realize where
compress command is called from.
(Error: "
*
* Building image: comb
*
umount ./../elkscmd/comb >/dev/null 2>&1 || true
dd if=/dev/zero of=./../elkscmd/comb bs=1024 count=720 2>/dev/null
/sbin/mkfs.minix -n14 ./../elkscmd/comb 720 >/dev/null
mkdir -p /mnt/elks
mount -o loop ./../elkscmd/comb /mnt/elks
(cd ./../elkscmd/rootfs_template; \
tar cf - --exclude CVS --exclude .keep *) | \
(cd /mnt/elks; tar xpf -)
for i in sys_utils ash bc byacc disk_utils file_utils levee m4 minix1
minix2 minix3 misc_utils mtools sash sh_utils inet; do make -C $i
min_rfs||exit 1; done >/dev/null
/bin/sh: compress: command not found
make[2]: *** [install] Error 127
make[1]: *** [_populate_target] Error 1
make[1]: Leaving directory `/home/eddy/elks/CVS/elkscmd'
make: *** [comb] Error 2
")
P.s.: I attach again my patch for elks makefile etc., now I had the time
to try it, and it works.. you can also accept just part of this.. as you
want, but at least the correction in arch/i86/drivers/char/KeyMaps/mkcfg
that now make menuconfig to crash if you enter in character device menu.
About menuconfig I noticed that there is an error: in multi-choice menu,
if you press escape, instead of return at the parent menu, it shows
help, this is not a big problem because you can just press enter to
solve it, but if there is a number choice, it enter in a continuous loop
as also the enter key shows help.
Claudio Matsuoka wrote:
> 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
> -
> To unsubscribe from this list: send the line "unsubscribe linux-8086" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Attachment #2: patch-elks-CVS.patch --]
[-- Type: text/plain, Size: 2819 bytes --]
diff -Naur ../../CVSori/elks/arch/i86/Makefile ./arch/i86/Makefile
--- ../../CVSori/elks/arch/i86/Makefile 2004-05-31 15:49:25.000000000 +0200
+++ ./arch/i86/Makefile 2006-08-09 13:10:08.000000000 +0200
@@ -92,7 +92,7 @@
(cd $(BASEDIR) ; $(LD) $(LDFLAGS) $(ARCH_LD) \
$(ARCH_DIR)/sibo/crt0.o $(ARCH_DIR)/sibo/crt1.o \
init/main.o $(ARCHIVES) $(DRIVERS) \
- -t -M -o $(ARCH_DIR)/boot/system > System.tmp ; \
+ -M -o $(ARCH_DIR)/boot/system > System.tmp ; \
sort -k4 System.tmp > System.map ; rm -f System.tmp )
#SIBO image build
diff -Naur ../../CVSori/elks/arch/i86/config.in ./arch/i86/config.in
--- ../../CVSori/elks/arch/i86/config.in 2003-07-20 21:07:25.000000000 +0200
+++ ./arch/i86/config.in 2006-08-15 17:24:58.000000000 +0200
@@ -224,4 +224,5 @@
bool 'Include kernel version system call' CONFIG_SYS_VERSION n
bool 'Optimise for size rather than speed' CONFIG_OPT_SMALL n
bool 'System Trace' CONFIG_STRACE n
+ bool 'Debug on printk' CONFIG_DEBUG n
endmenu
diff -Naur ../../CVSori/elks/arch/i86/drivers/char/KeyMaps/mkcfg ./arch/i86/drivers/char/KeyMaps/mkcfg
--- ../../CVSori/elks/arch/i86/drivers/char/KeyMaps/mkcfg 2002-04-25 00:03:53.000000000 +0200
+++ ./arch/i86/drivers/char/KeyMaps/mkcfg 2006-08-09 13:10:26.000000000 +0200
@@ -13,14 +13,14 @@
printf '# Automatically created - do not edit.\n\n' >&3
printf "choice 'XT Keyboard support'\t\t" >&3
printf '/* Automatically created - do not edit */\n\n' >&4
- while read FILE CODE NAME ; do
+ while read FILE CODE NAME ; do
printf '\t\\\n\t%-12s\tCONFIG_KEYMAP_%s' >&3 \
"${SEP}${NAME}" "${CODE}"
SEP=' '
printf '#include "%s"\t\t/* %s\t%-9s\t*/\n' >&4 \
"${FILE}" "${CODE}" "${NAME}"
done
- printf '"\t\tAmerican\n\n# EOF.\n' >&3
+ printf '\"\n' >&3
}
-codes | sort +1f | process 3> Config.in 4> keymaps.h
+codes | process 3> Config.in 4> keymaps.h
diff -Naur ../../CVSori/elks/arch/i86/drivers/char/ntty.c ./arch/i86/drivers/char/ntty.c
--- ../../CVSori/elks/arch/i86/drivers/char/ntty.c 2002-06-22 11:28:19.000000000 +0200
+++ ./arch/i86/drivers/char/ntty.c 2006-08-16 15:29:18.000000000 +0200
@@ -40,8 +40,12 @@
#define MAX_TTYS NUM_TTYS
struct tty ttys[MAX_TTYS];
+#ifdef CONFIG_CONSOLE_DIRECT
extern struct tty_ops dircon_ops;
+#endif
+#ifdef CONFIG_CONSOLE_BIOS
extern struct tty_ops bioscon_ops;
+#endif
#ifdef CONFIG_CHAR_DEV_RS
extern struct tty_ops rs_ops;
#endif
diff -Naur ../../CVSori/elks/include/linuxmt/debug.h ./include/linuxmt/debug.h
--- ../../CVSori/elks/include/linuxmt/debug.h 2002-05-14 00:00:58.000000000 +0200
+++ ./include/linuxmt/debug.h 2006-08-15 19:59:03.000000000 +0200
@@ -36,7 +36,7 @@
* parameters after the format string.
*/
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
#define debug printk
#define debug1 printk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Ash execution and VTs (error building elkscmd)
2006-08-24 8:50 ` [PATCH] Ash execution and VTs (error building elkscmd) Eddy
@ 2006-08-25 1:17 ` Claudio Matsuoka
0 siblings, 0 replies; 3+ messages in thread
From: Claudio Matsuoka @ 2006-08-25 1:17 UTC (permalink / raw)
To: linux-8086
On 8/24/06, Eddy <eddyx89@gmail.com> wrote:
> Very good work! But I can't build any image of elkscmd, because it give
> this error:
>
> "/bin/sh: compress: command not found".. I could not realize where
> compress command is called from.
Hello,
compress is called from the mtools makefile to compress man pages --
you can either install compress on your system or comment out that
line in the makefile.
> - -t -M -o $(ARCH_DIR)/boot/system > System.tmp ; \
> + -M -o $(ARCH_DIR)/boot/system > System.tmp ; \
Good catch, it seems that we had some unnecessary stuff on System.map.
Mike, any probkem if I commit Eddy's patches? I'd leave the debug
option out for now, I had some problems building the kernel with full
debug when tracing the minix executable loader.
^ 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