* [U-Boot-Users] problem compiling sc520
@ 2003-08-04 15:52 david stevenson
2003-08-04 19:14 ` Wolfgang Denk
0 siblings, 1 reply; 9+ messages in thread
From: david stevenson @ 2003-08-04 15:52 UTC (permalink / raw)
To: u-boot
I am still having problems with this.
I have applied the patches Brad sent on Sat to the CVS of yesterday, by hand.
But gcc 3.2 -Werror and
" goto done;
......
done:
}
do not appear compatable, so I changed the easiest option and removed -Werror.
I now have
lib_i386/libi386.a(video_bios.o): In function `probe_pci_video':
/home/david/smart/cvs/u-boot/lib_i386/video_bios.c:88: undefined reference to
`pci_find_class'
Can someone who gets past this let me know where the function is?
Thanks
David
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] problem compiling sc520
2003-08-04 19:14 ` Wolfgang Denk
@ 2003-08-04 18:17 ` david stevenson
2003-08-04 21:18 ` Wolfgang Denk
2003-08-04 21:53 ` Marc Singer
0 siblings, 2 replies; 9+ messages in thread
From: david stevenson @ 2003-08-04 18:17 UTC (permalink / raw)
To: u-boot
On Monday 04 August 2003 8:14 pm, Wolfgang Denk wrote:
> In message <200308041652.16627.david@avoncliff.com> you wrote:
> > But gcc 3.2 -Werror and
> > " goto done;
> > ......
> > done:
> > }
> > do not appear compatable, so I changed the easiest option and removed
> > -Werror.
>
> Try replacing the "done:" with "done: ;"
Yes that works fine. (strange the things I learn about C day by day 8-) )
> If it works, please submit a patch.
Hmm, request understood. Practice not so easy.
There are 40+ done: in many files both in sc520 and other area's, but there
are many other instances of goto. Any experts with sed or pearl around?
>
> > lib_i386/libi386.a(video_bios.o): In function `probe_pci_video':
> > /home/david/smart/cvs/u-boot/lib_i386/video_bios.c:88: undefined
> > reference to `pci_find_class'
> >
> > Can someone who gets past this let me know where the function is?
>
> -> find * -type f | xargs egrep -l pci_find_class
> include/pci.h
> lib_i386/video_bios.c
>
> Seems that except for the prototype in include/pci.h and the call in
> lib_i386/video_bios.c there is no file containing this function. Let
> me guess: nobody used this code before...
Well I was being more optimistic, I am only doing
make sc520_cdp_config
make all
And I had thought others had got past compile errors. Does this imply the
function is available in some external library?
>
> Best regards,
>
> Wolfgang Denk
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] problem compiling sc520
2003-08-04 15:52 [U-Boot-Users] problem compiling sc520 david stevenson
@ 2003-08-04 19:14 ` Wolfgang Denk
2003-08-04 18:17 ` david stevenson
0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2003-08-04 19:14 UTC (permalink / raw)
To: u-boot
In message <200308041652.16627.david@avoncliff.com> you wrote:
>
> But gcc 3.2 -Werror and
> " goto done;
> ......
> done:
> }
> do not appear compatable, so I changed the easiest option and removed -Werror.
Try replacing the "done:" with "done: ;"
If it works, please submit a patch.
> lib_i386/libi386.a(video_bios.o): In function `probe_pci_video':
> /home/david/smart/cvs/u-boot/lib_i386/video_bios.c:88: undefined reference to
> `pci_find_class'
>
> Can someone who gets past this let me know where the function is?
-> find * -type f | xargs egrep -l pci_find_class
include/pci.h
lib_i386/video_bios.c
Seems that except for the prototype in include/pci.h and the call in
lib_i386/video_bios.c there is no file containing this function. Let
me guess: nobody used this code before...
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Doubt is a pain too lonely to know that faith is his twin brother.
- Kahlil Gibran
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] problem compiling sc520
2003-08-04 21:18 ` Wolfgang Denk
@ 2003-08-04 20:35 ` david stevenson
2003-08-04 20:59 ` david stevenson
2003-08-05 6:53 ` Wolfgang Denk
0 siblings, 2 replies; 9+ messages in thread
From: david stevenson @ 2003-08-04 20:35 UTC (permalink / raw)
To: u-boot
On Monday 04 August 2003 10:18 pm, Wolfgang Denk wrote:
> In message <200308041917.13511.david@avoncliff.com> you wrote:
> > > Try replacing the "done:" with "done: ;"
> >
> > Yes that works fine. (strange the things I learn about C day by day 8-)
> > )
> >
> > > If it works, please submit a patch.
> >
> > Hmm, request understood. Practice not so easy.
>
> Well, maybe you mention the name of the file in question...
>
I may have been making problems for myself..
but first when I put -Werror back in there was a problem in cmd_eeprom.c
Index: common/cmd_eeprom.c
===================================================================
RCS file: /cvsroot//u-boot/u-boot/common/cmd_eeprom.c,v
retrieving revision 1.5
diff -u -r1.5 cmd_eeprom.c
--- common/cmd_eeprom.c 1 Jul 2003 21:07:07 -0000 1.5
+++ common/cmd_eeprom.c 4 Aug 2003 23:04:04 -0000
@@ -36,6 +36,11 @@
uchar *buffer, unsigned cnt);
#endif
+#ifdef CONFIG_SPI
+extern ssize_t spi_read(uchar *addr, int alen, uchar *buffer, int len);
+extern ssize_t spi_write (uchar *, int, uchar *, int);
+extern void spi_init_f (void);
+#endif
#if defined(CFG_EEPROM_X40430)
/* Maximum number of times to poll for acknowledge after write */
This may well not be the correct fix, but it allowed me to continue with
done:; problem
Index: board/sc520_cdp/flash.c
===================================================================
RCS file: /cvsroot//u-boot/u-boot/board/sc520_cdp/flash.c,v
retrieving revision 1.4
diff -u -r1.4 flash.c
--- board/sc520_cdp/flash.c 27 Jun 2003 21:32:24 -0000 1.4
+++ board/sc520_cdp/flash.c 4 Aug 2003 23:23:27 -0000
@@ -325,7 +325,7 @@
}
printf ("\n");
- done:
+ done:;
}
and now it compiles as far as unknown pci_find_class with -Werror enabled.
(not sure why I thought there were lots of these errors, now I can only find
one! )
David
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] problem compiling sc520
2003-08-04 20:35 ` david stevenson
@ 2003-08-04 20:59 ` david stevenson
2003-08-05 6:54 ` Wolfgang Denk
2003-08-05 6:53 ` Wolfgang Denk
1 sibling, 1 reply; 9+ messages in thread
From: david stevenson @ 2003-08-04 20:59 UTC (permalink / raw)
To: u-boot
On Monday 04 August 2003 9:35 pm, david stevenson wrote:
> > > > Try replacing the "done:" with "done: ;"
> > >
> > > Yes that works fine. (strange the things I learn about C day by day 8-)
> > > )
> > >
> > > > If it works, please submit a patch.
Sorry here is another one I must have fixed and forgot 8-(
Index: common/cmd_bootm.c
===================================================================
RCS file: /cvsroot//u-boot/u-boot/common/cmd_bootm.c,v
retrieving revision 1.21
diff -u -r1.21 cmd_bootm.c
--- common/cmd_bootm.c 27 Jul 2003 00:21:15 -0000 1.21
+++ common/cmd_bootm.c 4 Aug 2003 23:28:54 -0000
@@ -1012,9 +1012,9 @@
printf ("Image at %08lX:\n", (ulong)hdr);
print_image_hdr( hdr );
putc ('\n');
- next_sector:
+ next_sector:;
}
- next_bank:
+ next_bank:;
}
return (0);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] problem compiling sc520
2003-08-04 18:17 ` david stevenson
@ 2003-08-04 21:18 ` Wolfgang Denk
2003-08-04 20:35 ` david stevenson
2003-08-04 21:53 ` Marc Singer
1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2003-08-04 21:18 UTC (permalink / raw)
To: u-boot
In message <200308041917.13511.david@avoncliff.com> you wrote:
>
> > Try replacing the "done:" with "done: ;"
>
> Yes that works fine. (strange the things I learn about C day by day 8-) )
>
>
> > If it works, please submit a patch.
>
> Hmm, request understood. Practice not so easy.
Well, maybe you mention the name of the file in question...
> There are 40+ done: in many files both in sc520 and other area's, but there
> are many other instances of goto. Any experts with sed or pearl around?
Most of these should be ok. It is sufficient to find those where no
statement follows the colon. And the compiler will point these out...
[Sorry, I don't have a working build environment for the i386,
otherwise I would not have to ask such stupid questions.]
> > Seems that except for the prototype in include/pci.h and the call in
> > lib_i386/video_bios.c there is no file containing this function. Let
> > me guess: nobody used this code before...
> Well I was being more optimistic, I am only doing
> make sc520_cdp_config
> make all
> And I had thought others had got past compile errors. Does this imply the
> function is available in some external library?
At least not in any U-Boot file.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Being schizophrenic is better than living alone.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] problem compiling sc520
2003-08-04 18:17 ` david stevenson
2003-08-04 21:18 ` Wolfgang Denk
@ 2003-08-04 21:53 ` Marc Singer
1 sibling, 0 replies; 9+ messages in thread
From: Marc Singer @ 2003-08-04 21:53 UTC (permalink / raw)
To: u-boot
On Mon, Aug 04, 2003 at 07:17:13PM +0100, david stevenson wrote:
> > Try replacing the "done:" with "done: ;"
>
> Yes that works fine. (strange the things I learn about C day by day 8-) )
That was a (somewhat recent) update made to the C standard.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] problem compiling sc520
2003-08-04 20:35 ` david stevenson
2003-08-04 20:59 ` david stevenson
@ 2003-08-05 6:53 ` Wolfgang Denk
1 sibling, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2003-08-05 6:53 UTC (permalink / raw)
To: u-boot
Dear David,
in message <200308042135.48979.david@avoncliff.com> you wrote:
>
> I may have been making problems for myself..
> but first when I put -Werror back in there was a problem in cmd_eeprom.c
>
> Index: common/cmd_eeprom.c
> ===================================================================
> RCS file: /cvsroot//u-boot/u-boot/common/cmd_eeprom.c,v
> retrieving revision 1.5
> diff -u -r1.5 cmd_eeprom.c
> --- common/cmd_eeprom.c 1 Jul 2003 21:07:07 -0000 1.5
> +++ common/cmd_eeprom.c 4 Aug 2003 23:04:04 -0000
> @@ -36,6 +36,11 @@
> uchar *buffer, unsigned cnt);
> #endif
>
> +#ifdef CONFIG_SPI
> +extern ssize_t spi_read(uchar *addr, int alen, uchar *buffer, int len);
> +extern ssize_t spi_write (uchar *, int, uchar *, int);
> +extern void spi_init_f (void);
> +#endif
No, this is not a good idea. The right place to fix this is in
"include/common.h" (by replacing
"defined(CONFIG_PCU_E) || defined(CONFIG_CCM) || defined(CONFIG_ATC)"
with "defined(CONFIG_SPI)".
> #if defined(CFG_EEPROM_X40430)
> /* Maximum number of times to poll for acknowledge after write */
>
> This may well not be the correct fix, but it allowed me to continue with
> done:; problem
>
> Index: board/sc520_cdp/flash.c
> ===================================================================
> RCS file: /cvsroot//u-boot/u-boot/board/sc520_cdp/flash.c,v
> retrieving revision 1.4
> diff -u -r1.4 flash.c
> --- board/sc520_cdp/flash.c 27 Jun 2003 21:32:24 -0000 1.4
> +++ board/sc520_cdp/flash.c 4 Aug 2003 23:23:27 -0000
> @@ -325,7 +325,7 @@
> }
> printf ("\n");
>
> - done:
> + done:;
Thanks, added.
Will push to CVS soon.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
A bore is someone who persists in holding his own views after we have
enlightened him with ours.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] problem compiling sc520
2003-08-04 20:59 ` david stevenson
@ 2003-08-05 6:54 ` Wolfgang Denk
0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2003-08-05 6:54 UTC (permalink / raw)
To: u-boot
In message <200308042159.09596.david@avoncliff.com> you wrote:
>
> Sorry here is another one I must have fixed and forgot 8-(
> Index: common/cmd_bootm.c
Thanks, added.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
The nice thing about standards is that there are so many to choose
from. - Andrew S. Tanenbaum
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-08-05 6:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-04 15:52 [U-Boot-Users] problem compiling sc520 david stevenson
2003-08-04 19:14 ` Wolfgang Denk
2003-08-04 18:17 ` david stevenson
2003-08-04 21:18 ` Wolfgang Denk
2003-08-04 20:35 ` david stevenson
2003-08-04 20:59 ` david stevenson
2003-08-05 6:54 ` Wolfgang Denk
2003-08-05 6:53 ` Wolfgang Denk
2003-08-04 21:53 ` Marc Singer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.