[luau] linux porting question
MonMotha
monmotha at indy.rr.com
Mon Apr 7 17:16:01 PDT 2003
Charles Lockhart wrote:
> Sorry if this is unclear, I'm trying to figure out how to ask the question.
>
> This is primarily in regards to an embedded device, but I don't know the
> answer for the "standard" system either.
>
> Say you've got a board that has a cpu on it that is supported by the
> Linux kernel. And you have the tool chain for compiling for that cpu.
> And the kernel source, and the source for the whole standard distribution.
>
> When compiling the kernel, what board specific things would you need to
> know? What wouldn't be in the kernel?
>
> I was going throught the "linux from scratch" book, and went through the
> whole process and built the distribution one peice at a time. And I got
> to wondering how hard it would be to do this for an embedded platform.
> We look at embedded systems all the time and don't use them because the
> distribution is usually monta vista's hard-hat or something similar, and
> we don't want to shell out the bucks for their licensing. But if
> hardhat is already runnable on it, and the cpu is supported by either
> the main kernel distro or by the ppc kernel distro, how hard could it
> be? But when I say that "how hard could it be?" in a different tone it
> sounds pretty ominous.
>
> Any feedback?
>
> Thanks,
>
> -Charles
Well, it kinda depends on what you're trying to do. If you could give info
about just how "embedded" the board is (basically, give some sort of measure as
to how similar it is to it's big cousin computers). Also, knowing just what
you're trying to do is vital.
For example, the base userspace apps (like your shell, login utils, etc) tend to
be pretty quick as long as they've already been ported to your archetecture
(basically, clean up all those compiler "warnings" that don't mean anythign as
long as you run on x86, but suddenly become errors when the size of things start
changing).
The kernel is a different story. As long as it's been ported to something
similar, it's generally not to tough (assuming basic kernel programming
knowledge and familiararity with the linux kernel, both of which I lack :) The
challenge arises in actually getting it to do anything useful. You'll have to
know about all the things on the system that need to be turned on and off and
configured.
As an example, porting to the kernel to the iPAQ handheld (ARM based) required
lots of "inside knowledge" from Compaq/HP researches about the GPIO routings and
the command set for the micro.
Of course, getting the kernel to do basic things (like put some startup messages
on the screen) is one thing, getting it to even start up at all is quite
another. Of course you'll need a boot loader of some kind. This generally
requires nitty-gritty info about things like the memory map, memory timings, how
to configure things like DRAM controllers, etc. Generally, you'll need to do
some assembly programming here, but not much.
Basically, porting the kernel to a new board on a supported archetecture isn't
overwhelmingly tough, but you'll need to know quite a bit about the board to
accomplish the task. There's probably also quite a bit of stuff I've glossed
over as I'm not a kernel programmer, I just know some people who are :)
--MonMotha
More information about the LUAU
mailing list