Booting from SD card having u-boot image written in SPI flash corrupts SD card boot partition

  1. I soldered SPI flash to v1.3 board.
  2. U-boot written in SPI, following:
    https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD
  3. Booting Debian from SD card for the first time works as before SPI flash written.
  4. After the first successful Debian boot, it is not possible to boot any more from this SD card, regardless SPI flash.
  5. Each time boot.img has to be restored to SD card to be able to boot from SD card again.

Comparing binary images of original and corrupted SD card boot partition I found the differences:

 original                                         corrupted
00019804 FF FF                                    00 00
0003283A 02                                       00
000328E0 00 00 00 00 00 00 00 00 00 00 00         46 53 43 4B 30 30 30 30 52 45 43
000328FA 00 00 00 00                              03 00 00 08
00036800 2E 20 20 20 20 20 20 20 20 20 20 10 FF   46 53 43 4B 30 30 30 30 30 30 30 00 DF
0003681A 02                                       00
00036800 2E 2E 20 20 20 20 20 20 20 20 20 10 FF   46 53 43 4B 30 30 30 30 30 30 31 00 DF

I am going to watch your progress on the v 1.3 board, yesterday I “attempted” to solder
an spi nand chip onto the ver 1.3 pcb, I got the four tabs on the right side soldered in ok.
The other four pins were three or four tries and then I decided my non-reflow skills just aren’t up to it for installing smd ic’s.

So I have the nand chip partially installed. the board skill boots, green power, then red heatheat flash after boot from sd,… I guess I will leave soldering smd too someone that has the right tools

My next attempt was going to be to install little wire jumpers from the four left side tabs on the pcb, then solder them to the side of the chip.

edit: maybe not all the tabs/leads are required… I will be checking the data sheets

external SPI 25Q64Fx works also, dont need solder

Interesting option, I ordered two of the W25Q64JVSSIQ chips, I pretty much melted
off the bent tabs on my first couple soldering attempts SOIC_8_t

first attempt–


but I could slide a white paper under the left tabs

1 Like

@Zoran

Do you have the serial console log of the none booting sd card log? If I guess correctly, you might find a bug which will be helpful for the dev team.

Jack, here are the console dumps:
http://www.hdinfo.hr/private/RockPi4DebugBootDumps.zip

If you need something else, I’ll be happy to provide it.

Zoran

I noticed one strange thing about the console debug cable and RockPi4 v1.3 with SPI programmed SPI flash and no SD card present: The RockPi won’t start from SPI if the debug cable is connected before power on (nothing from the serial console and red LED stays off).
The serial cable have to be plugged in just a moment after power on to work.
If the SD card is present it boots from SPI flash, the debug cable doesn’t matter.
Still, booting from SD card while SPI is present with boot image will corrupt the SD card image, as I reported in the first post.