[BusyBox] RE: WORKS! - but still and issue -- 1.00-pre2/pre3 -shell/ash.cInternal compilererror

David Douglas ddouglas at Crossroads.com
Tue Sep 16 12:34:14 UTC 2003


I'm still not getting a console for some reason on my embedded system.
I'm working with some of the recommendations that just came out on the
list.  We only have one serial port on the system that's on a Discovery
II off of the R9000 processor.  I was getting the console up and running
just fine with the 0.60.5 busybox.

My inittab has the following:

::sysinit:/etc/init.d/rcS
::respawn:-/bin/ash

init links to busybox as does ash.

Thanks,
David


-----Original Message-----
From: Randy [mailto:chanr777 at hotmail.com] 
Sent: Monday, September 15, 2003 11:19 PM
To: David Douglas; Junio C Hamano; busybox at busybox.net
Subject: Re: WORKS! - but still and issue -- 1.00-pre2/pre3
-shell/ash.cInternal compilererror

Everything compiled okay and so far (in my limited usage) it seems to be
running okay.  I have mostly run some very basic shell scripts, mounted
filesystems (cramfs/ramdisk/jffs2) and executed programs with no issues
so
far.  I'll let you know if I run into anything in particular.

Thanks for the patch,
Randy

----- Original Message ----- 
From: "David Douglas" <ddouglas at Crossroads.com>
To: "Junio C Hamano" <junkio at cox.net>; "Randy Chan"
<chanr777 at hotmail.com>;
<busybox at busybox.net>
Sent: Monday, September 15, 2003 8:24 AM
Subject: WORKS! - but still and issue -- 1.00-pre2/pre3 -
shell/ash.cInternal compilererror


Ok,

So now it builds, but I'm having another problem.  The shell does not
seem to be responding properly when I use this busybox.  With the 0.60.5
busybox the shell works OK and I can access the ramdisk.  However, with
the pre3 busybox, nothing echo's back when I type a command...  It just
acts like nothing is there.

Help?!

Thanks,
David


-----Original Message-----
From: Junio C Hamano [mailto:junkio at cox.net]
Sent: Sunday, September 14, 2003 8:41 PM
To: Randy Chan; David Douglas
Subject: re: [Busybox] 1.00-pre2/pre3 - shell/ash.c Internal
compilererror

If you two have a chance, could you let me know if the patch I
posted to busybox list last week solves your problem?  I polled
three people who asked last month on the list about the ash
compilation problem due to older GCC bug, and have got one
positive reply.

My intention is to see if the patch, which should not change any
behaviour of the resulting code, works around the problem with
old compilers that had trouble with the 1.00-pre2 and 1.00-pre3
code as shipped, and if so, to push the change upstream.

Thanks in advance.

----------------------------------------------------------------
* Make ash compile under older GCC.

This patch moves structure declarations before their first use.
This solves, at least for me, "internal compiler error: in
int_mode_for_mode" problem people with older GCC have been
reporting since 1.00-pre2.  Please do not ask why this
essentially no-op change pleases the compiler; I do not know.


--- a/shell/ash.c 2003-09-01 19:36:17.000000000 -0700
+++ b/shell/ash.c 2003-09-12 10:40:21.000000000 -0700
@@ -550,6 +550,29 @@

 /* next character in input buffer */
 static char *parsenextc;                /* copy of parsefile->nextc */
+
+struct strpush {
+ struct strpush *prev;   /* preceding string on stack */
+ char *prevstring;
+ int prevnleft;
+#ifdef CONFIG_ASH_ALIAS
+ struct alias *ap;       /* if push was associated with an alias
*/
+#endif
+ char *string;           /* remember the string since it may
change */
+};
+
+struct parsefile {
+ struct parsefile *prev; /* preceding file on stack */
+ int linno;              /* current line */
+ int fd;                 /* file descriptor (or -1 if string) */
+ int nleft;              /* number of chars left in this line */
+ int lleft;              /* number of chars left in this buffer
*/
+ char *nextc;            /* next char in buffer */
+ char *buf;              /* input buffer */
+ struct strpush *strpush; /* for pushing strings at this level */
+ struct strpush basestrpush; /* so pushing one is fast */
+};
+
 static struct parsefile basepf;         /* top level input file */
 static char basebuf[IBUFSIZ];           /* buffer for top level input
file */
 static struct parsefile *parsefile = &basepf;  /* current input file */
@@ -1573,28 +1596,6 @@

 static int loopnest;            /* current loop nesting level */

-struct strpush {
- struct strpush *prev;   /* preceding string on stack */
- char *prevstring;
- int prevnleft;
-#ifdef CONFIG_ASH_ALIAS
- struct alias *ap;       /* if push was associated with an alias
*/
-#endif
- char *string;           /* remember the string since it may
change */
-};
-
-struct parsefile {
- struct parsefile *prev; /* preceding file on stack */
- int linno;              /* current line */
- int fd;                 /* file descriptor (or -1 if string) */
- int nleft;              /* number of chars left in this line */
- int lleft;              /* number of chars left in this buffer
*/
- char *nextc;            /* next char in buffer */
- char *buf;              /* input buffer */
- struct strpush *strpush; /* for pushing strings at this level */
- struct strpush basestrpush; /* so pushing one is fast */
-};
-
 /*
  * The parsefile structure pointed to by the global variable parsefile
  * contains information about the current file being read.






More information about the busybox mailing list