主题 : porting u-boot to QQ2440V3 复制链接 | 浏览器收藏 | 打印
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
楼主  发表于: 2008-01-30 02:07

 porting u-boot to QQ2440V3

管理提醒: 本帖被 qq2440 执行置顶操作(2009-12-07)
I've ported an u-boot with basic function to QQ2440v3. It is based on openmoko u-boot (http://svn.openmoko.org/trunk/src/target/u-boot/patches).

I'll commit the all patches to opencsbc project (http://opencsbc.svn.sourceforge.net/viewvc/opencsbc/) later.

Comments welcome :)



U-Boot 1.3.1-moko12 (Jan 29 2008 - 22:21:54)

DRAM:  64 MB
Flash: 512 kB
NAND:  64 MiB
*** Warning - bad CRC or NAND, using default environment

USB:   S3C2410 USB Deviced
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
QQ2440 #
QQ2440 #
QQ2440 #
QQ2440 #
QQ2440 #
QQ2440 #
QQ2440 #
QQ2440 #
QQ2440 # mmcinit
trying to detect SD Card...
Manufacturer:       0x13, OEM "KG"
Product name:       "SD128", revision 1.0
Serial number:      3227360776
Manufacturing date: 11/2006
CRC:                0x30, b0 = 1
READ_BL_LEN=13, C_SIZE_MULT=7, C_SIZE=3971
size = 1052770304
QQ2440 # fatload mmc 0 0x32000000 uimage
reading uimage

1656496 bytes read
QQ2440 # bootm 0x32000000
## Booting image at 32000000 ...
   Image Name:   Linux-2.6.23-moko11
   Created:      2008-01-29  14:39:54 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1656432 Bytes =  1.6 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
OK

Starting kernel ... arch_number = 0x0000030e boot_params = 0x30000100

Uncompressing Linux............................................................................................................ done, booting the kernel.
Linux version 2.6.23-moko11 (alex@alex-desktop) (gcc version 4.1.2) #8 PREEMPT Tue Jan 29 22:39:15 CST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Friendly-ARM QQ2440 Development Board
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 16384
  DMA zone: 128 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 16256 pages, LIFO batch:3
  Normal zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
CPU S3C2440A (id 0x32440001)
S3C244X: core 304.000 MHz, memory 101.333 MHz, peripheral 50.666 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order.  Total pages: 16256
Kernel command line: rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8
irq: clearing pending ext status 00000200

请不要再要我发build的步骤到邮箱了,我已经贴出来了,在帖子的第二页
http://aiothome.com/bbs/read.php?tid=125&fpage=0&toread=&page=2
[ 此贴被kasim在2008-11-12 12:02重新编辑 ]
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 982
精华: 0
发帖: 13
金钱: 130 两
威望: 13 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2008-07-02
最后登录: 2009-06-25
1楼  发表于: 2008-08-30 17:29
为什么还要

$make ARCH=arm \
CROSS_COMPILE=/usr/local/poky/eabi-glibc/arm/bin/arm-poky-linux-gnueabi- \
all

级别: 新手上路
UID: 982
精华: 0
发帖: 13
金钱: 130 两
威望: 13 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2008-07-02
最后登录: 2009-06-25
2楼  发表于: 2008-08-30 17:32
My lcd is samsung 3.5',would you please tell me which file to modify to support my lcd ?
3x a lot.
级别: 新手上路
UID: 982
精华: 0
发帖: 13
金钱: 130 两
威望: 13 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2008-07-02
最后登录: 2009-06-25
3楼  发表于: 2008-09-01 20:12
ok
I see
thnks a lot
级别: 新手上路
UID: 982
精华: 0
发帖: 13
金钱: 130 两
威望: 13 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2008-07-02
最后登录: 2009-06-25
4楼  发表于: 2008-09-02 15:07
QQ2440> tftp 31000000 uboot.bin
TFTP from server 192.168.2.198; our IP address is 192.168.2.222
Filename 'uboot.bin'.
Load address: 0x31000000
Loading: ############################################
done
Bytes transferred = 220516 (35d64 hex)
QQ2440> nand erase 0 50000

NAND erase: device 0 offset 0x0, size 0x50000
Erasing at 0x4c000 -- 100% complete.
OK
QQ2440> nand write 31000000 0 50000

NAND write: device 0 offset 0x0, size 0x50000
327680 bytes written: OK
?2440> reset
U-Boot 1.3.2-moko12 (Sep  2 2008 - 11:53:08)

I2C:  ready
DRAM:  64 MB
Flash: 512 kB
NAND:  Bad block table not found for chip 0
Bad block table not found for chip 0
64 MiB
*** Warning - bad CRC or NAND, using default environment

Video: 640x480x8 31kHz 59Hz
USB:  S3C2410 USB Deviced
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
In:    serial
Out:  serial
Err:  serial
Hit any key to stop autoboot:  0

NAND read: mtdparts variable not set, see 'help mtdparts'
incorrect device type in kernel
'kernel' is not a number
## Booting image at 32000000 ...
Bad Magic Number
QQ2440 # bdinfo
arch_number = 0x0000030E
env_t      = 0x00000000
boot_params = 0x30000100
DRAM bank  = 0x00000000
-> start    = 0x30000000
-> size    = 0x04000000
ethaddr    = 01:AB:CD:EF:FE:DC
ip_addr    = 192.168.2.222
baudrate    = 115200 bps
QQ2440 # ver

U-Boot 1.3.2-moko12 (Sep  2 2008 - 11:53:08)
QQ2440 #
级别: 新手上路
UID: 982
精华: 0
发帖: 13
金钱: 130 两
威望: 13 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2008-07-02
最后登录: 2009-06-25
5楼  发表于: 2008-09-02 15:14
Thanks for your help.
级别: 新手上路
UID: 982
精华: 0
发帖: 13
金钱: 130 两
威望: 13 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2008-07-02
最后登录: 2009-06-25
6楼  发表于: 2008-09-07 16:27
休假了,刚回来
等我弄好了一定发上来
级别: 新手上路
UID: 982
精华: 0
发帖: 13
金钱: 130 两
威望: 13 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2008-07-02
最后登录: 2009-06-25
7楼  发表于: 2008-09-08 19:22
刚试了一下
1.3.2rc1和1.3.2,1.3.4都不行,只能把patch应用在1.3.2rc2上(rc3没试),过几天有时间了,考虑移植到1.3.2或1.3.4正式版本上。
支持三星3.5'屏,修改两个文件
1修改qq2440.h
/*#define QQ2440_LCD_TFT_800480  1*/
/*uncomment if use SAMSUNG 3.5" LCD*/
#define QQ2440_LCD_TFT_320240  1
#define VIDEO_FB_16BPP_PIXEL_SWAP 1

另外修改自己的IP
#define CONFIG_ETHADDR        00:1d:60:1e:fe:dc
#define CONFIG_NETMASK                                  255.255.255.0
#define CONFIG_IPADDR        192.168.2.222
#define CONFIG_SERVERIP        192.168.2.198

2修改qq2440.c
增加
#elif defined QQ2440_LCD_TFT_320240
//#error "SAMSUNG 3.5' LCD on QQ2440 not supported yet"
        /* Configuration for SAMSUNG 3.5" LCM on QQ2440 */
        lcd->LCDCON1 = 0x00000378;
        lcd->LCDCON2 = 0x033bc14f;
        lcd->LCDCON3 = 0x00293f0f;
        lcd->LCDCON4 = 0x00000d08;
        lcd->LCDCON5 = 0x00000b09;
        lcd->LPCSEL  = 0x00000f82;

        pGD->winSizeX = pGD->plnSizeX = 320;
        pGD->winSizeY = pGD->plnSizeY = 240;
        pGD->gdfBytesPP = 2;
        pGD->gdfIndex = GDF_16BIT_565RGB;

        pGD->frameAdrs = LCD_VIDEO_ADDR;
        pGD->memSize = 0x25800; /* 320*240*16bit  */
#endif

编译完成就ok
[ 此贴被wsliu在2008-09-09 15:12重新编辑 ]
级别: 新手上路
UID: 982
精华: 0
发帖: 13
金钱: 130 两
威望: 13 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2008-07-02
最后登录: 2009-06-25
8楼  发表于: 2008-09-08 19:24
这几天再学学怎么用patch
级别: 新手上路
UID: 982
精华: 0
发帖: 13
金钱: 130 两
威望: 13 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2008-07-02
最后登录: 2009-06-25
9楼  发表于: 2008-09-09 15:14
sorry
漏了一行
已经加上了 上面红色的部分。
我测试过了,没有任何问题

本来想这几天把开机菜单搞定,不想昨天刚接了个DVB-T的项目
只能把这个u-boot先放一放了