Kernel Compiling

From: Jay Coles <jaycoles_at_yahoo.com>
Date: Tue, 22 Nov 2005 17:58:43 -0800 (PST)

First off you MUST have a cross compiling gcc
toolchain, if you havent downloaded or compiled one
yourself or have no idea what i am talking about then
STOP, anything you compile will not run on the x30

i do however have a toolchain that cross compiles for
the xscale platform whcih does work (compiles MPD just
fine)

First off you need the cross compiling toolchain in
your path, my one goes in your /opt directory my path
looks like this PATH=some
paths:/opt/crosstool/gcc-4.0.1-glibc-2.3.2/arm-iwmmxt-linux-gnu/bin
Now that you hav the compiler set up correctly go into
the newly added path (i recomend you add it to your
login scripts) you should see common compiling utils
prefexed by arm-iwmmxt-linux-gnu, this is your "HOST"
string and is used to tell the compiler which target
to compile for

the next step is to test it out, grab some source to
practice on (or write some yourself) the less time to
compile the better then run configure (providing you
have a configure script) with
--host=arm-iwmmxt-linux-gnu on the command line along
with any other options you need to specify. then do a
make.

there is no way for you to test the program you have
compiled so dont do a make install, you can try
running the executable but it will fail with an error
(or at least i hope it does else somthing is not set
up properly) to test it you need a pda running linux
which we dont have yet.

thats the basics of compiling however the kernel is
slightly diffrent, you have to edit the Makefile in
your kernel source directory and change the ARCH
varibla to ARCH=arm and CROSS_COMPILE to
CROSS_COMPILE=arm-iwmmxt-linux-gnu

at the moment there is no x30 system type, however it
isnt required to build a working kernel, its only
there to enable model specfic features, to set it up
properly go to "System type" after exectuting a make
menuconfig then go to ARM system type and select
PXA2xx based this should allow you to select most
required options. however for implementation you might
want to select hx4700 to fix a problem with usb gadget
support

others that would be handy are networking support MTD
(under device drivers) support APM emulation (under
power managment) serial driver (under device
drivers/serial drivers (last option) frame buffer
support (under device drivers/Graphics support/pxa LCD
framebuffer support, make sure you also select PXS LCD
command line paramater so you can change the tminigs
on the LCD screen. also check FRAME BUFFER CONSOLE
SUPPORT in (under device drivers/graphics
drivers/console display driver support/) also under
the usb gadget section (botom of USB) select ethernet
gadget as the only gadget driver and change the USB
periferal Controloller to PXA27x

for all listed above compile them built into the
kernel, this will save you alot of trouble, that all
you need for the kernel as for the initrd all it is is
a file backed filesystem, try loop mounting it with
sudo mount <path to initrd> /mnt -o loop, then you
should be able to navigate and add files to it, rember
the most intresting file in there should be linuxrc as
it is automatically invoked by the kerenl (it is
supposed to set up the main drive so you can then load
/etc/init which is on the hard drive), in here you
should set up modules, start the net connection (usb0)
and start a telnet server however you should never
exit the linuxrc file as the kernel will then try to
load /sbin/init which you wont have yet so put sleep
20 in a loop or somthing

one program you might like to compile is called
busybox as it contains most of the utils in /bin in
one executable and is quite small another is dropbear
which is an ultra tiny ssh server

if you want the toolchain just reply and i will email
it to you or if you have a server where i could make
it avalbile that would be better (40MB file, and at
least a couple of people intrested)

Jay Coles
JayColes_at_yahoo.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /"\
ASCII Ribbon Campain against \ /
HTML e-mail and postings. X
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ / \

Intel P4 with HT* technology
* - Hyper Thrashing, burn cache burn

                
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
Received on Tue Nov 22 2005 - 21:05:23 EST

This archive was generated by hypermail 2.2.0 : Tue Nov 22 2005 - 21:05:27 EST