Chinaunix首页 | 论坛 | 博客
  • 博客访问: 278013
  • 博文数量: 95
  • 博客积分: 2047
  • 博客等级: 大尉
  • 技术积分: 1022
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-14 16:18
文章分类

全部博文(95)

文章存档

2013年(1)

2011年(94)

我的朋友

分类: 嵌入式

2011-08-14 19:26:20

为SEP0718移植2.6.27内核

1 复制mach-sep0718目录值arch/arm下(从已经移植好的2.6.29内核中提取)

2 修改arch/arm/kconfig
添加
config ARCH_SEP0718
bool "SEP0718"
help
   Support for Southeast University SEP0718 boards.

添加
source "arch/arm/mach-sep0718/Kconfig"

3 修改arch/arm/Makefile
添加machine-$(CONFIG_ARCH_SEP0718)    := sep0718

4 修改arch/arm/tools/mach-types
没有机器号,只有手动添加
sep0718        ARCH_0718            EASIC0718      195

同时修改
nexio SA1100_NEXIO NEXIO 1950

5修改arm/arm/kernel/head.s
line82添加
mov r0, #0x0
mov r1, #0xc3 //u-boot没有正确传递机器号

line86 
mov r9, #0x0007b000 //give cpu id of v6 processor

以下
ENTRY(stext)
msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
@ and irqs disabled
mov r0, #0x0
mov r1, #0xc3

mrc p15, 0, r9, c0, c0 @ get processor id

mov r9, #0x0007b000 //give cpu id of v6 processor

bl __lookup_processor_type @ r5=procinfo r9=cpuid

6 修改arch/arm/mach-sep0718/kconfig

删除select V6

7 修改arch/arm/mm/kconfig
line402
# ARMv6
config CPU_V6
bool "Support ARM V6 processor"
depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM7X00A || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || ARCH_SEP0718
default y if ARCH_MX3
default y if ARCH_MSM7X00A
default y if ARCH_SEP0718
select CPU_32v6
select CPU_ABRT_EV6
select CPU_PABRT_NOIFAR
select CPU_CACHE_V6
select CPU_CACHE_VIPT
select CPU_CP15_MMU
select CPU_HAS_ASID if MMU
select CPU_COPY_V6 if MMU
select CPU_TLB_V6 if MMU

8 includ/asm/mach-types.h
#define MACH_TYPE_NEXIO                1950
#define MACH_TYPE_EASIC0718              195


编译,执行
现在的问题是系统会死在执行/sbin/init的地方

I am Stepldr ! 
init SD card...
Load U-boot From SD to 0x30300000,100kb.........
Load ramdisk From SD to 0x31000000,3mb.........
Load Linux Kernel From SD to 0x30008000,2mb .........
U-boot start .........

23

U-Boot 1.3.3 (Nov 10 2009 - 15:05:57)

U-Boot code: 30300000 -> 303137B8  BSS: -> 30315150
DRAM:  32 MB
## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB
Flash:  0 kB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0 
Boot with zImage

Starting kernel ...

Uncompressing Linux....................................................... done, booting the kernel.
<5>Linux version 2.6.27 (kyon@SEP4020.Linux) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #84 Wed Nov 11 11:01:33 CST 2009
CPU: ARMv6-compatible processor [0007b000] revision 0 (ARMv6TEJ), cr=00c5387f
Machine: SEP0718 board
Memory policy: ECC disabled, Data cache writeback
<7>On node 0 totalpages: 8192
<7>free_area_init_node: node 0, pgdat c01a2ce0, node_mem_map c01cc000
<7>  DMA zone: 8128 pages, LIFO batch:0
CPU0: D VIPT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
<5>Kernel command line: root=/dev/ram0 rw console=ttyS0,115200 initrd=0x31000000,3mb mem=32mb
<6>SEP0718 IRQ, (c) 2009 Southeast University ASIC
PID hash table entries: 128 (order: 7, 512 bytes)
<6>SEP0718 Timer, (c) 2009 Southeast University ASIC
Console: colour dummy device 80x30
<6>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
<6>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
<6>Memory: 32MB = 32MB total
<5>Memory: 27560KB available (1500K code, 210K data, 88K init)
<6>Calibrating delay loop... 131.48 BogoMIPS (lpj=657408)
Mount-cache hash table entries: 512
<6>CPU: Testing write buffer coherency: ok
<6>SEP0718 Clocks, (c) 2009 Southeast University ASIC
<5>SCSI subsystem initialized
<6>checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
<6>Freeing initrd memory: 3072K
<4>NetWinder Floating Point Emulator V0.97 (double precision)
<6>msgmni has been set to 59
<6>io scheduler noop registered
<6>io scheduler anticipatory registered
<6>io scheduler deadline registered
<6>io scheduler cfq registered (default)
<6>Serial: 8250/16550 driver3 ports, IRQ sharing disabled
<6>serial8250.0: ttyS0 at MMIO 0x10005000 (irq = 24) is a 16450
<6>console [ttyS0] enabled
Linux version 2.6.27 (kyon@SEP4020.Linux) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #84 Wed Nov 11 11:01:33 CST 2009
CPU: ARMv6-compatible processor [0007b000] revision 0 (ARMv6TEJ), cr=00c5387f
Machine: SEP0718 board
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIPT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: root=/dev/ram0 rw console=ttyS0,115200 initrd=0x31000000,3mb mem=32mb
SEP0718 IRQ, (c) 2009 Southeast University ASIC
PID hash table entries: 128 (order: 7, 512 bytes)
SEP0718 Timer, (c) 2009 Southeast University ASIC
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: 27560KB available (1500K code, 210K data, 88K init)
Calibrating delay loop... 131.48 BogoMIPS (lpj=657408)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
SEP0718 Clocks, (c) 2009 Southeast University ASIC
SCSI subsystem initialized
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
Freeing initrd memory: 3072K
NetWinder Floating Point Emulator V0.97 (double precision)
msgmni has been set to 59
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x10005000 (irq = 24) is a 16450
console [ttyS0] enabled
<6>serial8250.0: ttyS1 at MMIO 0x10006000 (irq = 23) is a 16450
serial8250.0: ttyS1 at MMIO 0x10006000 (irq = 23) is a 16450
<6>brd: module loaded
brd: module loaded
<6>loop: module loaded
loop: module loaded
<4>Driver 'sd' needs updating - please use bus_type methods
Driver 'sd' needs updating - please use bus_type methods
<6>mice: PS/2 mouse device common for all mice
mice: PS/2 mouse device common for all mice
<5>RAMDISK: ext2 filesystem found at block 0
RAMDISK: ext2 filesystem found at block 0
<5>RAMDISK: Loading 3000KiB [1 disk] into ram disk... RAMDISK: Loading 3000KiB [1 disk] into ram disk... done.
done.
VFS: Mounted root (ext2 filesystem).
VFS: Mounted root (ext2 filesystem).
<6>Freeing init memory: 88K
Freeing init memory: 88K
阅读(835) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

2011-08-19 19:22:41

0718不是今年才流片出来吗?09年就移植了?