免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: unixgg1984

[操作系统] u-boot/Linux最小系统移植的问题可以问我。 [复制链接]

论坛徽章:
0
发表于 2014-03-29 22:00 |显示全部楼层
好久没来了。继续这个贴。。

论坛徽章:
0
发表于 2014-03-29 22:08 |显示全部楼层
如何移植u-boot?
个人觉得,如果是经常要跟uboot打交道,并且有时间的话,可以把uboot的Makefile文件(编译体系)弄清楚,知道了uboot如何配置,如何选择各个目录、文件进行编译。那么以后遇到任何问题,可以跟下代码,看datasheet,就能够搞定了。

研究Uboot的Makefile文件,需要如下知识
1)Makefile的相关知识。可以网上搜索《跟我一起写makefile》陈皓。
2)bash脚本的相关知识。推荐《高级Bash 脚本编程指南》,当参考书用。具体问题google。

论坛徽章:
0
发表于 2014-04-14 09:46 |显示全部楼层
楼主你好,我是嵌入式新手,我要做的移植是根据http://dev.gentoo.org/~armin76/arm/pandaboard/install.xml 这个网址里的内容,将MLO,u-boot.img, uImage编译完成后拷到SD卡中,然后启动pandaboard。已经验证过MLO和uImage没有任何问题。u-boot.img也能成功编译出来,问题是启动不了。u-boot-tools 版本为2013.07,u-boot版本试过2013.04,2013.07,2013.10,latest,结果都一样启动不出来,调试信息如下:

U-boot 2013.10 (Apr 12 2014 - 05:08:24)

CPU   : OMAP4460 ES1.1
Board: OMAP4 Panda
I2C:     ready
DRAM: 1 GiB
MMC:   OMAP SD/MMC: 0
Using default environment

In:      serial
Out:    serial
Err:     serial
Net:    No ethernet found.
Hit any key to stop autoboot: 0
mmc0 is current device
SD/MMC found on device 0
reading boot.src
** Unable to read file boot.scr **
reading uEnv.txt
** Unable to read file uEnv.txt **
** File not found /boot/zImage **
Panda # _(光标停在这里)
我已经纠结了快一个星期,不知道自己错在哪里,有劳楼主解答~~

论坛徽章:
0
发表于 2014-04-16 10:51 |显示全部楼层
请问博主,uboot引导内核卡在Starting kernel...处,请问是否遇到类似的问题。有什么解决思路,谢谢!
PS:
u-boot版本1.3.4,代码位于lib_arm/bootm.c

        /* we assume that the kernel is in place */
        printf ("\nStarting kernel ...\n\n");

#ifdef CONFIG_USB_DEVICE
        {
                extern void udc_disconnect (void);
                udc_disconnect ();
        }
#endif

        cleanup_before_linux ();

        theKernel (0, machid, bd->bi_boot_params);
        /* does not return */
        return;

论坛徽章:
0
发表于 2014-05-21 20:13 来自手机 |显示全部楼层
启动内核,还需要一个文件:boot.scr,类似名称

论坛徽章:
0
发表于 2014-05-21 20:15 来自手机 |显示全部楼层
可能是加载kernel文件有问题,或者内核没有移植好

论坛徽章:
0
发表于 2014-05-21 20:18 |显示全部楼层

启动内核,还需要一个文件:boot.scr,类似名称

回复 23# Seira_L


   

论坛徽章:
0
发表于 2014-05-21 20:19 |显示全部楼层

可能是加载kernel文件有问题,或者内核没有移植好

回复 24# ziwuchen


   

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:58:11
发表于 2014-05-22 16:02 |显示全部楼层
回复 23# Seira_L


    需要一个boot.scr文件
omap4-common.h中,会从sd卡读取这个文件,然后运行文件中的脚本

        "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
        "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
                "source ${loadaddr}\0" \

        "mmc dev ${mmcdev}; if mmc rescan; then " \
                "echo SD/MMC found on device ${mmcdev};" \
                "if run loadbootscript; then " \
                        "run bootscript; " \

你需要使用mkimage命令制作这个boot.scr,附件是我自己用的,可以参考一下

boot.zip (2.17 KB, 下载次数: 10)

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:58:11
发表于 2014-05-22 16:04 |显示全部楼层
回复 24# ziwuchen


    需要更多的信息才能分析

什么板子?制作uImage时的-a和-e分别设置的多少?uImage的下载/加载地址又是多少?


您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP