From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Riley Williams" Subject: Re: sys_execve("/bin/init",args,18) => 65528 Date: Fri, 11 Jul 2003 19:35:56 +0100 Sender: linux-8086-owner@vger.kernel.org Message-ID: References: <0afa01c3476e$f723a970$8c06770a@wipro.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_002B_01C347E3.A5D4C980" Return-path: In-Reply-To: <0afa01c3476e$f723a970$8c06770a@wipro.com> List-Id: To: Raghavan Cc: Linux-8086@Vger.Kernel.Org This is a multi-part message in MIME format. ------=_NextPart_000_002B_01C347E3.A5D4C980 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi. > I am new to ELKS. > > I am using elks-0.1.1,elksnet-0.1.1, elkscmd_20020501.tar.gz, > Dev86src-0.16.11.tar.gz and I am compiling on a Pentium - Linux > Kernel 2.4. I have been able to compile and get all the Binaries. > The boot floppy comes up fine. The root floppy is giving me a > panic. > > *********************** > > ELKS version 0.1.1 > fd: probing disc in /dev/fd1 > fd: /dev/fd1 probably has 18 sectors and 80 cylinders > VFS: Mounted root (minix filesystem). > Loading init > sys_execve("/bin/init",args,18) => 65528. That 65528 is -6 written as an unsigned integer, and indicates a bug in the printk routine (more specifically in the numout() routine it calls to actually display the values). I have just committed a patch to fix that bug, and the patch is enclosed. > panic: Oops - trying to access dir > apparant call stack: > (0) ret addr = 3296 params = 67B4 26C4 2 26D0 2F64 0 > (1) ret addr = 33F4 params = 3D6 26EA 26EC 67B4 26E6 80 > (2) ret addr = 35C3 params = 3D6 3 8000 2706 0 3 > (3) ret addr = 41C0 params = 3D6 2 0 310 FFF8 2268 > (4) ret addr = 103 params = 0 0 0 0 0 0 > (5) ret addr = 0 params = 2268 A9 9FC0 2C74 3FF2 1E > (6) ret addr = 9C params = E120 1DA4 E5EC 0 0 1 We really need something to convert those return addresses into actual routine names, as the addresses themselves are basically meaningless 8( > I saw an identical posting by Mark Robson in Mar 03. I did not > find a solution to it. It looks like the init is not able to get > executed. Has anybody faced this problem ? Unfortunately, I can't help with your problem itself. Sorry. Best wishes from Riley. --- * Nothing as pretty as a smile, nothing as ugly as a frown. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.500 / Virus Database: 298 - Release Date: 10-Jul-2003 ------=_NextPart_000_002B_01C347E3.A5D4C980 Content-Type: application/octet-stream; name="printk.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="printk.diff" Index: elks/kernel/printk.c =================================================================== RCS file: /cvsroot/elks/elks/kernel/printk.c,v retrieving revision 1.11 diff -u -5 -u -r1.11 printk.c --- elks/kernel/printk.c 22 Jun 2002 09:28:21 -0000 1.11 +++ elks/kernel/printk.c 11 Jul 2003 18:32:10 -0000 @@ -78,33 +78,35 @@ /************************************************************************ * * Output a number */ -char *hex_string = "0123456789ABCDEF"; /* Also used by devices. */ +char *hex_string = "0123456789ABCDEF"; /* Also used by devices. */ static void numout(char *ptr, int len, int base, int useSign) { + long int vs; unsigned long int v; register char *bp; char buf[16]; bp = buf + 15; - v = (len == 2) - ? *((unsigned short *) ptr) - : *((unsigned long *) ptr); - - if (useSign && (((long)v) < 0)) { - v = -v; - *bp = '-'; - con_write(bp, 1); - } + if (useSign) { + vs = (len == 2) ? *((short *) ptr) : *((long *) ptr); + if (vs < 0) { + v = - vs; + *bp = '-'; + con_write(bp, 1); + } else + v = vs; + } else + v = (len == 2) ? *((unsigned short *) ptr) : *((unsigned long *) ptr); *bp = 0; do { - *--bp = hex_string[(v % base)]; /* Store digit. */ + *--bp = hex_string[(v % base)]; /* Store digit. */ } while ((v /= base) && (bp > buf)); con_write(bp, buf - bp + sizeof(buf) - 1); } ------=_NextPart_000_002B_01C347E3.A5D4C980--