• «
  • 1
  • 2
  • 3
  • »
  • Pages: 1/3     Go
主题 : u-boot for mini210/tiny210 (2013.01.03更新) 复制链接 | 浏览器收藏 | 打印
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
楼主  发表于: 2011-11-02 23:22

 u-boot for mini210/tiny210 (2013.01.03更新)

管理提醒: 本帖被 xoom 执行加亮操作(2011-11-03)
=== 2013/01/03 更新 ===
1.  合并u-boot v2013.01-rc2到mini210_linaro-2012.11-stable分支;
2. 支持通过USB DFU更新u-boot和kernel镜像(<8MB)(详细步骤看下面的帖子)
3. 解决无法正常启动内核镜像的问题

=== 2012/12/09 更新 ===
基于linaro-2012.11的代码(mini210_linaro-2012.11-stable分支)已经上传到gitorious server上。 目前实现并验证的功能有:
1. SD boot,基于linaro u-boot的SPL功能实现
2. 从SD卡的FAT分区上加载文件到SDRAM
3. 将环境变量保存至SD卡
4. tftp下载文件

已知问题
1. 用"fatls"列出SD卡上FAT分区目录内容时,出现重复的文件名;
2. 通过"nand read"读取NAND Flash数据时出现"NAND read from offset XXXXXXX failed -74"错误
3. 该版本的u-boot目前还不能正常启动内核,建议继续使用旧的2011.10分支代码。

编译和使用步骤见下面的帖子。
=== 2012/12/02 更新 ===
1. 修正S5PV210 timer问题。 该问题会导致一系列不正确的网络应用,比如tftp, ping的超时;
2. Mini210/Tiny210: 上跳过DM9000网卡的power down,从而节省每一次网络应用时初始化网卡的时间;
3. Mini210: 更改MACH_TYPE_MINI210为3466, 与友善之臂提供的内核源代码保持一致;
4. Mini210: 更改开发板默认的IP地址为192.168.0.2; TFTP server地址为192.168.0.1。

=== 2012/03/04 更新 ===
1. 加入了tiny210的支持,感谢本论坛的liukunmcu用户的贡献(http://www.aiothome.net/read.php?tid-17714.html);
2. mini210/tiny210的DM9000A网卡支持。

=== 2011/12/03 更新 ===
基于linaro-2011.10的代码已经上传到了gitorious server上。目前实现并验证的功能有:

1. SD boot,基于linaro u-boot的SPL功能实现
2. 从SD卡的FAT分区上加载文件到SDRAM
3. 将环境变量保存至SD卡(会出现mmc write fail (Data CRC fail), 但实际数据保存是成功的,还需要进一步debug)

编译和使用步骤见下面的帖子。

=== 2011/11/02 更新 ===
我已经将u-boot 1.3.4 for mini210的源代码上传到了gitorious server上。目前实现并验证了以下功能:

1. 支持SD卡和NAND Flash启动
2. 支持NAND Flash读写
3. 支持通过USB + DNW下载
4. 支持从SD卡的FAT分区上加载文件到SDRAM
[ 此帖被kasim在2013-01-03 16:11重新编辑 ]
"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楼  发表于: 2011-11-02 23:31
该u-boot是在linaro(www.linaro.org) u-boot的基础上修改而来。目前最新的code base是linaro 2012.11
编译和使用的步骤:

以下步骤在Ubuntu 10.10和Ubuntu 12.04上经过验证
1 . 下载源代码包:
可以在通过下面链接下载源代码:

https://gitorious.org/opencsbc/u-boot/archive-tarball/<branch name>

或者通过git获取源代码仓库
$git clone git://gitorious.org/opencsbc/u-boot.git
$git checkout origin/<branch name>

也可以通过https://gitorious.org/opencsbc/u-boot/trees/<branch name>在线浏览。

其中, <branch name>对应不同版本的代码分支:
mini210_linaro-2011.10-stable基于linaro 2011.10版本的分支
mini210_linaro-2012.11-stable基于linaro 2012.11版本的分支


2. 编译
2.1 从mini210光盘上获取交叉编译工具链arm-linux-gcc-4.5.1-v6-vfp-20101103.tgz并解压
$sudo tar -C / /path/to/arm-linux-gcc-4.5.1-v6-vfp-20101103.tgz

2.2 编译u-boot
2.2.1 配置u-boot源代码
$make ARCH=arm CROSS_COMPILE=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi- mini210_config //For mini210

$make ARCH=arm CROSS_COMPILE=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi- tiny210_config //For tiny210
2.2.2 构建u-boot二进制档
$make ARCH=arm CROSS_COMPILE=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi- all spl

3. 将u-boot镜像写入SD卡
3.1 将SD卡通过读卡器接上电脑,通过"cat /proc/partitions"找出SD卡对应的设备,通常情况下是/dev/sdb.

3.2 执行下面的命令
$sudo dd iflag=dsync oflag=dsync if=spl/mini210-spl.bin of=<SD卡对应设备> seek=1
$sudo dd iflag=dsync oflag=dsync if=u-boot.bin of=<SD卡对应设备> seek=49

4. 将SD卡取出并插入mini210的TF0插槽(靠近USB口的那个),并且将S2开关打到"SDBOOT"一端,打开电源,就在串口console上能看到u-boot的启动log了

OKOKraise: Signal # 8 caught


U-Boot 2011.06-00594-g99c1a89 (Dec 03 2011 - 10:08:40) for FriendlyARM-MINI210

CPU:    S5PC110@1000MHz

Board:   FriendlyARM-MINI210
DRAM:  512 MiB
WARNING: Caches not enabled

PWM Moudle Initialized.
GPD0CON  : 1111, GPD0DAT  : e
MMC:   SAMSUNG SD/MMC: 0, SAMSUNG SD/MMC: 1
In:    serial
Out:   serial
Err:   serial
FriendlyARM-MINI210 #


5. 通过USB更新u-boot和内核镜像
目前该功能只在mini210上支持, 且只适用于更新SD卡中的u-boot镜像以及第一个FAT分区上的内核镜像, 镜像文件大小的最大限制为8MB。该功能目前只在Linux操作系统上验证过,欢迎各位在Windows下测试并反馈。
要使用这一功能,需要在PC Linux上安装dfu-util工具:
在Ubuntu 10.04或更新的版本上,可以通过"sudo apt-get install dfu-util"安装,其他发行版可以自行从源代码编译后安装使用,具体步骤参考http://dfu-util.gnumonks.org/build.html

使用步骤:
1. u-boot启动后,在命令行上输入"dfu mmc 0"
2. 用USB线将开发板的USB OTG端口与PC连接起来
3. 在PC上通过以下命令更新:
     a. sudo dfu-util -a u-boot -R -D /path/to/u-boot.bin       //更新u-boot镜像
     b. sudo dfu-util -a uImage -R -D /path/to/uImage         //更新内核镜像
4. 更新完成后,在u-boot命令行上用CRTL+C退出下载


感谢友善之臂的大力支持!
[ 此帖被kasim在2013-01-03 16:10重新编辑 ]
"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楼  发表于: 2012-02-14 12:46

 回 7楼(jnny_cn) 的帖子

太好了,我一直很想在210上跑X + GTK。
能否把你对u-boot的修改发给我(kasimling@gmail.com)?这样这个u-boot就可以支持tiny210了,谢谢!
"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楼  发表于: 2012-02-14 13:32

 回 7楼(jnny_cn) 的帖子

另外,你从哪里拿到的210的Linux OpenGL库?
"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楼  发表于: 2012-02-15 09:43
引用第10楼jnny_cn于2012-02-15 09:36发表的  :
昨天测试发现移植的u-boot还有一些问题,所以稍后把弄好的会发给你

3d用的不是硬件opengl是软件的opengl

没有找到sgx540的xorg驱动,
.......

了解。能否把基于软件OpenGL的X + GTK移植经验分享出来?我想那也是很有价值的。谢谢!
"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楼  发表于: 2012-02-15 11:16

 回 12楼(jnny_cn) 的帖子

非常感谢,我会把这个整理一下了重新发到论坛上。
另外,我觉得如果你可以在google code上建立一个这样的项目作为经验的积累会更好。这是以前一个国外的开发者为mini2440做的项目,你可以参考。
http://code.google.com/p/mini2440/
"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楼  发表于: 2012-02-25 15:01

 回 14楼(cockliujun) 的帖子

因为我只测试过这个U-Boot的从SD启动部分,不确定它能否从NAND启动:)
"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楼  发表于: 2012-03-20 12:34
引用第19楼m_r_dao于2012-03-20 10:16发表的  :
LZ:你的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
8楼  发表于: 2012-03-20 18:04
引用第21楼m_r_dao于2012-03-20 17:31发表的  :
原来直接执行make tiny210或者make mini210就可以了.交叉编译器直接在makefile里写死算了.

我把配置和编译的步骤都放在帖子的1楼,建议你再仔细看一遍

还有一个问题就是有没有人知道七楼所说的把内存改为单通道,在u-boot里面怎么修改?

http://blog.csdn.net/liukun321/article/details/7270426
"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楼  发表于: 2012-04-30 08:10

 回 28楼(sunyx) 的帖子

U-Boot默认只支持uImage格式的内核镜像
"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
  • 3
  • »
  • Pages: 1/3     Go