On Sat, 30 Jun 2012 02:40:04 -0300
"Alexandre Souza - Listas" <pu1bzz.listas at gmail.com> wrote:
Thanks Chuck, but I want to understand HOW it is
done. I have a XYZ
device and I know the memory/port map. How do I put it into the code,
compile and load on the target?
First: Get access to the bootloader. This may
require to access some
debug ports like a RS232 port. Probably you don't even have a usable
bootloader. Then you are back at using JTAG to bitbang the FLASH or
poke a kernel image into RAM, set the CPU PC to the entry point of the
kernel and releasing the CPU HALT...
Once you found a way to get code onto the target build a cross tool
chain and compile a stock Linux kernel for the CPU architecture of the
target. Try to adapt the driver for the console to your target hardware
and boot the kernel. Repeat this until you have a working (serial)
console. Then work your way through the other drvice drivers.
I'd use NetBSD instead of Linux. Cross building NetBSD (kernel and
complete user land) on any POSIX platform is a piece of cake. The
kernel code is much nicer to work on, the code more readable, better
organized and multi architecture support is well implemented, as its
one of NetBSD design goals. Also NetBSD tends to support many older
machines that Linux abandoned. (sun4c, e.g.)
--
\end{Jochen}
\ref{http://www.unixag-kl.fh-kl.de/~jkunz/}