Jump to content

RK3399 Orange Pi


Igor

Recommended Posts

Hi,

 

I tried today the latest image Armbian_20.02.1_Orangepi-rk3399_buster_current_5.4.20_desktop.img for the Orange Pi RK3399, and got

## Executing script at 00500000
Boot script loaded from mmc 1
102 bytes read in 17 ms (5.9 KiB/s)
34210 bytes read in 487 ms (14 MiB/s)
0722176 bytes read in 1353 ms (14.6 MiB/s)
* File not found /boot/dtb/ **
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
698 bytes read in 32 ms (82 KiB/s)
Applying kernel provided DT fixup script (rockchip-fixup.scr)
## Executing script at 39000000
## Loading init Ramdisk from Legacy Image at 04000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    7134146 Bytes = 6.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... K
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...

I know my board is nit-picky, and I will try another image, but does the log says anything that could be helpful?
Thanks.

Link to comment
Share on other sites

Same with image Armbian_20.02.1_Orangepi-rk3399_buster_legacy_4.4.213

 

canning mmc 1:1...
ound U-Boot script /boot/boot.scr
40 bytes read in 22 ms (129.9 KiB/s)
## Executing script at 00500000
Boot script loaded from mmc 1
102 bytes read in 17 ms (5.9 KiB/s)
674569 bytes read in 520 ms (14.1 MiB/s)
0492296 bytes read in 1338 ms (14.6 MiB/s)
* File not found /boot/dtb/ **
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
ile not found /boot/dtb/rockchip/overlay/rockchip-fixup.scr **
# Loading init Ramdisk from Legacy Image at 04000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    7674505 Bytes = 7.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ...
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
=>

 

Link to comment
Share on other sites

And another... Armbian_20.02.1_Orangepi-rk3399_bionic_legacy_4.4.213_desktop

940 bytes read in 22 ms (129.9 KiB/s)
## Executing script at 00500000
Boot script loaded from mmc 1
102 bytes read in 17 ms (5.9 KiB/s)
36013 bytes read in 583 ms (14.1 MiB/s)
0492296 bytes read in 1341 ms (14.6 MiB/s)
ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
* File not found /boot/dtb/rockchip/overlay/rockchip-fixup.scr **
  Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
=>
CTRL-A Z for help | 1500000 8N1 |

I suppose that the board is the problem, and not each and every Armbian image.

Link to comment
Share on other sites

39 minutes ago, gounthar said:

* File not found /boot/dtb/ **

Again, some "file not found" ...

Could be that you have an incompatible U-Boot present in the eMMC which prevent reading properly the SDCard images.

Make sure that you have TP50265 shorted to GND to disable the eMMC completely, and then it will boot using the U-Boot present on the SDCard.

Link to comment
Share on other sites

I now can remember why I had put this board aside for a few months...

Whenever I think I managed to get it to start on the SDCard, I get

DDR Version 1.08 20170320
In
hannel 0: DDR3, 800MHz
BMB
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
pmoot1: 2017-04-07, version: 1.06
CPUId = 0x0
ChipType = 0x10, 1838
2 0
BootCapSize=100000
UserCapSize=14910MB
FwPartOffset=2000 , 100000
SdmmcInit=0 0
BootCapSize=0
UserCapSize=15193MB
FwPartOffset=2000 , 0
StorageInit ok = 195484
LoadTrustBL
No find bl30.bin
o find bl32.bin
unBL31 0x40000
NOTI 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
INFO:    BL31: Initializing BL32

and nothing else. Never. Ever.

Link to comment
Share on other sites

2 hours ago, gounthar said:

nothing else

This U-Boot seems to be pretty old ...

 

The one I built recently is booting fine 5.6.2 from eMMC :

DDR Version 1.24 20191016
In
soft reset
SRX
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, 307
SdmmcInit=2 0
BootCapSize=100000
UserCapSize=14910MB
FwPartOffset=2000 , 100000
mmc0:cmd8,20
mmc0:cmd5,20
mmc0:cmd55,20
mmc0:cmd1,20
mmc0:cmd8,20
mmc0:cmd5,20
mmc0:cmd55,20
mmc0:cmd1,20
mmc0:cmd8,20
mmc0:cmd5,20
mmc0:cmd55,20
mmc0:cmd1,20
SdmmcInit=0 1
StorageInit ok = 67497
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=0xa5d94
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.01-armbian (Apr 06 2020 - 16:14:46 -0400)

Model: Orange Pi RK3399 Board
DRAM:  2 GiB
PMIC:  RK808 
MMC:   dwmmc@fe310000: 2, dwmmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial@ff1a0000
Out:   serial@ff1a0000
Err:   serial@ff1a0000
Model: Orange Pi RK3399 Board
rockchip_dnl_key_pressed: adc_channel_single_shot fail!
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
2940 bytes read in 19 ms (150.4 KiB/s)
## Executing script at 00500000
Boot script loaded from mmc 0
209 bytes read in 16 ms (12.7 KiB/s)
7746799 bytes read in 755 ms (9.8 MiB/s)
22217216 bytes read in 2122 ms (10 MiB/s)
74021 bytes read in 38 ms (1.9 MiB/s)
1266 bytes read in 33 ms (37.1 KiB/s)
Applying kernel provided DT overlay rockchip-spi-spidev.dtbo
2698 bytes read in 33 ms (79.1 KiB/s)
Applying kernel provided DT fixup script (rockchip-fixup.scr)
## Executing script at 39000000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    7746735 Bytes = 7.4 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 7d7be000, end 7df214af ... OK
   Loading Device Tree to 000000007d743000, end 000000007d7bdfff ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.6.2-rockchip64 (root@giroles-hpel8300) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #trunk SMP PREEMPT Mon Apr 6 16:26:34 EDT 2020
[    0.000000] Machine model: Orange Pi RK3399 Board
...

 

Link to comment
Share on other sites

Ok, I think I managed to get the pads to work ONE time...

And I managed to boot Armbian, thanks a lot for your help and patience...
Now, I'm using it through one USB2UART thingie on an OrangePi Zero, but I don't have all the characters...
So... Quick quick quick add Wifi via command line, and let's go to work.
Thanks a ton for your help!

Link to comment
Share on other sites

22 minutes ago, gounthar said:

I now have a working OrangePi RK3399, thanks a lot.

After transferring Armbian from SDCard to eMMC, next time you wish to boot SDCard, it will be less painful, no more needs of TP50265 ...

Simply stop U-Boot with spacebar, then you can select SD with "setenv devnum 1" followed by "run mmc_boot".

 

22 minutes ago, gounthar said:

I haven't seen on the download page that the wifi was non fonctional,

You need to switch firmware to another version :

mv /lib/firmware/brcm/brcmfmac4356-sdio.bin /lib/firmware/brcm/brcmfmac4356-sdio.bin-ORIG
mv /lib/firmware/brcm/brcmfmac4356-sdio.txt /lib/firmware/brcm/brcmfmac4356-sdio.txt-ORIG
cp /lib/firmware/brcm/brcmfmac4356-sdio-nanopi-m4v2.bin /lib/firmware/brcm/brcmfmac4356-sdio.bin
cp /lib/firmware/brcm/brcmfmac4356-sdio-nanopi-m4v2.txt /lib/firmware/brcm/brcmfmac4356-sdio.txt

 

Link to comment
Share on other sites

6.388066] systemd[1]: /lib/systemd/system/rk3399-bluetooth.service:6: Failed to parse service type, ignoring: exec
[    6.388184] systemd[1]: /lib/systemd/system/rk3399-bluetooth.service:11: Support for option SysVStartPriority= has been removed and it is ignored

 

lines from boot log, command armbianmonitor -u dumps log to remote server http://ix.io/2N9v - is this ok?

 

 

Link to comment
Share on other sites

and here are some more lines:

[    3.025330] of_get_named_gpiod_flags: parsed 'uart_rts_gpios' property of node '/wireless-bluetooth[0]' - status (0)
[    3.025346] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: uart_rts_gpios = 83.
[    3.025377] of_get_named_gpiod_flags: can't parse 'BT,power_gpio' property of node '/wireless-bluetooth[0]'
[    3.025427] of_get_named_gpiod_flags: parsed 'BT,reset_gpio' property of node '/wireless-bluetooth[0]' - status (0)
[    3.025441] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,reset_gpio = 9.
[    3.025488] of_get_named_gpiod_flags: parsed 'BT,wake_gpio' property of node '/wireless-bluetooth[0]' - status (0)
[    3.025502] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_gpio = 90.
[    3.025548] of_get_named_gpiod_flags: parsed 'BT,wake_host_irq' property of node '/wireless-bluetooth[0]' - status (0)
[    3.025562] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_host_irq = 4.
[    3.026068] [BT_RFKILL]: Request irq for bt wakeup host
[    3.026159] [BT_RFKILL]: ** disable irq
can anyone know how to defeat this?

Link to comment
Share on other sites

16 hours ago, piter75 said:

 

You can fix your current installation by running:


sudo sed -i s/Type=exec/Type=simple/g /lib/systemd/system/rk3399-bluetooth.service

followed by a reboot.

 

Bluetooth in legacy Bionic images will be fixed when they are built next time.

I did, but the Bluetooth Adapters application still does not start, of course there is no way to add Bluetooth devices, what else can you try?
Boot log output:

3.019909] of_get_named_gpiod_flags: parsed 'uart_rts_gpios' property of node '/wireless-bluetooth[0]' - status (0)
[    3.019927] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: uart_rts_gpios = 83.
[    3.019952] of_get_named_gpiod_flags: can't parse 'BT,power_gpio' property of node '/wireless-bluetooth[0]'
[    3.020002] of_get_named_gpiod_flags: parsed 'BT,reset_gpio' property of node '/wireless-bluetooth[0]' - status (0)
[    3.020018] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,reset_gpio = 9.
[    3.020067] of_get_named_gpiod_flags: parsed 'BT,wake_gpio' property of node '/wireless-bluetooth[0]' - status (0)
[    3.020082] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_gpio = 90.
[    3.020131] of_get_named_gpiod_flags: parsed 'BT,wake_host_irq' property of node '/wireless-bluetooth[0]' - status (0)
[    3.020146] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_host_irq = 4.
[    3.020702] [BT_RFKILL]: Request irq for bt wakeup host
[    3.020800] [BT_RFKILL]: ** disable irq
[    3.021030] [BT_RFKILL]: bt shut off power
[    3.043187] [BT_RFKILL]: bt_default device registered.

 

[    7.296310] systemd[1]: /lib/systemd/system/rk3399-bluetooth.service:11: Support for option SysVStartPriority= has been removed and it is ignored
 

Link to comment
Share on other sites

32 minutes ago, dimaxus said:

I did, but the Bluetooth Adapters application still does not start, of course there is no way to add Bluetooth devices, what else can you try?

 

At first I (somehow...) thought you were using OrangePi 4.

Now I see you have OrangePi RK3399 - the issue may stem from something else here.

The board has AP6356S module but rk3399-bluetooth service is configured as it was using AP6256.

 

Try one more substitution (and reboot):

 sudo sed -i s%BCM4345C5%BCM4356A2%g /lib/systemd/system/rk3399-bluetooth.service

 

Link to comment
Share on other sites

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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines