打印
[i.MX]

MFG烧写uboot、内核和文件系统后,启动出错

[复制链接]
1605|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
火狐free|  楼主 | 2017-2-17 22:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
MFGtools配置如下:
cfg.ini文件配置:
[profiles]
chip = MX6Q Linux Update

[platform]
board = SabreSD

[LIST]
name = SabreSD-eMMC

ucl2.xml文件 对应配置
<LIST name="SabreSD-eMMC" 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 1 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access boot partition 1</CMD>
    <!--
    <CMD state="Updater" type="push" body="send" file="files/u-boot-mx6q-sabresd.bin">Sending U-Boot</CMD>
    -->
        <CMD state="Updater" type="push" body="send" file="files/u-boot.bin">Sending U-Boot</CMD>

    <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2 skip=2">write U-Boot to sd card</CMD>
    <CMD state="Updater" type="push" body="$ echo 8 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access user partition and enable boot partion 1 to boot</CMD>
     
    <CMD state="Updater" type="push" body="send" file="files/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 sd card</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>
<LIST name="Android-SabreSD-eMMC" desc="Choose eMMC android as media">
  <!-- Android Profile: -->
        <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="$ 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 1 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access boot partition 1</CMD>
        <CMD state="Updater" type="push" body="send" file="files/android/u-boot.bin">Sending U-Boot</CMD>
        <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2 skip=2">write U-Boot to sd card</CMD>

        <CMD state="Updater" type="push" body="$ echo 8 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access user partition and enable boot partion 1 to boot</CMD>
        <CMD state="Updater" type="push" body="send" file="mksdcard-android.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-android.sh /dev/mmcblk0"> Partitioning...</CMD>

        <CMD state="Updater" type="push" body="$ ls -l /dev/mmc* ">Formatting sd partition</CMD>

        <CMD state="Updater" type="push" body="send" file="files/android/boot.img">Sending kernel uImage</CMD>
        <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0p1">write boot.img</CMD>
        <CMD state="Updater" type="push" body="frf">flush the memory.</CMD>

       
        <CMD state="Updater" type="push" body="$ newfs_msdos -F 32 -O android -c 8 /dev/mmcblk0p4">Formatting sd partition</CMD>
        <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk0p5">Formatting system partition</CMD>
        <CMD state="Updater" type="push" body="$ mkfs.ext4 -O^extent /dev/mmcblk0p6">Formatting cache partition</CMD>
        <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk0p7">Formatting data partition</CMD>
        <CMD state="Updater" type="push" body="frf">flush the memory.</CMD>
        <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk0p8">Formatting misc partition</CMD>
       
        <CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk0p5 bs=512" file="files/android/system.img">Sending and writting system.img</CMD>
        <CMD state="Updater" type="push" body="frf">flush the memory.</CMD>
       
        <!-- Write userdata.img is optional, for some customer this is needed, but it's optional. -->
        <!-- Also, userdata.img will have android unit test, you can use this to do some auto test. -->
<!--        <CMD state="Updater" type="push" onError="ignore" body="pipe dd of=/dev/mmcblk0p7" file="file/android/userdate.img"> Sending userdata.img(optional) </CMD>
        <CMD state="Updater" type="push" body="frf">flush the memory.</CMD>  -->
        <CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk0p2 bs=512" file="files/android/recovery.img">Sending and writting recovery.img</CMD>

        <CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>

        <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>

烧写过程中提示格式化,格式化无法进行,在其他帖子里看到点击取消,尝试取消,烧写成功;

超级终端调试,启动显示内容如下:
U-Boot 2009.08-dirty (12鏈?13 2016 - 17:07:44)

CPU: Freescale i.MX6 family TO1.2 at 792 MHz
Thermal sensor with ratio = 174
Temperature:   38 C, calibration data 0x54e4c269
mx6q pll1: 792MHz
mx6q pll2: 528MHz
mx6q pll3: 480MHz
mx6q pll8: 50MHz
ipg clock     : 66000000Hz
ipg per clock : 66000000Hz
uart clock    : 80000000Hz
cspi clock    : 60000000Hz
ahb clock     : 132000000Hz
axi clock   : 264000000Hz
emi_slow clock: 132000000Hz
ddr clock     : 528000000Hz
usdhc1 clock  : 198000000Hz
usdhc2 clock  : 198000000Hz
usdhc3 clock  : 198000000Hz
usdhc4 clock  : 198000000Hz
nfc clock     : 24000000Hz
Board: i.MX6Q-SABRESD: unknown-board Board: 0x63012 [POR ]
Boot Device: MMC
I2C:   ready
DRAM:   1 GB
MMC:   FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2,FSL_USDHC: 3
*** Warning - bad CRC or MMC, using default environment
(这里出现了警告)
In:    serial
Out:   serial
Err:   serial
Found PFUZE100! deviceid=10,revid=21
Net:   got MAC address from IIM: 00:00:00:00:00:00
FEC0 [PRIME]
Hit any key to stop autoboot:  0
打印uboot启动参数
MX6Q SABRESD U-Boot > print
bootdelay=3
baudrate=115200
ethaddr=00:21:54:98:65:32
ipaddr=192.168.0.200
serverip=192.168.0.174
netmask=255.255.255.0
loadaddr=0x10800000
rd_loadaddr=(0x1300000)
netdev=eth0
ethprime=FEC0
uboot=u-boot.bin
kernel=uImage
nfsroot=/home/lu/nfsboot
bootargs_base=setenv bootargs console=ttymxc0,115200 enable_wait_mode=off
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=192.168.0.199:192.168.
0.50:192.168.0.1:255.255.255.0::eth0:off nfsroot=${serverip}:${nfsroot},v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; boot
m
bootargs_mmc=setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait
bootcmd_mmc=run bootargs_base bootargs_mmc; mmc dev 3; mmc read ${loadaddr} 0x80
0 0x2000; bootm
ethact=FEC0
bootcmd=run bootcmd_mmc
stdin=serial
stdout=serial
stderr=serial

Environment size: 813/8188 bytes

重启一直停在下面界面处:
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
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
regulator_init_complete: vmmc: incomplete constraints, leaving on
snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:00:01 UTC (1)
eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, irq=-1)
PHY: 1:01 - Link is Up - 100/Full
Sending DHCP requests .....

刚接触imx6,这个问题困扰了我两天了,一直没解决,求各位帮忙看看是怎么回事?

相关帖子

沙发
火狐free|  楼主 | 2017-2-17 22:23 | 只看该作者
最终停留在下面界面:
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
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
regulator_init_complete: vmmc: incomplete constraints, leaving on
snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:00:01 UTC (1)
eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, irq=-1)
PHY: 1:01 - Link is Up - 100/Full
Sending DHCP requests ...... timed out!
IP-Config: Reopening network devices...
eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, irq=-1)
PHY: 1:01 - Link is Up - 100/Full
Sending DHCP requests ...... timed out!
IP-Config: Auto-configuration of network failed.

Waiting for root device /dev/mmcblk0p1...


有人提示说更改bootargs_mmc
更改setenv bootargs_mmc 'setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk*p1 rootwait'  (注*分别设置了1/2/3)都不行

使用特权

评论回复
板凳
火狐free|  楼主 | 2017-2-18 22:25 | 只看该作者
有人没?

使用特权

评论回复
地板
jackybaip| | 2017-2-20 12:34 | 只看该作者
uboot rootfs 参数可能不对

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

39

帖子

3

粉丝