1.修改主目录下Makefile:

ARCH?= $(SUBARCH)

CROSS_COMPILE?= $(CONFIG_CROSS_COMPILE:"%"=%)改为:

ARCH?= arm

CROSS_COMPILE?= /usr/local/arm/4.5.1/bin/arm-linux-

2.arch/arm/mach-s3c64xx目录下

2.1 拷贝个mach-mini6410.c重命名为mach-ok6410.c并修改其内容:

2.1.1 把所有mini6410字样都替换为ok6410,注意是小写

2.1.2 把所有MINI6410字样都替换为OK6410,注意是大写

2.1.3 修改static struct mtd_partition ok6410_nand_part

/*

[0] = {

.name= "uboot",

.size= SZ_1M,

.offset= 0,

},

[1] = {

.name= "kernel",

.size= SZ_2M,

.offset= SZ_1M,

},

[2] = {

.name= "rootfs",

.size= MTDPART_SIZ_FULL,

.offset= SZ_1M + SZ_2M,

},*/

改为

{

.name= "Bootloader",

.offset= 0,

.size= (2 * SZ_1M),

.mask_flags= MTD_CAP_NANDFLASH,

},

{

.name= "Kernel",

.offset= (2 * SZ_1M),

.size= (5*SZ_1M) ,

.mask_flags= MTD_CAP_NANDFLASH,

},

{

.name= "File System",

.offset= (7 * SZ_1M),

.size= (200*SZ_1M) ,

},

{

.name= "User",

.offset= MTDPART_OFS_APPEND,

.size= MTDPART_SIZ_FULL,

}

2.2修改Kconfig文件,参照Mini6410的配置,加入OK6410如下:

config MACH_OK6410

bool "OK6410"

select CPU_S3C6410

select S3C_DEV_HSMMC

select S3C_DEV_HSMMC1

select S3C64XX_SETUP_SDHCI

select S3C_DEV_USB_HOST

select S3C_DEV_NAND

select S3C_DEV_FB

select S3C64XX_SETUP_FB_24BPP

select SAMSUNG_DEV_ADC

select SAMSUNG_DEV_TS

help

Machine support for the FORLINX OK6410

2.3 修改Makefile文件,参照MINI6410,加入OK6410如下:

obj-$(CONFIG_MACH_OK6410)        += mach-ok6410.o

3. 修改arch/arm/tools/mach-types文件,加入OK6410的mach-type,这个必须和U-BOOT中的MACH-TYPE一致,这里选用smdk6410的mach-type:1626。如下:

ok6410 MACH_OK6410 OK6410 1626

4.回到主目录下执行Make menuconfig

root@ubuntu:/home/my# cd linux-3.6.7/

root@ubuntu:/home/my/linux-3.6.7# make menuconfig

配置如下:

4.1 先选择Load an Alternate Configuration File,输入arch/arm/configs/s3c6400_defconfig

4.2 选择General Setup,打开Cross_compiler tool perfix,输入

/usr/local/arm/4.5.1/bin/arm-linux-

4.3选择System Type,取消SMDK6400 ,A&W6410,SMDK6410等平台,只选择OK6410

4.4 选择Save an Alternate Configuration File,保存为.config然后退出。

5.回到主目录下执行make zImage生成zImage文件

6.回到主目录下执行make uImage生成uImage文件

uImage文件是u boot 所支持的文件格式。

6.1 拷贝u-boot-2012.10/tools/目录下的mkimage文件到主机/usr/bin目录下

6.2 修改Entry_Point问题,参考另一篇文章:

6.3 回到主目录下执行make uImage生成uImage文件

7. 把uImage烧写到NAND中运行,NAND flash放置程序的结构如下:

0000 0000 ---0020 0000 大小2M 放置uboot

0020 0000 ---0070 0000 大小5M 放置uImage

0070 0000 ---0CF0 0000 大小200M 放置 rootfs

结果如下:

NAND read: device 0 offset 0x200000, size 0x500000

5242880 bytes read: OK

## Booting kernel from Legacy Image at 50008000 ...

Image Name: Linux-3.6.7

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 1476616 Bytes = 1.4 MiB

Load Address: 50008000

Entry Point: 50008040

Verifying Checksum ... OK

XIP Kernel Image ... OK

OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Booting Linux on physical CPU 0

Linux version 3.6.7 (root@ubuntu) (gcc version 4.5.1 (ctng-1.8.1-FA) ) #1 Mon Dec 3 15:54:25 CST 2012

CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387d

CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache

Machine: OK6410

Memory policy: ECC disabled, Data cache writeback

CPU S3C6410 (id 0x36410101)

S3C24XX Clocks, Copyright 2004 Simtec Electronics

camera: no parent clock specified

S3C64XX: PLL settings, A=533000000, M=533000000, E=24000000

S3C64XX: HCLK2=266500000, HCLK=133250000, PCLK=66625000

mout_apll: source is fout_apll (1), rate is 533000000

mout_epll: source is epll (1), rate is 24000000

mout_mpll: source is mpll (1), rate is 533000000

usb-bus-host: source is clk_48m (0), rate is 48000000

audio-bus: source is mout_epll (0), rate is 24000000

audio-bus: source is mout_epll (0), rate is 24000000

audio-bus: source is mout_epll (0), rate is 24000000

irda-bus: source is mout_epll (0), rate is 24000000

camera: no parent clock specified

CPU: found DTCM0 8k @ 00000000, not enabled

CPU: moved DTCM0 8k to fffe8000, enabled

CPU: found DTCM1 8k @ 00000000, not enabled

CPU: moved DTCM1 8k to fffea000, enabled

CPU: found ITCM0 8k @ 00000000, not enabled

CPU: moved ITCM0 8k to fffe0000, enabled

CPU: found ITCM1 8k @ 00000000, not enabled

CPU: moved ITCM1 8k to fffe2000, enabled

Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024

Kernel command line: noinitrd root=/dev/mtdblock2 rootfstype=yaffs2 init=/linuxrc console=ttySAC0,115200

PID hash table entries: 1024 (order: 0, 4096 bytes)

Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)

Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)

Memory: 256MB = 256MB total

Memory: 256784k/256784k available, 5360k reserved, 0K highmem

Virtual kernel memory layout:

vector : 0xffff0000 - 0xffff1000 ( 4 kB)

DTCM : 0xfffe8000 - 0xfffec000 ( 16 kB)

ITCM : 0xfffe0000 - 0xfffe4000 ( 16 kB)

fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)

vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)

lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)

modules : 0xbf000000 - 0xc0000000 ( 16 MB)

.text : 0xc0008000 - 0xc02818ac (2535 kB)

.init : 0xc0282000 - 0xc029cb54 ( 107 kB)

.data : 0xc029e000 - 0xc02c7f20 ( 168 kB)

.bss : 0xc02c8024 - 0xc02f9064 ( 197 kB)

SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

NR_IRQS:246

VIC @f6000000: id 0x00041192, vendor 0x41

VIC @f6010000: id 0x00041192, vendor 0x41

sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms

Console: colour dummy device 80x30

Calibrating delay loop... 353.89 BogoMIPS (lpj=1769472)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

Setting up static identity map for 0x501dd240 - 0x501dd29c

DMA: preallocated 256 KiB pool for atomic coherent allocations

OK6410: Option string ok6410=0

OK6410: selected LCD display is 480x272

s3c64xx_dma_init: Registering DMA channels

PL080: IRQ 73, at d0846000, channels 0..8

PL080: IRQ 74, at d0848000, channels 8..16

S3C6410: Initialising architecture

bio: create slab at 0

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

ROMFS MTD (C) 2007 Red Hat, Inc.

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

start plist test

end plist test

s3c-fb s3c-fb: window 0: fb

Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled

s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 69) is a S3C6400/10

console [ttySAC0] enabled

s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 70) is a S3C6400/10

s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 71) is a S3C6400/10

s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 72) is a S3C6400/10

brd: module loaded

loop: module loaded

S3C24XX NAND Driver, (c) 2004 Simtec Electronics

s3c24xx-nand s3c6400-nand: Tacls=4, 30ns Twrph0=8 60ns, Twrph1=6 45ns

s3c24xx-nand s3c6400-nand: System booted from NAND

s3c24xx-nand s3c6400-nand: NAND soft ECC

NAND device: Manufacturer ID: 0xec, Chip ID: 0xd5 (Samsung NAND 2GiB 3,3V 8-bit), page size: 4096, OOB size: 218

No oob scheme defined for oobsize 218

------------[ cut here ]------------

kernel BUG at drivers/mtd/nand/nand_base.c:3278!

Internal error: Oops - BUG: 0 [#1] ARM

Modules linked in:

CPU: 0 Not tainted (3.6.7 #1)

PC is at nand_scan_tail+0x580/0x67c

LR is at nand_scan_tail+0x580/0x67c

pc : [] lr : [] psr: 60000013

sp : cf82fe98 ip : 00000001 fp : cf80a210

r10: c0181530 r9 : c0181524 r8 : 00000001

r7 : 00000000 r6 : cfa2fa80 r5 : cf80a000 r4 : cf80a210

r3 : c02ae464 r2 : c02ae464 r1 : 20000093 r0 : 00000025

Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel

Control: 00c5387d Table: 50004008 DAC: 00000017

Process swapper (pid: 1, stack limit = 0xcf82e268)

Stack: (0xcf82fe98 to 0xcf830000)

fe80: cf80a000 cf854300

fea0: cfa2fa80 c01816fc 00000000 cfa2f9c0 cf827fc0 00000000 c02f8900 c02f88f8

fec0: c02f8900 c02ad1ac c02ad178 c02c48e8 c029c8b8 c0295ce0 00000000 c01658a0

fee0: c0165888 c0164634 00000000 c02ad178 c02c48e8 c02ad1ac 00000000 00000049

ff00: c0295ce0 c0164844 c02c48e8 cf82ff18 c01647b8 c0162f3c cf803878 cf8238e0

ff20: c02c48e8 c02c48e8 c02c1288 cfa2f9c0 00000000 c0163e60 c0250c40 c02c48e8

ff40: c02c48e8 c02c8040 cf82e000 00000000 00000049 c0164d68 00000000 c0298b6c

ff60: c02c8040 cf82e000 00000000 00000049 c0295ce0 c0008704 c02af678 00000000

ff80: c026fb28 c0295ce0 00000049 c0035fac c0253f3c c026f698 00000006 00000006

ffa0: c02af678 c0298b6c 00000006 c0298b4c c02c8040 00000049 c029c8b8 c0282168

ffc0: 00000000 c0282840 00000006 00000006 c0282168 00000000 00000000 c0282758

ffe0: c000f10c 00000013 00000000 00000000 00000000 c000f10c ffffffff ffffffff

[] (nand_scan_tail+0x580/0x67c) from [] (s3c24xx_nand_probe+0x1c0/0x480)

[] (s3c24xx_nand_probe+0x1c0/0x480) from [] (platform_drv_probe+0x18/0x1c)

[] (platform_drv_probe+0x18/0x1c) from [] (driver_probe_device+0x7c/0x200)

[] (driver_probe_device+0x7c/0x200) from [] (__driver_attach+0x8c/0x90)

[] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x54/0x80)

[] (bus_for_each_dev+0x54/0x80) from [] (bus_add_driver+0x170/0x240)

[] (bus_add_driver+0x170/0x240) from [] (driver_register+0x78/0x144)

[] (driver_register+0x78/0x144) from [] (do_one_initcall+0x34/0x180)

[] (do_one_initcall+0x34/0x180) from [] (kernel_init+0xe8/0x1b0)

[] (kernel_init+0xe8/0x1b0) from [] (kernel_thread_exit+0x0/0x8)

Code: 0a000003 e1a01003 e59f00e4 eb017dbe (e7f001f2)

---[ end trace 707c2cde67d9c275 ]---

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

内核启动了,但由于NAND驱动的问题使得内核初始化没有完成。接下来就是要改NAND驱动了。

编译ok6410linux内核,Linux3.6.7在OK6410平台的移植(二)编译配置linux3.6.7相关推荐

  1. Linux3.6.7在OK6410下的移植

    2019独角兽企业重金招聘Python工程师标准>>> 这是在本学期期末整项目时习得的,不知道以后会不会有用. 一个天天整js+css+html的,突然弄Linux C,学到的确实不 ...

  2. 编译linux内核生成.ko,Linux内核编译完整过程

    通过网上的资料我自己的实际内核编译,我把对Linux内核编译的过程写在这里,也许对其他的Linux爱好者的编译学习有些帮助,其中很大部分是网上的资料,另外就是我在实际编译过程中的一些实际经验. 内核简 ...

  3. 编译linux内核分区,Ubuntu编译内核及grub的一些笔记

    最近心态不稳定,不怎么想发表文章,但看了看之前写了的笔记,想想还是整理出来吧,其实我写文章,也有一部分原因是为了心里的慰藉--当年游戏打不过别人,关注点便转向其它方面.这里整理的是以前编译内核.引导启 ...

  4. 64位ubuntu 12.04编译linux内核提示mkimage command not found

    今天心血来潮,想编译以下linux内核来玩玩.一开始编译x86的版本,遇到了openssl/opensslv.h文件缺失的问题,经过一番折腾,顺利解决(解决过程请参见我的另外一篇博客"lin ...

  5. Linux 编译时查找错误字符,编译Linux内核时出现“fatal error: linux/netfilter/xt_dscp: No such file or directory”...

    编译Linux内核时出现"fatal error: linux/netfilter/xt_dscp: No such file or directory".下面开始查找原因. 第一 ...

  6. 编译linux内核3.0系统出现的警告信息(原创)

    编译linux内核3.0系统出现的警告信息(原创) 余超   yuchao86@gmail.com [yuchao@yuchao-Latitude-E5410 linux-3.0]$gcc --ver ...

  7. A40i使用笔记:编译驱动到内核中调用(ubuntu和A40i平台)

    一.前言 最近因个人需求和工作需求,准备入坑linux驱动篇,学习了几节课程,简单了解了linux驱动流程,本章前期现介绍开发linux驱动必备的工具,否则后续学习很困难 二.环境 notepadqq ...

  8. 【转】如何编译一个内核 - Ubuntu方式

    如何编译一个内核 - Ubuntu方式 2011-09-19 15:40 转载地址:http://hi.baidu.com/1101050240/blog/item/69e3d0d92f2b297dd ...

  9. quado编辑Android代码步骤,Ubuntu11.10下编译android内核源码

    编译android源码时并不会自动编译android内核,因此需要手动编译这部分代码.编译内核所用的时间比编译android源码要少得多,只需一会就编译完成. 1.确定内核版本 进入存放android ...

最新文章

  1. 表格td超出部分隐藏,显示...
  2. JSP/SERVLET(6)——Jquery EasyUI 选项卡Tabs的使用方法
  3. tracepro应用实例详解_建筑安装工程造价,高清PPT图文详解,小白也能学会的简单步骤...
  4. python requests session刷新_Python Requests Session set-cookie不生效的坑
  5. orm2 中文文档 3.1 模型属性
  6. Webpack3 从入门到放弃
  7. .NET连接SAP系统专题:C#如何导入内文至SAP(十一)
  8. 第五篇:数据预处理(二) - 异常值处理
  9. C#中的四舍五入有多坑
  10. HCIE-RS面试--交换机工作原理
  11. hbuildx微信开发者工具-微信小程序测试
  12. 云网资源如何搭乘「数字孪生」的快车道?
  13. 关于计算机的教学论文,关于计算机教学论文
  14. OSPF的DR和BDR【eNSP实现】
  15. 在线的h5编辑器汇总和分析
  16. Win11系统UAC被禁用怎么打开
  17. 行走的“摄影神器”三星Galaxy S21!五一出游必备
  18. matplotlib learning-----案例:对比电影的票房收入(3)
  19. 计算机考研四大名著,2017考研英语翻译每日一句:四大名著
  20. iOS 关于视频录制实现 (仿微信)

热门文章

  1. Selenium常用API的使用java语言之1-环境安装之Java
  2. 【Vue】---- 手动封装on,emit,off
  3. 前端QRCode.js生成二维码(解决长字符串模块和报错问题)
  4. python变量类型字符串的内建函数使用
  5. mysql实现自增函数
  6. struts2基础----自定义拦截器
  7. CodeForces512C-Pluses everywhere-模拟/数学/排列组合模板
  8. 基于消息的异步套接字
  9. 使用NumberFormatter判断TextInput输入内容是否为数字,如果是则格式化数字。
  10. 树莓派 libcurl安装