• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : 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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2008-04-21 12:13
不客气,不过再好的代码躺在SVN里面是没有用的,只有实际用了才能体现价值
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2008-04-24 18:03
引用第3楼ycsandao于2008-04-24 14:50发表的  :
u-boot-1.3.1中qq2440.h中的在NANDFLASH中设定环境变量的地址空间时

#define CFG_ENV_OFFSET 是怎么定义的?需要考虑哪些因素?你设定的CFG_ENV_SIZE 是 16k

#define  CFG_ENV_OFFSET_00B 1 的定义,没有替代CFG_ENV_OFFSET 的意思呀?
.......


CFG_ENV_OFFSET_OOB的意思是把env数据分区的offset写在block 0的OOB区域里,至于这个offset如何用的,恐怕你的看代码才能了解。
这个机制的可以参考 http://wiki.openmoko.org/wiki/NAND_bad_blocks#Environment
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2008-05-20 09:32
引用第5楼wxllllllove于2008-05-19 23:04发表的  :
请问版主能把u-boot -1.3.1 for  QQ2440V3的源码发给我吗 我现在正在研究这  万分感谢    邮箱 wxlllove@126.com

我已经把u-boot patch check in到https://opencsbc.svn.sourceforge.net/svnroot/opencsbc/trunk/target/u-boot/patches
你可以通过下面的命令check out:
svn co https://opencsbc.svn.sourceforge.net/svnroot/opencsbc opencsbc

有关svn的操作参考https://sourceforge.net/svn/?group_id=204028
有关build u-boot的步骤我已经发Mail到你的邮箱
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2008-05-21 00:26
已发
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2008-05-21 21:00
我更新过u-boot的patch,大概没法在原来版本的u-boot上用了,现在应该在u-boot 1.3.2-rc2上可以
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2008-05-28 09:11
Here's the instructions for how to build u-boot for FriendlyARM QQ2440V3:

You'll need svn(subrevision, http://subversion.tigris.org/) and quilt tool (http://savannah.nongnu.org/projects/quilt) installed on the development PC

1. Install Cross Compile Toolchain from Pokylinux.org

$wget http://pokylinux.org/releases/pinky-3.1/poky-eabi-glibc-i686-arm-toolchain-pinky-3.1.tar.bz2

$tar jxvf poky-eabi-glibc-i686-arm-toolchain-pinky-3.1.tar.bz2 -C /

2. Get u-boot source code against which the QQ2440 patches are generated:

Get u-boot soruce tar ball from U-boot project FTP:
$wget ftp://ftp.denx.de/pub/u-boot/u-boot-1.3.2-rc1.tar.bz2


$tar jxvf u-boot-1.3.2-rc1.tar.bz2

3. Get QQ2440 u-boot patch from opencsbc via svn
$svn co https://opencsbc.svn.sourceforge.net/svnroot/opencsbc opencsbc

4. patch u-boot with opencsbc patch for QQ2440

$cd u-boot-1.3.2-rc1 && cp -a ../opencsbc/trunk/target/u-boot/patches . && quilt push -av

5. build u-boot for QQ2440
$make ARCH=arm \
CROSS_COMPILE=/usr/local/poky/eabi-glibc/arm/bin/arm-poky-linux-gnueabi- \
qq2440_config

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

You'll get u-boot.bin after it is complied successfully

6. Flash the generated u-boot.bin into NAND Flash by SJF jtag tool on Windows

7. You'll get u-boot running on QQ2440 after reset the board

U-Boot 1.3.1-moko12 (Apr  5 2008 - 14:49:35)

DRAM:  64 MB
Flash: 512 kB
NAND:  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
QQ2440 #

Note:
1. The u-boot contains LCD support for the 7" 800x480
LCD only currently
2. This u-boot porting is based on the one by
OpenMoko, for general features on this u-boot, see
http://wiki.openmoko.org/wiki/U-boot
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2008-05-28 16:55
你可以把'$'后面的命令直接复制粘贴到bash命令提示符后面执行
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2008-07-07 10:49
我不是已经贴出来了吗?
"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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
9楼  发表于: 2008-08-30 21:01
It depends on which s3c24x0 frame buffer driver you use. In this case, I use framebuffer driver from openmoko and add 7' LCD configuration to board/qq2440/qq2440.c like following:


+#ifdef CONFIG_VIDEO
+void board_video_init(GraphicDevice *pGD)
+{
+    S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD();
+
+    /* FIXME: select LCM type by env variable */
+
+    /* Configuration for GTA01 LCM on QT2410 */
+#ifdef QQ2440_LCD_TFT_800480
+        /* Configuration for HITACHI 7" LCM on QQ2440 */
+        lcd->LCDCON1 = 0x00000178;
+        lcd->LCDCON2 = 0x1977c141;
+        lcd->LCDCON3 = 0x021b1f28;
+        lcd->LCDCON4 = 0x00000d1f;
+        lcd->LCDCON5 = 0x00000b08;
+        lcd->LPCSEL  = 0x00000f82;
+
+        pGD->winSizeX = pGD->plnSizeX = 800;
+        pGD->winSizeY = pGD->plnSizeY = 480;
+        pGD->gdfBytesPP = 2;
+        pGD->gdfIndex = GDF_16BIT_565RGB;
+
+        pGD->frameAdrs = LCD_VIDEO_ADDR;
+        pGD->memSize = 0xBB800; /* 800*480*16bit  */
+
+#elif defined QQ2440_LCD_TFT_240320
+#error "NEC 3.5' LCD on QQ2440 not supported yet"
+#endif
+}
+#endif

You can refer to http://archlinux.gooth.cn/svn/arm/trunk/target/u-boot/patches/uboot-s3c2410_fb.patch and http://archlinux.gooth.cn/svn/arm/trunk/target/u-boot/patches/uboot-qq2440.patch for more info on LCD support for QQ2440
"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."
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go