Chinaunix首页 | 论坛 | 博客
  • 博客访问: 384378
  • 博文数量: 73
  • 博客积分: 2620
  • 博客等级: 少校
  • 技术积分: 1212
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-09 10:47
文章分类
文章存档

2011年(18)

2010年(50)

2009年(5)

我的朋友

分类: LINUX

2010-08-20 13:20:40

[uClinux-dev] HOWTO uClinux 2.6.21 on LPC22XX / LPC2468
原文链接:mail/uclinux-dev/2007-May/042875.html
希望对大家有帮助
 
注意:
1 该文章所写内容只要是针对LPC2468芯片就完全正确,不需要配置任何内容(更改外部晶振频率无效),只需要设置串口输出终端波特率与uClinux-dist/vendors/NXP/LPC2468/config.linux-2.6.x中的CONFIG_CMDLINE参数一致,默认波特率为38400
2 编译器选择作者指定的版本,否则会出现错误。

[uClinux-dev] HOWTO uClinux 2.6.21 on LPC22XX / LPC2468
Goetz, Philippe Philippe.Goetz at siemens.com
Fri May 11 07:46:18 EDT 2007

Previous message: [uClinux-dev] pthread link errors
Next message: [uClinux-dev] Configure script cannot find libraries
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

--------------------------------------------------------------------------------

Hi,
I successfully build and execute a uClinux based on kernel 2.6.21 and you will find following the how-to.
This howto will explain how to do this.

1. Download and Install the snapgear tool chain (gcc 3.4.4):

In the Embedded Artists wmware image, download the following tool
chain:
*

In terminal do the following:
$su
Password: root
$cd /
$tar zxvf /arm-linux-tools-20061213.tar.gz
$exit

2. Download the sources

Download the uClinux snapshot:
-
Download the 2.6.20.x kernel:
-
Download the uClinux patch for 2.6.21:
-
Download the LPC2468 patch for 2.6.21-uc0:
- linux-2.6.21-uc0-lpc2468.diff in

Download the BSP for LPC2468:
- uClinux-dist-20070130-nxp-lpc2468.tgz in


3. Setup the sources

1) Untar the uClinux snapshop and remove the kernels
tar -zxvf /uClinux-dist-20070130.tar.gz
rm -r uClinux-dist/linux-2.0.x
rm -r uClinux-dist/linux-2.4.x
rm -r uClinux-dist/linux-2.6.x
2) Make a new linux-2.6.x kernel from scratch
tar -jxvf /linux2.6.21.tar.bz2
gzip -dc /linux-2.6.21-uc0-big.patch.gz | patch -p0
patch -p0 <  /linux-2.6.21-uc0-lpc2468.diff
mv linux-2.6.21 uClinux-dist/linux-2.6.x
3) Install the BSP for LPC2468
tar -zxvf /uClinux-nxp-lpc2468.tar.gz

4. Compile the kernel using the default setup

NOTE: For Embedded Artists LPC2468 OEM Board users:
The image is located uClinux-dist/linux2.6.x/arch/arm/boot/Image
The romfs is located uClinux-dist/images/romfs.img

image has to be loaded @a0008000
romfs has to be loaded @a1800000

Good luck, Philippe GOETZ

Last words:
THIS IS NOT FULLY TESTED (even not tested at all). It is fresh from
the oven. TESTERS ARE WELCOME.
NO DRIVER INCLUDED. They will come soon.


>>> Here a snapshot of the console output:

Resetting CPU ...

**********************************************
* LPC2468 OEM Board from Embedded Artists AB *
* *
**********************************************
Booting (may take some time)...

U-Boot 1.1.6 (Apr 3 2007 - 15:31:25)

DRAM: 32 MB
Flash: 4.5 MB
NAND: 128 MiB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
LPC2468_OEM_Board #
LPC2468_OEM_Board #
LPC2468_OEM_Board #
LPC2468_OEM_Board # mmc
...
LPC2468_OEM_Board # fatload mmc 0 a0008000 Image
...
LPC2468_OEM_Board # fatload mmc 0 a1800000 romfs.img
...
LPC2468_OEM_Board # go a0008000
## Starting application at 0xA0008000 ...
þLinux version 2.6.21-uc0 (user at eadevenv) (gcc version 3.4.4) #2 Thu
May 10 13:4
7:29 BST 2007
CPU: NXP-LPC2468 [24680000] revision 0 (ARMvundefined 13), cr=a00ec980
Machine: LPC22xx, PHILIPS ELECTRONICS Co., Ltd.
Built 1 zonelists. Total pages: 8128
Kernel command line: root=/dev/ram initrd=0xA1800000,4096K
console=ttyS0,38400N8
PID hash table entries: 128 (order: 7, 512 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 27404KB available (800K code, 105K data, 68K init)
Mount-cache hash table entries: 512
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
Freeing initrd memory: 4096K
NetWinder Floating Point Emulator V0.97 (double precision)
io scheduler noop registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xe000c000 (irq = 6) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
RAMDISK: romfs filesystem found at block 0
RAMDISK: Loading 149KiB [1 disk] into ram disk... done.
VFS: Mounted root (romfs filesystem) readonly.
Shell invoked to run file: /etc/rc
Command: hostname NXP-LPC2468
Command: /bin/expand /etc/ramfs.img /dev/ram1
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram1 /var
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: cat /etc/motd
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|

For further information check:


Command: sh

Sash command shell (version 1.1.1)
/> Execution Finished, Exiting
toks= -/bin/sh (null) (null) (null)
tty= console
termcap= linux
toks= /bin/sh (null) (null) (null)
tty= ttyS0
termcap= linux

Sash command shell (version 1.1.1)
/>
Sash command shell (version 1.1.1)
/>
/> cat /proc/version
Linux version 2.6.21-uc0 (user at eadevenv) (gcc version 3.4.4) #2 Thu
May 10 13:47
:29 BST 2007
/>



Mit freundlichen Grüßen
Philippe GOETZ

Siemens Building Technologies
Fire & Security Products GmbH & Co. oHG
SBT FSP ...
Siemensallee 84
76187 Karlsruhe, Germany
Tel.: +49 721 595-8006
Fax: +49 721 595-2606
mailto:philippe.goetz at siemens.com

Offene Handelsgesellschaft · Sitz der Gesellschaft: München · Registergericht: Amtsgericht München, HRA 74215
Leitung: Hans Mehl, Reinhard Kretschmer

Gesellschafter:
Siemens Building Technologies Beteiligungs GmbH
Geschäftsführer: Reinhard Kretschmer, Peter Kurtz, Hans Mehl, Klaus-Dieter Rollmann, Stefan Werner, Josef Winter
Sitz der Gesellschaft: Erlangen · Registergericht: Fürth (Bay.), HRB 6951
Siemens Aktiengesellschaft · Vorsitzender des Aufsichtsrats: Heinrich v. Pierer · Vorstand: Klaus Kleinfeld,
Vorsitzender: Johannes Feldmayer, Joe Kaeser, Rudi Lamprecht, Eduardo Montes, Jürgen Radomski,
Erich R. Reinhardt, Hermann Requardt, Uriel J. Sharef, Klaus Wucherer
Sitz der Gesellschaft: Berlin und München · Registergericht: Berlin-Charlottenburg, HRB 12300, München, HRB 6684
WEEE-Reg.-Nr. DE 41544343

-------------- next part --------------
An HTML attachment was scrubbed...
URL: ... 896/attachment.html
阅读(21935) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~