Re: How to start porting to a new ARCHITECTURE?
David Given wrote: You've got two major tasks ahead of you: - - port gcc - - port the kernel - - cross-compile a basic userland Nobody expects the Spanish inquisition. Actually, there is one more major headache, which is porting a boot loader. Probably uBoot or something similar. Memory needs to be set up so it can be accessed by the kernel, the kernel (and initrd) pulled from the flash, and flow passed into it. If the system uses hardware controllers that exist elsewhere, the kernel port may be easier than that. It may be that the system has an ethernet controller that is already supported under Linux. Of course, the startup code and everything else under the arch directory will still need to be handled, but at least as far as the drivers are concerned, some work may be saved. Shachar -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: How to start porting to a new ARCHITECTURE?
Hello David, Am 2007-09-17 19:46:20, schrieb David Given: You've got two major tasks ahead of you: - - port gcc OK, it seems that parts of gcc went used under Windows... Maybe it will easy to port it native to Linux. - - port the kernel Since it is a All-In-On-Chip, there is not realy much hardware support needed. Floppy, CF-Disks as external controlers, USB is On-Chip same for LAN, serial, ... - - cross-compile a basic userland :-/ For the former, you'll need to write a new gcc backend targeting your architecture, and then add support to binutils to allow programs to be linked. This is not easy. gcc's innards tend to drive people mad. While reading a little bit the gcc documentation, I am realy confuse WHERE to start and HOW! Once you have a compiler, you can then port the kernel --- this will require development hardware with a good debugger (or, preferably, a reliable emulator with built-in debugger support). You'll be wading neck-deep in the inside of the kernel, although I gather it's not as bad as it used to be these days. Now you have both a compiler and a kernel, you can use your compiler to generate a userland --- as set of basic binaries to get your system up and running --- and then boot your new system. This isn't too difficult, although cross-compiling on gcc has its own horrors. Once you've got it reliably self-hosted, you're most of the way there --- setting up a basic Debian port is relatively straightforward. Self-Hosted is my target since I have had MANY horrors with cross-compiling I'd suggest looking up a gcc and linux-kernel mailing list and asking there for more detailed info. OK, I am on the LKM, but do you know a suitable gcc MAILINGLIST? (I can not use NEWSGROUPS over GSM and since I can use E-Mail for free using iMode... :-)) ) Thanks, Greetings and nice Day Michelle Konzack Tamay Dogan Network -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSN LinuxMichi 0033/6/6192519367100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: How to start porting to a new ARCHITECTURE?
On Wed, Sep 19, 2007 at 03:26:37PM +0200, Michelle Konzack wrote: Am 2007-09-17 19:46:20, schrieb David Given: For the former, you'll need to write a new gcc backend targeting your architecture, and then add support to binutils to allow programs to be linked. This is not easy. gcc's innards tend to drive people mad. While reading a little bit the gcc documentation, I am realy confuse WHERE to start and HOW! At first you should check what is already available. I wrote a gcc backend for a small RISC core during my internship. They told me, they have an assembler. But it only was a hackish perl script. And the functionality of ld and ar was not implemented at all. So I started with implementing as, ld and ar. Half a year later, everything worked fine and there was only one bug in the port I knew of. But I didn't implement stuff like floating point. Of course, to get a compiler which is able to compile itself more work is needed. And after that you can start porting Linux... Daniel signature.asc Description: Digital signature
Re: How to start porting to a new ARCHITECTURE?
On Wed, Sep 19, 2007 at 03:26:37PM +0200, Michelle Konzack wrote: Am 2007-09-17 19:46:20, schrieb David Given: [...] Now you have both a compiler and a kernel, you can use your compiler to generate a userland --- as set of basic binaries to get your system up and running --- and then boot your new system. This isn't too difficult, although cross-compiling on gcc has its own horrors. Once you've got it reliably self-hosted, you're most of the way there --- setting up a basic Debian port is relatively straightforward. Self-Hosted is my target since I have had MANY horrors with cross-compiling [...] Having never done it myself, take this with a grain of salt, but my understanding is that you should really only use the cross-complied system to bootstrap your port to the point where you can recompile it all natively, then use the resulting native system to recomplie it all again, just to be 100% sure. From there, you have the hard part out of the way (hopefully) and can focus on the usual arch-specific bugs in your desired applications. -- { IRL(Jeremy_Stanley); PGP(9E8DFF2E4F5995F8FEADDC5829ABF7441FB84657); SMTP([EMAIL PROTECTED]); IRC([EMAIL PROTECTED]); ICQ(114362511); AIM(dreadazathoth); YAHOO(crawlingchaoslabs); FINGER([EMAIL PROTECTED]); MUD([EMAIL PROTECTED]:6669); WWW(http://fungi.yuggoth.org/); } -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: How to start porting to a new ARCHITECTURE?
Am 2007-09-17 12:16:18, schrieb Bastian Blank: On Mon, Sep 17, 2007 at 10:32:06AM +0200, Michelle Konzack wrote: since 2007-08-01 I am now jobless (yeah, the new French GOV do not like that I stay in the army as PMC) and today (Saturday) I was asked by an owner of a german Enterprise whether it is possibel to port GNU/Linux, specialy Debian to this new ARCHITECTURE. Can you describe the architecture a little bit more? Does it have a MMU, memory/io protection, 32/64bit? It is an RISC architecture and currently I only know, that it has a MMU and is 32 Bit. Afaik is the MMU neccesary because the 64 MByte internal memory can increased with external ones (I think it is up to 256 Mbyte) The chip is a so called Singel-Chip-Computer with OS-On-Chip. I have found several Manufacturers for such chips while I was looking for an ultra-Compact-Version of a Mainboard/SBC. Most of them are based in ia32. But the Manufacturer of this new architecture claim, it is MUCH faster as all equivalend ia32/arm/mips based CPU's. Now I need to ask you, how one should start this? Define an ELF abi, port gcc and binutils. Since two other peoples have send me some Links to porting-docu I have not to read all the stuff... Note: Currently I am poking arround with a Ultra-High-Speed DSP for realtime analysis of Radar-Signals. Thanks, Greetings and nice Day Michelle Konzack Tamay Dogan Network -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSN LinuxMichi 0033/6/6192519367100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: How to start porting to a new ARCHITECTURE?
On Mon, Sep 17, 2007 at 10:32:06AM +0200, Michelle Konzack wrote: since 2007-08-01 I am now jobless (yeah, the new French GOV do not like that I stay in the army as PMC) and today (Saturday) I was asked by an owner of a german Enterprise whether it is possibel to port GNU/Linux, specialy Debian to this new ARCHITECTURE. Can you describe the architecture a little bit more? Does it have a MMU, memory/io protection, 32/64bit? Now I need to ask you, how one should start this? Define an ELF abi, port gcc and binutils. Bastian -- Our way is peace. -- Septimus, the Son Worshiper, Bread and Circuses, stardate 4040.7. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: How to start porting to a new ARCHITECTURE?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michelle Konzack wrote: [...] since 2007-08-01 I am now jobless (yeah, the new French GOV do not like that I stay in the army as PMC) and today (Saturday) I was asked by an owner of a german Enterprise whether it is possibel to port GNU/Linux, specialy Debian to this new ARCHITECTURE. Now I need to ask you, how one should start this? You've got two major tasks ahead of you: - - port gcc - - port the kernel - - cross-compile a basic userland For the former, you'll need to write a new gcc backend targeting your architecture, and then add support to binutils to allow programs to be linked. This is not easy. gcc's innards tend to drive people mad. Once you have a compiler, you can then port the kernel --- this will require development hardware with a good debugger (or, preferably, a reliable emulator with built-in debugger support). You'll be wading neck-deep in the inside of the kernel, although I gather it's not as bad as it used to be these days. Now you have both a compiler and a kernel, you can use your compiler to generate a userland --- as set of basic binaries to get your system up and running --- and then boot your new system. This isn't too difficult, although cross-compiling on gcc has its own horrors. Once you've got it reliably self-hosted, you're most of the way there --- setting up a basic Debian port is relatively straightforward. I'd suggest looking up a gcc and linux-kernel mailing list and asking there for more detailed info. - -- ┌── dg@cowlark.com ─── http://www.cowlark.com ─── │ │ There does not now, nor will there ever, exist a programming language in │ which it is the least bit hard to write bad programs. --- Flon's Axiom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG7st7f9E0noFvlzgRAuz6AKC4JnIKL5SXJq+Np6qNEJcgMEJ6AACglhF6 aVbLIkgBmbaIhFyQSga55xw= =nuuc -END PGP SIGNATURE-