按照官方手册进行mini2440 linux移植及遇到的问题

发布者:快乐阳光最新更新时间:2024-07-15 来源: elecfans关键字:官方手册  mini2440  linux移植 手机看文章 扫描二维码
随时随地手机看文章

        .name           = 'dm9000',

        .id             = -1,

        .num_resources  = ARRAY_SIZE(mini2440_dm9k_resource),

        .resource       = mini2440_dm9k_resource,

        .dev            = {

                .platform_data  = &mini2440_dm9k_pdata,

        },

};





static struct s3c24xx_mci_pdata mini2440_mmc_cfg = {

   .gpio_detect   = S3C2410_GPG(8),

   .gpio_wprotect = S3C2410_GPH(8),

   .set_power     = NULL,

   .ocr_avail     = MMC_VDD_32_33|MMC_VDD_33_34,

};







static struct platform_device *mini2440_devices[] __initdata = {

&s3c_device_usb,

&s3c_device_rtc,

&s3c_device_lcd,

&s3c_device_wdt,

&s3c_device_i2c0,

&s3c_device_iis,

&mini2440_device_eth,

&s3c24xx_uda134x,

&s3c_device_nand,

&s3c_device_sdi,

&s3c_device_usbgadget,

};



static void __init mini2440_map_io(void)

{

s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc));

s3c24xx_init_clocks(12000000);  // 外部时钟频率为12000000

s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs));

}



static void __init mini2440_machine_init(void)

{

s3c24xx_fb_set_platdata(&mini2440_fb_info); // lcd platform device add



s3c_i2c0_set_platdata(NULL); // i2c



s3c2410_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND); // lcd 背光



s3c_device_nand.dev.platform_data = &friendly_arm_nand_info; //nand

s3c_device_sdi.dev.platform_data = &mini2440_mmc_cfg; //SD card

platform_add_devices(mini2440_devices, ARRAY_SIZE(mini2440_devices));

s3c_pm_init();

}



MACHINE_START(MINI2440, 'FriendlyARM Mini2440 development board')

.phys_io = S3C2410_PA_UART,

.io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,

.boot_params = S3C2410_SDRAM_PA + 0x100,



.init_irq = s3c24xx_init_irq,

.map_io = mini2440_map_io,

.init_machine = mini2440_machine_init,

.timer = &s3c24xx_timer,

MACHINE_END


可以启动了,神了,但是还是有错误:



Creating 5 MTD partitions on 'NAND 128MiB 3,3V 8-bit':

0x000000000000-0x000000040000 : 'supervivi'

0x000000040000-0x000000060000 : 'param'

uncorrectable error : 

0x000000060000-0x000000560000 : 'Kernel'

uncorrectable error : 

0x000000560000-0x000040560000 : 'root'

mtd: partition 'root' extends beyond the end of device 'NAND 128MiB 3,3V 8-bit' -- size truncated to 0x7aa0000

ftl_cs: FTL header not found.

0x000000000000-0x000040000000 : 'nand'

mtd: partition 'nand' extends beyond the end of device 'NAND 128MiB 3,3V 8-bit' -- size truncated to 0x8000000

 


 


可能是分区不对,先不管,移植文件系统再说.贴上完整的启动信息



Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00200000 ... done

zImage magic = 0x016f2818

Setup linux parameters at 0x30000100

linux command line is: 'noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0'

MACH_TYPE = 1999

NOW, Booting Linux......

Uncompressing Linux................................................................................................................................. done, booting the kernel.

Linux version 2.6.32.2 (root@FC9) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #4 Thu Jul 8 13:43:27 CST 2010

CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177

CPU: VIVT data cache, VIVT instruction cache

Machine: FriendlyARM Mini2440 development board

ATAG_INITRD is deprecated; please update your bootloader.

Memory policy: ECC disabled, Data cache writeback

CPU S3C2440A (id 0x32440001)

S3C24XX Clocks, (c) 2004 Simtec Electronics

S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz

CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on

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

Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0

PID hash table entries: 256 (order: -2, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory: 64MB = 64MB total

Memory: 60620KB available (3588K code, 418K data, 132K init, 0K highmem)

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

Hierarchical RCU implementation.

NR_IRQS:85

irq: clearing subpending status 00000003

irq: clearing subpending status 00000002

Console: colour dummy device 80x30

console [ttySAC0] enabled

Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

NET: Registered protocol family 16

S3C Power Management, Copyright 2004 Simtec Electronics

S3C2440: Initialising architecture

S3C2440: IRQ Support

S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics

DMA channel 0 at c4808000, irq 33

DMA channel 1 at c4808040, irq 34

DMA channel 2 at c4808080, irq 35

DMA channel 3 at c48080c0, irq 36

S3C244X: Clock Support, DVS off

bio: create slab at 0

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

s3c-i2c s3c2440-i2c: slave address 0x10

s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz

s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

ROMFS MTD (C) 2007 Red Hat, Inc.

msgmni has been set to 118

alg: No test for stdrng (krng)

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler deadline registered

io scheduler cfq registered

Console: switching to colour frame buffer device 60x53

fb0: s3c2410fb frame buffer device

s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440

s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440

s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440

brd: module loaded

S3C24XX NAND Driver, (c) 2004 Simtec Electronics

s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns

s3c24xx-nand s3c2440-nand: NAND soft ECC

NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)

Scanning device for bad blocks

Creating 5 MTD partitions on 'NAND 128MiB 3,3V 8-bit':

0x000000000000-0x000000040000 : 'supervivi'

0x000000040000-0x000000060000 : 'param'

uncorrectable error : 

0x000000060000-0x000000560000 : 'Kernel'

uncorrectable error : 

0x000000560000-0x000040560000 : 'root'

mtd: partition 'root' extends beyond the end of device 'NAND 128MiB 3,3V 8-bit' -- size truncated to 0x7aa0000

ftl_cs: FTL header not found.

0x000000000000-0x000040000000 : 'nand'

mtd: partition 'nand' extends beyond the end of device 'NAND 128MiB 3,3V 8-bit' -- size truncated to 0x8000000

dm9000 Ethernet Driver, V1.31

dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using ifconfig

eth0: dm9000e at c486e300,c4872304 IRQ 51 MAC: 00:00:00:00:00:00 (chip)

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver

s3c2410-ohci s3c2410-ohci: S3C24XX OHCI

s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1

s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 2 ports detected

usbcore: registered new interface driver libusual

s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes

mice: PS/2 mouse device common for all mice

S3C24XX RTC, (c) 2004,2006 Simtec Electronics

s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling

s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0

i2c /dev entries driver

S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics

s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled

cpuidle: using governor ladder

sdhci: Secure Digital Host Controller Interface driver

sdhci: Copyright(c) Pierre Ossman

s3c-sdi s3c2440-sdi: powered down.

s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ

usbcore: registered new interface driver hiddev

usbcore: registered new interface driver usbhid

usbhid: v2.6:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.21.

No device for DAI UDA134X

No device for DAI s3c24xx-i2s

S3C24XX_UDA134X SoC Audio driver

UDA134X SoC Audio Codec

asoc: UDA134X <-> s3c24xx-i2s mapping ok

ALSA device list:

  #0: S3C24XX_UDA134X (UDA134X)

TCP cubic registered

NET: Registered protocol family 17

s3c2410-rtc s3c2410-rtc: setting system clock to 2009-06-21 08:21:07 UTC (1245572467)

List of all partitions:

1f00             256 mtdblock0 (driver?)

1f01             128 mtdblock1 (driver?)

1f02            5120 mtdblock2 (driver?)

1f03          125568 mtdblock3 (driver?)

1f04          131072 mtdblock4 (driver?)

No filesystem could mount root, tried:  ext3 cramfs vfat msdos romfs

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)

[] (u


[1] [2] [3]
关键字:官方手册  mini2440  linux移植 引用地址:按照官方手册进行mini2440 linux移植及遇到的问题

上一篇:boot移植(十一)---代码修改---支持nandflash
下一篇:ARM-Linux移植之(四)——根文件系统构建

推荐阅读最新更新时间:2026-03-19 14:53

Qt-embedded-linux-opensource-src-4.5.1移植mini2440开发板技术说明
用过友善之臂的朋友都知道,友善之臂mini2440内置的是qt2的界面设计,但是现在q4逐渐成为主流。如何把qt4成功移植到mini2440非常不容易,本人也费了很到的功夫才完成了这样的工程。现在我把自己的经验拿出来与大家分享,希望有兴趣的朋友少走弯路。 1.我的环境及所需资源: PC机操作系统: Ubuntu 交叉编译工具:arm-linux-gcc-4.3.2.tar.gz 所需资源: tslib-1.4.tar.gz qt-embedded-linux-opensource-src-4.5.1.tar.gz qt-x11-linux-opensource-src-4.5.1.tar.gz 2.安装
[单片机]
Linux中SPI子系统图解和mini2440下的SPI驱动移植
1.SPI子系统框图详解: SPI总线上有两类设备:一类是主控端,通常作为SOC系统的一个子模块出现,比如很多嵌入式MPU中都常常包含SPI模块。一类是受控端,例如一些SPI接口的Flash、传感器等等。主控端是SPI总线的控制者,通过使用SPI协议主动发起SPI总线上的会话。而受控端则被动接受SPI主控端的指令,并作出响应的响应。 如图1所示,linux下的spi子系统主要涉及3个部分:spi核心、spiprotocol驱动和spi主控制器驱动。如图1.1,spi核心负责抽象出所有控制器都具备的功能代码,同时向上为spiprotocol驱动提供接口比如spi_message、spi_transfer,spi_async等,具
[单片机]
<font color='red'>Linux</font>中SPI子系统图解和<font color='red'>mini2440</font>下的SPI驱动<font color='red'>移植</font>
linux-2.6.32在mini2440开发板上移植 按键驱动程序移植
编者:按键驱动程序涉及到linux中断程序的编写。 1、按键原理图。 2、驱动程序的编写移植。 在/linux-2.6.32.2/drivers/char/目录下创建一个新的驱动程序文件mini2440_buttons.c,内容及详细注释如下: span style= font-size: 18px; #include linux/module.h #include linux/kernel.h #include linux/fs.h #include linux/init.h #include linux/delay.h #include linux/poll.h #include linux/irq.h #include
[单片机]
<font color='red'>linux</font>-2.6.32在<font color='red'>mini2440</font>开发板上<font color='red'>移植</font> 按键驱动程序<font color='red'>移植</font>
linux-2.6.32在mini2440开发板上移植-移植I2C-EEPROM 驱动
1 在内核中配置I2C 驱动 Linux-2.6.32.2 对S2C2440 的I2C 接口提供了完善的驱动,因此我们只需在内核中配置一下即可使用。 在内核源代码目录执行:make menuconfig,进入内核配置主菜单,依次选择进入如下子菜单: Device Drivers --- * I2C support --- I2C Hardware Bus support --- 如图,我们看到这里已经选择好了“ * S3C2410 I2C Driver”,这里的S3C2410 也可以适用于S3C2440,因为它们的I2C 端口及寄存器定义都是完全相同的。 以上配置所对
[单片机]
<font color='red'>linux</font>-2.6.32在<font color='red'>mini2440</font>开发板上<font color='red'>移植</font>-<font color='red'>移植</font>I2C-EEPROM 驱动
linux-2.6.32在mini2440开发板上移植-SD卡驱动移植
1 在内核中注册SD 设备驱动 Linux-2.6.32.2 已经自带了S3C2440 芯片的SD 卡驱动,我们只需在初始化代码中加入SD 平台设备结构就可以,打开arch/arm/mach-s3c2440/mach-mini2440.c,在nand flash 平台结构后面添加如下红色代码: ;在mini2440.c 的顶部添加SD 卡设备结构所需的头文件 #include linux/mmc/host.h #include plat/mci.h static struct platform_device mini2440_device_eth = { .name = dm9000 , .id = -1, .num_resour
[单片机]
linux-2.6.32在mini2440开发板上移植 添加ADC驱动程序
添加ADC驱动程序 编者:由于内核没有支持S3C2440的ADC驱动,在这里增加ADC驱动。友善的手册对这个介绍的还算相当详细,所以直接按照手册进行。里面的代码也有详细的注释。ADC驱动属于字符型设备,在这里以杂项设备也有的翻译为混杂设备,进行实现。 1 、关于S3C2440 的ADC 和触摸屏接口 Linux-2.6.32.2 内核并没有提供支持S3C2440 的ADC 驱动程序,因此我们自行设计了一个,这个驱动比较简单,属于字符设备,它位于drivers/char 目录下,驱动程序的文件名为:mini2440_adc.c。在S3C2440 芯片中,AD 输入和触摸屏接口使用共同的A/D 转换器,见2440 芯片手册第16
[单片机]
<font color='red'>linux</font>-2.6.32在<font color='red'>mini2440</font>开发板上<font color='red'>移植</font> 添加ADC驱动程序
linux-2.6.32在mini2440开发板上移植-W35型LCD驱动移植
编者注:本移植主要步骤还是按照手册来,里面讲解了一些有用的基础知识。但书册上提供了集中屏幕的方案,我们这里主要就用一种,也就是开发板自带的W35型号。液晶驱动的源程序在src/drivers/video/目录下,主要是s3c2410fb.c这几个文件,详细的讲解可以参照《linux设备驱动开发详解》一书。对于这里的移植,一般是实现为platform形式,所以,对platform_device这个结构体,把我准确一般就可以了。移植期间遇到的一个问题,一直没搞通。移植好后,烧尽板子,发现没正常运行。尝试了整整一下午,也不行。难道把drives/video/下的哪个驱动给改了?differ一下,发现没。match-mini2440.c这
[单片机]
linux-2.6.32在mini2440开发板上移植*移植DM9000 网卡驱动
1 设备资源初始化 Linux-2..6.32.2 已经自带了完善的DM9000 网卡驱动驱动(源代码位置:linux-2.6.32.2/ drivers/net/dm9000.c),它也是一个平台设备,因此在目标平台初始化代码中,只要填写好相 应的结构表即可,具体步骤如下: 首先添加驱动所需的头文件dm9000.h: #include linux/dm9000.h 再定义DM9000 网卡设备的物理基地址,以便后面用到: /* DM9000AEP 10/100 ethernet controller */ #define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300) 再填充该平台
[单片机]
小广播
最新单片机文章
何立民专栏 单片机及嵌入式宝典

北京航空航天大学教授,20余年来致力于单片机与嵌入式系统推广工作。

厂商技术中心

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

 
机器人开发圈

电子工程世界版权所有 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2026 EEWORLD.com.cn, Inc. All rights reserved