OpenNuvoton / NUC970_U-Boot_v2016.11

U-Boot v2016.11 for NUC970, N9H30, and NUC980
28 stars 45 forks source link

Problem booting from SPI NAND flash #29

Closed sushantdasputepatil closed 2 years ago

sushantdasputepatil commented 3 years ago

Hi Nuvoton,

We are using SPI NAND Flash W25N01GVZEIG with NUC980DK61Y. For this we are using nuvoton_nuc980_iot_defconfig. It is not booting after flashing uboot-spl.bin, uboot.bin and uImage. image

yachen commented 3 years ago

Not seeing this issue with nuc980_iot_defconfig on IoT board. Are you testing on IoT board?

 SPL load main U-Boot from SPI NAND Flash! (May 25 2021 18:27:34)

U-Boot 2016.11-g29843d5 (May 25 2021 - 18:27:34 +0800)

CPU: NUC980
Board: NUC980
DRAM:  64 MiB
NAND:  0 MiB
SF: Detected W25N01GV with page size 2 KiB, erase size 128 KiB, total 128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0
SF: Detected W25N01GV with page size 2 KiB, erase size 128 KiB, total 128 MiB
device 0 offset 0x200000, size 0x800000
SF: 8388608 bytes @ 0x200000 Read: OK
## Booting kernel from Legacy Image at 00007fc0 ...
sushantdasputepatil commented 3 years ago

Hi yachen,

Please suggest what can be the missing thread? We are referring IOT hardware but using SPI NAND Flash in 1bit mode. In schematic, SPI NOR FLASH - W25Q256JV part is mentioned, and currently we are trying to interface SPI NAND FLASH W25N01GVZEIG. PFA schematic, uboot config file and build images. uboot.config.txt c1-400.pdf may25_v4.zip

yachen commented 3 years ago

I think you're booting in 4-bit mode. Please check the console output.

sushantdasputepatil commented 3 years ago

Hi @yachen, we already tried setting PG[9:8]=01 (1 bit mode), but still, it is giving same problem. image (1)

yachen commented 3 years ago

Can you test my U-Boot image? uboot.zip

sushantdasputepatil commented 3 years ago

Hi yachen,

Thank you so much for the files. This files are working on our board but with YAFFS this is still not working, We are able to work with initramfs kernel image. We are using nuc980_iot_defconfig but still our uboot is not working. How can we build uboot that will work with spi nand flash.

yachen commented 3 years ago

Hi,

The image files I sent you was build from this repository using nuc980_iot_defconfig. I didn't make other modification.

Sincerely,

Yi-An Chen

sushantdasputepatil commented 3 years ago

Hi @yachen ,

Till the time we are using uboot files build by buildroot with nuc980_iot_defconfig, those files are not working, today I have seperately downloaded uboot repository from github and build images with same nuc980_iot_defconfig. Those images are now working on our board.

Thanks.

sushantdasputepatil commented 3 years ago

Hi,

We are able to boot into kernel now but not able to boot rootfs.yaffs2. Kernel is creating 3 mtd partitions used inband-tag argument but failed to mount rootfs. MicrosoftTeams-image (2)

Thanks

sushantdasputepatil commented 3 years ago

Hi @yachen here is our latest boot log in which rootfs failed to mount. Please check it and let us know if we are missing something. bootwithnufiles.txt

yachen commented 3 years ago

Did you program the rootfs into SPI NAND?

sushantdasputepatil commented 3 years ago

Yes.

yachen commented 3 years ago

Than try boot with ramfs as rootfs, mount yaffs2 manually and see how it works.

sushantdasputepatil commented 3 years ago

Hi I have tried ramfs first then tried to mount yaffs2 manually, here is the output. MicrosoftTeams-image (5)

yachen commented 3 years ago

You missed the inband-tags flag.

sushantdasputepatil commented 3 years ago

~ # ~ # mount -t yaffs2 -o"inband-tags" /dev/mtdblock2 /mnt yaffs: dev is 32505858 name is "mtdblock2" rw yaffs: passed flags "inband-tags" yaffs: yaffs: Attempting MTD mount of 31.2,"mtdblock2" yaffs: block 2 is bad yaffs: block 3 is bad yaffs: block 4 is bad yaffs: block 5 is bad yaffs: block 6 is bad yaffs: block 7 is bad yaffs: block 8 is bad yaffs: block 9 is bad yaffs: block 10 is bad . . . . yaffs: block 451 is bad yaffs: block 452 is bad yaffs: block 453 is bad yaffs: block 454 is bad yaffs: block 455 is bad yaffs: block 456 is bad yaffs: block 457 is bad yaffs: 5 blocks to be sorted... yaffs: yaffs_read_super: is_checkpointed 0 ~ # ~ # ~ # cd mnt/ /mnt # ls lost+found /mnt # /mnt # /mnt # cd .. ~ # cd mnt/ /mnt # cd .. ~ # umount /mnt yaffs: yaffs_put_super yaffs: yaffs_put_super done ~ # ~ #

sushantdasputepatil commented 3 years ago

Hi @yachen Do you have any update on this issue?