Philips Semiconductors
AN10476
Getting started Linux with LPC3180
make clean
make lpc3180_defconfig
make
make uImage
This will give you the images files as ‘
arch/arm/boot/uImage’
which you can run using the
ARM Debugger or convert into a U-Boot image, i.e. (must be one line):
mkimage -A arm -O Linux -T Kernel -C none -a 80600000 -e 80600000 -n "Linux-
2.6.10" -d uImage uImage_phytec.ubt
In our case, the
‘uImage’
file is renamed as
‘uImage_phytec’
.
After running
‘make xxx_defconfig’
you can change the default kernel parameters by
running
‘make xconfig’
or
‘make menuconfig’
.
When a completely new kernel is built and if you have built loadable modules use the
following script to copy the modules to ./lib/modules:
./collect_modules
These then need to be copied to the target arm root file system that you have mounted
(see next section):
cp -dpR ./lib/modules/2.6.10/kernel ~/mnt_rootfs/lib/modules/2.6.10/
3.4 Building root file system
The pre-build root file-system is available on
‘/images/root_fs_arm.ext2.phytec.gz’
.
You can modify this file system (as root on your Linux development system) by unzipping
and mounting it:
gzip –d root_fs_arm.ext2.phytec.gz
mount -o loop root_fs_arm.ext2.phytec ./mnt_rootfs/
And simply making the modifications required (in
./mnt_rootfs/
). Below are the
instructions on adding user application, updating loadable modules and modifying
network settings.
E.g.
•
When we intend to add a new application program as ‘hello’(see chapter 6 on how to
develop such a new application), just copy it to the ./mnt_rootfs/bin/ directory, then the
program can be used as a command directly under Linux Shell.
cp ~apps/hello ~/mnt_rootfs/bin
•
To update the loadable modules, collect and copy the new module files to the root file
system as described in section 3.3:
cp -dpR ./lib/modules/2.6.10/kernel ~/mnt_rootfs/lib/modules/2.6.10/
•
If user would like to change some boot settings, have a look at the files under
‘
./mnt_rootfs/etc/
’ directory. It’s a good start to understand the workflow of a root file
system. There are detailed descriptions on the function of these files in Linux
Documentation and Linux-How-To documents. For example, if you would like to
change the Ethernet ip address, open and edit the file
‘./mnt_rootfs/etc/network/interfaces’
would work.
After you did your modifications, un-mount and zip the image again. You can get the new
root file system file.
Also you can make its u-boot image with:
mkimage -A arm -O Linux -T Filesystem -C none -a 0x80800000 -e 0 -n "My RootFS
v0.1" -d root_fs_arm.ext2.phytec.gz rootfs_phytec.ubt
<12NC>
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
Application note
Rev.03 — 21 Dec 2006
6 of 28