查看: 21733|回复: 10

[已解决] IMX6程序下载到eMMC中有问题(已解决)

[复制链接]

该用户从未签到

7

主题

48

帖子

0

注册会员

Rank: 2

积分
179
最后登录
1970-1-1
发表于 2014-10-13 12:52:31 | 显示全部楼层 |阅读模式
本帖最后由 FSL_TICS_Rita 于 2014-11-27 16:55 编辑

您好,我使用的是SabreSD这个开发板,用LTIB编译出来的程序可以在SD卡运行,现在少些eMMC有两个问题请教:

1.我用MFGtool工具下载自带的程序,每次运行到DHCP就不执行啦,如果我在PC上开启DHCP功能给他分配IP就可以执行过去,否则反复等待DHCP,打印信息如下:
MMC read: dev # 2, block # 2048, count 8192 ... 8192 blocks read: OK
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Linux-3.0.35-2666-gbdde708
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3866444 Bytes =  3.7 MB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 3.0.35-2666-gbdde708 (r65388@shlinux3) (gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) ) #1 SMP PREEMPT Fri Aug 16 10:43:44 CST 2013
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Freescale i.MX 6Quad/DualLite/Solo Sabre-SD Board
Memory policy: ECC disabled, Data cache writealloc
CPU identified as i.MX6Q, silicon rev 1.2
PERCPU: Embedded 7 pages/cpu @8c008000 s5440 r8192 d15040 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 194560
Kernel command line: console=ttymxc0,115200 ip=dhcp root=/dev/mmcblk0p1 rootwait
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 512MB 256MB = 768MB total
Memory: 765764k/765764k available, 282812k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xf4600000 - 0xffe00000   ( 184 MB)
    vmalloc : 0xc0800000 - 0xf2000000   ( 792 MB)
    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)
      .init : 0x80008000 - 0x8003c000   ( 208 kB)
      .text : 0x8003c000 - 0x80a8f8f4   (10575 kB)
      .data : 0x80a90000 - 0x80af3e40   ( 400 kB)
       .bss : 0x80af3e64 - 0x80b41d8c   ( 312 kB)
中间省略打印信息若干行
lib80211: common routines for IEEE802.11 drivers
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
Bus freq driver module loaded
Bus freq driver Enabled
mxc_dvfs_core_probe
DVFS driver module loaded
regulator_init_complete: PFUZE100_VGEN6: incomplete constraints, leaving on
regulator_init_complete: PFUZE100_VGEN3: incomplete constraints, leaving on
regulator_init_complete: PFUZE100_VGEN2: incomplete constraints, leaving on
regulator_init_complete: PFUZE100_VGEN1: incomplete constraints, leaving on
snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:01:39 UTC (99)
eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, irq=-1)
PHY: 1:01 - Link is Up - 1000/


2.就是我修改了MFGTool工具,想下载我的程序,但是,每次下载成功后,从新启动还是运行的老程序,不知道为什么?我的配置如下(我改动的文件名已标红):
ucl2.xml文件
<LIST name="SabreSD-eMMC-Liu" desc="Choose eMMC Linux as media">
    <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mx6q-sabresd.bin" >Loading U-boot</CMD>
    <CMD state="BootStrap" type="load" file="uImage" address="0x10800000"
        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>
    <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"
        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD>
    <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

        <CMD state="Updater" type="push" body="$ ls /dev/*"/>
        <CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1536 count=16">clean up u-boot parameter</CMD>

        <CMD state="Updater" type="push" body="$ echo 0 > /sys/block/mmcblk0boot0/force_ro">access boot partition 1</CMD>
        <CMD state="Updater" type="push" body="send" file="files/liu_u-boot.bin">Sending U-Boot</CMD>
        <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0boot0 bs=512 seek=2 skip=2">write U-Boot to eMMC</CMD>
        <CMD state="Updater" type="push" body="$ echo 1 > /sys/block/mmcblk0boot0/force_ro"> re-enable read-only access </CMD>
        <CMD state="Updater" type="push" body="$ echo 8 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">enable boot partion 1 to boot</CMD>

    <CMD state="Updater" type="push" body="send" file="files/liu_uImage">Sending kernel uImage</CMD>
    <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=1M seek=1 conv=fsync">write kernel image to eMMC</CMD>

    <CMD state="Updater" type="push" body="send" file="mksdcard.sh.tar">Sending partition shell</CMD>
    <CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
    <CMD state="Updater" type="push" body="$ sh mksdcard.sh /dev/mmcblk0"> Partitioning...</CMD>

    <CMD state="Updater" type="push" body="$ mkfs.ext3 -j /dev/mmcblk0p1">Formatting rootfs partition</CMD>
    <CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk0p1"/>  
    <CMD state="Updater" type="push" body="$ mount -t ext3 /dev/mmcblk0p1 /mnt/mmcblk0p1"/>
    <CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk0p1" file="files/rootfs.tar.bz2">Sending and writting rootfs</CMD>
    <CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
    <CMD state="Updater" type="push" body="$ umount /mnt/mmcblk0p1">Unmounting rootfs partition</CMD>
    <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>

cfg.ini
[profiles]
chip = MX6Q Linux Update

[platform]
board = SabreSD

[LIST]
name = SabreSD-eMMC-Liu

boot switch sw6
1   2   3   4   5   6   7   8
on on  off on  off  on  on  off

我用同样的方法下载到SD卡就是对的:
ucl2.xml文件
<LIST name="Sabre-SD-Liu" desc="Choose SD as media">
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mx6q-sabresd.bin" >Loading U-boot</CMD>
        <CMD state="BootStrap" type="load" file="uImage" address="0x10800000"
                loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>
        <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"
                loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD>
        <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>
        <!-- -->
        <CMD state="Updater" type="push" body="mknod block,mmcblk1,/dev/mmcblk1,block"/>
        <CMD state="Updater" type="push" body="send" file="mksdcard.sh.tar">Sending partition shell</CMD>
        <CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
        <CMD state="Updater" type="push" body="$ sh mksdcard.sh /dev/mmcblk1"> Partitioning...</CMD>
        <CMD state="Updater" type="push" body="mknod block/mmcblk1,mmcblk1p1,/dev/mmcblk1p1,block"/>
        <CMD state="Updater" type="push" body="send" file="files/liu_u-boot.bin">Sending liu_u-boot.bin</CMD>
        <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk1 bs=1k seek=1 skip=1 conv=fsync">write liu_u-boot.bin to sd card</CMD>
        <CMD state="Updater" type="push" body="send" file="files/liu_uImage">Sending kernel liu_uImage</CMD>
        <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk1 bs=1M seek=1 conv=fsync">write liu_kernel image to sd card</CMD>
        <CMD state="Updater" type="push" body="$ mkfs.ext3 -j /dev/mmcblk1p1">Formatting liu_rootfs partition</CMD>
        <CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk1p1"/>
        <CMD state="Updater" type="push" body="$ mount -t ext3 /dev/mmcblk1p1 /mnt/mmcblk1p1"/>
        <CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk1p1" file="files/rootfs.tar.bz2">Sending and writting liu_rootfs</CMD>
        <CMD state="Updater" type="push" body="frf">Finishing liu_rootfs write</CMD>
        <CMD state="Updater" type="push" body="$ umount /mnt/mmcblk1p1">Unmounting liu_rootfs partition</CMD>
        <CMD state="Updater" type="push" body="$ echo Update Complete!">Liu Make SD Done</CMD>
</LIST>



麻烦您啦!谢谢!

我知道答案 目前已有10人回答
回复

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3278
最后登录
1970-1-1
发表于 2014-10-13 12:58:16 | 显示全部楼层
好的,我帮你看一下哈~~
回复 支持 反对

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3278
最后登录
1970-1-1
发表于 2014-10-13 12:58:25 | 显示全部楼层
请耐心等待~~
回复 支持 反对

使用道具 举报

该用户从未签到

7

主题

48

帖子

0

注册会员

Rank: 2

积分
179
最后登录
1970-1-1
 楼主| 发表于 2014-10-13 18:55:23 | 显示全部楼层
我想追加一个问题,就是我在我自己的板子上测试想通过MFGTOOL下载SD2上的TF卡,下载模式使用的
boot switch sw6
1   2   3   4   5   6   7   8
off off  off on  off  on  on  off
,我在开发板下载SD能通过,在我的板载下载tf卡就是不行,
我想咨询下TF卡与NAND  FLASH的ucl2.xml文件写法。

麻烦您啦。
对啦上面那个问题我还没有解决。
回复 支持 反对

使用道具 举报

该用户从未签到

7

主题

48

帖子

0

注册会员

Rank: 2

积分
179
最后登录
1970-1-1
 楼主| 发表于 2014-10-13 18:55:51 | 显示全部楼层
打错啦
下载模式
boot switch sw6
1   2   3   4   5   6   7   8
off off  off off  off  on  on  off
回复 支持 反对

使用道具 举报

该用户从未签到

7

主题

48

帖子

0

注册会员

Rank: 2

积分
179
最后登录
1970-1-1
 楼主| 发表于 2014-10-13 22:06:57 | 显示全部楼层

刚才提的那个问题,我在网上看您给别人的回复,明白了,因为我用的自己的板子,内存与sabreSD的不一样,所以需要从新编写MFGTOOL固件。
请您先帮我解决我今天下午提的问题吧,那个是基于开发板的。
还有一个问题就是我烧写SD卡与烧写TF卡步骤是一样的吧!只是我按手册调整启动的时候把SD3改为SD2就可以了吧,因为我的TF卡是接SD2上的。
但是我有个问题就是下载时候所有都一样,启动的时候不同,对吧。还有就是SD卡数据位是8位的为什么用1位的呢,TF是4位的,是不是也用1位的。
回复 支持 反对

使用道具 举报

该用户从未签到

1

主题

802

帖子

0

金牌会员

Rank: 6Rank: 6

积分
1763
最后登录
1970-1-1
发表于 2014-10-29 17:41:41 | 显示全部楼层
启动是不一样的, 要看哪个接口
回复 支持 反对

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3278
最后登录
1970-1-1
发表于 2014-10-30 17:27:42 | 显示全部楼层
rivita 发表于 2014-10-13 22:06
刚才提的那个问题,我在网上看您给别人的回复,明白了,因为我用的自己的板子,内存与sabreSD的不一样, ...

楼主你好,烧写工程是一样的。不过启动模式设置是不一样的。
回复 支持 反对

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3278
最后登录
1970-1-1
发表于 2014-10-30 17:28:38 | 显示全部楼层
很抱歉,后来该帖子沉掉了,才给你回复,请问你的问题解决了吗?如果没有的话,欢迎继续在这里讨论哈~~
回复 支持 反对

使用道具 举报

该用户从未签到

7

主题

48

帖子

0

注册会员

Rank: 2

积分
179
最后登录
1970-1-1
 楼主| 发表于 2014-10-30 20:51:13 | 显示全部楼层
FSL_TICS_Rita 发表于 2014-10-30 17:28
很抱歉,后来该帖子沉掉了,才给你回复,请问你的问题解决了吗?如果没有的话,欢迎继续在这里讨论哈~~ ...

我现在在我自己做的板子调试,这个问题就没调试啦。等回来过几天我在调试这个。麻烦您啦!
不过问题还没解决,如果您能帮我解决下还是好的,或者过几天再说。
回复 支持 反对

使用道具 举报

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

本版积分规则

关闭

站长推荐上一条 /3 下一条

Archiver|手机版|小黑屋|恩智浦技术社区

GMT+8, 2025-9-8 03:26 , Processed in 0.107409 second(s), 30 queries , MemCache On.

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表