From: Mitch D. <md...@po...> - 2000-11-04 17:42:24
|
Rene Malmgren wrote: > > Hi everyone I have been tying to get a kernel working on my Dreamcast > but unfortunatly so far no luck. I have bean running from troble into > trouble. But finaly I started to question my GCC. First I used the 2.97 > debian package found at ftp://ftp.m17n.org/super-h/debian. This gcc > could compile the CVS kernel, but only after I comented out all of the > FOOBAR and HD64xxxx stuff from the Makefiles. I belive that there are > some files missing. Dear Rene, My partner (Greg Banks) and I must apologise to you and the rest of the team, because we broke the support for the "GENERIC" machine type. Please apply the attached patch. Niibe-san, can we check this patch in please? Below I would like to review some of your error messages, and attempt to explain why they are happening, and show you how you can avoid them. > the error I got was: > > make[1]: Entering directory `/usr/src/sh/kernel/arch/sh/kernel' > sh-linux-gcc -D__KERNEL__ -I/usr/src/sh/kernel/include -Wall > -Wstrict-prototypes > -O2 -fomit-frame-pointer -fno-strict-aliasing -ml -m4 -pipe -c -o > mach_fooba > r.o mach_foobar.c > mach_foobar.c:34: `hd64465_inb' undeclared here (not in a function) Even though Foobar support has been broken until now, it should not be necessary to compile mach_foobar.c to get the kernel running on your DreamCast. But read on... > mach_foobar.c:65: initializer element is not constant > mach_foobar.c:65: (near initialization for `mv_foobar') Earlier this year, the situation was that once you compiled your SuperH kernel for a particular machine, it was not possible to use that kernel on another SuperH machine, even though the processor may be the same. Therefore work was done to let us build one kernel which (in binary form) would run on the widest range of SuperH computers. This configuration setting is "GENERIC", and it works by compiling the particular settings of EVERY board the SuperH supports, and selecting them at run-time using a mechanism called the "machine vector". > the kernel was configured without GDB stub support (kernel-hacker menu) > and without IDE sufpport. the processortype selected was "GENERIC". To The reason mach_foobar.c is being compiled is because you're compiling a GENERIC kernel. So the Foobar configuration must be included. But as I said earlier, Foobar (as checked in) is broken at the moment. Apart from your method, there are two ways of solving this problem. The first is to apply the attached patch. The second is to generate a specific "DreamCast" machine type for the SuperH kernel. Then you wouldn't have to specify "GENERIC". (Actually, this would be a very useful contribution to our project, if you would consider doing it). > So I tried compiling the GCC. Unfortunatly again I ran into problems. I > got the GCC from ftp://ftp.m17n.org/super-h/original the file called > egcs-core-20001002. then I made > Q3: does anybody know what could be the problem? Or perhaps how the gcc > should be compiled, where you finde the rigt files and so on? You can ensure the maximum chance of success by following Stuart Menefy's excellent instructions, posted here: http://linuxsh.sourceforge.net/docs/building-source.php3 You can find more information about using CVS here: http://sourceforge.net/docman/display_doc.php?docid=763&group_id=1 http://sourceforge.net/docman/display_doc.php?docid=765&group_id=1 I would suggest you use CVS to get the source for binutils, gdb, gcc-core and kernel from SourceForge. Use the four module names I just gave. I can verify that the most recent version of these sources do indeed compile as per Stuart's instructions (except for the GENERIC/Foobar problem), since I've spent the last few days making a turnkey script to do the job. I hope this helps, and I look forward to hearing of your success on the DreamCast. (And to your submission of a "DreamCast" machine type!!) Regards, Mitch. |