moon0213 发表于 2013-9-5 09:19:07

TQ335X SD无法运行的问题

想从SD卡启动并运行,但是只能启动到u-boot,无法直接从sd卡运行

启动信息如下:
Welcome to use TQ3358 Board!
boot from SD card...
*** Warning - bad CRC, using default environment



##### EmbedSky BIOS for TQ3358 #####
This Board: SDRAM is 512MB; LCD display size is: 800X480
Hit any key to stop autoboot:0

675 bytes read
don't update images from SD card and start system now!

NAND read: device 0 offset 0x280000, size 0x300000
3145728 bytes read: OK
setting bootargs ...
bootargs=console=ttyO0,115200n8 androidboot.console=ttySAC0 root=/dev/mtdblock8 rootfstype=yaffs2 rw rootwait=1 init=/init ip=off lcd=X800Y480 uart1_d_can=uart1 uart2_i2c2=uart2
Booting from nand ...

NAND read: device 0 offset 0x580000, size 0x500000
5242880 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!

#####    Boot for TQ3358 Main Menu      #####
#####   EmbedSky SD download mode   #####

Download u-boot.bin to Nand Flash
Download MLO to Nand Flash
Download Linux Kernel (uImage.bin) to Nand Flash
Download LOGO Picture (logo.bin) to NandFlash
Download UBIFS image (root.bin) to Nand Flash
Download YAFFS image (root.bin) to Nand Flash
Download Program to SDRAM and Run it
Boot the system
Format the Nand Flash
Set the boot parameters
Download User Program
Enter TFTP download mode menu
Reboot u-boot
Test kernel Image (uImage)
Enter your selection:

不明白的是为什么还要从nand读取内核来运行?难道不能直接读取sd卡中的内核运行吗?

moon0213 发表于 2013-9-5 09:21:37

我是完全按照手册操作的
image/embedsky.ini文件的配置是这样的:

#### This is TQ3358 SD config files ####
operating condition=run
OS Type=Linux

天嵌技术支持01 发表于 2013-9-5 09:26:00

从你的打印信息来看,是读内核镜像失败了。

要从SD卡运行起来,需要把内核镜像放到SD卡的根目录的

moon0213 发表于 2013-9-5 09:32:01

sd卡下面都有这些文件的,MLO, root.bin, u-boot.bin, uImage.bin全部都在根目录下,
image/linux目录下也有。

打印信息为什么会这样?
##### EmbedSky BIOS for TQ3358 #####
This Board: SDRAM is 512MB; LCD display size is: 800X480
Hit any key to stop autoboot:0

675 bytes read
don't update images from SD card and start system now!

NAND read: device 0 offset 0x280000, size 0x300000
3145728 bytes read: OK
为什么是从nand读取?

亚瑟王 发表于 2013-9-5 09:37:43

moon0213 发表于 2013-9-5 09:32 static/image/common/back.gif
sd卡下面都有这些文件的,MLO, root.bin, u-boot.bin, uImage.bin全部都在根目录下,
image/linux目录下也有 ...

从SD卡启动仅仅是从SD卡读取u-boot镜像,其他的镜像,比如Logo、内核、文件系统都是在Nand Flash上的。

天嵌技术支持01 发表于 2013-9-5 09:40:06

确认如下几个条件:
1.需要制作TQ3358 SD启动卡MLO不能自己直接拷贝到SD卡

2.底板上的拨码开关拨到SD卡启动模式

moon0213 发表于 2013-9-5 09:42:02

从SD卡运行难道只是引导?am335x不止这功能吧,beaglebone是没有nand的,只能从sd卡启动运行的
难道天嵌的不能从sd卡运行?

moon0213 发表于 2013-9-5 09:55:45

又重新制作了一遍,完全按照手册,拨码开关正确,在win7下用TQ335X_bootSDTools.exe工具制作,MLO是直接烧录,不是后来复制

我认为如果能够从SD卡启动uboot,就说明我这个启动制作没有问题,问题应该是启动时不应该从NAND读取内核,应该从sd卡读取内核,因为这时nand里面根本没有任何数据,怎么可能读取成功?

moon0213 发表于 2013-9-5 10:04:44

还有,启动后传递的参数也是不对的
Welcome to use TQ3358 Board!
boot from SD card...
*** Warning - bad CRC, using default environment



##### EmbedSky BIOS for TQ3358 #####
This Board: SDRAM is 512MB; LCD display size is: 800X480
Hit any key to stop autoboot:0

675 bytes read
don't update images from SD card and start system now!

NAND read: device 0 offset 0x280000, size 0x300000
3145728 bytes read: OK
setting bootargs ...
bootargs=console=ttyO0,115200n8 androidboot.console=ttySAC0 root=/dev/mtdblock8 rootfstype=yaffs2 rw rootwait=1 init=/init ip=off lcd=X800Y480 uart1_d_can=uart1 uart2_i2c2=uart2
Booting from nand ...

NAND read: device 0 offset 0x580000, size 0x500000
5242880 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!


红色部分应该是root=/dev/mmcblock,需要从SD卡加载文件系统

天嵌技术支持01 发表于 2013-9-5 12:07:53

beaglebone用emmc替换了nand flash,所以它是从mmc启动的

moon0213 发表于 2013-9-5 12:20:42

embest的开发板devkit8600也可以从sd卡启动并运行的,TQ3358的板子只能用SD卡做引导启动吗?

moon0213 发表于 2013-9-6 16:32:34

SD卡启动运行搞定,需要的同学可以参考:

AM335X支持从SD卡和NAND启动。从NAND启动比较简单,只要在u-boot中做好nand的驱动即可。需要注意:如果am335x的gpmc复用,并且用到了方向控制芯片来控制复用功能,这时就不能用gpmc.dir来做NAND方向控制芯片的方向控制脚,否则am335x会无法启动。解决方法,用gpmc的wen脚来做方向控制即可。


大题步骤说一下:

首先在linux系统下把SD卡分两个区,一个FAT32,做启动分区,一个ext2/3/4区,存放根文件系统,供内核挂载用。然后在windows下用天嵌的SD卡启动制作工具把FAT32分区做成启动盘,复制MLO,u-boot.bin,uImage.bin到该分区,要严格按照天嵌教程制作。

以上工作做完后再来修改U-BOOT代码
修改根目录下common/main.c的515行
#if 0         /* 这里把1 改为0 */
                run_command ("run boot_args;run nand_boot", 0);
#else
                uboot_device = *p_data;
               
                printd("--boot_device=%d\n", uboot_device);
                if (BOOT_DEVICE_NAND == uboot_device)
                {
                        run_command ("run boot_args;run nand_boot", 0);
                }
                else
                {
                        //run_command ("run boot _args;run mmc_boot", 0);
                              /*这里也要修改为mmc的参数*/
                              run_command ("run mmc_args;run mmc_boot", 0);
                }
#endif
然后编译出新的u-boot.bin文件,复制到sd卡,SD卡启动制作完成!

fengc234 发表于 2013-10-22 21:26:20

moon0213 发表于 2013-9-6 16:32 static/image/common/back.gif
SD卡启动运行搞定,需要的同学可以参考:

AM335X支持从SD卡和NAND启动。从NAND启动比较简单,只要在u-b ...

我的板子是在NAND模式下并且NAND里面也有没有程序的时候,按TPS65910的PWRON键有CCCC字符输出,我在SD卡模式下将MLO、u-boot.bin、image.bin、root.bin手动下载到NAND里面后,再从NAND模式下启动就没有任何打印信息了连电源芯片都启动不了,你遇到过类似的现象吗?
页: [1]
查看完整版本: TQ335X SD无法运行的问题