Jump to content

Firefly RK3399 can't boot from sd after armbian install


Sergey Zapunidi

Recommended Posts

I have Firefly RK3399 board. I ran armbian from SD card successfully the first time. After full init, I ran nand-sata-flash.sh install script, also successfully. But then I can't boot from the same SD card anymore. I always boot from the eMMC memory.

I expected that boot sequence would be set on SD card first, then check eMMC.

Edited by Sergey Zapunidi
Link to comment
Share on other sites

58 minutes ago, Sergey Zapunidi said:

I expected that boot sequence would be set on SD card first, then check eMMC.

No ! All Rockchip SoC have boot sequence SPIFlash, eMMC and last SDCard.

I don't know if Firefly has a jumper or swtich to short the eMMC clock, if not, you have to leave booting u-boot from eMMC, then hit space bar before it start booting kernel, and manually do "setenv devnum 1" followed with "run mmc_boot" to force botting from SDCard.

 

EDIT : According to FireFly schematic, it seems it provide the TP31/TP32 test pads to short the clock...

Link to comment
Share on other sites

On 1/12/2019 at 5:56 PM, martinayotte said:
Quote

No ! All Rockchip SoC have boot sequence SPIFlash, eMMC and last SDCard.

It is possible to boot from eMMC, where its bootloader checks SD card for boot sector and boots from it if the test is positive. I believe that is how I booted from SD the first time, having Firefly official Lubuntu installed on eMMC. I wonder why Armbian do not use this way?

Quote

I don't know if Firefly has a jumper or swtich to short the eMMC clock, if not, you have to leave booting u-boot from eMMC, then hit space bar before it start booting kernel, and manually do "setenv devnum 1" followed with "run mmc_boot" to force botting from SDCard.

Space bar didn't work for me. I tried pressing space bar at the moment of the attached screenshot, few lines before, on the appearance of the first line, before that, seconds after that, but it all didn't disturb the booting sequence in any way.

 

I solved my initial problem with Rockchip AndroidTool software. Firefly has "Recovery" button that you press and hold before power up. It brings the board into MaskROM mode. Then you can install one of the official Ubuntu/Android images on eMMC and get booting from SD back. I had to change several USB-C cables and USB ports on PC, until it worked. Use short cable, connect closer to the USB host IC on the PC motherboard. Otherwise USB device is recognized and MaskROM status is displayed, but writing bootloader fails with no explanation. All software is downloadable from here: http://en.t-firefly.com/doc/download/3.html. Flashing instructions are here: http://wiki.t-firefly.com/en/Firefly-RK3399/flash-image.html#connect-device

Quote

EDIT : According to FireFly schematic, it seems it provide the TP31/TP32 test pads to short the clock...

Thank you for this suggestion. I may try it in the future. But it troubles me that EMMC_CLK (TP31) is directly connected to the RK3399 chip which drives it (see attached schematics). If I short circuit TP31 to TP32 (GND) then I short circuit push/pull output, which is usually risky. In my practice from the MCU world, continuous short circuit of TTL output pin usually leads to pin damage. Nevertheless I found that short circuiting TP31 and TP32 is in the official Firefly documentation: http://wiki.t-firefly.com/en/Firefly-RK3399/maskrom.html

 

log.jpg

emmc_clock.png

Link to comment
Share on other sites

48 minutes ago, Sergey Zapunidi said:

It is possible to boot from eMMC, where its bootloader checks SD card for boot sector and boots from it if the test is positive. I believe that is how I booted from SD the first time, having Firefly official Lubuntu installed on eMMC. I wonder why Armbian do not use this way?

If you tell me where to look in u-boot code, it will be a pleasure to enable that in future build. Until then, it is not Armbian who is responsible of this boot sequence, but Rockchip ...

 

50 minutes ago, Sergey Zapunidi said:

Space bar didn't work for me

Maybe because previous u-boot didn't have this feature enabled, but after having Armbian installed, you will see that it is enabled, you have 2 seconds to do it after the very first u-boot log print, then it will load the DT/uInitrd/kernel.

54 minutes ago, Sergey Zapunidi said:

If I short circuit TP31 to TP32 (GND) then I short circuit push/pull output, which is usually risky.

Right ! But this is a design flaw from FireFly, if I compare schematic with the one of RockPro, it's jumper is located after a 22ohms serial resistor, preventing complete short of the SoC output.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines