gentheaven 发表于 2019-9-24 19:41:48

SD卡不烧写Nand flash

我用SD卡烧写NADNflash,就是不成功。
SD卡制作没问题。
启动模式是SD卡,内核也启动了,就是不烧写。

256MB Nand Flash, mx6ul-c 开发板。

2.863187] nand: 256MiB, SLC, page size: 2048, OOB size: 64
[    2.869906] gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
[    2.877027] Scanning device for bad blocks
[    2.885625] mmc0: host does not support reading read-only switch. assuming write-enable.
[    2.902455] mmc0: new SDHC card at address 0001
[    2.913059] mmcblk0: mmc0:0001 0000 7.43 GiB
[    2.924467]mmcblk0: p1 p2
[    3.094671] 6 ofpart partitions found on MTD device gpmi-nand
[    3.100507] Creating 6 MTD partitions on "gpmi-nand":
[    3.105600] 0x000000000000-0x000000400000 : "boot"
[    3.113113] 0x000000400000-0x000000600000 : "logo"
[    3.120706] 0x000000600000-0x000000700000 : "ENV"
[    3.128138] 0x000000700000-0x000000a00000 : "DTB"
[    3.135602] 0x000000a00000-0x000001200000 : "kernel"
[    3.143552] 0x000001200000-0x000010000000 : "rootfs"
[    3.151632] gpmi-nand 1806000.gpmi-nand: driver registered.
[    3.161506] usbcore: registered new inte**ce driver usbhid
[    3.167128] usbhid: USB HID core driver
[    3.184231] fsl-asrc 2034000.asrc: driver registered
[    3.198309] snd-soc-dummy snd-soc-dummy: ASoC: Failed to create platform debugfs directory
[    3.207889] imx-wm8960 sound.14: wm8960-hifi <-> 202c000.sai mapping ok
[    3.215977] imx-wm8960 sound.14: snd-soc-dummy-dai <-> 2034000.asrc mapping ok
[    3.223546] imx-wm8960 sound.14: wm8960-hifi <-> 202c000.sai mapping ok
[    3.240991] NET: Registered protocol family 26
[    3.245809] TCP: cubic registered
[    3.250737] NET: Registered protocol family 10
[    3.258084] sit: IPv6 over IPv4 tunneling driver
[    3.264591] NET: Registered protocol family 17
[    3.269264] can: controller area network core (rev 20120528 abi 9)
[    3.275649] NET: Registered protocol family 29
[    3.280237] can: raw protocol (rev 20120528)
[    3.284539] can: broadcast manager protocol (rev 20120528 t)
[    3.290360] can: netlink gateway (rev 20130117) max_hops=1
[    3.296553] Bluetooth: RFCOMM TTY layer initialized
[    3.301687] Bluetooth: RFCOMM socket layer initialized
[    3.306906] Bluetooth: RFCOMM ver 1.11
[    3.310764] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.316105] Bluetooth: BNEP filters: protocol multicast
[    3.321512] Bluetooth: BNEP socket layer initialized
[    3.326510] Bluetooth: HIDP (Human Inte**ce Emulation) ver 1.2
[    3.332515] Bluetooth: HIDP socket layer initialized
[    3.337702] 8021q: 802.1Q VLAN Support v1.8
[    3.342052] Key type dns_resolver registered
[    3.347898] cpu cpu0: dev_pm_opp_get_opp_count: device OPP not found (-19)
[    3.371631] gpio_dvfs: disabling
[    3.374914] vref-3v3: disabling
[    3.378193] usb_otg1_vbus: disabling
[    3.381803] can-3v3: disabling
[    3.384883] regulator-dummy: disabling
[    3.389777] imx mcc test is registered.
[    3.395683] rtc-rx8010 0-0032: setting system clock to 2017-09-21 09:13:36 UTC (1505985216)
[    3.422893] ALSA device list:
[    3.425907]   #0: wm8960-audio
[    3.440842] EXT3-fs (mmcblk0p2): recovery required on readonly filesystem
[    3.447842] EXT3-fs (mmcblk0p2): write access will be enabled during recovery
[    3.538668] random: nonblocking pool is initialized
[    3.570873] kjournald starting.Commit interval 5 seconds
[    3.580632] EXT3-fs (mmcblk0p2): recovery complete
[    3.585462] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[    3.592553] VFS: Mounted root (ext3 filesystem) readonly on device 179:2.
[    3.602722] devtmpfs: mounted
[    3.606758] Freeing unused kernel memory: 388K (80a25000 - 80a86000)
Mounting /proc and /sys
Starting the hotplug events dispatcher udevd
Synthesizing initial hotplug even[    4.187084] udevd (106): /proc/106/oom_adj is deprecated, please use /proc/106/oom_.
ts
[    7.801921] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Setting the hostname to freescale
Running depmod
depmod: can't change directory to '3.14.38-6UL_ga-g5f0603cedf2': No such file or directory
Mounting filesystems
[    9.331676] EXT3-fs (mmcblk0p2): using internal journal
Starting inetd:
Starting syslogd and klogd
cat: can't open '/proc/boardname': No such file or directory
/etc/rc.d/rc.local: line 63: [: =: unary operator expected
[    9.786946] flexcan 2090000.can can0: writing ctrl=0x0e312085
[    9.818072] flexcan 2094000.can can1: writing ctrl=0x0e312085
Reconfiguring network inte**ces... ifdown: inte**ce lo not configured
ifdown: inte**ce eth0 not configured
ifdown: inte**ce eth1 not configured
RTNETLINK answers: File exists
[   10.088465] fec 20b4000.ethernet eth0: Freescale FEC PHY driver (mii_bus:phy_addr=20b400)
[   10.138794] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   10.328954] fec 2188000.ethernet eth1: Freescale FEC PHY driver (mii_bus:phy_addr=20b400)
[   10.368836] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
RTNETLINK answers: File exists
done.
alsactl: parse:1655: Unable to open file '/data0/imx6_linux/alsa/tmp/share/alsa/init/00main': No such file or directory
alsactl: set_control:1267: failed to obtain info for control #55 (No such file or directory)
xres = 1024, yres = 600


CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7.1 | VT102 | Offline | tty.usbserial                                 


gentheaven 发表于 2019-9-24 19:45:45

如果直接从nand启动,会发现rootfs不存在

3.219597] can: broadcast manager protocol (rev 20120528 t)
[    3.225418] can: netlink gateway (rev 20130117) max_hops=1
[    3.231603] Bluetooth: RFCOMM TTY layer initialized
[    3.236812] Bluetooth: RFCOMM socket layer initialized
[    3.242093] Bluetooth: RFCOMM ver 1.11
[    3.245898] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.251236] Bluetooth: BNEP filters: protocol multicast
[    3.256556] Bluetooth: BNEP socket layer initialized
[    3.261555] Bluetooth: HIDP (Human Inte**ce Emulation) ver 1.2
[    3.267559] Bluetooth: HIDP socket layer initialized
[    3.272681] 8021q: 802.1Q VLAN Support v1.8
[    3.277124] Key type dns_resolver registered
[    3.306181] gpio_dvfs: disabling
[    3.309467] vref-3v3: disabling
[    3.312748] usb_otg1_vbus: disabling
[    3.316355] VSD_3V3: disabling
[    3.319433] can-3v3: disabling
[    3.323085] regulator-dummy: disabling
[    3.327349] imx mcc test is registered.
[    3.333363] rtc-rx8010 0-0032: setting system clock to 2017-09-21 09:21:34 UTC (1505985694)
[    3.360545] ALSA device list:
[    3.363650]   #0: wm8960-audio
[    3.367696] yaffs: dev is 32505861 name is "mtdblock5" ro
[    3.373319] yaffs: passed flags ""
[    3.423800] random: nonblocking pool is initialized
[    3.965409] VFS: Mounted root (yaffs2 filesystem) readonly on device 31:5.
[    3.972652] devtmpfs: error mounting -2
[    3.977320] Freeing unused kernel memory: 396K (80a87000 - 80aea000)
[    3.991857] Kernel panic - not syncing: No working init found.Try passing init= option to kernel. See Linux Docume.

gentheaven 发表于 2019-9-24 20:54:56

U-Boot 2015.04-g56889c6 (Dec 25 2018 - 09:54:12)

CPU:   Freescale i.MX6UL rev1.2 at 396 MHz
CPU:   Temperature 54 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:256 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

Display: TFT70AB-800x480 (800x480)
Video: 800x480x24
Error: no valid bmp image at 83800000 cfb_console.c
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc0 is current device
Net:   FEC1
Error: FEC1 address not set.

Normal Boot
Hit any key to stop autoboot:0

gentheaven 发表于 2019-9-24 21:47:15

建议版主为mx6ul, 256M nand,更新最新的uboot二进制文件,同时更新烧写脚本。
有机会让用户选择无需校准。
现在网站上的uboot版本是 2015.04,不能选择disable校准。
对于没有屏幕的开发板,永远没机会校准。

gentheaven 发表于 2019-9-24 22:31:07

本帖最后由 gentheaven 于 2019-9-24 22:32 编辑

问题解决了。
用户资料\Linux\tools\SD\烧写\256Mnand\createSdcard-qt4.tar.bz2
createSdcard-qt4.tar.bz2 这个压缩包中的uboot版本很旧,不支持选择 Calibrate
1. Screen Type Menu or DTB
2. Change The Calibrate
0. Exit To Boot Shell
Enter your number:

可以使用网站上:用户资料\linux>镜像>uboot>256mnand>256Mdd
有最新的uboot二进制文件。
用这个文件和createSdcard-qt4.tar.bz2制作最新的烧录程序。

解压缩文件createSdcard-qt4.tar.bz2,
生成update.tar.bz2,再解压缩这个文件,生成update目录。
把update目录中sdrun 和 target子目录中的u-boot.imx 换成最新的。
然后,就在update目录下,执行
tar -cjf update.tar.bz2 *
mv update.tar.bz2 ..
然后在上一级目录,就可以执行
sudo ./createSdcard.sh
烧写SD卡成功之后。

把SD卡插入开发板,
boot的时候,立刻按空格键。

选择2. Change The Calibrate
再选择2. Not Calibrate
然后输入0,最后输入boot, 启动开发板

---------------MAIN MENU---------------
1. Screen Type Menu or DTB
2. Change The Calibrate
0. Exit To Boot Shell
Enter your number:
:2
---------------MENU OF CALIBRATION---------------
1. Calibrate
2. Not Calibrate
0. return


页: [1]
查看完整版本: SD卡不烧写Nand flash