Jump to content

Firfly-rk3399 have not been booting up reasent images from Armbian


Recommended Posts

Posted

Unfortunately, I can't test the M2 operation. I don't have an adapter to connect the NVMe module to the board. Without an adapter, it is impossible to connect a standard NVMe module (the USB connectors interfere, they are double height), you need to look for a short version of NVMe, but I have not seen such for a long time. But I do know that the latest versions of ArmbianTV run perfectly from the SD card (i'm tested). The kernel versions 4.4 and 5.10 work. The composition has a DTB specifically for firefly-rk3399 (although with DTB for rk3399-pc-plus, everything works the same, except for BT and analog sound). I hope to send a patch for the main core to the official build system soon, this will allow the official Armbian versions on Firefly-rk3399 to work properly.

Posted
  On 2/16/2021 at 11:08 AM, denni_isl said:

 

Some progress,  rk3399-nanopi-m4.dtb does bring everyting up exept hdmi - the others on the list did just end at Starting kernel .....rk3399-orangepi-4.dtb does also bring up the board.

  On 2/16/2021 at 11:08 AM, denni_isl said:

 

Some progress,  rk3399-nanopi-m4.dtb does bring everyting up exept hdmi - the others on the list did just end at Starting kernel .....

rk3399-orangepi-4.dtb does also bring up the board.

 

 

  Reveal hidden contents

 

But no hdmi connection - just UART

 

 

apt update - apt upgrade

and the new image boots up

 

 

 

Screenshot_2021-02-16_11-18-07.png

Screenshot_2021-02-16_11-49-26.png

Expand  

 

Expand  

Thank you,it helps me a lot.Change to rk3399-nanopi-m4.dtb really works well.I have booted Armbian_21.02.3_Firefly-rk3399_buster_current_5.10.21.img from SD card,and it seems nothing worng but HDMI.Did anyone tested the M.2 PCIE slot?

d0fe1add6bbb7013.png

 

Posted

Weird, even though after loading the overlay file for either of those two other boards (rk3399-nanopi-m4.dtb or rk3399-orangepi-4.dtb) gets me past the "Starting kernel..." log message, boot for 5.10.21 still doesn't complete for me - now I get stuck at the "fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!" log entry. Since this particular line points at a problem with the .dtb file (which makes sense, either of those files are not meant for this board) it's puzzling why this would work for others.

 

I'm using the following (U-Boot 2020.10-armbian):

ext4load mmc 1 0x49000000 /boot/dtb-5.10.21-rockchip64/rockchip/rk3399-nanopi-m4.dtb
ext4load mmc 1 0x46000000 /boot/Image
env set fdt_high ffffffff
booti 0x46000000 - 0x49000000

Posted
  On 4/5/2021 at 1:04 PM, balbes150 said:

don't reinvent the wheel, all  versions already work correctly with Fyrefly-rk3399 with native DTB.

Expand  

 

Nobody is reinventing the wheel @balbes150. This thread tracks issues booting from SD with some of the versions, in particular current - your statement that "all versions already work correctly" is overconfident and simply not true.

Posted
  On 4/5/2021 at 1:04 PM, balbes150 said:

don't reinvent the wheel, all  versions already work correctly with Fyrefly-rk3399 with native DTB.

Expand  

It seems not working on my firefly-rk3399 borad……(2G RAM). I've tried buliding the new version Armbian_21.05.0-trunk_Firefly-rk3399_buster_current_5.10.27.img,but the board stopped at “Starting kernel”.Then I edited the armbianEnv.txt,changed the dtb file to rockchip/rk3399-nanopi-m4.dtb, the board can boot into system,though it takes me about 2-3 minutes……

 

DDR Version 1.19 20190305
In
Channel 0: DDR3, 800MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Channel 1: DDR3, 800MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
256B stride
ch 0 ddrconfig = 0x101, ddrsize = 0x20
ch 1 ddrconfig = 0x101, ddrsize = 0x20
pmugrf_os_reg[2] = 0x32817281, stride = 0x9
OUT
Boot1: 2019-03-14, version: 1.19
CPUId = 0x0
ChipType = 0x10, 231
SdmmcInit=2 0
BootCapSize=100000
UserCapSize=14910MB
FwPartOffset=2000 , 100000
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=60906MB
FwPartOffset=2000 , 0
StorageInit ok = 224328
SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit read PBA: 0x1404
SecureInit read PBA: 0x1804
SecureInit read PBA: 0x1c04
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT 0x3380ec0 signature is wrong
recovery gpt...
GPT 0x3380ec0 signature is wrong
recovery gpt fail!
LoadTrust Addr:0x4000
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xcefb8
RunBL31 0x40000
NOTICE:  BL31: v1.3(debug):42583b6
NOTICE:  BL31: Built : 07:55:13, Oct 15 2019
NOTICE:  BL31: Rockchip release version: v1.1
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    plat_rockchip_pmu_init(1190): pd status 3e
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2020.10-armbian (Apr 05 2021 - 15:11:52 +0000)

SoC: Rockchip rk3399
Reset cause: POR
Model: Firefly ROC-RK3399-PC Mezzanine Board
DRAM:  2 GiB
PMIC:  RK808
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPIFlash... unrecognized JEDEC id bytes: ff, ff, ff
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Model: Firefly ROC-RK3399-PC Mezzanine Board
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
3185 bytes read in 4 ms (777.3 KiB/s)
## Executing script at 00500000
Boot script loaded from mmc 1
117 bytes read in 4 ms (28.3 KiB/s)
13104621 bytes read in 557 ms (22.4 MiB/s)
33300992 bytes read in 1410 ms (22.5 MiB/s)
77021 bytes read in 11 ms (6.7 MiB/s)
2698 bytes read in 8 ms (329.1 KiB/s)
Applying kernel provided DT fixup script (rockchip-fixup.scr)
## Executing script at 09000000
Moving Image from 0x2080000 to 0x2200000, end=4260000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    13104557 Bytes = 12.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to 7929a000, end 79f195ad ... OK
   Loading Device Tree to 000000007921e000, end 0000000079299fff ... OK

Starting kernel ...
 

Posted
  On 4/5/2021 at 5:07 PM, adzio said:

Nobody is reinventing the wheel @balbes150. This thread tracks issues booting from SD with some of the versions, in particular current - your statement that "all versions already work correctly" is overconfident and simply not true.

Expand  

 

If you do not want to read and do not see the recommendations, you can continue to waste time, I am not going to prove anything to you and waste time on you.

 

  On 4/6/2021 at 12:20 PM, Niang Min said:

Then I edited the armbianEnv.txt,

Expand  

Try these versions, they have all the latest fixes.

https://users.armbian.com/balbes150/station-p1/

Posted

@balbes150 It works both ways. I can choose not to waste my time and not to get involved with folks whose first reaction is to generalize and spew negativity rather than to internalize feedback and to make it actionable.

 

I had tried debugging your CSC software to get it to even finish booting and you decided to disparage me that I’m reinventing the wheel.

 

I've seen, read and followed your recommendations and they didn’t work, simple as that. I'm not a noob with Linux, but well above enthusiast level.

 

Your custom Armbian_21.05.0-trunk_Station-p1_focal_current_5.10.25.img.xz image boots to prompt on my setup. So we’re getting somewhere. My board has two PCIe modules attached, without which it’s quite useless to me. So that's probably the difference (the issue) booting bare board vs. with PCIE attached but the board should still finish booting with any 5.10 image. This configuration boots fine with other flavors (debian, ubuntu) with both modules attached, so it should work here too.

 

The issue in these Release images may be PCIe related. The station version boots with the PCIe -110 error in dmsg and lspci output is empty. Perhaps the other versions don’t finish boot because they are running into some sort of PCIe init issue. BTW the station image is different than what is shipped in other Armbian 5.10 images because the -110 error is absent there and lspci has correct output (basically, my PCIE stuff works on Armbian 5.10 + Rock Pi 4C).

 

So, a bug found in the field. No problem, but also no need to throw feces at people for reporting and no need to disparage them when they’re trying to debug from their side which in the end may only help you, like in this case.

Posted (edited)

The newest images are not booting out of the box  did though get Armbian_22.11.0-trunk_Firefly-rk3399_sid_current_5_19.14.img to boot

 

  Quote

changing  extlinux.conf - fdt /boot/dtb/rockchip/rk3399-roc-pc-plus.dtb 

Expand  

 

- it is working quite well with rk3399-roc-pc-plus device blog except there is no wifi at all.

 

Trying to compile with this line bullseye kernel 5.19 server image

 

  Quote

sudo ./compile.sh CLEAN_LEVEL=make,debs,images,alldebs,cache EXTRAWIFI=yes CREATE_PATCHES=yes EXPERT=yes NO_APT_CACHER=yes

Expand  

 

get tihis error;

  Quote

drivers/usb/dwc3/host.c:110:11: error: ‘struct dwc3’ has no member named ‘xhci_trb_ent_quirk’; did you mean ‘dis_u1_entry_quirk’?
make[3]: *** [scripts/Makefile.build:249: drivers/usb/dwc3/host.o] Error 1
make[2]: *** [scripts/Makefile.build:466: drivers/usb/dwc3] Error 2
make[1]: *** [scripts/Makefile.build:466: drivers/usb] Error 2
make: *** [Makefile:1846: drivers] Error 2
[ error ] ERROR in function compile_kernel [ functions/cli/cli-entrypoint.sh:108 -> functions/main/default-build.sh:63 -> functions/compilation/kernel.sh:142 -> functions/logging/traps.sh:0 ]
[ error ] Kernel was not built [ @host ]
[ o.k. ] Process terminated

Expand  

    -------------

This is beound my scope

This seems to be the case

 

https://www.kernel.org/doc/html/v5.16/driver-api/usb/dwc3.html

 

 

Edited by denni_isl
Posted

Did get Arbian 22.08 bullseye kernel 5.19.16-media to work by copying rk3399-firefly.dtb from a working 5.15.27-media

 

The boot up error

 

  Quote

fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!

Expand  

 

Found this

 

  Reveal hidden contents

 

Posted (edited)

After copying rk3399-firefly.dtb from Armbian 22.05-0-trunk Bullseye 5.15.27-media to Armbian_22.11.0-trunk_Firefly-rk3399_sid_current_5.19.14

it did work fine.  

 

 

Edited by denni_isl
Posted


3 Nov 22

Was able to compile Armbian (22.11.0-trunk) Kernel: 6.0.6-media for firefly-rk3399 with

sudo ./compile.sh CLEAN_LEVEL=make,debs,images,alldebs,cache EXTRAWIFI=yes CREATE_PATCHES=yes
EXPERT=yes NO_APT_CACHER=yes

 

and apply this patch to drivers/usb/dwc3/core.c

+ #include <linux/ectcon.h>

 

and copy /boot/dtb/rockchip/firefly-rk3399.dtb from a SD card with Arbian with kernel 5.15.27-media
to /boot/dtb/rockchip/ on the new Armbian 22.11.0-trunk kernel 6.0.6 image

 

 

Posted

The console is completely different now - it used to be blurred.  I usually set up usable console; sudo apt install console-data console-setup  (for right keyboard)  and sudo dpkg-reconfigure keyboard-configuration and sudo dpkg-reconfigure console-data > sudo dpkg-reconfigure console-setup - utf8 - latin1 - termus - 11x22

 

Now the console on firefly-rk3399 is Cristal clear with the new kernel 6 

Posted

I finally got Armbian working on my Firefly RK3399 thanks to your efforts here.
Then i ran gparted to check for the ominous extra partitions but i had none of them.

 

Maybe i can give back something: During all my attempts to get any images from Firefly working i understood i had to erase the flash first to be able to move from Android to Ubuntu. And to be able to erase the flash one would have to use the right upgrade_tool version that came with the Android release.

 

In my case i had to get the old version v1.24 running on my linux machine (32Bit App on 64Bit linux). And i had to have either a boot loader or a firmware to erase. 

 

I happened to have a MiniLoaderAll.bin (attached) from a previous expansion of a Firefly Ubuntu img file and i could use that to erase the flash successfully.

Again i tried to erase the flash with current version of upgrade_tool v2.1 and it failed but i could now flash their Ubuntu images with it.

 

Maybe the successful erase with the right upgrade_tools did remove the ominous partitions you still seem to have.

MiniLoaderAll.binFetching info...

Posted

@Archetrix @balbes150

I have purchased a Firefly RK3399 board which has Android 8.1 on it. I can start it with Ubuntu 20.04 downloaded from T-Firefly website on a TF card. I can enter loader mode and maskrom mode. My questions how can I install armbian on EMMC. Can you give me a much detailed guide.

 

Thanks a lot.

Posted
  On 10/8/2023 at 6:34 AM, Huifeng Shen said:

I have purchased a Firefly RK3399 board which has Android 8.1 on it. I can start it with Ubuntu 20.04 downloaded from T-Firefly website on a TF card. I can enter loader mode and maskrom mode. My questions how can I install armbian on EMMC. Can you give me a much detailed guide.

Expand  

Have you tried writing to an Armbian SD card from this theme and trying to launch it?

Posted
  On 10/10/2023 at 6:30 AM, Huifeng Shen said:

The photo and the ttl is added later

Expand  

A strange model, there are not many components. Now I have compiled new versions 20231010 current (6.5.5) and edge (6.6.-rc5) for Firefly-rk3399 and checked out the launch. Everything starts from the SD card and works without problems. I checked the installation on eMMC - it works. These images have a built-in u-boot, which ensures that the system starts even if it is not on the eMMC. Try to completely erase the eMMC and check the launch from the SD card. If the system does not start, the UART console is needed, without it it is impossible to find out the cause of the error. By the way, the built-in u-boot supports displaying the process on the HDMI monitor screen and selecting the system. If you do not have any display at startup, it means that u-boot does not start (or does not work). Perhaps a special u-boot is needed for your specific model.

Posted (edited)

@balbes150 I succeed to run `Armbian_23.10_Firefly-rk3399_lunar_edge_6.6.0.img` and `Armbian_23.8.1_Firefly-rk3399_jammy_current_6.1.50.img` on SD card. Thank you very much. Would you please help me a favor, how to fix the following error on UART

 

mmc: ERROR: SDHCI:Transfer data timeout
mmc: ERROR: SDHCI ERR:cmd:0x153a,stat:0x0
mmc: ERROR: Tuning procedure failed, falling back to fixed sampling clock
mmc: ERROR: tuning execution failed
emmc reinit

 

Edited by Huifeng Shen
Add more information
Posted

The full complete log when start Armbian for firefly rk3399

 

DDR Version 1.26 20210628
In
Channel 0: DDR3, 800MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Channel 1: DDR3, 800MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
256B stride
ch 0 ddrconfig = 0x101, ddrsize = 0x20
ch 1 ddrconfig = 0x101, ddrsize = 0x20
pmugrf_os_reg[2] = 0x32817281, stride = 0x9
OUT
Boot1 Release Time: May 29 2020 17:36:36, version: 1.26
CPUId = 0x0
ChipType = 0x10, 337
mmc: ERROR: SDHCI:Transfer data timeout
mmc: ERROR: SDHCI ERR:cmd:0x153a,stat:0x0
mmc: ERROR: Tuning procedure failed, falling back to fixed sampling clock
mmc: ERROR: tuning execution failed
emmc reinit
mmc: ERROR: SDHCI:Transfer data timeout
mmc: ERROR: SDHCI ERR:cmd:0x153a,stat:0x0
mmc: ERROR: Tuning procedure failed, falling back to fixed sampling clock
mmc: ERROR: tuning execution failed
emmc reinit
mmc: ERROR: SDHCI:Transfer data timeout
mmc: ERROR: SDHCI ERR:cmd:0x153a,stat:0x0
mmc: ERROR: Tuning procedure failed, falling back to fixed sampling clock
mmc: ERROR: tuning execution failed
SdmmcInit=2 1
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=30145MB
FwPartOffset=2000 , 0
StorageInit ok = 488421
SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit read PBA: 0x1404
SecureInit read PBA: 0x1804
SecureInit read PBA: 0x1c04
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT part:  0, name:           Ventoy, start:0x800, size:0x3acffd8
GPT part:  1, name:          VTOYEFI, start:0x3ad07d8, size:0x10000
no find partition:uboot.
Trust Addr:0x4000, 0x58334c42
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xd9f08
RunBL31 0x40000 @ 612057 us
NOTICE:  BL31: v1.3(release):845ee93
NOTICE:  BL31: Built : 15:51:11, Jul 22 2020
NOTICE:  BL31: Rockchip release version: v1.1
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    plat_rockchip_pmu_init(1196): pd status 3e
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2022.04-armbian (Aug 22 2023 - 15:24:21 +0000)

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines