请教V3S如何从W25N01GVZEIG启动,网上例程较多为spi nor flash ,如果使用nand flash需要如何配置?目前烧录到nand flash启动无反应,上电依然进入fel模式 请各位大佬赐教
离线
下方为配置的环境变量
vi include/configs/sun8i.h
#define CONFIG_BOOTCOMMAND "sf probe 0; " \
"sf read 0x41800000 0x100000 0x10000; " \
"sf read 0x41000000 0x110000 0x400000; " \
"bootz 0x41000000 - 0x41800000"
#define CONFIG_BOOTARGS "console=ttyS0,115200 earlyprintk panic=5 rootwait " \
"mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2"
离线
buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *,支持SPI NAND
https://whycan.com/t_5221.htmluboot 需要处理一下, 参考这个帖子.
非常感谢指教,看了帖子配置dts如下方(dts配置过多个方案均无果),makemenuconfig配置如下方 编译完成,用xfel将u-boot-sunxi-with-spl.bin 烧录到spi nand flash (W25N01GVZEIG),
主板上电依旧没有日志输出,直接进入fel模式,有更换过两个主板,基本排除硬件问题,而且用w25q128也能正常启动打印出日志
方案1 dts修改以下内容,测试结果上电无反应,进入fel模式
&spi0 {
status = "okay";
spi-nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <50000000>;
//status = "disabled";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x80000>;
read-only;
};
partition@1 {
label = "dtb";
reg = <0x80000 0x20000>;
read-only;
};
partition@2 {
label = "kernel";
reg = <0x100000 0x700000>;
read-only;
};
partition@3 {
label = "rom";
reg = <0x800000 0x4000000>;
read-only;
};
partition@4 {
label = "overlay";
reg = <0x4800000 0x3000000>;
};
};
};
};
方案2 dts修改以下内容,测试结果上电无反应,进入fel模式
// &spi0 {
// pinctrl-0 = <&spi0_pins>;
// pinctrl-names = "default";
// status = "okay";
// flash@0 {
// #address-cells = <1>;
// #size-cells = <1>;
// compatible = "spi-nand";
// reg = <0>;
// spi-max-frequency = <24000000>;
// };
// };
make menuconfig配置如下
→ Device Drivers → SPI Support ─
│ │ -y- Enable Driver Model for SPI drivers
│ │ [ ] Altera SPI driver (NEW)
│ │ [ ] Cadence QSPI driver (NEW)
│ │ [ ] Designware SPI driver (NEW)
│ │ [ ] Samsung Exynos SPI driver (NEW)
│ │ [ ] Freescale DSPI driver (NEW)
│ │ [ ] Intel ICH SPI driver (NEW)
│ │ [ ] Marvell Armada 3700 SPI driver (NEW)
│ │ [ ] Rockchip SPI driver (NEW)
│ │ [ ] Sandbox SPI driver (NEW)
│ │ [y] Allwinner SPI driver
│ │ [ ] nVidia Tegra114 SPI driver (NEW)
│ │ [ ] nVidia Tegra20 Serial Flash controller driver (NEW)
│ │ [ ] nVidia Tegra20/Tegra30 SLINK driver (NEW)
→ Device Drivers → SPI Flash Support ─
│ │ -y- Enable Driver Model for SPI flash
│ │ [ ] Support sandbox SPI flash device (NEW)
│ │ [y] Legacy SPI Flash Interface support
│ │ [ ] SPI flash Bank/Extended address register support (NEW)
│ │ [ ] Atmel SPI flash support (NEW)
│ │ [ ] EON SPI flash support (NEW)
│ │ [ ] GigaDevice SPI flash support (NEW)
│ │ [ ] Macronix SPI flash support (NEW)
│ │ [ ] Spansion SPI flash support (NEW)
│ │ [ ] STMicro SPI flash support (NEW)
│ │ [ ] SST SPI flash support (NEW)
│ │ [y] Winbond SPI flash support
│ │ [y] Use small 4096 B erase sectors (NEW)
│ │ [ ] AT45xxx DataFlash support (NEW)
[y] SPI Flash MTD support
→ Device Drivers → MTD Support ──
│ │ [y] Enable Driver Model for MTD drivers
│ │ [ ] Enable Driver Model for CFI Flash driver
│ │ [ ] Altera Generic Quad SPI Controller (NEW)
执行编译指令:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LicheePi_Zero_800x480LCD_defconfig
time make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 2>&1 | tee build.log
编译完成执行读取spi nand可以正常反馈信息
xfel spinand
Found spi nand flash 'W25N01GV' with 134217728 bytes
执行写入指令 xfel spinand write 0 u-boot-sunxi-with-spl.bin
主板断电后重新上电依然进入fel模式,并没有日志打印输出 也就是uboot启动失败?配置过程具体是哪一步有问题,烦请指教 感谢感谢
离线
大佬们麻烦解答下纳 没招了:(
离线
非常感谢解答,大佬能否再详细一点点呢,确实新手不太懂哎(V3V+spi nand flash W25N01GVZEIG)
刚刚看到一篇有大佬说
“spl 不能运行的问题是, 4k(或2k) page 当 1k 来读,所以你的 boot0无法启动,所以你写spi nand注意这个问题就可以了。”
我尝试以下方法把u-boot-sunxi-with-spl.bin用1k打包到flashimg.bin 下载进nand falsh上电依然进入fel
dd if=/dev/zero of=flashimg.bin bs=1M count=16
dd if=u-boot-sunxi-with-spl.bin of=flashimg.bin bs=1K conv=notrunc
xfel spinand erase 0 16777216
xfel spinand write 0 flashimg.bin
具体是哪一步还需要配置呢,大佬能否明示 感激不尽 抱拳!
离线
@hd_xyz
buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *,支持SPI NAND
https://whycan.com/t_5221.html这里面有处理 boot0 的脚本,你参考一下。
好的好的,非常感谢 我研究一下
离线