Skip to contentSkip to conversation

sys_execve("/bin/init",args,18) => 65528

DISCUSSION Raghavan 2 participants 2 messages Jul 11, 2003

lore
Share & tools
lore

Raghavan

author
#0 lore raw

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

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.

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

*********************

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 any body faced this problem ?

Please help.

Bye,

raghavan V

#1 lore raw

Hi.

Quoted 8 lines

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.

Quoted 8 lines

***********************

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.

Quoted 9 lines

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(

Quoted 3 lines

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

Index: elks/kernel/printk.c
===================================================================
RCS file: /cvsroot/elks/elks/kernel/printk.c,v
retrieving revision 1.11

kernel/printk.c +13 -11
diff -u -5 -u -r1.11 printk.c
@@ -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);
 }