您尚未登录。

楼主 #1 2019-10-31 20:01:14

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

V3s SPI NAND u-boot @openwrt

您好所有赢家的策划者!

我在寻找此方式来编译u-boot时找到了这个论坛,我的V3可以直接从SPI-NAND引导。
我设法从SPI-NOR启动主线u-boot 2019.01,但不适用于SPI-NAND。 V3s BROM甚至不会启动u-boot SPL。

我已经找到了该视频 https://www.youtube.com/watch?v=IIbRWTCTslw ,但是所有链接都已消失。
我知道V3可以从此SPI-NAND进行引导,因为它在该nand上随附了boot0,boot1和一些u-boot 2011,并且可以引导。

我是否需要一些特殊的配置或其他补丁?

非常感谢!

您可以用中文回答,我将通过翻译进行:)

English:


Hello allwinner masterminds!

I found this forum while searching for a way to compile u-boot in such a way, that my V3s can boot directly from SPI-NAND.
I managed to boot mainline u-boot 2019.01 from SPI-NOR but it does not work with SPI-NAND. The V3s BROM does not even start the u-boot SPL.

I've found this video https://www.youtube.com/watch?v=IIbRWTCTslw but all links are dead.
I know the V3s can boot from this SPI-NAND because it was shipped with boot0, boot1 and some u-boot 2011 on this nand and it boots.

Do I need some special config or additional patches?

Many thanks!

You can answer in chinese, I will run it through a translator smile

离线

#2 2019-10-31 20:40:33

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

spl 不能运行的问题是, 4k(或2k) page 当 1k 来读,所以你的 boot0无法启动,所以你写spi nand注意这个问题就可以了。





离线

楼主 #3 2019-10-31 20:46:26

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

哦,所以我必须将spl块化为1k件? 非常感谢,将尝试!

Oh, so I have to chunk the spl to 1k pieces? Thank you very much, will try!

离线

#4 2019-10-31 20:52:52

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

对,这是我从全志官方烧录工具和固件得出的经验。





离线

#5 2019-10-31 21:02:37

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

spi nand 烧录方法: https://whycan.cn/t_2449.html#p19694





离线

楼主 #6 2019-10-31 22:33:45

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Thank you very much for the tipp with the 1k-chunked SPL! I wrote a script to chunk the spl for me and now the SPL comes up fine!

非常感谢您提供1k的SPL技巧! 我编写了一个脚本来为我分块spl,现在SPL正常了!

离线

#7 2019-10-31 22:42:17

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

可以分享你的脚本和烧录过程吗?





离线

#8 2019-10-31 22:42:56

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

u-boot 需要修改一些地方才能引导 kernel: https://whycan.cn/t_358.html#p26403





离线

楼主 #9 2019-11-01 03:33:17

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

晕哥 说:

可以分享你的脚本和烧录过程吗?

一旦设法使SPL和u-boot都运行,我将写一个不错的摘要。 不幸的是,我出差直到星期一。 但是,我保证我会尽快与您联系!

离线

#10 2019-11-01 08:11:16

ffplay
会员
注册时间: 2019-08-31
已发帖子: 92
积分: 92

Re: V3s SPI NAND u-boot @openwrt

楼主这是三下五除二就搞定了spi nand, 牛叉牛叉。

离线

#11 2019-11-01 08:13:34

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

niubility(牛逼)!

离线

#12 2019-11-01 09:54:18

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 363
积分: 312

Re: V3s SPI NAND u-boot @openwrt

牛逼,这令人羡慕的英文。uboot的spl的spi只有flash的驱动还需要魔改,还有就是即使2019.7月env也不支持spi nand,只能写到uboot内部

离线

楼主 #13 2019-11-02 14:37:50

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Im currently writing an SPL to load u-boot from spi-nand. Already made some great progress. My 1k-page chunking script for the SPL works fine, too. I hope I can finish my work on monday or tuesday. Then I will make my patches and scripts public and try to get it to mainstream.

我目前正在编写SPL以从spi-nand加载u-boot。 已经取得了很大的进步。 我的SPL 1k页分块脚本也可以正常工作。 我希望我能在星期一或星期二完成工作。 然后,我将公开我的补丁程序和脚本,并尝试使其成为主流。

离线

#14 2019-11-02 14:45:32

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

期待,坐等大神的补丁。

离线

楼主 #15 2019-11-04 23:58:45

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Quick update: The spi-nand SPL works fine and loads u-boot perfectly. Im working on booting to linux tomorrow. Should be very easy and pretty straight forward.
I'll keep you updated.

快速更新:spi-nand SPL 工作正常,完美加载u-boot。 我正在明天启动到linux。 应该很容易和非常直截了当。
我会及时通知你

离线

楼主 #16 2019-11-06 20:57:19

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Success!
I finally booted everything from spi-nand.
My fork of openwrt (still a bit messy and not cleaned up) contains all changes: https://github.com/bhorn/openwrt/tree/dolphinpi-spinand
The SPL-chunking-script is embedded in the mach-sunxi generation process https://github.com/bhorn/openwrt/blob/dolphinpi-spinand/target/linux/sunxi/image/gen_sunxi_spinand_img.sh and OpenWRT creates a ready-to-use image file to burn to the spi-nand.
The spi-nand-spl loader is located at https://github.com/bhorn/openwrt/blob/dolphinpi-spinand/package/boot/uboot-sunxi/src/arch/arm/mach-sunxi/spl_spinand_sunxi.c and targets u-boot-2019.10
My development-board is the DolphinPi so just search for dolphinpi and you will find all other configs and customization done. If I can find some time the next days I will try to write an elaborate blog post with "how-to" compile everything correctly.
Don't hesitate to ask questions if you need help building or flashing. I just boot the board from SD and then burn the image with
gzip -cd /root/openwrt-[...]-squashfs.img.gz | mtd write - /dev/mtd0
When mtd0 is the whole spi-nand in one partition.

成功!
我终于从spi-nand引导了一切。
我的分叉openwrt(仍然有点凌乱,没有清理)包含所有更改:https://github.com/bhorn/openwrt/tree/dolphinpi-spinand
SPL-chunking-脚本嵌入在mach-sunxi生成过程中https://github.com/bhorn/openwrt/blob/dolphinpi-spinand/target/linux/sunxi/image/gen_sunxi_spinand_img.sh 和OpenWRT创建一个随时可用的图像文件刻录到spi-nand。
Spi-nand-spl装载机位于https://github.com/bhorn/openwrt/blob/dolphinpi-spinand/package/boot/uboot-sunxi/src/arch/arm/mach-sunxi/spl_spinand_sunxi.c 和目标u-boot-2019.10
我的开发板是DolphinPi,所以只需搜索dolphinpi,你会发现所有其他配置和定制完成。 如果我能在接下来的几天找到一些时间,我会尝试写一篇精心制作的博客文章,其中包含"how-to"正确编译所有内容。
如果您需要帮助建立或闪烁,请不要犹豫,提出问题。 我只是从SD启动主板,然后刻录图像
gzip-cd/root/openwrt-[...-squashfs.img。gz|mtd写入-/dev/mtd0
当mtd0是整个spi-nand在一个分区。

离线

#17 2019-11-06 21:26:04

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde 感谢你的分享!





离线

#18 2019-11-06 21:47:44

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde 这个openwrt 我应该如何编译呢?是不是一键就生成了烧录的bin文件?

然后用一张特殊的 TF 卡启动烧录到 SPI NAND 吗?

TF卡启动之后会自动执行这个命令吗:

gzip -cd /root/openwrt-[...]-squashfs.img.gz | mtd write - /dev/mtd0

离线

楼主 #19 2019-11-06 22:29:53

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

@xgui

Like every other OpenWRT, clone the repo,

git clone https://github.com/bhorn/openwrt
cd openwrt
git checkout dolphinpi-spinand

run

make menuconfig

make sure your config targets the V3s and the "Dolphin Pi":

  │ │                             Target System (Allwinner A1x/A20/A3x/R40/V3s)  --->
  │ │                             Subtarget (Allwinner A20/A3x/R40/V3s)  --->
  │ │                             Target Profile (Petit-Miner Dolphin Pi)  --->

The devicetree of the dolpinpi
also activate

> Base System > mtd
> Kernel modules > SPI Support > kmod-spi-dev 

then run

make

one file shoud appear:

bin/targets/sunxi/cortexa7/openwrt-snapshot-r11418-9eef37be78-sunxi-cortexa7-sun8i-v3s-dolphinpi-squashfs-spinand.img.gz

Now you need an sd-card image for your V3s that can access the spi-nand. To build an image capable of burning to spi-nand, look at the next post.

Then copy the spinand.img.gz to the V3s file-system of the sd-card (e.g. to /root/spinand.img.gz) and boot the V3s from the sd-card.
Now you can run

gzip -cd /root/spinand.img.gz | mtd write - /dev/mtd0

Now you have burned the spinand image to the spi-nand and should be able to boot from it.

最近编辑记录 bamkrsde (2019-11-06 23:29:34)

离线

楼主 #20 2019-11-06 23:28:18

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Hey,

I updated the repository. I added an generic V3s device image that will boot from sd-card and can access the spi-nand for burning purposes (warning: output is on uart2!)
The ready-to-use-config is available in the repository, too: https://github.com/bhorn/openwrt/blob/dolphinpi-spinand/sdwithspinandaccess.config

git clone https://github.com/bhorn/openwrt
cd openwrt
git checkout dolphinpi-spinand
cp sdwithspinandaccess.config .config
make menuconfig
# no need to change anything, just save and exit
make
# Image is located in bin/targets/sunxi/cortexa7/openwrt-snapshot-[...]-sunxi-cortexa7-sun8i-v3s-rawspinandaccessuart2-ext4-sdcard.img.gz

Build this image and burn it to the sd-card. With this sd-card you can run the command to burn the image like in the previous post.


To change uart2 to uart0 change:
* CONFIG_CONS_INDEX=3 to CONFIG_CONS_INDEX=0 in GenericV3sBoard_SPINAND_UART2_defconfig
* serial2 = &uart2; to serial2 = &uart0; in sun8i-v4s-rawspinandaccessuart2.dts (both u-boot and kernel)

最近编辑记录 bamkrsde (2019-11-06 23:37:45)

离线

#21 2019-11-07 06:42:03

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde 太棒了, 感谢无私分享!

离线

#22 2019-11-07 07:21:41

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

QQ截图20191107071024.pngQQ截图20191107071053.pngQQ截图20191107071210.pngQQ截图20191107071233.pngQQ截图20191107071845.png





离线

#23 2019-11-07 09:18:49

LinjieGuo
Moderator
注册时间: 2019-07-24
已发帖子: 565
积分: 570
个人网站

Re: V3s SPI NAND u-boot @openwrt

感谢大神的技术分享。

离线

#24 2019-11-07 14:53:07

我思故我在
会员
注册时间: 2019-09-03
已发帖子: 244
积分: 243.5

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde 感谢分享!我看你用的是海豚派(dolphinpi)的V3s开发板, 请问板上的ESP8089驱动了吗?是不是用这个开发板做WIFI中继?

离线

楼主 #25 2019-11-07 17:24:34

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

我思故我在 说:

@bamkrsde 感谢分享!我看你用的是海豚派(dolphinpi)的V3s开发板, 请问板上的ESP8089驱动了吗?是不是用这个开发板做WIFI中继?

I havent tested it yet but it should be pretty straight forward.

https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/net/wireless/esp,esp8089.txt

I will try to implement it and will update the repository accordingly.

离线

#26 2019-11-07 17:43:58

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

https://whycan.cn/t_2091.html#p19696

ESP8089 驱动会奔溃(driver panic)

离线

#27 2019-11-07 17:45:22

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

按楼主的步奏,我编译成功了: https://whycan.cn/t_3168.html#p27029

离线

#28 2019-11-07 21:09:23

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

QQ图片20191107210537.jpg

QQ截图20191107210605.png

我焊上了 GD5F1GQ4UCYIG, 期待 ID 是: C8 B1 48, 可是linux log提示: unknown raw ID e458a464:

[    1.121140] loop: module loaded
[    1.131309] spi-nand spi0.0: unknown raw ID e458a464
[    1.137088] spi-nand: probe of spi0.0 failed with error -524
[    1.144842] libphy: Fixed MDIO Bus: probed
[    1.150935] dwmac-sun8i 1c30000.ethernet: PTP uses main clock

不知道是不是没有焊接好?

离线

楼主 #29 2019-11-07 21:22:18

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

I checked the datasheet. The GD5F1GQ4UCYIG is not compatible with the SPL. It uses a different cache-addressing scheme. Unfortunatly I won't be able to implement support for other chips currently. I have ordered some other SPI-NAND chips. When they arrive, I'll refactor the driver to easily implement other chips.
The next chip I'll implement to the SPL is the W25N01GV. However, this won't be until next week when the chips arrive.
For your error

[    1.131309] spi-nand spi0.0: unknown raw ID e458a464
[    1.137088] spi-nand: probe of spi0.0 failed with error -524

I don't know what this error means. Its something out of my scope, seems to be a problem with the linux-kernel mtd-driver.

最近编辑记录 bamkrsde (2019-11-07 21:42:46)

离线

楼主 #30 2019-11-07 21:34:25

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

我思故我在 说:

@bamkrsde 感谢分享!我看你用的是海豚派(dolphinpi)的V3s开发板, 请问板上的ESP8089驱动了吗?是不是用这个开发板做WIFI中继?

So there is no driver for the ESP8089 in mainline. The one driver I found won't compile. Sorry I don't have any more time to further dig down to this sad
However, I updated the devicetree to implement some more DolphinPi components. I also added the ESP8089 to the Devicetree. So it should be running if you manage to compile a kernel smile

离线

#31 2019-11-07 22:14:41

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

QQ图片20191107221051.jpg

QQ截图20191107220748.png


我重新找了一片旧板子, 用 @晕哥 linux5.1的 usb启动 固件, 控制台是 UART0, log显示spi nand 正常, 可以变成一个U盘(USB DISK)

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.1.0-rc4-00035-g0b5cbfb-dirty (root@test4) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7n May 6 03:51:59 EDT 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
....
[    0.904750] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[    0.916248] spi-nand spi0.0: GigaDevice SPI NAND was found.
[    0.921916] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    0.932856] libphy: Fixed MDIO Bus: probed




但是用 openwrt 的 sd card img:

[    1.101827] console [ttyS0] enabled
[    1.119819] loop: module loaded
[    1.129893] spi-nand spi0.0: unknown raw ID 006478e4
[    1.134904] spi-nand: probe of spi0.0 failed with error -524
[    1.143418] libphy: Fixed MDIO Bus: probed
[    1.149457] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.155776] dwmac-sun8i 1c30000.ethernet: No regulator found

离线

#32 2019-11-07 22:25:15

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

QQ图片20191107222309.jpg

我另外一块V3s + Winbond W25N01 的板子, 用上面的USB启动, 能在电脑端看到128M的U盘,但是用openwrt也是一样的结果:

[    1.103306] console [ttyS0] enabled
[    1.121267] loop: module loaded
[    1.131387] spi-nand spi0.0: unknown raw ID 006faa20
[    1.137160] spi-nand: probe of spi0.0 failed with error -524
[    1.144897] libphy: Fixed MDIO Bus: probed
[    1.150980] dwmac-sun8i 1c30000.ethernet: PTP uses main clock

离线

#33 2019-11-07 22:31:44

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

W25N01.pdf

根据这个手册, 应该输出 00EFAA21 才对, 实际上是显示006faa20, 我可以保证硬件没有问题.

离线

#34 2019-11-07 23:04:54

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

最新消息, 我用 v3s_s3_fel_autorun_linux_uart0_pb8_pb9_201905018_spinand_OK.7z 配合 Win32DiskImager 把 openwrt-sunxi-cortexa7-sun8i-v3s-dolphinpi-ext4-spinand.img.gz 文件写入U盘, spl可以启动,然后挂了:

W25N01, GD5F1GQ4UCYIG 都是一样的结果:

U-Boot SPL 2019.10 (Nov 06 2019 - 15:22:33 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Unknown chip aaef
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

期待楼主把其他 SPI NAND 都测试一遍 ^_^

QQ截图20191107230606.png

离线

楼主 #35 2019-11-07 23:34:58

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

xgui 说:
U-Boot SPL 2019.10 (Nov 06 2019 - 15:22:33 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Unknown chip aaef
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Great that you managed to burn the image! Thats the expected output smile
As I said, I will start refactoring the driver next week when my new spi-nand-chips arrive. My plan is to generalize the driver thus adding new chips is very easy to do. I will try to implement the GD5F1GQ4UCYIG, too. It seems like its just a matter of bit shifting for the address calculation.

When the chip is supported (just the mx35lf1ge atm) it will look something like this:

U-Boot SPL 2019.10 (Nov 07 2019 - 13:32:46 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found 1Gb Macronix MX35LF1GE4AB (12c2)


U-Boot 2019.10 (Nov 07 2019 - 13:32:46 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Dolphin Pi
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Macronix SPI NAND was found.
128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Reading 4194304 byte(s) (2048 page(s)) at offset 0x00110000
Reading 65536 byte(s) (32 page(s)) at offset 0x00100000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   ARM OpenWrt Linux-4.19.81
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3045768 Bytes = 2.9 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Kernel Image
   Loading Device Tree to 42dfa000, end 42dff97e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.81 (bam@bamdevsrv) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r11277-99e21ac05a)) #0 SMP PREEMPT Thu Nov 7 13:32:46 2019

...

[    1.144587] spi-nand spi0.0: Macronix SPI NAND was found.
[    1.150031] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.159658] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.166472] Creating 4 MTD partitions on "spi0.0":
[    1.171304] 0x000000000000-0x000000100000 : "u-boot"
[    1.180135] 0x000000100000-0x000000110000 : "dtb"
[    1.187830] 0x000000110000-0x000000510000 : "kernel"
[    1.205698] 0x000000510000-0x000008000000 : "rootfs"
[    1.405708] mtd: device 3 (rootfs) set to be root filesystem

...

最近编辑记录 bamkrsde (2019-11-07 23:38:53)

离线

#36 2019-11-08 08:25:50

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde 感谢回复, 发现立创商城也有mx35lf1ge这个芯片出售, https://so.szlcsc.com/global.html?k=mx35lf1ge

批量价7¥人民币, 我晚点下单去买两个.

2019-11-08_082327.png


还有一个问题我没有明白, 在 Linux driver 里面已经支持了市面上所有spi nand 芯片, 为什么你的固件只支持 mx35lf1ge 这一个呢?

前面@晕哥 提供的固件就支持了好几种spi nand芯片。

离线

#37 2019-11-08 08:58:02

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

2019-11-08_085655.png

已经下单,坐等收货,明天应该可以拿到芯片焊上。

离线

#38 2019-11-08 09:41:13

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 363
积分: 312

Re: V3s SPI NAND u-boot @openwrt

你们频率配的多少哦,这个问题我遇到过,一般是没焊好,降频应该是没问题的

离线

楼主 #39 2019-11-08 15:10:41

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

xgui 说:

还有一个问题我没有明白, 在 Linux driver 里面已经支持了市面上所有spi nand 芯片, 为什么你的固件只支持 mx35lf1ge 这一个呢?

shaoxi2010 说:

你们频率配的多少哦,这个问题我遇到过,一般是没焊好,降频应该是没问题的

That might be possible! We have a very clean layout on the DolphinPi layout. 100mhz SPI clock is no problem here. But you may need to tweak the clock for you board! Maybe tweak https://github.com/bhorn/openwrt/blob/dolphinpi-spinand/target/linux/sunxi/files-4.19/arch/arm/boot/dts/sun8i-v3s-rawspinandaccessuart2.dts#L111 down to 50mhz or 24mhz. egon is working with 6mhz and the SPL is working with 24mhz. Looking at you output, 24mhz seems to work fine for you. You could try that!

离线

#40 2019-11-08 15:20:20

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

有道理,SPI 时钟频率是有可能的,怪不得 SPI NAND 的芯片 ID与datasheet有点相似.

离线

#41 2019-11-08 16:32:33

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 363
积分: 312

Re: V3s SPI NAND u-boot @openwrt

xgui 说:

有道理,SPI 时钟频率是有可能的,怪不得 SPI NAND 的芯片 ID与datasheet有点相似.

这个问题我之前在群上问过大佬,现象和你的是一样的,经过我测试到最高频率只能设置到75M,高于这个就玩蛋,用的芒果派。
改的华邦的SPI NAND。

离线

楼主 #42 2019-11-08 22:18:58

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

shaoxi2010 说:

这个问题我之前在群上问过大佬,现象和你的是一样的,经过我测试到最高频率只能设置到75M,高于这个就玩蛋,用的芒果派。
改的华邦的SPI NAND。

xgui 说:

有道理,SPI 时钟频率是有可能的,怪不得 SPI NAND 的芯片 ID与datasheet有点相似.

Hey! I updated the repository! I already refactored the SPI-NAND-SPL to accept new chips and also added support for generic chips with a page size of 2K. I also added the support for W25N01 and GD5F1GQ4UCYIG, but wasn't able to test it.
So W25N01, GD5F1GQ4UCYIG and other chips with 2k page size should work now! @xgui it would be very nice of you if you could test those chips if you have any. My W25N01 won't arrive till next week...

I also clocked down the SPI clock for the SD-Card image to 50mhz. Thus more sketchy layouts should be no problem!

最近编辑记录 bamkrsde (2019-11-08 22:19:09)

离线

#43 2019-11-08 23:29:42

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

QQ图片20191108232718.jpg

QQ图片20191108232650.jpg

@bamkrsde 嗯,我收到了立创商城寄的mx35lf1ge, 直接焊上了, 没有重新编译, 还是用 v3s_s3_fel_autorun_linux_uart0_pb8_pb9_201905018_spinand_OK.7z 配合 Win32DiskImager 把 openwrt-sunxi-cortexa7-sun8i-v3s-dolphinpi-ext4-spinand.img.gz 文件写入U盘, 可以启动,然后挂了(go die):

first board log:

U-Boot SPL 2019.10 (Nov 06 2019 - 15:22:33 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found 1Gb Macronix MX35LF1GE4AB (12c2)


U-Boot 2019.10 (Nov 06 2019 - 15:22:33 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Dolphin Pi
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Macronix SPI NAND was found.
128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Reading 4194304 byte(s) (2048 page(s)) at offset 0x00110000
Reading 65536 byte(s) (32 page(s)) at offset 0x00100000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   ARM OpenWrt Linux-4.19.81
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2926488 Bytes = 2.8 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Kernel Image
   Loading Device Tree to 42dfa000, end 42dff564 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.81 (root@test5) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r11430-68d12ac1fe)) #0 SMP PREEMPT Wed Nov 6 15:22:33 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Dolphin PI
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0x7c/0x42c with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s31244 r8192 d22004 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line:
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53872K/65536K available (5928K kernel code, 396K rwdata, 1644K rodata, 2048K init, 242K bss, 11664K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7945 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 397 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 243 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000021] Switching to timer-based delay loop, resolution 41ns
[    0.000247] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000449] Console: colour dummy device 80x30
[    0.000983] console [tty0] enabled
[    0.001038] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001074] pid_max: default: 32768 minimum: 301
[    0.001253] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001283] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002283] CPU: Testing write buffer coherency: ok
[    0.002866] /cpus/cpu@0 missing clock-frequency property
[    0.002918] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060215] Setting up static identity map for 0x40200000 - 0x40200060
[    0.080217] rcu: Hierarchical SRCU implementation.
[    0.120345] smp: Bringing up secondary CPUs ...
[    0.120396] smp: Brought up 1 node, 1 CPU
[    0.120415] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.120433] CPU: All CPU(s) started in HYP mode.
[    0.120447] CPU: Virtualization extensions available.
[    0.130506] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.131269] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.131336] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.131712] pinctrl core: initialized pinctrl subsystem
[    0.132932] NET: Registered protocol family 16
[    0.133351] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.134476] No ATAGs?
[    0.194247] SCSI subsystem initialized
[    0.194721] usbcore: registered new interface driver usbfs
[    0.194821] usbcore: registered new interface driver hub
[    0.196717] usbcore: registered new device driver usb
[    0.197651] pps_core: LinuxPPS API ver. 1 registered
[    0.197699] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.197899] PTP clock support registered
[    0.199511] Advanced Linux Sound Architecture Driver Initialized.
[    0.205121] clocksource: Switched to clocksource arch_sys_counter
[    0.235036] NET: Registered protocol family 2
[    0.237363] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.237449] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.237489] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.237525] TCP: Hash tables configured (established 1024 bind 1024)
[    0.237701] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.237770] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.238078] NET: Registered protocol family 1
[    0.238511] kvm [1]: 8-bit VMID
[    0.239548] kvm [1]: Hyp mode initialized successfully
[    0.242453] No memory allocated for crashlog
[    0.243570] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.271888] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.272487] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.300972] io scheduler noop registered
[    0.301021] io scheduler deadline registered
[    0.301310] io scheduler cfq registered (default)
[    0.302194] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.308932] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.513447] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.541364] 1c28800.serial: ttyS0 at MMIO 0x1c28800 (irq = 30, base_baud = 1500000) is a U6_16550A
[    1.099019] console [ttyS0] enabled
[    1.117046] loop: module loaded
[    1.127192] spi-nand spi0.0: Macronix SPI NAND was found.
[    1.132635] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.142260] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.149054] Creating 4 MTD partitions on "spi0.0":
[    1.153888] 0x000000000000-0x000000100000 : "u-boot"
[    1.162762] 0x000000100000-0x000000110000 : "dtb"
[    1.170464] 0x000000110000-0x000000510000 : "kernel"
[    1.178289] random: fast init done
[    1.188154] 0x000000510000-0x000008000000 : "rootfs"
[    1.391344] mtd: device 3 (rootfs) set to be root filesystem
[    1.398237] mtdsplit: no squashfs found in "rootfs"
[    1.405643] libphy: Fixed MDIO Bus: probed
[    1.411370] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.417467] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.433782] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.441188] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.448525] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.453500] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.460316] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.465996] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.471679] dwmac-sun8i 1c30000.ethernet (unnamed net_device) (uninitialized): device MAC address 5a:99:4a:6f:94:54
[    1.482623] libphy: stmmac: probed
[    1.487657] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.494612] libphy: mdio_mux: probed
[    1.498425] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.504801] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.610981] dwmac-sun8i 1c30000.ethernet: EMAC reset timeout
[    1.617068] dwmac-sun8i 1c30000.ethernet: Error: Failed to register MDIO bus for child /soc/ethernet@1c30000/mdio-mux/mdio@1
[    1.628595] dwmac-sun8i 1c30000.ethernet: Error: No acceptable child buses found
[    1.636123] dwmac-sun8i 1c30000.ethernet: Failed to register mux
[    1.643252] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.650346] ehci-platform: EHCI generic platform driver
[    1.656144] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.662437] ohci-platform: OHCI generic platform driver
[    1.668654] usbcore: registered new interface driver usb-storage
[    1.676223] mousedev: PS/2 mouse device common for all mice
[    1.683453] i2c /dev entries driver
[    1.689483] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.700452] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.734544] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.748787] NET: Registered protocol family 10
[    1.766142] Segment Routing with IPv6
[    1.769949] NET: Registered protocol family 17
[    1.774478] can: controller area network core (rev 20170425 abi 9)
[    1.781814] NET: Registered protocol family 29
[    1.786734] 8021q: 802.1Q VLAN Support v1.8
[    1.790993] Registering SWP/SWPB emulation handler
[    1.804486] hctosys: unable to open rtc device (rtc0)
[    1.810155] ALSA device list:
[    1.813156]   No soundcards found.
[    1.819214] random: crng init done
[    1.848699] EXT4-fs (mtdblock3): mounted filesystem without journal. Opts: (null)
[    1.862355] VFS: Mounted root (ext4 filesystem) readonly on device 31:3.
[    1.879659] Freeing unused kernel memory: 2048K
[    1.892064] Run /sbin/init as init process
[    2.491845] init: Console is alive
[    2.495869] init: - watchdog -
[    2.991315] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.998738] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.016715] init: - preinit -
[    3.801329] libphy: PHY stmmac-0:00 not found
[    3.806010] platform 1c30000.ethernet eth0: Could not attach to PHY
[    3.812303] platform 1c30000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
ip: SIOCSIFFLAGS: No such device
sendto(): Network unreachable
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    6.977190] mount_root: Could not open mtd device: /dev/mtd3
[    6.982987] mount_root: reading rootfs failed
[    6.987684] mount_root: mounting /dev/root
[    7.007906] urandom-seed: Seed file not found (/etc/urandom.seed)
[    7.087687] procd: - early -
[    7.090759] procd: - watchdog -
[    8.496679] procd: - watchdog -
[    8.500294] procd: - ubus -
[    8.559004] procd: - init -
Please press Enter to activate this console.
[    9.052689] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.193019] urngd: v1.0.1 started.
[    9.295762] xt_time: kernel timezone is -0000
[    9.330440] PPP generic driver version 2.4.2
[    9.338350] NET: Registered protocol family 24
[    9.360056] kmodloader: done loading kernel modules from /etc/modules.d/*
[   13.500533] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[   13.515118] pgd = 9b1f735a
[   13.517838] [00000000] *pgd=43039003, *pmd=43aa7003, *pte=00000000
[   13.524045] Internal error: Oops: 207 [#1] PREEMPT SMP ARM
[   13.529532] Modules linked in: pppoe ppp_async iptable_nat ipt_MASQUERADE xt_state xt_nat xt_conntrack xt_REDIRECT xt_FLOWOFFLOAD pppox ppp_generic nf_nat_ipv4 nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack ipt_REJECT xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt rtc_sunxi nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6
[   13.578038] CPU: 0 PID: 1 Comm: procd Not tainted 4.19.81 #0
[   13.583701] Hardware name: Allwinner sun8i Family
[   13.588425] PC is at sunxi_wdt_ping+0x14/0x2c
[   13.592787] LR is at sunxi_wdt_ping+0x14/0x2c
[   13.597146] pc : [<c063430c>]    lr : [<c063430c>]    psr: 60000013
[   13.603413] sp : c3839e98  ip : 82416480  fp : 00000003
[   13.608639] r10: 2463a4a8  r9 : c3a6c300  r8 : c3a6c3ac
[   13.613866] r7 : 00000001  r6 : fa5518d4  r5 : 00000000  r4 : c48a2ca0
[   13.620394] r3 : 00000000  r2 : c08168b4  r1 : 00000003  r0 : c3a6c100
[   13.626924] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   13.634060] Control: 30c5387d  Table: 43151200  DAC: fffffffd
[   13.639809] Process procd (pid: 1, stack limit = 0x3214faef)
[   13.645471] Stack: (0xc3839e98 to 0xc383a000)
[   13.649832] 9e80:                                                       c3a6c100 c3a6c300
[   13.658016] 9ea0: fa5518d4 c0632ff8 00000000 c3a6c100 c3a6c300 ffffe000 00000001 00000001
[   13.666199] 9ec0: c3a6c344 ffffe000 00000001 c3a6c3ac c3a6c300 00000004 00000001 c0633210
[   13.674382] 9ee0: 00000001 c063316c 0001b82f c3839f80 00000000 00000000 00000004 c03482a4
[   13.682565] 9f00: 0010ad85 00000000 c314c414 00000001 24523af9 00000003 0000000d 00000000
[   13.690748] 9f20: 1d75f8f9 00000000 0000000c 00000000 17eae7b9 00000000 00000001 c3834000
[   13.698931] 9f40: c025d6ec 00000100 00000200 00000001 c3bcd240 0001b82f c3839f80 c034854c
[   13.707114] 9f60: 0000015a c0201324 c3bcd240 c3bcd240 0001b82f 00000001 00000000 c034873c
[   13.715297] 9f80: 00000000 00000000 00000006 00000000 00000000 0002e004 00000004 c0201324
[   13.723480] 9fa0: c3838000 c0201120 00000000 00000000 00000003 0001b82f 00000001 00000000
[   13.731662] 9fc0: 00000000 00000000 0002e004 00000004 ffffffff 00000000 0000201d 00000001
[   13.739846] 9fe0: beee5df0 beee5de0 b6f0cf48 b6f0c418 60000010 00000003 00000000 00000000
[   13.748045] [<c063430c>] (sunxi_wdt_ping) from [<c0632ff8>] (__watchdog_ping+0x84/0x1a8)
[   13.756146] [<c0632ff8>] (__watchdog_ping) from [<c0633210>] (watchdog_write+0xa4/0xc8)
[   13.764163] [<c0633210>] (watchdog_write) from [<c03482a4>] (__vfs_write+0x1c/0x138)
[   13.771917] [<c03482a4>] (__vfs_write) from [<c034854c>] (vfs_write+0xb4/0x170)
[   13.779234] [<c034854c>] (vfs_write) from [<c034873c>] (ksys_write+0x50/0x9c)
[   13.786378] [<c034873c>] (ksys_write) from [<c0201120>] (ret_fast_syscall+0x0/0x4c)
[   13.794036] Exception stack(0xc3839fa8 to 0xc3839ff0)
[   13.799092] 9fa0:                   00000000 00000000 00000003 0001b82f 00000001 00000000
[   13.807275] 9fc0: 00000000 00000000 0002e004 00000004 ffffffff 00000000 0000201d 00000001
[   13.815456] 9fe0: beee5df0 beee5de0 b6f0cf48 b6f0c418
[   13.820516] Code: e590304c e1c346d0 f57ff04e ebefe620 (e5d52000)
[   14.145132] ---[ end trace 1f0f0284e0e109fc ]---
[   14.149791] Kernel panic - not syncing: Fatal exception
[   14.155035] Rebooting in 3 seconds..
[   17.158667] Unable to handle kernel NULL pointer dereference at virtual address 00000001
[   17.166765] pgd = 9b1f735a
[   17.169476] [00000001] *pgd=43039003, *pmd=43aa7003, *pte=00000000
[   17.175674] Internal error: Oops: 207 [#2] PREEMPT SMP ARM
[   17.181159] Modules linked in: pppoe ppp_async iptable_nat ipt_MASQUERADE xt_state xt_nat xt_conntrack xt_REDIRECT xt_FLOWOFFLOAD pppox ppp_generic nf_nat_ipv4 nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack ipt_REJECT xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt rtc_sunxi nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6
[   17.229648] CPU: 0 PID: 1 Comm: procd Tainted: G      D           4.19.81 #0
[   17.236696] Hardware name: Allwinner sun8i Family
[   17.241419] PC is at sunxi_wdt_restart+0x10/0xe4
[   17.246041] LR is at watchdog_restart_notifier+0x18/0x28
[   17.251353] pc : [<c0634224>]    lr : [<c0632a48>]    psr: a0000193
[   17.257620] sp : c3839cb0  ip : 00000000  fp : 00000000
[   17.262846] r10: 0ccccb60  r9 : c093291c  r8 : c48a2ca0
[   17.268072] r7 : 00000000  r6 : 00000000  r5 : fffffffe  r4 : 00000000
[   17.274600] r3 : c3a6c100  r2 : 00000000  r1 : 00000000  r0 : c3a6c100
[   17.281130] Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   17.288354] Control: 30c5387d  Table: 43151200  DAC: fffffffd
[   17.294102] Process procd (pid: 1, stack limit = 0x3214faef)
[   17.299764] Stack: (0xc3839cb0 to 0xc383a000)
[   17.304125] 9ca0:                                     00000000 fffffffe 00000000 00000000
[   17.312308] 9cc0: 00000000 c0632a48 00000000 c02575ec c0c64278 00000000 00000000 00000bb8
[   17.320491] 9ce0: c0c0a434 c0257820 00000000 00000000 00000000 c0c63968 00000bb8 c0226950
[   17.328674] 9d00: 00000001 c0c63968 00000bb8 c023a8e4 00000000 c3839d2c c0c09e64 0000000b
[   17.336856] 9d20: ffffe000 c0227e4c c08cf6c0 03599000 00000000 00000001 c3838210 0000000b
[   17.345039] 9d40: c3124800 00000000 c3839e48 00000207 c3124800 00000207 00010000 c312483c
[   17.353222] 9d60: 00000014 c022bec0 00000000 c022c150 c0c04cbc e37a0ee2 00000002 00000000
[   17.361405] 9d80: c3bbf200 c0c09f94 00000207 c022bed0 00000000 c3839e48 c3838000 2463a4a8
[   17.369588] 9da0: 00000003 c022c320 06e2fb84 00000000 e37a0ee2 c3bbf180 c3834080 c3bbf200
[   17.377771] 9dc0: c3fe8e00 c07cd7bc c0c04cbc c3fe8d80 c0c04cbc c026ace4 c39d8540 800c000a
[   17.385954] 9de0: 00000004 c39d8540 00000004 c07b763c 00000003 00ffffff 00000000 fffffffe
[   17.394136] 9e00: 00000000 c02575ec c0c633bc 00000002 c3314000 00000000 c3fe8d80 c3834000
[   17.402319] 9e20: c3bbf180 00000000 c3124800 ffffe000 c063430c 60000013 ffffffff c3839e7c
[   17.410502] 9e40: c3a6c3ac c0201ab0 c3a6c100 00000003 c08168b4 00000000 c48a2ca0 00000000
[   17.418685] 9e60: fa5518d4 00000001 c3a6c3ac c3a6c300 2463a4a8 00000003 82416480 c3839e98
[   17.426868] 9e80: c063430c c063430c 60000013 ffffffff c48a2ca0 bf000000 c3a6c100 c3a6c300
[   17.435051] 9ea0: fa5518d4 c0632ff8 00000000 c3a6c100 c3a6c300 ffffe000 00000001 00000001
[   17.443233] 9ec0: c3a6c344 ffffe000 00000001 c3a6c3ac c3a6c300 00000004 00000001 c0633210
[   17.451416] 9ee0: 00000001 c063316c 0001b82f c3839f80 00000000 00000000 00000004 c03482a4
[   17.459598] 9f00: 0010ad85 00000000 c314c414 00000001 24523af9 00000003 0000000d 00000000
[   17.467780] 9f20: 1d75f8f9 00000000 0000000c 00000000 17eae7b9 00000000 00000001 c3834000
[   17.475964] 9f40: c025d6ec 00000100 00000200 00000001 c3bcd240 0001b82f c3839f80 c034854c
[   17.484146] 9f60: 0000015a c0201324 c3bcd240 c3bcd240 0001b82f 00000001 00000000 c034873c
[   17.492329] 9f80: 00000000 00000000 00000006 00000000 00000000 0002e004 00000004 c0201324
[   17.500511] 9fa0: c3838000 c0201120 00000000 00000000 00000003 0001b82f 00000001 00000000
[   17.508693] 9fc0: 00000000 00000000 0002e004 00000004 ffffffff 00000000 0000201d 00000001
[   17.516876] 9fe0: beee5df0 beee5de0 b6f0cf48 b6f0c418 60000010 00000003 00000000 00000000
[   17.525071] [<c0634224>] (sunxi_wdt_restart) from [<c0632a48>] (watchdog_restart_notifier+0x18/0x28)
[   17.534221] [<c0632a48>] (watchdog_restart_notifier) from [<c02575ec>] (notifier_call_chain+0x2c/0x6c)
[   17.543539] [<c02575ec>] (notifier_call_chain) from [<c0257820>] (atomic_notifier_call_chain+0x34/0x48)
[   17.552946] [<c0257820>] (atomic_notifier_call_chain) from [<c0226950>] (machine_restart+0x58/0x80)
[   17.562006] [<c0226950>] (machine_restart) from [<c023a8e4>] (panic+0x204/0x278)
[   17.569415] [<c023a8e4>] (panic) from [<c0227e4c>] (die+0x360/0x37c)
[   17.575781] [<c0227e4c>] (die) from [<c022bec0>] (__do_kernel_fault.part.0+0x64/0x74)
[   17.583620] [<c022bec0>] (__do_kernel_fault.part.0) from [<c022c150>] (do_page_fault+0x280/0x2b0)
[   17.592499] [<c022c150>] (do_page_fault) from [<c022c320>] (do_DataAbort+0x30/0xb0)
[   17.600164] [<c022c320>] (do_DataAbort) from [<c0201ab0>] (__dabt_svc+0x50/0x80)
[   17.607561] Exception stack(0xc3839e48 to 0xc3839e90)
[   17.612616] 9e40:                   c3a6c100 00000003 c08168b4 00000000 c48a2ca0 00000000
[   17.620800] 9e60: fa5518d4 00000001 c3a6c3ac c3a6c300 2463a4a8 00000003 82416480 c3839e98
[   17.628980] 9e80: c063430c c063430c 60000013 ffffffff
[   17.634042] [<c0201ab0>] (__dabt_svc) from [<c063430c>] (sunxi_wdt_ping+0x14/0x2c)
[   17.641620] [<c063430c>] (sunxi_wdt_ping) from [<c0632ff8>] (__watchdog_ping+0x84/0x1a8)
[   17.649719] [<c0632ff8>] (__watchdog_ping) from [<c0633210>] (watchdog_write+0xa4/0xc8)
[   17.657733] [<c0633210>] (watchdog_write) from [<c03482a4>] (__vfs_write+0x1c/0x138)
[   17.665484] [<c03482a4>] (__vfs_write) from [<c034854c>] (vfs_write+0xb4/0x170)
[   17.672801] [<c034854c>] (vfs_write) from [<c034873c>] (ksys_write+0x50/0x9c)
[   17.679942] [<c034873c>] (ksys_write) from [<c0201120>] (ret_fast_syscall+0x0/0x4c)
[   17.687600] Exception stack(0xc3839fa8 to 0xc3839ff0)
[   17.692655] 9fa0:                   00000000 00000000 00000003 0001b82f 00000001 00000000
[   17.700837] 9fc0: 00000000 00000000 0002e004 00000004 ffffffff 00000000 0000201d 00000001
[   17.709018] 9fe0: beee5df0 beee5de0 b6f0cf48 b6f0c418
[   17.714076] Code: e92d41f0 e590304c e5937064 e5938060 (e5d73001)
[   17.720177] ---[ end trace 1f0f0284e0e109fd ]---
[   17.724795] Kernel panic - not syncing: Fatal exception
[   17.730028] Rebooting in 3 seconds..
[   20.733652] Unable to handle kernel NULL pointer dereference at virtual address 00000001
[   20.741746] pgd = 9b1f735a
[   20.744455] [00000001] *pgd=43039003, *pmd=43aa7003, *pte=00000000
[   20.750649] Internal error: Oops: 207 [#3] PREEMPT SMP ARM
[   20.756134] Modules linked in: pppoe ppp_async iptable_nat ipt_MASQUERADE xt_state xt_nat xt_conntrack xt_REDIRECT xt_FLOWOFFLOAD pppox ppp_generic nf_nat_ipv4 nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack ipt_REJECT xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt rtc_sunxi nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6
[   20.804600] CPU: 0 PID: 1 Comm: procd Tainted: G      D           4.19.81 #0
[   20.811648] Hardware name: Allwinner sun8i Family
[   20.816357] PC is at sunxi_wdt_restart+0x10/0xe4
[   20.820977] LR is at watchdog_restart_notifier+0x18/0x28
[   20.826289] pc : [<c0634224>]    lr : [<c0632a48>]    psr: a0000193
[   20.832556] sp : c3839ac8  ip : 00000000  fp : 00000000
[   20.837782] r10: 0ccccb60  r9 : c093291c  r8 : c48a2ca0
[   20.843008] r7 : 00000000  r6 : 00000000  r5 : fffffffe  r4 : 00000000
[   20.849535] r3 : c3a6c100  r2 : 00000000  r1 : 00000000  r0 : c3a6c100
[   20.856063] Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   20.863287] Control: 30c5387d  Table: 43151200  DAC: fffffffd
[   20.869034] Process procd (pid: 1, stack limit = 0x3214faef)
[   20.874694] Stack: (0xc3839ac8 to 0xc383a000)
[   20.879056] 9ac0:                   00000000 fffffffe 00000000 00000000 00000000 c0632a48
[   20.887239] 9ae0: 00000000 c02575ec c0c64278 00000000 00000000 00000bb8 c0c0a434 c0257820
[   20.895422] 9b00: 00000000 00000000 00000000 c0c63968 00000bb8 c0226950 00000001 c0c63968
[   20.903605] 9b20: 00000bb8 c023a8e4 c3838000 c3839b44 c0c09e64 0000000b ffffe000 c0227e4c
[   20.911787] 9b40: c08cf6c0 03599000 00000001 00000001 c3838210 0000000b c3124800 00000001
[   20.919970] 9b60: c3839c60 00000207 c3124800 00000207 c3838000 0ccccb60 00000000 c022bec0
[   20.928153] 9b80: 00000001 c022c150 37bc7700 c383582c c3fe7aa8 00041351 37d42a3e c0c09f94
[   20.936336] 9ba0: 00000207 c022bed0 00000001 c3839c60 c3838000 0ccccb60 00000000 c022c320
[   20.944519] 9bc0: c04f0540 c3818000 c3819220 c0537650 00000001 c07adde4 0000001e 00000000
[   20.952701] 9be0: c0c98b80 00000003 c3839c18 c0c65f04 00000000 c0257828 c0c98b80 00000004
[   20.960884] 9c00: c3839c38 c0c65f04 00000000 c0257828 00000000 00025d9b c3808400 0000000a
[   20.969066] 9c20: c0c65f04 c0539538 00000000 c0c65eeb c3819220 00000000 c3808400 00000000
[   20.977249] 9c40: 00000006 c0c47b30 c0634224 a0000193 ffffffff c3839c94 c48a2ca0 c0201ab0
[   20.985432] 9c60: c3a6c100 00000000 00000000 c3a6c100 00000000 fffffffe 00000000 00000000
[   20.993614] 9c80: c48a2ca0 c093291c 0ccccb60 00000000 00000000 c3839cb0 c0632a48 c0634224
[   21.001797] 9ca0: a0000193 ffffffff c0c659d0 bf000000 00000000 fffffffe 00000000 00000000
[   21.009980] 9cc0: 00000000 c0632a48 00000000 c02575ec c0c64278 00000000 00000000 00000bb8
[   21.018162] 9ce0: c0c0a434 c0257820 00000000 00000000 00000000 c0c63968 00000bb8 c0226950
[   21.026345] 9d00: 00000001 c0c63968 00000bb8 c023a8e4 00000000 c3839d2c c0c09e64 0000000b
[   21.034527] 9d20: ffffe000 c0227e4c c08cf6c0 03599000 00000000 00000001 c3838210 0000000b
[   21.042710] 9d40: c3124800 00000000 c3839e48 00000207 c3124800 00000207 00010000 c312483c
[   21.050893] 9d60: 00000014 c022bec0 00000000 c022c150 c0c04cbc e37a0ee2 00000002 00000000
[   21.059076] 9d80: c3bbf200 c0c09f94 00000207 c022bed0 00000000 c3839e48 c3838000 2463a4a8
[   21.067258] 9da0: 00000003 c022c320 06e2fb84 00000000 e37a0ee2 c3bbf180 c3834080 c3bbf200
[   21.075441] 9dc0: c3fe8e00 c07cd7bc c0c04cbc c3fe8d80 c0c04cbc c026ace4 c39d8540 800c000a
[   21.083624] 9de0: 00000004 c39d8540 00000004 c07b763c 00000003 00ffffff 00000000 fffffffe
[   21.091806] 9e00: 00000000 c02575ec c0c633bc 00000002 c3314000 00000000 c3fe8d80 c3834000
[   21.099989] 9e20: c3bbf180 00000000 c3124800 ffffe000 c063430c 60000013 ffffffff c3839e7c
[   21.108172] 9e40: c3a6c3ac c0201ab0 c3a6c100 00000003 c08168b4 00000000 c48a2ca0 00000000
[   21.116354] 9e60: fa5518d4 00000001 c3a6c3ac c3a6c300 2463a4a8 00000003 82416480 c3839e98
[   21.124537] 9e80: c063430c c063430c 60000013 ffffffff c48a2ca0 bf000000 c3a6c100 c3a6c300
[   21.132720] 9ea0: fa5518d4 c0632ff8 00000000 c3a6c100 c3a6c300 ffffe000 00000001 00000001
[   21.140903] 9ec0: c3a6c344 ffffe000 00000001 c3a6c3ac c3a6c300 00000004 00000001 c0633210
[   21.149085] 9ee0: 00000001 c063316c 0001b82f c3839f80 00000000 00000000 00000004 c03482a4
[   21.157268] 9f00: 0010ad85 00000000 c314c414 00000001 24523af9 00000003 0000000d 00000000
[   21.165450] 9f20: 1d75f8f9 00000000 0000000c 00000000 17eae7b9 00000000 00000001 c3834000
[   21.173633] 9f40: c025d6ec 00000100 00000200 00000001 c3bcd240 0001b82f c3839f80 c034854c
[   21.181816] 9f60: 0000015a c0201324 c3bcd240 c3bcd240 0001b82f 00000001 00000000 c034873c
[   21.189998] 9f80: 00000000 00000000 00000006 00000000 00000000 0002e004 00000004 c0201324
[   21.198180] 9fa0: c3838000 c0201120 00000000 00000000 00000003 0001b82f 00000001 00000000
[   21.206363] 9fc0: 00000000 00000000 0002e004 00000004 ffffffff 00000000 0000201d 00000001
[   21.214545] 9fe0: beee5df0 beee5de0 b6f0cf48 b6f0c418 60000010 00000003 00000000 00000000
[   21.222732] [<c0634224>] (sunxi_wdt_restart) from [<c0632a48>] (watchdog_restart_notifier+0x18/0x28)
[   21.231877] [<c0632a48>] (watchdog_restart_notifier) from [<c02575ec>] (notifier_call_chain+0x2c/0x6c)
[   21.241193] [<c02575ec>] (notifier_call_chain) from [<c0257820>] (atomic_notifier_call_chain+0x34/0x48)
[   21.250597] [<c0257820>] (atomic_notifier_call_chain) from [<c0226950>] (machine_restart+0x58/0x80)
[   21.259654] [<c0226950>] (machine_restart) from [<c023a8e4>] (panic+0x204/0x278)
[   21.267063] [<c023a8e4>] (panic) from [<c0227e4c>] (die+0x360/0x37c)
[   21.273426] [<c0227e4c>] (die) from [<c022bec0>] (__do_kernel_fault.part.0+0x64/0x74)
[   21.281265] [<c022bec0>] (__do_kernel_fault.part.0) from [<c022c150>] (do_page_fault+0x280/0x2b0)
[   21.290143] [<c022c150>] (do_page_fault) from [<c022c320>] (do_DataAbort+0x30/0xb0)
[   21.297805] [<c022c320>] (do_DataAbort) from [<c0201ab0>] (__dabt_svc+0x50/0x80)
[   21.305204] Exception stack(0xc3839c60 to 0xc3839ca8)
[   21.310260] 9c60: c3a6c100 00000000 00000000 c3a6c100 00000000 fffffffe 00000000 00000000
[   21.318443] 9c80: c48a2ca0 c093291c 0ccccb60 00000000 00000000 c3839cb0 c0632a48 c0634224
[   21.326622] 9ca0: a0000193 ffffffff
[   21.330120] [<c0201ab0>] (__dabt_svc) from [<c0634224>] (sunxi_wdt_restart+0x10/0xe4)
[   21.337958] [<c0634224>] (sunxi_wdt_restart) from [<c0632a48>] (watchdog_restart_notifier+0x18/0x28)
[   21.347100] [<c0632a48>] (watchdog_restart_notifier) from [<c02575ec>] (notifier_call_chain+0x2c/0x6c)
[   21.356413] [<c02575ec>] (notifier_call_chain) from [<c0257820>] (atomic_notifier_call_chain+0x34/0x48)
[   21.365814] [<c0257820>] (atomic_notifier_call_chain) from [<c0226950>] (machine_restart+0x58/0x80)
[   21.374868] [<c0226950>] (machine_restart) from [<c023a8e4>] (panic+0x204/0x278)
[   21.382272] [<c023a8e4>] (panic) from [<c0227e4c>] (die+0x360/0x37c)
[   21.388632] [<c0227e4c>] (die) from [<c022bec0>] (__do_kernel_fault.part.0+0x64/0x74)
[   21.396470] [<c022bec0>] (__do_kernel_fault.part.0) from [<c022c150>] (do_page_fault+0x280/0x2b0)
[   21.405348] [<c022c150>] (do_page_fault) from [<c022c320>] (do_DataAbort+0x30/0xb0)
[   21.413010] [<c022c320>] (do_DataAbort) from [<c0201ab0>] (__dabt_svc+0x50/0x80)
[   21.420408] Exception stack(0xc3839e48 to 0xc3839e90)
[   21.425463] 9e40:                   c3a6c100 00000003 c08168b4 00000000 c48a2ca0 00000000
[   21.433646] 9e60: fa5518d4 00000001 c3a6c3ac c3a6c300 2463a4a8 00000003 82416480 c3839e98
[   21.441826] 9e80: c063430c c063430c 60000013 ffffffff
[   21.446885] [<c0201ab0>] (__dabt_svc) from [<c063430c>] (sunxi_wdt_ping+0x14/0x2c)
[   21.454463] [<c063430c>] (sunxi_wdt_ping) from [<c0632ff8>] (__watchdog_ping+0x84/0x1a8)
[   21.462562] [<c0632ff8>] (__watchdog_ping) from [<c0633210>] (watchdog_write+0xa4/0xc8)
[   21.470574] [<c0633210>] (watchdog_write) from [<c03482a4>] (__vfs_write+0x1c/0x138)
[   21.478326] [<c03482a4>] (__vfs_write) from [<c034854c>] (vfs_write+0xb4/0x170)
[   21.485643] [<c034854c>] (vfs_write) from [<c034873c>] (ksys_write+0x50/0x9c)
[   21.492783] [<c034873c>] (ksys_write) from [<c0201120>] (ret_fast_syscall+0x0/0x4c)
[   21.500441] Exception stack(0xc3839fa8 to 0xc3839ff0)
[   21.505496] 9fa0:                   00000000 00000000 00000003 0001b82f 00000001 00000000
[   21.513678] 9fc0: 00000000 00000000 0002e004 00000004 ffffffff 00000000 0000201d 00000001
[   21.521859] 9fe0: beee5df0 beee5de0 b6f0cf48 b6f0c418
[   21.526916] Code: e92d41f0 e590304c e5937064 e5938060 (e5d73001)
[   21.533013] ---[ end trace 1f0f0284e0e109fe ]---
[   21.537631] Kernel panic - not syncing: Fatal exception
[   21.542864] Rebooting in 3 seconds..

second board log:

Macronix SPI NAND was found.
128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Reading 4194304 byte(s) (2048 page(s)) at offset 0x00110000
Reading 65536 byte(s) (32 page(s)) at offset 0x00100000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   ARM OpenWrt Linux-4.19.81
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2926488 Bytes = 2.8 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Kernel Image
   Loading Device Tree to 42dfa000, end 42dff564 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.81 (root@test5) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r11430-68d12ac1fe)) #0 SMP PREEMPT Wed Nov 6 15:22:33 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Dolphin PI
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0x7c/0x42c with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s31244 r8192 d22004 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line:
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53872K/65536K available (5928K kernel code, 396K rwdata, 1644K rodata, 2048K init, 242K bss, 11664K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7945 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 397 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 243 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000244] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000448] Console: colour dummy device 80x30
[    0.000962] console [tty0] enabled
[    0.001017] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001055] pid_max: default: 32768 minimum: 301
[    0.001240] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001275] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002288] CPU: Testing write buffer coherency: ok
[    0.002870] /cpus/cpu@0 missing clock-frequency property
[    0.002923] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060210] Setting up static identity map for 0x40200000 - 0x40200060
[    0.080211] rcu: Hierarchical SRCU implementation.
[    0.120336] smp: Bringing up secondary CPUs ...
[    0.120388] smp: Brought up 1 node, 1 CPU
[    0.120407] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.120425] CPU: All CPU(s) started in HYP mode.
[    0.120439] CPU: Virtualization extensions available.
[    0.130495] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.131268] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.131337] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.131716] pinctrl core: initialized pinctrl subsystem
[    0.132939] NET: Registered protocol family 16
[    0.133356] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.134489] No ATAGs?
[    0.194248] SCSI subsystem initialized
[    0.194718] usbcore: registered new interface driver usbfs
[    0.194818] usbcore: registered new interface driver hub
[    0.196723] usbcore: registered new device driver usb
[    0.197666] pps_core: LinuxPPS API ver. 1 registered
[    0.197711] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.197897] PTP clock support registered
[    0.199560] Advanced Linux Sound Architecture Driver Initialized.
[    0.205141] clocksource: Switched to clocksource arch_sys_counter
[    0.235420] NET: Registered protocol family 2
[    0.236282] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.236361] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.236400] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.236436] TCP: Hash tables configured (established 1024 bind 1024)
[    0.236604] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.236670] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.236968] NET: Registered protocol family 1
[    0.237397] kvm [1]: 8-bit VMID
[    0.238780] kvm [1]: Hyp mode initialized successfully
[    0.241670] No memory allocated for crashlog
[    0.242770] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.271535] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.272119] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.300727] io scheduler noop registered
[    0.300776] io scheduler deadline registered
[    0.301059] io scheduler cfq registered (default)
[    0.301940] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.308737] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.512060] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.541058] 1c28800.serial: ttyS0 at MMIO 0x1c28800 (irq = 30, base_baud = 1500000) is a U6_16550A
[    1.098698] console [ttyS0] enabled
[    1.116842] loop: module loaded
[    1.126992] spi-nand spi0.0: unknown raw ID 00000000
[    1.132031] spi-nand: probe of spi0.0 failed with error -524
[    1.140622] libphy: Fixed MDIO Bus: probed
[    1.146689] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.152523] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.169153] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.176574] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.183817] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.188858] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.195709] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.201376] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.207079] dwmac-sun8i 1c30000.ethernet (unnamed net_device) (uninitialized): device MAC address 3a:a3:f2:3f:4f:74
[    1.218005] libphy: stmmac: probed
[    1.223040] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.230077] libphy: mdio_mux: probed
[    1.233729] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.240489] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.248536] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.255102] ehci-platform: EHCI generic platform driver
[    1.261809] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.268408] ohci-platform: OHCI generic platform driver
[    1.274297] usbcore: registered new interface driver usb-storage
[    1.281700] mousedev: PS/2 mouse device common for all mice
[    1.289216] i2c /dev entries driver
[    1.295415] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.306484] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.337964] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.350386] NET: Registered protocol family 10
[    1.368902] Segment Routing with IPv6
[    1.373185] NET: Registered protocol family 17
[    1.378002] can: controller area network core (rev 20170425 abi 9)
[    1.384836] NET: Registered protocol family 29
[    1.389951] 8021q: 802.1Q VLAN Support v1.8
[    1.394215] Registering SWP/SWPB emulation handler
[    1.407868] hctosys: unable to open rtc device (rtc0)
[    1.413327] ALSA device list:
[    1.416879]   No soundcards found.
[    1.421965] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.429716] Please append a correct "root=" boot option; here are the available partitions:
[    1.438435] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.446732] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.81 #0
[    1.452740] Hardware name: Allwinner sun8i Family
[    1.457487] [<c022af40>] (unwind_backtrace) from [<c0227ae8>] (show_stack+0x10/0x14)
[    1.465248] [<c0227ae8>] (show_stack) from [<c07b0568>] (dump_stack+0x88/0x9c)
[    1.472486] [<c07b0568>] (dump_stack) from [<c023a7cc>] (panic+0xec/0x278)
[    1.479378] [<c023a7cc>] (panic) from [<c0a013d8>] (mount_block_root+0x1c8/0x280)
[    1.486874] [<c0a013d8>] (mount_block_root) from [<c0a016c8>] (prepare_namespace+0x150/0x188)
[    1.495408] [<c0a016c8>] (prepare_namespace) from [<c0a00fa4>] (kernel_init_freeable+0x244/0x254)
[    1.504292] [<c0a00fa4>] (kernel_init_freeable) from [<c07c2af4>] (kernel_init+0x8/0x110)
[    1.512480] [<c07c2af4>] (kernel_init) from [<c02011f8>] (ret_from_fork+0x14/0x3c)
[    1.520053] Exception stack(0xc3839fb0 to 0xc3839ff8)
[    1.525109] 9fa0:                                     00000000 00000000 00000000 00000000
[    1.533292] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.541474] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.548107] Rebooting in 1 seconds..

请问是我这种烧录方法不对吗?

离线

#44 2019-11-09 09:05:55

我思故我在
会员
注册时间: 2019-09-03
已发帖子: 244
积分: 243.5

Re: V3s SPI NAND u-boot @openwrt

从头到尾看了半天这个帖子, 估计奔溃问题, 可能还是和dts频率有关系, 降频或许就解决了。

离线

#45 2019-11-09 13:02:35

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 363
积分: 312

Re: V3s SPI NAND u-boot @openwrt

降频肯定的,因为uboot下spi频率默认最大24m,到内核就不一样了

离线

#46 2019-11-09 18:56:43

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

我克隆了最新的代码,编译,烧录到 w25n01, 发现spl 已经识别,但是u-boot还是无法启动:

U-Boot SPL 2019.10 (Nov 08 2019 - 14:19:42 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found Winbond W25N01GVxxIG (efaa21)


U-Boot 2019.10 (Nov 08 2019 - 14:19:42 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Dolphin Pi
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
Hit any key to stop autoboot:  0
unknown raw ID 43d60da0
MTD device spi-nand0 not found, ret -19
unknown raw ID 43d60d68
MTD device spi-nand0 not found, ret -19
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=>

离线

#47 2019-11-09 19:36:52

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

QQ截图20191109190614.png

写入MX35LF1GE4AB 成功,但是校验失败(verified error).

U-Boot SPL 2019.10 (Nov 08 2019 - 14:19:42 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found Macronix MX35LF1GE4AB (c212c2)


U-Boot 2019.10 (Nov 08 2019 - 14:19:42 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Dolphin Pi
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Macronix SPI NAND was found.
128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Reading 4194304 byte(s) (2048 page(s)) at offset 0x00110000
Reading 65536 byte(s) (32 page(s)) at offset 0x00100000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   ARM OpenWrt Linux-4.19.81
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2926096 Bytes = 2.8 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Kernel Image
   Loading Device Tree to 42dfa000, end 42dff97e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.81 (root@test5) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r11430-68d12ac1fe)) #0 SMP PREEMPT Fri Nov 8 14:19:42 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Dolphin PI
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0x7c/0x42c with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s31244 r8192 d22004 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line:
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53872K/65536K available (5928K kernel code, 396K rwdata, 1644K rodata, 2048K init, 242K bss, 11664K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7945 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 397 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 243 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000256] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000463] Console: colour dummy device 80x30
[    0.000974] console [tty0] enabled
[    0.001032] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001069] pid_max: default: 32768 minimum: 301
[    0.001248] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001282] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002280] CPU: Testing write buffer coherency: ok
[    0.002857] /cpus/cpu@0 missing clock-frequency property
[    0.002911] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060194] Setting up static identity map for 0x40200000 - 0x40200060
[    0.080195] rcu: Hierarchical SRCU implementation.
[    0.120333] smp: Bringing up secondary CPUs ...
[    0.120384] smp: Brought up 1 node, 1 CPU
[    0.120403] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.120421] CPU: All CPU(s) started in HYP mode.
[    0.120435] CPU: Virtualization extensions available.
[    0.130471] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.131255] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.131322] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.131687] pinctrl core: initialized pinctrl subsystem
[    0.132939] NET: Registered protocol family 16
[    0.133342] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.134494] No ATAGs?
[    0.194249] SCSI subsystem initialized
[    0.194720] usbcore: registered new interface driver usbfs
[    0.194820] usbcore: registered new interface driver hub
[    0.196679] usbcore: registered new device driver usb
[    0.197568] pps_core: LinuxPPS API ver. 1 registered
[    0.197611] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.197805] PTP clock support registered
[    0.199484] Advanced Linux Sound Architecture Driver Initialized.
[    0.205116] clocksource: Switched to clocksource arch_sys_counter
[    0.234991] NET: Registered protocol family 2
[    0.236604] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.236686] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.236724] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.236758] TCP: Hash tables configured (established 1024 bind 1024)
[    0.236926] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.236992] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.237286] NET: Registered protocol family 1
[    0.237706] kvm [1]: 8-bit VMID
[    0.238827] kvm [1]: Hyp mode initialized successfully
[    0.241804] No memory allocated for crashlog
[    0.242917] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.270608] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.271719] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.301399] io scheduler noop registered
[    0.301447] io scheduler deadline registered
[    0.301758] io scheduler cfq registered (default)
[    0.302671] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.308330] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.512330] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.541630] 1c28800.serial: ttyS0 at MMIO 0x1c28800 (irq = 32, base_baud = 1500000) is a U6_16550A
[    1.099299] console [ttyS0] enabled
[    1.117472] loop: module loaded
[    1.127627] spi-nand spi0.0: unknown raw ID 00000000
[    1.132664] spi-nand: probe of spi0.0 failed with error -524
[    1.141238] libphy: Fixed MDIO Bus: probed
[    1.147395] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.153232] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.170054] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.177526] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.184771] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.189823] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.196674] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.202339] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.208039] dwmac-sun8i 1c30000.ethernet (unnamed net_device) (uninitialized): device MAC address aa:13:f1:02:85:f1
[    1.218953] libphy: stmmac: probed
[    1.223958] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.230974] libphy: mdio_mux: probed
[    1.234620] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.241378] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.249868] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.257244] ehci-platform: EHCI generic platform driver
[    1.262925] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.269533] ohci-platform: OHCI generic platform driver
[    1.275624] usbcore: registered new interface driver usb-storage
[    1.282880] mousedev: PS/2 mouse device common for all mice
[    1.289410] sun4i-a10-lradc-keys 1c22800.lradc: Linked as a consumer to regulator.1
[    1.298061] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.307715] i2c /dev entries driver
[    1.313865] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.325438] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.357997] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.366486] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[    1.607757] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.622639] NET: Registered protocol family 10
[    1.639745] Segment Routing with IPv6
[    1.643552] NET: Registered protocol family 17
[    1.648767] can: controller area network core (rev 20170425 abi 9)
[    1.655668] NET: Registered protocol family 29
[    1.660166] 8021q: 802.1Q VLAN Support v1.8
[    1.664394] Registering SWP/SWPB emulation handler
[    1.678287] hctosys: unable to open rtc device (rtc0)
[    1.683745] ALSA device list:
[    1.687367]   No soundcards found.
[    1.692454] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.700263] Please append a correct "root=" boot option; here are the available partitions:
[    1.708928] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.717218] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.81 #0
[    1.723227] Hardware name: Allwinner sun8i Family
[    1.727973] [<c022af40>] (unwind_backtrace) from [<c0227ae8>] (show_stack+0x10/0x14)
[    1.735735] [<c0227ae8>] (show_stack) from [<c07b0588>] (dump_stack+0x88/0x9c)
[    1.742974] [<c07b0588>] (dump_stack) from [<c023a7cc>] (panic+0xec/0x278)
[    1.749865] [<c023a7cc>] (panic) from [<c0a013d8>] (mount_block_root+0x1c8/0x280)
[    1.757361] [<c0a013d8>] (mount_block_root) from [<c0a016c8>] (prepare_namespace+0x150/0x188)
[    1.765894] [<c0a016c8>] (prepare_namespace) from [<c0a00fa4>] (kernel_init_freeable+0x244/0x254)
[    1.774778] [<c0a00fa4>] (kernel_init_freeable) from [<c07c2b14>] (kernel_init+0x8/0x110)
[    1.782968] [<c07c2b14>] (kernel_init) from [<c02011f8>] (ret_from_fork+0x14/0x3c)
[    1.790541] Exception stack(0xc3839fb0 to 0xc3839ff8)
[    1.795597] 9fa0:                                     00000000 00000000 00000000 00000000
[    1.803780] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.811962] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.818593] Rebooting in 1 seconds..

果然启动到文件系统就失败了, 看来得用 TF 卡烧录了.

离线

楼主 #48 2019-11-10 00:49:34

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

xgui 说:
[    6.977190] mount_root: Could not open mtd device: /dev/mtd3
[    6.982987] mount_root: reading rootfs failed
[    6.987684] mount_root: mounting /dev/root
...

second board log:

[    1.421965] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.429716] Please append a correct "root=" boot option; here are the available partitions:

请问是我这种烧录方法不对吗?

First board: There seems to be something wrong with the ext4-fs image. I've never tested ext4. I don't know if its a general problem, bug or board-problem.

Second board: There seems to be the kernel-commandline missing. Try aborting u-boots start and run
(i hope i remember correctly)

env set bootargs "root=/dev/mtd3"
env save
boot

离线

楼主 #49 2019-11-10 00:55:33

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

xgui 说:

我克隆了最新的代码,编译,烧录到 w25n01, 发现spl 已经识别,但是u-boot还是无法启动:

unknown raw ID 43d60da0
MTD device spi-nand0 not found, ret -19
unknown raw ID 43d60d68
MTD device spi-nand0 not found, ret -19
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=>

Is this the DolphinPi image? I only changed the MHZ for the generic sd-card config. Still seems to be the clock since the w25n01 correctly responds to the SPL which is running with 24mhz.
Change this https://github.com/bhorn/openwrt/blob/dolphinpi-spinand/target/linux/sunxi/files-4.19/arch/arm/boot/dts/sun8i-v3s-dolphinpi.dts#L171 to 60mhz and try again smile If it still wont work, try 24mhz.
But I'm a bit worried that the mx35 runs fine with ~100mhz but the w25n01 not. The w25n01 is the only spi-nand we can get at reasonable prices here in germany...

离线

楼主 #50 2019-11-10 00:57:03

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

xgui 说:

写入MX35LF1GE4AB 成功,但是校验失败(verified error).

[    1.692454] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.700263] Please append a correct "root=" boot option; here are the available partitions:
[    1.708928] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Its the kernel-commandline problem from #48

最近编辑记录 bamkrsde (2019-11-10 00:57:16)

离线

#51 2019-11-10 07:39:06

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

这是我编译出来的镜像: openwrt-sunxi-cortexa7-sun8i-v3s-dolphinpi-20191109.tgz

我烧录了: openwrt-sunxi-cortexa7-sun8i-v3s-dolphinpi-squashfs-spinand.img

芯片是: MX35LF1GE4AB

QQ截图20191110074145.png
烧录检验通过.

U-Boot SPL 2019.10 (Nov 06 2019 - 15:22:33 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found 1Gb Macronix MX35LF1GE4AB (12c2)


U-Boot 2019.10 (Nov 06 2019 - 15:22:33 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Dolphin Pi
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Macronix SPI NAND was found.
128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Reading 4194304 byte(s) (2048 page(s)) at offset 0x00110000
Reading 65536 byte(s) (32 page(s)) at offset 0x00100000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   ARM OpenWrt Linux-4.19.81
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2926488 Bytes = 2.8 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Kernel Image
   Loading Device Tree to 42dfa000, end 42dff564 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.81 (root@test5) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r11430-68d12ac1fe)) #0 SMP PREEMPT Wed Nov 6 15:22:33 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Dolphin PI
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0x7c/0x42c with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s31244 r8192 d22004 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line:
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53872K/65536K available (5928K kernel code, 396K rwdata, 1644K rodata, 2048K init, 242K bss, 11664K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7945 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 397 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 243 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000244] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000446] Console: colour dummy device 80x30
[    0.000959] console [tty0] enabled
[    0.001015] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001051] pid_max: default: 32768 minimum: 301
[    0.001232] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001262] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002255] CPU: Testing write buffer coherency: ok
[    0.002849] /cpus/cpu@0 missing clock-frequency property
[    0.002899] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060201] Setting up static identity map for 0x40200000 - 0x40200060
[    0.080200] rcu: Hierarchical SRCU implementation.
[    0.120332] smp: Bringing up secondary CPUs ...
[    0.120385] smp: Brought up 1 node, 1 CPU
[    0.120404] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.120424] CPU: All CPU(s) started in HYP mode.
[    0.120437] CPU: Virtualization extensions available.
[    0.130492] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.131250] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.131315] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.131698] pinctrl core: initialized pinctrl subsystem
[    0.132908] NET: Registered protocol family 16
[    0.133323] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.134458] No ATAGs?
[    0.194159] SCSI subsystem initialized
[    0.194635] usbcore: registered new interface driver usbfs
[    0.194742] usbcore: registered new interface driver hub
[    0.196686] usbcore: registered new device driver usb
[    0.197634] pps_core: LinuxPPS API ver. 1 registered
[    0.197681] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.197867] PTP clock support registered
[    0.199511] Advanced Linux Sound Architecture Driver Initialized.
[    0.205114] clocksource: Switched to clocksource arch_sys_counter
[    0.234962] NET: Registered protocol family 2
[    0.236457] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.236539] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.236581] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.236615] TCP: Hash tables configured (established 1024 bind 1024)
[    0.236789] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.236857] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.237153] NET: Registered protocol family 1
[    0.237581] kvm [1]: 8-bit VMID
[    0.238796] kvm [1]: Hyp mode initialized successfully
[    0.241690] No memory allocated for crashlog
[    0.242785] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.271900] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.272522] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.300925] io scheduler noop registered
[    0.300972] io scheduler deadline registered
[    0.301262] io scheduler cfq registered (default)
[    0.302145] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.308939] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.510833] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.540412] 1c28800.serial: ttyS0 at MMIO 0x1c28800 (irq = 30, base_baud = 1500000) is a U6_16550A
[    1.098018] console [ttyS0] enabled
[    1.116105] loop: module loaded
[    1.126324] spi-nand spi0.0: Macronix SPI NAND was found.
[    1.131770] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.141481] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.148044] Creating 4 MTD partitions on "spi0.0":
[    1.152867] 0x000000000000-0x000000100000 : "u-boot"
[    1.161783] 0x000000100000-0x000000110000 : "dtb"
[    1.169454] 0x000000110000-0x000000510000 : "kernel"
[    1.177299] random: fast init done
[    1.187059] 0x000000510000-0x000008000000 : "rootfs"
[    1.390267] mtd: device 3 (rootfs) set to be root filesystem
[    1.397186] 1 squashfs-split partitions found on MTD device rootfs
[    1.403415] 0x0000006c0000-0x000008000000 : "rootfs_data"
[    1.413642] libphy: Fixed MDIO Bus: probed
[    1.419807] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.426188] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.442506] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.449995] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.457326] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.462302] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.469156] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.474822] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.480523] dwmac-sun8i 1c30000.ethernet (unnamed net_device) (uninitialized): device MAC address 42:79:e1:88:2c:cf
[    1.491443] libphy: stmmac: probed
[    1.496510] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.503463] libphy: mdio_mux: probed
[    1.507280] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.513652] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.521464] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.529164] ehci-platform: EHCI generic platform driver
[    1.534841] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.541506] ohci-platform: OHCI generic platform driver
[    1.547507] usbcore: registered new interface driver usb-storage
[    1.554751] mousedev: PS/2 mouse device common for all mice
[    1.562236] i2c /dev entries driver
[    1.568482] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.579501] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.613385] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.627785] NET: Registered protocol family 10
[    1.644737] Segment Routing with IPv6
[    1.649246] NET: Registered protocol family 17
[    1.653821] can: controller area network core (rev 20170425 abi 9)
[    1.660941] NET: Registered protocol family 29
[    1.665869] 8021q: 802.1Q VLAN Support v1.8
[    1.670131] Registering SWP/SWPB emulation handler
[    1.683595] hctosys: unable to open rtc device (rtc0)
[    1.689293] ALSA device list:
[    1.692293]   No soundcards found.
[    1.698260] random: crng init done
[    1.709119] squashfs: SQUASHFS error: unable to read inode lookup table
[    1.721311] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[    1.728794] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 1th superblock
[    1.739992] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0x3137cd11)
[    1.748044] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 2th superblock
[    1.755841] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[    1.763077] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 1th superblock
[    1.770819] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0x3137cd11)
[    1.778686] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 2th superblock
[    1.786526] List of all partitions:
[    1.790054] 1f00            1024 mtdblock0
[    1.790059]  (driver?)
[    1.796716] 1f01              64 mtdblock1
[    1.796721]  (driver?)
[    1.803278] 1f02            4096 mtdblock2
[    1.803280]  (driver?)
[    1.809897] 1f03          125888 mtdblock3
[    1.809901]  (driver?)
[    1.816534] 1f04          124160 mtdblock4
[    1.816538]  (driver?)
[    1.823086] No filesystem could mount root, tried:
[    1.823089]  ext3
[    1.827992]  ext2
[    1.829922]  ext4
[    1.831849]  squashfs
[    1.833775]  vfat
[    1.836065]  f2fs
[    1.837994]
[    1.841416] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[    1.849776] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.81 #0
[    1.855783] Hardware name: Allwinner sun8i Family
[    1.860526] [<c022af40>] (unwind_backtrace) from [<c0227ae8>] (show_stack+0x10/0x14)
[    1.868286] [<c0227ae8>] (show_stack) from [<c07b0568>] (dump_stack+0x88/0x9c)
[    1.875527] [<c07b0568>] (dump_stack) from [<c023a7cc>] (panic+0xec/0x278)
[    1.882418] [<c023a7cc>] (panic) from [<c0a01470>] (mount_block_root+0x260/0x280)
[    1.889914] [<c0a01470>] (mount_block_root) from [<c0a016c8>] (prepare_namespace+0x150/0x188)
[    1.898448] [<c0a016c8>] (prepare_namespace) from [<c0a00fa4>] (kernel_init_freeable+0x244/0x254)
[    1.907332] [<c0a00fa4>] (kernel_init_freeable) from [<c07c2af4>] (kernel_init+0x8/0x110)
[    1.915520] [<c07c2af4>] (kernel_init) from [<c02011f8>] (ret_from_fork+0x14/0x3c)
[    1.923092] Exception stack(0xc3839fb0 to 0xc3839ff8)
[    1.928149] 9fa0:                                     00000000 00000000 00000000 00000000
[    1.936331] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.944513] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.951145] Rebooting in 1 seconds..

Linux驱动也识别到了 mtd 分区

但是仍然出现这种错误:

[    1.709119] squashfs: SQUASHFS error: unable to read inode lookup table
[    1.721311] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[    1.728794] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 1th superblock
...

还是无法启动到shell.

离线

#52 2019-11-10 07:49:40

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

... 接着,继续按楼上的操作, 烧录: openwrt-sunxi-cortexa7-sun8i-v3s-dolphinpi-squashfs-spinand.img

芯片是: W25N01

U-Boot SPL 2019.10 (Nov 06 2019 - 15:22:33 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Unknown chip aaef
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

直接出错了.

离线

楼主 #53 2019-11-11 17:38:57

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

xgui 说:

... 接着,继续按楼上的操作, 烧录: openwrt-sunxi-cortexa7-sun8i-v3s-dolphinpi-squashfs-spinand.img

芯片是: W25N01

U-Boot SPL 2019.10 (Nov 06 2019 - 15:22:33 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Unknown chip aaef
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

直接出错了.

Thats the output of the old SPL which does not support other chips. Please use the updated version you used in #51

最近编辑记录 bamkrsde (2019-11-11 17:39:10)

离线

#54 2019-11-11 17:42:02

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde 我直接 git pull, 然后 make 生成的img文件包括了最新的spl了吗?

离线

楼主 #55 2019-11-11 20:26:46

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

xgui 说:
[    1.709119] squashfs: SQUASHFS error: unable to read inode lookup table
[    1.721311] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[    1.728794] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 1th superblock
...

Hm, I don't know why your squashfs isn't found.
However, I received my W25N01 chips and already soldered one on.

unknown raw ID 43d60da0
MTD device spi-nand0 not found, ret -19
unknown raw ID 43d60d68
MTD device spi-nand0 not found, ret -19

I get the same error. I will dig down on this.

离线

楼主 #56 2019-11-11 21:55:15

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

unknown raw ID 43d60da0
MTD device spi-nand0 not found, ret -19
unknown raw ID 43d60d68
MTD device spi-nand0 not found, ret -19

It was a bug in u-boot! I thought the u-boot spi-nand is in the same state as the linux spi-nand state. But I was wrong. The u-boot spi-nand winbond-implementation missed the W25N01 (however it embedded the W25M02 which is basically two W25N01 in one package). I updated the repo to include the W25N01.

离线

#57 2019-11-11 22:28:44

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

离线

#58 2019-11-12 10:11:15

642242855
会员
注册时间: 2019-10-31
已发帖子: 191
积分: 98

Re: V3s SPI NAND u-boot @openwrt

现在不是出了SDIO接口的nand flash 吗,用SDIO的接口会不会比SPI速度更快,有没有谁搞下SDIO 启动的

离线

#59 2019-11-12 10:29:55

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

642242855 说:

现在不是出了SDIO接口的nand flash 吗,用SDIO的接口会不会比SPI速度更快,有没有谁搞下SDIO 启动的

SDIO接口的 NAND?那个接口就是TF卡,把他当TF卡用就可以了,硬件上面做了FTL层,处理了写平衡和坏卡。





离线

#60 2019-11-12 10:41:24

642242855
会员
注册时间: 2019-10-31
已发帖子: 191
积分: 98

Re: V3s SPI NAND u-boot @openwrt

晕哥 说:
642242855 说:

现在不是出了SDIO接口的nand flash 吗,用SDIO的接口会不会比SPI速度更快,有没有谁搞下SDIO 启动的

SDIO接口的 NAND?那个接口就是TF卡,把他当TF卡用就可以了,硬件上面做了FTL层,处理了写平衡和坏卡。

_20191112103947.png

离线

#61 2019-11-12 11:13:17

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

米客方德: http://www.mkfounder.com/

是这家吗?





离线

#62 2019-11-12 11:23:14

642242855
会员
注册时间: 2019-10-31
已发帖子: 191
积分: 98

Re: V3s SPI NAND u-boot @openwrt

晕哥 说:

米客方德: http://www.mkfounder.com/

是这家吗?

是的,就是这家,很多产品是很实用,没有用过批量的,质量就不清楚

离线

#63 2019-11-12 11:26:34

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: V3s SPI NAND u-boot @openwrt

他们一直有做, 但是在立创商城涨价了: https://whycan.cn/t_2619.html

对了,这个主题是关于 V3s + spi nand 的讨论, 我们就不在这里参和了吧。





离线

#64 2019-11-13 19:51:32

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

我git pull最新的代码编译, 用 win32diskimager烧录openwrt-sunxi-cortexa7-sun8i-v3s-dolphinpi-squashfs-spinand.img,

在 w25n01 上 u-boot 可以识别spi nand, 并正常启动, 但是 linux 驱动识别 flash id 出错:

[    1.108748] loop: module loaded
[    1.119116] spi-nand spi0.0: unknown raw ID 0067a800
[    1.124152] spi-nand: probe of spi0.0 failed with error -524
[    1.132691] libphy: Fixed MDIO Bus: probed

完整log:

U-Boot SPL 2019.10 (Nov 13 2019 - 07:58:39 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found Winbond W25N01GVxxIG (efaa21)


U-Boot 2019.10 (Nov 13 2019 - 07:58:39 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Dolphin Pi
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Winbond SPI NAND was found.
128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Reading 4194304 byte(s) (2048 page(s)) at offset 0x00110000
Reading 65536 byte(s) (32 page(s)) at offset 0x00100000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   ARM OpenWrt Linux-4.19.81
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2925512 Bytes = 2.8 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Kernel Image
   Loading Device Tree to 42dfa000, end 42dffa7f ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.81 (root@test5) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r11430-68d12ac1fe)) #0 SMP PREEMPT Wed Nov 13 07:58:39 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Dolphin PI
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0x7c/0x42c with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s31244 r8192 d22004 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line:
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53868K/65536K available (5928K kernel code, 396K rwdata, 1644K rodata, 2048K init, 242K bss, 11668K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7945 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 397 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 243 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000264] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000475] Console: colour dummy device 80x30
[    0.000988] console [tty0] enabled
[    0.001046] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001081] pid_max: default: 32768 minimum: 301
[    0.001258] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001293] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002290] CPU: Testing write buffer coherency: ok
[    0.002875] /cpus/cpu@0 missing clock-frequency property
[    0.002929] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060198] Setting up static identity map for 0x40200000 - 0x40200060
[    0.080198] rcu: Hierarchical SRCU implementation.
[    0.120331] smp: Bringing up secondary CPUs ...
[    0.120382] smp: Brought up 1 node, 1 CPU
[    0.120401] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.120419] CPU: All CPU(s) started in HYP mode.
[    0.120433] CPU: Virtualization extensions available.
[    0.123855] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.124609] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.124679] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.125042] pinctrl core: initialized pinctrl subsystem
[    0.126280] NET: Registered protocol family 16
[    0.126678] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.127803] No ATAGs?
[    0.184168] SCSI subsystem initialized
[    0.184644] usbcore: registered new interface driver usbfs
[    0.184774] usbcore: registered new interface driver hub
[    0.186734] usbcore: registered new device driver usb
[    0.187656] pps_core: LinuxPPS API ver. 1 registered
[    0.187699] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.187905] PTP clock support registered
[    0.189442] Advanced Linux Sound Architecture Driver Initialized.
[    0.195092] clocksource: Switched to clocksource arch_sys_counter
[    0.225809] NET: Registered protocol family 2
[    0.227372] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.227455] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.227491] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.227528] TCP: Hash tables configured (established 1024 bind 1024)
[    0.227691] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.227757] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.228087] NET: Registered protocol family 1
[    0.228507] kvm [1]: 8-bit VMID
[    0.229536] kvm [1]: Hyp mode initialized successfully
[    0.232458] No memory allocated for crashlog
[    0.233564] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.261957] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.262527] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.291017] io scheduler noop registered
[    0.291065] io scheduler deadline registered
[    0.291344] io scheduler cfq registered (default)
[    0.292234] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.299122] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.504713] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.532156] 1c28800.serial: ttyS0 at MMIO 0x1c28800 (irq = 32, base_baud = 1500000) is a U6_16550A
[    1.090321] console [ttyS0] enabled
[    1.108748] loop: module loaded
[    1.119116] spi-nand spi0.0: unknown raw ID 0067a800
[    1.124152] spi-nand: probe of spi0.0 failed with error -524
[    1.132691] libphy: Fixed MDIO Bus: probed
[    1.138852] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.144690] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.161507] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.168988] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.176318] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.181295] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.188144] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.193813] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.199514] dwmac-sun8i 1c30000.ethernet (unnamed net_device) (uninitialized): device MAC address da:78:ce:9a:b9:1d
[    1.210424] libphy: stmmac: probed
[    1.215605] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.222555] libphy: mdio_mux: probed
[    1.226417] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.232798] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.240657] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.248329] ehci-platform: EHCI generic platform driver
[    1.254021] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.260695] ohci-platform: OHCI generic platform driver
[    1.266752] usbcore: registered new interface driver usb-storage
[    1.273982] mousedev: PS/2 mouse device common for all mice
[    1.280555] sun4i-a10-lradc-keys 1c22800.lradc: Linked as a consumer to regulator.1
[    1.289171] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.298827] i2c /dev entries driver
[    1.304925] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.316538] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.350727] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.359427] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[    1.607717] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.622591] NET: Registered protocol family 10
[    1.639716] Segment Routing with IPv6
[    1.643518] NET: Registered protocol family 17
[    1.648721] can: controller area network core (rev 20170425 abi 9)
[    1.655611] NET: Registered protocol family 29
[    1.660104] 8021q: 802.1Q VLAN Support v1.8
[    1.664331] Registering SWP/SWPB emulation handler
[    1.678178] hctosys: unable to open rtc device (rtc0)
[    1.683634] ALSA device list:
[    1.687241]   No soundcards found.
[    1.692327] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.700139] Please append a correct "root=" boot option; here are the available partitions:
[    1.708787] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.717080] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.81 #0
[    1.723091] Hardware name: Allwinner sun8i Family
[    1.727836] [<c022af40>] (unwind_backtrace) from [<c0227ae8>] (show_stack+0x10/0x14)
[    1.735598] [<c0227ae8>] (show_stack) from [<c07b0588>] (dump_stack+0x88/0x9c)
[    1.742838] [<c07b0588>] (dump_stack) from [<c023a7cc>] (panic+0xec/0x278)
[    1.749728] [<c023a7cc>] (panic) from [<c0a013d8>] (mount_block_root+0x1c8/0x280)
[    1.757224] [<c0a013d8>] (mount_block_root) from [<c0a016c8>] (prepare_namespace+0x150/0x188)
[    1.765757] [<c0a016c8>] (prepare_namespace) from [<c0a00fa4>] (kernel_init_freeable+0x244/0x254)
[    1.774641] [<c0a00fa4>] (kernel_init_freeable) from [<c07c2b14>] (kernel_init+0x8/0x110)
[    1.782829] [<c07c2b14>] (kernel_init) from [<c02011f8>] (ret_from_fork+0x14/0x3c)
[    1.790403] Exception stack(0xc3839fb0 to 0xc3839ff8)
[    1.795459] 9fa0:                                     00000000 00000000 00000000 00000000
[    1.803642] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.811823] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.818456] Rebooting in 1 seconds..

最近编辑记录 xgui (2019-11-13 19:58:42)

离线

#65 2019-11-13 20:05:22

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

同一个文件烧到 MX flash, 可以识别id并执行mtd分区, 但是 rootfs 有问题:

U-Boot SPL 2019.10 (Nov 13 2019 - 07:58:39 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found Macronix MX35LF1GE4AB (c212c2)


U-Boot 2019.10 (Nov 13 2019 - 07:58:39 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Dolphin Pi
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Macronix SPI NAND was found.
128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Reading 4194304 byte(s) (2048 page(s)) at offset 0x00110000
Reading 65536 byte(s) (32 page(s)) at offset 0x00100000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   ARM OpenWrt Linux-4.19.81
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2925512 Bytes = 2.8 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Kernel Image
   Loading Device Tree to 42dfa000, end 42dffa7f ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.81 (root@test5) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r11430-68d12ac1fe)) #0 SMP PREEMPT Wed Nov 13 07:58:39 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Dolphin PI
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0x7c/0x42c with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s31244 r8192 d22004 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line:
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53868K/65536K available (5928K kernel code, 396K rwdata, 1644K rodata, 2048K init, 242K bss, 11668K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7945 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 397 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 243 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000267] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000478] Console: colour dummy device 80x30
[    0.000989] console [tty0] enabled
[    0.001045] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001082] pid_max: default: 32768 minimum: 301
[    0.001266] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001298] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002301] CPU: Testing write buffer coherency: ok
[    0.002891] /cpus/cpu@0 missing clock-frequency property
[    0.002945] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060201] Setting up static identity map for 0x40200000 - 0x40200060
[    0.080201] rcu: Hierarchical SRCU implementation.
[    0.120325] smp: Bringing up secondary CPUs ...
[    0.120377] smp: Brought up 1 node, 1 CPU
[    0.120396] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.120414] CPU: All CPU(s) started in HYP mode.
[    0.120428] CPU: Virtualization extensions available.
[    0.123859] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.124635] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.124703] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.125068] pinctrl core: initialized pinctrl subsystem
[    0.126305] NET: Registered protocol family 16
[    0.126703] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.127823] No ATAGs?
[    0.184165] SCSI subsystem initialized
[    0.184628] usbcore: registered new interface driver usbfs
[    0.184757] usbcore: registered new interface driver hub
[    0.186651] usbcore: registered new device driver usb
[    0.187584] pps_core: LinuxPPS API ver. 1 registered
[    0.187629] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.187835] PTP clock support registered
[    0.189454] Advanced Linux Sound Architecture Driver Initialized.
[    0.195092] clocksource: Switched to clocksource arch_sys_counter
[    0.225796] NET: Registered protocol family 2
[    0.227446] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.227532] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.227571] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.227606] TCP: Hash tables configured (established 1024 bind 1024)
[    0.227769] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.227837] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.228162] NET: Registered protocol family 1
[    0.228598] kvm [1]: 8-bit VMID
[    0.229621] kvm [1]: Hyp mode initialized successfully
[    0.232558] No memory allocated for crashlog
[    0.233676] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.261675] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.263371] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.291846] io scheduler noop registered
[    0.291893] io scheduler deadline registered
[    0.292174] io scheduler cfq registered (default)
[    0.293061] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.298666] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.506793] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.534322] 1c28800.serial: ttyS0 at MMIO 0x1c28800 (irq = 32, base_baud = 1500000) is a U6_16550A
[    1.091988] console [ttyS0] enabled
[    1.110222] loop: module loaded
[    1.120474] spi-nand spi0.0: Macronix SPI NAND was found.
[    1.126690] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.136019] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.142408] Creating 4 MTD partitions on "spi0.0":
[    1.147465] 0x000000000000-0x000000100000 : "u-boot"
[    1.156428] 0x000000100000-0x000000110000 : "dtb"
[    1.163986] 0x000000110000-0x000000510000 : "kernel"
[    1.171897] random: fast init done
[    1.181792] 0x000000ae0000-0x000008000000 : "rootfs"
[    1.380572] mtd: device 3 (rootfs) set to be root filesystem
[    1.387486] mtdsplit: no squashfs found in "rootfs"
[    1.394753] libphy: Fixed MDIO Bus: probed
[    1.400635] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.406925] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.423247] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.430724] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.438097] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.443077] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.449925] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.455637] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.461321] dwmac-sun8i 1c30000.ethernet (unnamed net_device) (uninitialized): device MAC address 56:7d:8a:cc:74:72
[    1.472253] libphy: stmmac: probed
[    1.477245] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.484189] libphy: mdio_mux: probed
[    1.488004] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.494383] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.502241] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.509922] ehci-platform: EHCI generic platform driver
[    1.515824] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.522122] ohci-platform: OHCI generic platform driver
[    1.528350] usbcore: registered new interface driver usb-storage
[    1.535928] mousedev: PS/2 mouse device common for all mice
[    1.541898] sun4i-a10-lradc-keys 1c22800.lradc: Linked as a consumer to regulator.1
[    1.550870] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.560460] i2c /dev entries driver
[    1.566751] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.578482] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.612403] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.621164] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[    1.867721] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.882180] NET: Registered protocol family 10
[    1.899845] Segment Routing with IPv6
[    1.903662] NET: Registered protocol family 17
[    1.908801] can: controller area network core (rev 20170425 abi 9)
[    1.915843] NET: Registered protocol family 29
[    1.920340] 8021q: 802.1Q VLAN Support v1.8
[    1.924572] Registering SWP/SWPB emulation handler
[    1.938349] hctosys: unable to open rtc device (rtc0)
[    1.943805] ALSA device list:
[    1.947435]   No soundcards found.
[    1.962482] random: crng init done
[    1.967813] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[    1.975376] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 1th superblock
[    1.986596] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0xe1a02000)
[    1.994458] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 2th superblock
[    2.002307] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[    2.009658] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 1th superblock
[    2.017388] F2FS-fs (mtdblock3): Magic Mismatch, valid(0xf2f52010) - read(0xe1a02000)
[    2.025275] F2FS-fs (mtdblock3): Can't find valid F2FS filesystem in 2th superblock
[    2.033097] List of all partitions:
[    2.036721] 1f00            1024 mtdblock0
[    2.036727]  (driver?)
[    2.043283] 1f01              64 mtdblock1
[    2.043286]  (driver?)
[    2.049909] 1f02            4096 mtdblock2
[    2.049913]  (driver?)
[    2.056552] 1f03          119936 mtdblock3
[    2.056557]  (driver?)
[    2.063104] No filesystem could mount root, tried:
[    2.063107]  ext3
[    2.068001]  ext2
[    2.069931]  ext4
[    2.071858]  squashfs
[    2.073784]  vfat
[    2.076075]  f2fs
[    2.078004]
[    2.081427] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[    2.089787] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.81 #0
[    2.095795] Hardware name: Allwinner sun8i Family
[    2.100539] [<c022af40>] (unwind_backtrace) from [<c0227ae8>] (show_stack+0x10/0x14)
[    2.108299] [<c0227ae8>] (show_stack) from [<c07b0588>] (dump_stack+0x88/0x9c)
[    2.115539] [<c07b0588>] (dump_stack) from [<c023a7cc>] (panic+0xec/0x278)
[    2.122430] [<c023a7cc>] (panic) from [<c0a01470>] (mount_block_root+0x260/0x280)
[    2.129925] [<c0a01470>] (mount_block_root) from [<c0a016c8>] (prepare_namespace+0x150/0x188)
[    2.138459] [<c0a016c8>] (prepare_namespace) from [<c0a00fa4>] (kernel_init_freeable+0x244/0x254)
[    2.147343] [<c0a00fa4>] (kernel_init_freeable) from [<c07c2b14>] (kernel_init+0x8/0x110)
[    2.155531] [<c07c2b14>] (kernel_init) from [<c02011f8>] (ret_from_fork+0x14/0x3c)
[    2.163104] Exception stack(0xc3839fb0 to 0xc3839ff8)
[    2.168160] 9fa0:                                     00000000 00000000 00000000 00000000
[    2.176343] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.184525] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    2.191157] Rebooting in 1 seconds..

请问是我的烧录文件有问题吗?或者是我的烧录方法有问题?

离线

#66 2019-11-13 20:19:38

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

我发现 rootfs 在 0x000000ae0000-0x000008000000 这个位置,
实际上我的 openwrt-sunxi-cortexa7-sun8i-v3s-dolphinpi-squashfs-spinand.img 这个烧录文件也才 0x6AFE16 个字节,所以根本没有烧录 rootfs

这是我编译出来的文件: openwrt-sunxi-cortexa7-sun8i-v3s-dolphinpi-20191113.tgz

@bamkrsde 请问这个文件正常吗?

最近编辑记录 xgui (2019-11-13 20:24:06)

离线

楼主 #67 2019-11-14 00:26:45

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Hey @all,

first of all sorry for being inactive at the moment, I worked hard to implement UBI and UBIFS for SPI-NAND (since the other fs did not work properly) and here it is.
I updated the repository once more, now everything works fine with an UBI image.
The UBI contains the dtb, kernel, u-boot-env and a UBIFS-rootfs thus we have a proper wear-leveling for all relevant parts. It takes some time to boot but this is an OK trade for a reliable filesystem.

However I think the sd-card-image is broken, at least I havent tested it on this version.

离线

#68 2019-11-14 09:21:56

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

Hey bamkrsde, 我刚刚重新git pull,编译,发现bin/targets/sunxi/cortexa7这个目录并没有生成UBI相关的文件,是我的操作有错误吗?我第一次使用openwrt, 请多多指教。

还有, 你说

However I think the sd-card-image is broken, at least I havent tested it on this version.

实际上我并没有使用sd card image了,都是使用 spi nand image.

离线

楼主 #69 2019-11-14 14:55:13

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

xgui 说:

Hey bamkrsde, 我刚刚重新git pull,编译,发现bin/targets/sunxi/cortexa7这个目录并没有生成UBI相关的文件,是我的操作有错误吗?我第一次使用openwrt, 请多多指教。

The image should now be in bin/targets/sunxi/openwrt-snapshot-r(git-revision)-sunxi-cortexa7-v3s-sun8i-v3s-dolphinpi-ubifs-ubispinand.img.gz. Thats a side effect of the refactoring I did in the sunxi-target Makefiles. Sorry I forgot to mention that!

The UBI is tweaked to a 128KiB block-size and 2048 page-size spi-nand. So all prior mentioned chips should run perfectly.
If not, this can be tweaked with make menuconfig in images (or something like that).

还有, 你说
实际上我并没有使用sd card image了,都是使用 spi nand image.

I have to fix it either way some time because I need it for development reasons. But its not my priority .

离线

#70 2019-11-14 15:31:17

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

可是我打开 make menuconfig  > Target Images 并没有发现有关于 ubi image 的相关设置:

│ │                                 [ ] ramdisk  ----                                                                                      │ │
  │ │                                     *** Root filesystem archives ***                                                                   │ │
  │ │                                 [ ] cpio.gz                                                                                            │ │
  │ │                                 [ ] tar.gz                                                                                             │ │
  │ │                                     *** Root filesystem images ***                                                                     │ │
  │ │                                 [*] ext4  --->                                                                                         │ │
  │ │                                 [*] squashfs  --->                                                                                     │ │
  │ │                                 [*] GZip images                                                                                        │ │
  │ │                                     *** Image Options ***                                                                              │ │
  │ │                                 (20) Boot (SD Card) filesystem partition size (in MB)                                                  │ │
  │ │                                 (2) SPI-NAND pagesize size                                                                             │ │
  │ │                                 (128) SPI-NAND block-size (in KiB) (NEW)                                                               │ │
  │ │                                 (1048576) Offset of ubi in the spi-nand (NEW)                                                          │ │
  │ │                                 (104) Root filesystem partition size (in MB)   

而且也不存在 bin/targets/sunxi/openwrt-snapshot-r(git-revision)-sunxi-cortexa7-v3s-sun8i-v3s-dolphinpi-ubifs-ubispinand.img.gz 这个文件.

离线

楼主 #71 2019-11-14 16:59:53

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Use the new spinand.config (cp spinand.config .config; make menuconfig)! The Targets changed! The make menuconfig should look like:

Target Systems (Allwinner A1x/A20/A3x/R48/V3s)
Subtarget (Allwinner V3s)
Target Profile (Petit-Miner Dolphin Pi)

离线

#72 2019-11-14 17:32:21

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde Thank you, I am try now. 正在编译,回家我就烧录。

离线

楼主 #73 2019-11-14 18:33:08

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Hey @xgui: I found a little bug that u-boot is not correctly build after the refactoring (it used an old one the whole time!) I fixed that.
So please run

git pull
cp spinand.config .config

again before building so you get a working newly-build u-boot.
And the Image was moved again (sorry! its all work in progress) this time to bin/targets/sunxi/cortexa7v3sspinand/openwrt-snapshot-r(git-revision)-sunxi-cortexa7v3sspinand-sun8i-v3s-dolphinpi-ubifs-ubispinand.img.gz

离线

#74 2019-11-14 20:20:53

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

Hey @bamkrsde, I have executed git pull and use new spinand.config,

并且生成了

bin/targets/sunxi/cortexa7v3sspinand/openwrt-snapshot-r11543+4-47658339b7-sunxi-cortexa7v3sspinand-sun8i-v3s-dolphinpi-ubifs-ubispinand.img.gz

但是在 Linux 出错

MX35LF1GE4AB:

[    1.133382] loop: module loaded
[    1.142930] spi-nand spi0.0: unknown raw ID 00000000
[    1.147940] spi-nand: probe of spi0.0 failed with error -524
[    1.156532] libphy: Fixed MDIO Bus: probed
[    1.162605] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.168413] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.185048] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.192416] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.199636] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.204653] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.211438] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.217139] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.223279] libphy: stmmac: probed
[    1.228298] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.235271] libphy: mdio_mux: probed
[    1.238896] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.245619] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.253963] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.260505] ehci-platform: EHCI generic platform driver
[    1.266966] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.273551] ohci-platform: OHCI generic platform driver
[    1.279426] usbcore: registered new interface driver usb-storage
[    1.286797] mousedev: PS/2 mouse device common for all mice
[    1.293417] sun4i-a10-lradc-keys 1c22800.lradc: Linked as a consumer to regulator.1
[    1.301965] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.311462] i2c /dev entries driver
[    1.317583] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.329333] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.361721] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.370373] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[    1.614264] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.629369] NET: Registered protocol family 10
[    1.646612] Segment Routing with IPv6
[    1.650412] NET: Registered protocol family 17
[    1.655632] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.668849] can: controller area network core (rev 20170425 abi 9)
[    1.675716] NET: Registered protocol family 29
[    1.680188] 8021q: 802.1Q VLAN Support v1.8
[    1.684923] Registering SWP/SWPB emulation handler
[    1.700313] UBI error: cannot open mtd 1, error -19
[    1.705738] hctosys: unable to open rtc device (rtc0)
[    1.711154] ALSA device list:
[    1.714320]   No soundcards found.
[    1.718759] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
[    1.727157] Please append a correct "root=" boot option; here are the available partitions:
[    1.735621] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.743887] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.82 #0
[    1.749884] Hardware name: Allwinner sun8i Family
[    1.754622] [<c022af40>] (unwind_backtrace) from [<c0227ae8>] (show_stack+0x10/0x14)
[    1.762370] [<c0227ae8>] (show_stack) from [<c0838728>] (dump_stack+0x88/0x9c)
[    1.769596] [<c0838728>] (dump_stack) from [<c023a7cc>] (panic+0xec/0x278)
[    1.776477] [<c023a7cc>] (panic) from [<c0c013dc>] (mount_block_root+0x1c8/0x280)
[    1.783960] [<c0c013dc>] (mount_block_root) from [<c0c01618>] (prepare_namespace+0x9c/0x188)
[    1.792392] [<c0c01618>] (prepare_namespace) from [<c0c00fa8>] (kernel_init_freeable+0x244/0x254)
[    1.801256] [<c0c00fa8>] (kernel_init_freeable) from [<c084acb4>] (kernel_init+0x8/0x110)
[    1.809428] [<c084acb4>] (kernel_init) from [<c02011f8>] (ret_from_fork+0x14/0x3c)
[    1.816986] Exception stack(0xc3833fb0 to 0xc3833ff8)
[    1.822032] 3fa0:                                     00000000 00000000 00000000 00000000
[    1.830200] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.838366] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.844987] Rebooting in 5 seconds..

W25N01GVxxIG:

[    1.133799] loop: module loaded
[    1.143482] spi-nand spi0.0: unknown raw ID 0067aa20
[    1.148497] spi-nand: probe of spi0.0 failed with error -524
[    1.157014] libphy: Fixed MDIO Bus: probed
[    1.163185] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.168993] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.185555] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.192932] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.200152] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.205173] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.212011] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.217667] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.223807] libphy: stmmac: probed
[    1.228827] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.235802] libphy: mdio_mux: probed
[    1.239426] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.246166] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.254577] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.261116] ehci-platform: EHCI generic platform driver
[    1.267594] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.274192] ohci-platform: OHCI generic platform driver
[    1.280062] usbcore: registered new interface driver usb-storage
[    1.287399] mousedev: PS/2 mouse device common for all mice
[    1.293991] sun4i-a10-lradc-keys 1c22800.lradc: Linked as a consumer to regulator.1
[    1.302572] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.312318] i2c /dev entries driver
[    1.318294] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.330031] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.361733] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.370401] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[    1.614282] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.629287] NET: Registered protocol family 10
[    1.646521] Segment Routing with IPv6
[    1.650313] NET: Registered protocol family 17
[    1.655507] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.668723] can: controller area network core (rev 20170425 abi 9)
[    1.675545] NET: Registered protocol family 29
[    1.680014] 8021q: 802.1Q VLAN Support v1.8
[    1.684792] Registering SWP/SWPB emulation handler
[    1.700007] UBI error: cannot open mtd 1, error -19
[    1.705510] hctosys: unable to open rtc device (rtc0)
[    1.710925] ALSA device list:
[    1.714088]   No soundcards found.
[    1.718502] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
[    1.726893] Please append a correct "root=" boot option; here are the available partitions:
[    1.735359] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.743627] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.82 #0
[    1.749624] Hardware name: Allwinner sun8i Family
[    1.754362] [<c022af40>] (unwind_backtrace) from [<c0227ae8>] (show_stack+0x10/0x14)
[    1.762110] [<c0227ae8>] (show_stack) from [<c0838728>] (dump_stack+0x88/0x9c)
[    1.769339] [<c0838728>] (dump_stack) from [<c023a7cc>] (panic+0xec/0x278)
[    1.776220] [<c023a7cc>] (panic) from [<c0c013dc>] (mount_block_root+0x1c8/0x280)
[    1.783701] [<c0c013dc>] (mount_block_root) from [<c0c01618>] (prepare_namespace+0x9c/0x188)
[    1.792133] [<c0c01618>] (prepare_namespace) from [<c0c00fa8>] (kernel_init_freeable+0x244/0x254)
[    1.800988] [<c0c00fa8>] (kernel_init_freeable) from [<c084acb4>] (kernel_init+0x8/0x110)
[    1.809161] [<c084acb4>] (kernel_init) from [<c02011f8>] (ret_from_fork+0x14/0x3c)
[    1.816719] Exception stack(0xc3833fb0 to 0xc3833ff8)
[    1.821765] 3fa0:                                     00000000 00000000 00000000 00000000
[    1.829931] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.838097] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.844717] Rebooting in 5 seconds..

离线

楼主 #75 2019-11-15 22:32:47

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Again, you have a timing problem.
Again, alter https://github.com/bhorn/openwrt/blob/dolphinpi-spinand/target/linux/sunxi/files-4.19/arch/arm/boot/dts/sun8i-v3s-dolphinpi.dts#L159 to a lower and suitable mhz (i.e. 24mhz)

离线

#76 2019-11-16 16:41:56

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

Hey @bamkrsde

我先 git pull, 然后 把 spi clock 修改成了 25000000, win32diskimager burn 之后, 出现这个问题:

U-Boot SPL 2019.10 (Nov 15 2019 - 14:24:05 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found Winbond W25N01GVxxIG (efaa21)
sunxi SPI-NAND: Loading u-boot from 0x40000
sunxi SPI-NAND: u-boot hcrc OK!


U-Boot 2019.10 (Nov 15 2019 - 14:24:05 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Dolphin Pi
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
Loading Environment from UBI... Winbond SPI NAND was found.
128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
ubi0 error: scan_peb: bad image sequence number 1573729378 in PEB 97, expected 1573827845
Erase counter header dump:
	magic          0x55424923
	version        1
	ec             1
	vid_hdr_offset 2048
	data_offset    4096
	image_seq      1573729378
	hdr_crc        0x23f91fb6
erase counter header hexdump:
00000000: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 00 00 08 00 00 00 10 00 5d cd 34 62 00 00 00 00  UBI#....................].4b....
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 23 f9 1f b6  ............................#...
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd2, error -22
UBI error: cannot attach mtd2
UBI error: cannot initialize UBI, error -22
UBI init error 22
Please check, if the correct MTD partition is used (size big enough?)

** Cannot find mtd partition "ubi0"
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   phy interface0
WARNING: emac: cannot find pinctrl-0 node
sunxi_set_gate: (CLK#26) unhandled
sunxi_set_reset: (RST#12) unhandled
Could not get PHY for ethernet@1c30000: addr 1
eth-1: ethernet@1c30000
Hit any key to stop autoboot:  0 
UBIFS error (pid: 1): cannot open "ubi0:kernel", error -19
Error reading superblock on volume 'ubi0:kernel' errno=-19!
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
UBIFS not mounted, use ubifs mount to mount volume first!
ubifsload - load file from an UBIFS filesystem

Usage:
ubifsload <addr> <filename> [bytes]
    - load file 'filename' to address 'addr'
UBIFS not mounted, use ubifs mount to mount volume first!
ubifsload - load file from an UBIFS filesystem

Usage:
ubifsload <addr> <filename> [bytes]
    - load file 'filename' to address 'addr'
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> 

然后 make clean, git reset, 再重新 make & burn, 还是同样的error.

离线

楼主 #77 2019-11-18 15:23:57

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Did you completly erase the spi-nand before writing to it? It looks like you didn't. Please read the UBI/UBIFS manuals.

离线

#78 2019-11-18 15:45:15

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

bamkrsde 说:

Did you completly erase the spi-nand before writing to it? It looks like you didn't. Please read the UBI/UBIFS manuals.

How should I completly erase the spi-nand,

use u-boot nand erase cmd ?

离线

#79 2019-12-04 10:47:35

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

U-Boot SPL 2019.10 (Nov 15 2019 - 14:24:05 +0000)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found Winbond W25N01GVxxIG (efaa21)
sunxi SPI-NAND: Loading u-boot from 0x40000
sunxi SPI-NAND: u-boot hcrc OK!


U-Boot 2019.10 (Nov 15 2019 - 14:24:05 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Dolphin Pi
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
Loading Environment from UBI... Winbond SPI NAND was found.
128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
ubi0 error: scan_peb: bad image sequence number 1573729378 in PEB 97, expected 1573827845
Erase counter header dump:
        magic          0x55424923
        version        1
        ec             1
        vid_hdr_offset 2048
        data_offset    4096
        image_seq      1573729378
        hdr_crc        0x23f91fb6
erase counter header hexdump:
00000000: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 00 00 08 00 00 00 10 00 5d cd 34 62 00 00 00 00  UBI#....................].4b....
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 23 f9 1f b6  ............................#...
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd2, error -22
UBI error: cannot attach mtd2
UBI error: cannot initialize UBI, error -22
UBI init error 22
Please check, if the correct MTD partition is used (size big enough?)

** Cannot find mtd partition "ubi0"
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   phy interface0
WARNING: emac: cannot find pinctrl-0 node
sunxi_set_gate: (CLK#26) unhandled
sunxi_set_reset: (RST#12) unhandled
Could not get PHY for ethernet@1c30000: addr 1
eth-1: ethernet@1c30000
Hit any key to stop autoboot:  0
UBIFS error (pid: 1): cannot open "ubi0:kernel", error -19
Error reading superblock on volume 'ubi0:kernel' errno=-19!
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
UBIFS not mounted, use ubifs mount to mount volume first!
ubifsload - load file from an UBIFS filesystem

Usage:
ubifsload <addr> <filename> [bytes]
    - load file 'filename' to address 'addr'
UBIFS not mounted, use ubifs mount to mount volume first!
ubifsload - load file from an UBIFS filesystem

Usage:
ubifsload <addr> <filename> [bytes]
    - load file 'filename' to address 'addr'
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> nand
Unknown command 'nand' - try 'help'
=>

u-boot have not nand command, how can erase nand?

离线

#80 2019-12-04 17:45:11

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

参考这个: https://lists.denx.de/pipermail/u-boot/2016-February/246137.html

V3s + W25N01GV 操作:

=> mtdparts

device spi-nand0 <0>, # parts = 2
 #: name                size            offset          mask_flags
 0: boot                0x00100000      0x00000000      0
 1: ubi0                0x07f00000      0x00100000      0

active partition: spi-nand0,0 - (boot) 0x00100000 @ 0x00000000

defaults:
mtdids  : spi-nand0=0
mtdparts: mtdparts=0:1M(boot),-(ubi0)
=> ubi part ubi0
ubi0 error: scan_peb: bad image sequence number 1573729378 in PEB 97, expected 1574671118
Erase counter header dump:
        magic          0x55424923
        version        1
        ec             1
        vid_hdr_offset 2048
        data_offset    4096
        image_seq      1573729378
        hdr_crc        0x23f91fb6
erase counter header hexdump:
00000000: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 00 00 08 00 00 00 10 00 5d cd 34 62 00 00 00 00  UBI#....................].4b....
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 23 f9 1f b6  ............................#...
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd2, error -22
UBI error: cannot attach mtd2
UBI error: cannot initialize UBI, error -22
UBI init error 22
Please check, if the correct MTD partition is used (size big enough?)
=>

离线

#81 2019-12-04 17:58:22

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

死马做活马医, 强行用 mtd erase 命令擦除 ubi0区:

=> mtd erase ubi0
Erasing 0x00000000 ... 0x07efffff (1016 eraseblock(s))
=>
=> ubi part ubi0
=>

重新用 win32diskimager 烧录进去, 启动OK:

[    1.129118] loop: module loaded
[    1.139120] spi-nand spi0.0: Winbond SPI NAND was found.
[    1.145015] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.154359] 2 fixed-partitions partitions found on MTD device spi0.0
[    1.160720] Creating 2 MTD partitions on "spi0.0":
[    1.165741] 0x000000000000-0x000000100000 : "boot"
[    1.175769] 0x000000100000-0x000008000000 : "ubi0"
[    1.182914] random: fast init done
[    1.405666] random: crng init done
[    1.555927] libphy: Fixed MDIO Bus: probed
[    1.562172] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.567979] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.584497] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.591853] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.599073] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.604128] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.610912] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.616590] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.622720] libphy: stmmac: probed
[    1.627724] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.634742] libphy: mdio_mux: probed
[    1.638366] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.645099] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.653544] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.660086] ehci-platform: EHCI generic platform driver
[    1.666565] ehci-platform 1c1a000.usb: EHCI Host Controller
[    1.673094] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    1.681060] ehci-platform 1c1a000.usb: irq 35, io mem 0x01c1a000
[    1.711605] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    1.717976] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    1.726288] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.733520] usb usb1: Product: EHCI Host Controller
[    1.738394] usb usb1: Manufacturer: Linux 4.19.85 ehci_hcd
[    1.743887] usb usb1: SerialNumber: 1c1a000.usb
[    1.749396] hub 1-0:1.0: USB hub found
[    1.753635] hub 1-0:1.0: 1 port detected
[    1.758905] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.765696] ohci-platform: OHCI generic platform driver
[    1.771353] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    1.778233] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    1.786348] ohci-platform 1c1a400.usb: irq 36, io mem 0x01c1a400
[    1.866557] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.19
[    1.874878] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.882110] usb usb2: Product: Generic Platform OHCI controller
[    1.888023] usb usb2: Manufacturer: Linux 4.19.85 ohci_hcd
[    1.893518] usb usb2: SerialNumber: 1c1a400.usb
[    1.899072] hub 2-0:1.0: USB hub found
[    1.903307] hub 2-0:1.0: 1 port detected
[    1.908864] usbcore: registered new interface driver usb-storage
[    1.916374] mousedev: PS/2 mouse device common for all mice
[    1.922888] sun4i-a10-lradc-keys 1c22800.lradc: Linked as a consumer to regulator.1
[    1.931186] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.940806] i2c /dev entries driver
[    1.947191] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.958858] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.991665] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    2.000394] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[    2.244226] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    2.258227] NET: Registered protocol family 10
[    2.276046] Segment Routing with IPv6
[    2.279822] NET: Registered protocol family 17
[    2.284918] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.298195] can: controller area network core (rev 20170425 abi 9)
[    2.305017] NET: Registered protocol family 29
[    2.309486] 8021q: 802.1Q VLAN Support v1.8
[    2.314269] Registering SWP/SWPB emulation handler
[    2.328377] ubi0: default fastmap pool size: 50
[    2.333513] ubi0: default fastmap WL pool size: 25
[    2.338313] ubi0: attaching mtd1
[    4.500200] ubi0: scanning is finished
[    4.532000] ubi0: attached mtd1 (name "ubi0", size 127 MiB)
[    4.537587] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.544867] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.551776] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.558733] ubi0: good PEBs: 1016, bad PEBs: 0, corrupted PEBs: 0
[    4.565005] ubi0: user volume: 4, internal volumes: 1, max. volumes count: 128
[    4.572294] ubi0: max/mean erase counter: 1/0, WL threshold: 128, image sequence number: 1574671118
[    4.581329] ubi0: available PEBs: 0, total reserved PEBs: 1016, PEBs reserved for bad PEB handling: 20
[    4.590682] ubi0: background thread "ubi_bgt0d" started, PID 1210
[    4.596829] hctosys: unable to open rtc device (rtc0)
[    4.602269] ALSA device list:
[    4.605244]   No soundcards found.
[    4.619442] UBIFS (ubi0:3): background thread "ubifs_bgt0_3" started, PID 1212
[    4.753564] UBIFS (ubi0:3): start fixing up free space
[    5.522755] UBIFS (ubi0:3): free space fixup complete
[    5.598874] UBIFS (ubi0:3): UBIFS: mounted UBI device 0, volume 3, name "rootfs"
[    5.606382] UBIFS (ubi0:3): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    5.616312] UBIFS (ubi0:3): FS size: 110342144 bytes (105 MiB, 869 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[    5.626919] UBIFS (ubi0:3): reserved for root: 0 bytes (0 KiB)
[    5.632762] UBIFS (ubi0:3): media format: w4/r0 (latest is w5/r0), UUID C9978655-2A1E-43FF-9481-401E1C7A1FD7, small LPT model
[    5.650986] VFS: Mounted root (ubifs filesystem) on device 0:12.
[    5.659861] Freeing unused kernel memory: 2048K
[    5.664630] Run /sbin/init as init process
[    6.055656] init: Console is alive
[    6.059475] init: - watchdog -
[    6.793632] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.845266] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.863256] init: - preinit -
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    8.494479] mount_root: mounting /dev/root
[    8.515764] mount_root: loading kmods from internal overlay
[    8.540814] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[    8.548758] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[    9.219065] block: attempting to load /etc/config/fstab
[    9.235841] block: unable to load configuration (fstab: Entry not found)
[    9.242848] block: no usable configuration
[    9.268207] urandom-seed: Seed file not found (/etc/urandom.seed)
[    9.310891] procd: - early -
[    9.317936] procd: - watchdog -
[   10.795907] procd: - watchdog -
[   10.799483] procd: - ubus -
[   10.869830] procd: - init -
Please press Enter to activate this console.
[   11.800925] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.870958] urngd: v1.0.1 started.
[   12.203367] xt_time: kernel timezone is -0000
[   12.349415] PPP generic driver version 2.4.2
[   12.357555] NET: Registered protocol family 24
[   12.386066] kmodloader: done loading kernel modules from /etc/modules.d/*
[   25.716348] Generic PHY 0.1:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0.1:01, irq=POLL)
[   25.744894] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[   25.785550] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[   25.840999] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[   25.899167] br-lan: port 1(eth0) entered blocking state
[   25.911868] br-lan: port 1(eth0) entered disabled state
[   25.931376] device eth0 entered promiscuous mode
[   25.951495] br-lan: port 1(eth0) entered blocking state
[   25.956870] br-lan: port 1(eth0) entered forwarding state
[   26.003582] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   26.724681] br-lan: port 1(eth0) entered disabled state
[   35.041628] vcc3v3: disabling
[   35.044623] vcc5v0: disabling



BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r11644-205ff32af0
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/#
root@OpenWrt:/#

终于启动, 泪水都快流出来了。


现在还是百思不得其解, 为什么一定要用 mtd erase ubi0 这个擦除命令呢?明明我用win32diskimager校验是正确的!


本站下载: openwrt-snapshot-r11644-205ff32af0-sunxi-cortexa7v3sspinand-sun8i-v3s-dolphinpi-ubifs-ubispinand_img.gz

解压后,用win32diskimager 烧入,校验正确之后再重启。

离线

#82 2019-12-04 22:59:09

歌以咏志
会员
注册时间: 2019-09-21
已发帖子: 219
积分: 210

Re: V3s SPI NAND u-boot @openwrt

太棒了, 强帖留名, 这种干货帖我喜欢.

离线

楼主 #83 2019-12-05 05:54:27

bamkrsde
会员
注册时间: 2019-10-31
已发帖子: 29
积分: 29

Re: V3s SPI NAND u-boot @openwrt

Sorry for not replying earlier. Please understand that I can only help you with generic problems. I wasn't able to tell you how you are able to erase your spi-nand because I don't know what tools and workflow you are using.

xgui 说:

终于启动, 泪水都快流出来了。


现在还是百思不得其解, 为什么一定要用 mtd erase ubi0 这个擦除命令呢?明明我用win32diskimager校验是正确的!

Its a bit difficult to explain. I'll try to make it as simple as possible.

Ubi stores some meta-data at every physical erase block (PEB). For example, your spi-nand has a PEB-size of 128K and a page-size of 2K.
The first 2 pages of each PEB is used to store metadata (erase-cycle-count and other data).
At every start, the ubi-driver iterates over all PEBs and tries to read the meta-data.
When you write your image to the spi-nand, all data is stored in the front of the spi-nand. After your image there is the free space to use that isn't touched while writing your image.
When the ubi-driver iterates over this free space, it sees some garbage meta-data, complains about it and throws an error.
Thus you have to delete the free space entirely so ubi actually identifies it as free space and not as used data-blocks with garbage meta-data.

I hope this explanation was good enough to understand the ubi-problem.

离线

#84 2019-12-05 08:28:28

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde

Thanks very much for your help, who from a distant friend.
I am very new to nand and ubi file systems. I am going to learn PEB.

非常感谢你这位来自远方朋友的帮助, 我对 nand 和 ubi 文件系统很陌生, 我现在去学习 PEB 方面的知识。

离线

#85 2019-12-05 08:51:05

童年的天空
会员
注册时间: 2019-12-05
已发帖子: 9
积分: 9

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde hello, It's recompiles the entire openwrt when Every time I enter the make  command. Why is that?

离线

#86 2019-12-05 09:06:47

如果我是一只熊猫
会员
注册时间: 2019-12-05
已发帖子: 3
积分: 3

Re: V3s SPI NAND u-boot @openwrt

@bamkrsde Thanks for you share, after burn the nand, and reboot system, I have not found any framebuffer device ? can I drive the lcd ?

离线

#87 2020-03-06 21:04:19

qmsolo2004
会员
注册时间: 2019-05-17
已发帖子: 2
积分: 1.5

Re: V3s SPI NAND u-boot @openwrt

感谢大神的技术分享!

离线

#88 2020-05-07 15:21:40

tom_xiao
会员
注册时间: 2020-05-07
已发帖子: 7
积分: 7

Re: V3s SPI NAND u-boot @openwrt

虽然快崩溃了,还是需要慢慢学习一下,流程是不是线挂载NAND 成U盘,然后通过dd 指令再把img 下载进去

离线

#89 2020-05-07 15:25:03

有梦的地方
会员
注册时间: 2020-03-17
已发帖子: 284
积分: 284

Re: V3s SPI NAND u-boot @openwrt

tom_xiao 说:

虽然快崩溃了,还是需要慢慢学习一下,流程是不是线挂载NAND 成U盘,然后通过dd 指令再把img 下载进去

对的,就是这样。
用win32diskimager或者dd都可以。

离线

#90 2020-05-21 16:15:08

auroal1
会员
注册时间: 2020-05-21
已发帖子: 7
积分: 7

Re: V3s SPI NAND u-boot @openwrt

牛逼,这令人羡慕的英文。uboot的spl的spi只有flash的驱动还需要魔改,还有就是即使2019.7月env也不支持spi nand,只能写到uboot内部

离线

#91 2020-09-19 20:02:43

shawn.d
会员
注册时间: 2020-09-12
已发帖子: 164
积分: 100

Re: V3s SPI NAND u-boot @openwrt

很有用的脚本。

离线

#92 2021-01-04 11:44:41

zhang235hai
会员
注册时间: 2020-04-06
已发帖子: 212
积分: 165

Re: V3s SPI NAND u-boot @openwrt

我已经成功使用SD卡启动系统,并且能使用mtd工具识别SPI NAND
怎么得到能用于SPI NAND的烧写文件呢?
gzip -cd /root/spinand.img.gz | mtd write - /dev/mtd0
这条指令的spinand.img.gz文件可以直接用buildroot得到吗?

离线

#93 2021-07-19 18:15:53

wzlxy
会员
注册时间: 2018-08-07
已发帖子: 11
积分: 0.5

Re: V3s SPI NAND u-boot @openwrt

谢谢楼主的分享,我这边已经用spi nand 验证通过了  ,已经用上热乎乎的openwrt了:cool:cool

离线

#94 2021-09-27 19:26:01

varzhou
会员
注册时间: 2020-07-14
已发帖子: 104
积分: 3

Re: V3s SPI NAND u-boot @openwrt

niubility(牛逼)!

离线

#95 2022-01-06 16:27:56

ultrawise
会员
注册时间: 2021-03-27
已发帖子: 4
积分: 3.5

Re: V3s SPI NAND u-boot @openwrt

有可能把spi-nand启动这部分,移植到主线uboot+主线linux上么?
平台:v3s
系统:主线uboot+主线linux

离线

#96 2022-01-24 14:42:31

晓枫VS枯叶
会员
注册时间: 2020-05-03
已发帖子: 12
积分: 2

Re: V3s SPI NAND u-boot @openwrt

ultrawise 说:

有可能把spi-nand启动这部分,移植到主线uboot+主线linux上么?
平台:v3s
系统:主线uboot+主线linux

主线的linux早就已经支持了,主线u-boot还需要脚本进行处理才能启动。

离线

#97 2022-05-05 16:14:47

jack599766257
会员
注册时间: 2022-04-09
已发帖子: 4
积分: 8

Re: V3s SPI NAND u-boot @openwrt

ultrawise 说:

有可能把spi-nand启动这部分,移植到主线uboot+主线linux上么?
平台:v3s
系统:主线uboot+主线linux

我已经搞定了 Uboot-2022.04+Linux5.2 但是根文件系统用的jffs2 重启两次就搞坏了 还在找原因。

离线

#98 2022-05-06 08:45:20

zhang235hai
会员
注册时间: 2020-04-06
已发帖子: 212
积分: 165

Re: V3s SPI NAND u-boot @openwrt

jack599766257 说:
ultrawise 说:

有可能把spi-nand启动这部分,移植到主线uboot+主线linux上么?
平台:v3s
系统:主线uboot+主线linux

我已经搞定了 Uboot-2022.04+Linux5.2 但是根文件系统用的jffs2 重启两次就搞坏了 还在找原因。

可以分享一下你是怎么做的吗?

离线

#99 2022-05-09 10:03:07

jack599766257
会员
注册时间: 2022-04-09
已发帖子: 4
积分: 8

Re: V3s SPI NAND u-boot @openwrt

@zhang235hai
已在主页更新U-Boot部分,内核和根文件系统待更,根文件系统已经换成了UBIFS,目前运行良好。

离线

#100 2023-03-24 09:42:47

bright
会员
注册时间: 2022-10-21
已发帖子: 10
积分: 0

Re: V3s SPI NAND u-boot @openwrt

大佬,能不能把网页升级这块的功能也搞出来,按你的方式移植成功了,但是不能网页升级!

离线

#102 2023-03-24 20:20:53

jolewe4317
会员
注册时间: 2023-03-24
已发帖子: 5
积分: 5

Re: V3s SPI NAND u-boot @openwrt

The problem that spl cannot run is that 4k page is read as 1k,  boot0 cannot start, can write spi nand ?

离线

#103 2023-09-03 20:08:12

sliver_cyh
会员
注册时间: 2021-12-07
已发帖子: 7
积分: 7

Re: V3s SPI NAND u-boot @openwrt

为啥我按照楼主的流程配置后,U-BOOT启动就出现这个问题
U-Boot SPL 2022.04 (Sep 03 2023 - 19:42:38 +0800)
DRAM: 64 MiB
Trying to boot from sunxi SPI-NAND
sunxi SPI-NAND: Found Macronix MX35LF1GE4AB (c212c2)
sunxi SPI-NAND: Loading u-boot from 0x20000
sunxi SPI-NAND: u-boot hcrc ERROR!
麻烦大佬们帮忙看下,感谢

离线

#104 2023-09-24 11:41:54

jflbr
会员
注册时间: 2023-09-13
已发帖子: 1
积分: 1

Re: V3s SPI NAND u-boot @openwrt

f1c200可以用 xfer烧写spinand,但我的s3(华嵌的)不能烧录,显示spinad id 0xffffffff.型号为mkdv1gcl(128m)

离线

#105 2024-01-21 11:51:47

dsp2000
会员
注册时间: 2024-01-21
已发帖子: 25
积分: 0

Re: V3s SPI NAND u-boot @openwrt

可以直接在WIN编译吗?

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn