Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qemu f1c100s can't boot Linux kernel due to SPI sun6i read data wrong with a offset 7 byte #2

Open
chuanjinpang opened this issue May 14, 2023 · 0 comments

Comments

@chuanjinpang
Copy link

the project qemu f1c100s is a great job for R&D. now the uboot can work well. however can't boot Linux kernel.
I debug it, and find the some issue about aw_sun6i_spi_xfer.
it read nor flash data as below.
81000000: 0x00000000 0xd0000000 0x00edfe0d 0x00000642
however , the good data is
hexdump -s 0x100000 sysimage-nor.img -n 100
0100000 0dd0 edfe 4200 1806 0000 3800 4200 ec01
finally, narrow down to below function. could I commit a patch after fix ?

----qemu debug log ------
aw_sun6i_spi: aw_sun6i_spi_xfer: spi xfer start
aw_sun6i_spi: aw_sun6i_spi_xfer: tx [0] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: rx [0] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: tx [1] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: rx [1] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: tx [2] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: rx [2] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: tx [3] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: rx [3] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: tx [4] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: rx [4] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: tx [5] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: rx [5] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: tx [6] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: rx [6] 00
aw_sun6i_spi: aw_sun6i_spi_xfer: tx [7] 00
m25p 80000:42
[Switching to Thread 0x7ffff5f43700 (LWP 33739)]

---- uboot NG log -----
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
device 0 offset 0x80000, size 0x80000
SF: 524288 bytes @ 0x80000 Read: OK
Unknown command 'bmp' - try 'help'
gpio: pin 134 (gpio 134) value is 1
Warning: value of pin is still 0
DFU waiting on SPI-NOR...
Booting from SPI-NOR...
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
device 0 offset 0x100000, size 0x500000
SF: 5242880 bytes @ 0x100000 Read: OK
Wrong Image Format for bootm command //here it's a bug
ERROR: can't get kernel image!
DFU waiting on SPI-NOR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant