Re: More things for writing new CPU ports.

From: Iwo Mergler
Date: Mon Sep 22 2008 - 00:21:22 EST


Meng Sun wrote:
> Hi all,
>
> What should I do for implement Linux kernel on a new CPU and target
> board? I just read FAQ but it's just general information. Could you
> please tell me which documents(except CPU datasheets and target board
> documents) I should read?
>
> Cheers,

That depends on what you mean by new CPU.

1) Your new CPU is an ASIC variant of an existing one. That is, it has a different
part number, but is based on a supported processor core, e.g. MIPS, ARM, etc.
In this case, you add a new board directory in arch/YourProc/. If the processor
architecture has ASIC variant support, use it to cover the stuff internal to the ASIC.

2) Your new CPU is an extension or modification of an existing processor core.
You have already updated GCC to support the extensions and now want kernel
support for the OS relevant ones.
In this case, you probably need to update the CPU common files files in arch/YourProc,
as well as create a board file for your target board.

3) You have designed a completely new processor core from scratch. You have
implemented support for this core in GNU binutils, GCC, etc. You have ported
a bootloader and now want Linux on your new system.
In this case, you create your own processor directory in arch/ and implement
the primitives, probably using an existing similar architecture as a template.
That directory is all yours, so you may decide using board or ASIC subdirectories.


In other words, the kernel is fairly modular and there is a good chance that you
new CPU is already 90% supported.

Kind regards,

Iwo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/