Running From Sdram; Start Linux Kernel And Root File System - Philips LPC3180 Application Note

Getting started linux with
Table of Contents

Advertisement

Philips Semiconductors
It is probably not a good idea to start a rootfs completely from scratch as the kernel and
the libraries in the root file-system must be built with the same compiler (we use arm-
linux-gcc v3.4.0 with vfp support). But if the customer definitely needs to create a new
rootfs for function customization or reducing rootfs size or other reasons, here is a
example script of generating an empty ext2 file system:
This script file will create an empty ext2 file system with 6MB size. Then you can copy
necessary library files/executable files/startup script files from original mounted
~/mnt_rootfs/
Be careful!
When the file size of
you will have a problem when downloading the file using Realview debugger. A work-
around is to enlarge the file with 1 byte with the command:
'echo'

4. Running from SDRAM

4.1 Start Linux kernel and Root file system

• Setup the hardware connection and make sure the Phytec board JP32 jumper is on 2-
• Open a serial terminal and set its parameters as '115200,8n1n'.
• In the RealView debugger load the
Sibl and U-Boot is started automatically. In the Serial terminal window press enter to stop
auto-boot.
43210
Initialize only
Main entry returned
U-Boot 1.1.1 (Jan 25 2006 - 12:00:24)
<12NC>
Application note
#!/bin/sh
RAMDIR_PATH="initrd"
MNTPOINT="initrd_mnt"
IMAGE="ramdisk"
TARGET="ramdisk.img"
rm -f $TARGET
dd if=/dev/zero of=$IMAGE bs=1k count=6144
mke2fs -F -m0 $IMAGE
mkdir -p $MNTPOINT
mount -t ext2 -o loop $IMAGE $MNTPOINT
cp -a "$RAMDISK_PATH"/* $MNTPOINT
chown root:root -R $MNTPOINT
umount $MNTPOINT
rm -rf $MNTPOINT
gzip -9 < $IMAGE > $TARGET
rm -f $IMAGE
by
root_fs_arm.ext2.phytec.
root_fs_arm.ext2.phytec.gz
echo >> root_fs_arm.ext2.phytec.gz
until the file size is word aligned!
3 state(UART5 boot).
sure the path directory is set correctly in
Rev.03 — 21 Dec 2006
Getting started Linux with LPC3180
is not aligned on word (4 bytes) size,
file from the rv directory (make
'uboot_phytec.inc'
'uboot_phytec.inc'
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
AN10476
).
7 of 28

Advertisement

Table of Contents
loading

Table of Contents