Firefly Open Source Community

Title: Problem on Gitlab? [Print This Page]

Author: mansson    Time: 2/26/2018 21:41
Title: Problem on Gitlab?
Hi.
I can't pull the latest change from https://gitlab.com/TeeFirefly/FireNow-Nougat.git It looks like the commit made three weeks ago "1.fix the launcher black when booting 2.fix ADB connections 3.[ AIO-3399J… " by "omy" touched about 35.000 files. Was that intentional or is the branch firefly-rk3399  broken?

Author: leung先森    Time: 2/27/2018 09:19
it update to the Android7.1.2 from the 7.1.1 .
it s  fine.
Author: mansson    Time: 2/27/2018 23:45
Hm. Well, I can't make it boot. It worked fine before the update...

#Boot ver: 2017-12-29#1.06
empty serial no.
normal boot.
checkKey
vbus = 1
board_fbt_key_pressed: ir_keycode = 0x0, frt = 0
no fuel gauge found
no fuel gauge found
failed to find phy node
can't find power_ctr node for panel
enable[0] disable[0]
read logo on state from dts [1]
no fuel gauge found
can't find dts node for deviceinfo
dw_rk_hdmi_register:fail to read deviceinfo
hdmi baseparamer 0x0@0-0
[EDID-EXTEND] It is a  CEA 861 Series Extension.
no baseparametr,find best edid mode,vic=1121
hdmi_dev->video.vic is 4
rk lcdc - 0 dclk set: dclk = 74250000HZ, pll select = 0, div = 1
"Synchronous Abort" handler, esr 0x96000004
ELR:     59438fc
LR:      59210e4
x0 : 0000000005712e80 x1 : ffffffffffffffff
x2 : 0000000000000670 x3 : 0000000000000000
x4 : 0000000005712e80 x5 : 00000000000003e8
x6 : 00015752a0000001 x7 : 0000000000000020
x8 : 0000000000000000 x9 : 0000000000000008
x10: 0000000000000000 x11: 0000000000000000
x12: 000000000000000a x13: 0000000000000048
x14: 0000000000000008 x15: 000000002367b880
x16: 0000000000000000 x17: 0000000000000230
x18: 00000000056fd928 x19: 0000000000000019
x20: 0000000000000104 x21: 0000000005712550
x22: 00000000057125d0 x23: 0000000005712650
x24: 000000000595b2c0 x25: 0000000005712618
x26: 00000000056febb0 x27: 00000000000002d5
x28: 000000000000056e x29: 00000000056fd660

Resetting CPU ...

resetting ...
Author: leung先森    Time: 2/28/2018 09:28
mansson Posted at 2/27/2018 23:45
Hm. Well, I can't make it boot. It worked fine before the update...

#Boot ver: 2017-12-29#1.06

need to update loader
make sure loader and kernel resource is new.
Author: mansson    Time: 2/28/2018 16:43
OK, The flash page says "sudo upgrade_tool ul bootloader.bin #flash bootloader" but there is no file named bootloader.bin anywhere.I made a wild guess and did "sudo upgrade_tool ul rockdev/Image-rk3399_firefly_box/MiniLoaderAll.bin". Anyway, that makes no difference. The kernel, uboot etc is flashed from the latest build. I flash everything that is freshly built. I have only made one change relative Gitlab, that's the bug in mkimage.sh which I think you should fix. Wrong tune2fs gets invoked unless you give the full path, and the Debian version causes a hang when creating the image. I don't think this patch is in any way related to the boot problem.

diff --git a/mkimage.sh b/mkimage.sh
index a8d7f87d66..1760383a56 100755
--- a/mkimage.sh
+++ b/mkimage.sh
@@ -141,7 +141,7 @@ then
                 ok=0
                 while [ "$ok" = "0" ]; do
                     make_ext4fs -l $system_size $MAKE_EXT4FS_ARGS >/dev/null 2>&1 &&
-                    tune2fs -c -1 -i 0 $IMAGE_PATH/system.img >/dev/null 2>&1 &&
+                    prebuilts/android-emulator/linux-x86_64/bin64/tune2fs -c -1 -i 0 $IMAGE_PATH/system.img >/dev/null 2>&1 &&
                     ok=1 || system_size=$(($system_size + 5242880))
                 done
                 e2fsck -fyD $IMAGE_PATH/system.img >/dev/null 2>&1 || true

Here's the console output with the updated Loader. It looks more like a hardware confusion. Does the loader use the same device tree as the kernel? I'm using the classic rk-3399 Firefly which I think you call "box" as opposed to some newer "AIO" version. Can there be any confusion about that after the upgrade?

#Boot ver: 2018-02-27#1.09
empty serial no.
normal boot.
checkKey
vbus = 1
board_fbt_key_pressed: ir_keycode = 0x0, frt = 0
no fuel gauge found
no fuel gauge found
failed to find phy node
can't find power_ctr node for panel
enable[0] disable[0]
read logo on state from dts [1]
no fuel gauge found
can't find dts node for deviceinfo
dw_rk_hdmi_register:fail to read deviceinfo
hdmi baseparamer 0x0@0-0
[EDID-EXTEND] It is a  CEA 861 Series Extension.
no baseparametr,find best edid mode,vic=1121
hdmi_dev->video.vic is 4
rk lcdc - 0 dclk set: dclk = 74250000HZ, pll select = 0, div = 1
"Synchronous Abort" handler, esr 0x96000004
ELR:     59438fc
LR:      59210e4
x0 : 0000000005712e80 x1 : ffffffffffffffff
x2 : 0000000000000670 x3 : 0000000000000000
x4 : 0000000005712e80 x5 : 00000000000003e8
x6 : 00015752a0000001 x7 : 0000000000000020
x8 : 0000000000000000 x9 : 0000000000000008
x10: 0000000000000000 x11: 0000000000000000
x12: 000000000000000a x13: 0000000000000048
x14: 0000000000000008 x15: 000000002367b880
x16: 0000000000000000 x17: 0000000000000230
x18: 00000000056fd928 x19: 0000000000000019
x20: 0000000000000104 x21: 0000000005712550
x22: 00000000057125d0 x23: 0000000005712650
x24: 000000000595b2c0 x25: 0000000005712618
x26: 00000000056febb0 x27: 00000000000002d5
x28: 000000000000056e x29: 00000000056fd660

Resetting CPU ...

resetting ...

Author: mansson    Time: 3/1/2018 16:25
Just confirming that reverting to the 7.1.1 label works OK. The main difference I can see in the logs is from something called BL31.
The working 7.1.1. boot contains: NOTICE:  BL31: Built : 16:55:03, Mar 31 2017
The non-working 7.1.2 contains: NOTICE:  BL31: Built : 10:18:20, Jul 27 2017
The non-working boot log contains trustzone-related output that is not present in the working boot log:
INFO:    BL31: Initializing BL32
INF [0x0] TEE-CORE:init_primary_helper:337: Initializing (1.1.0-96-g3fbe315-dev #4 Fri Jun 30 00:35:17 UTC 2017 aarch64)
INF [0x0] TEE-CORE:init_primary_helper:338: Release version: 1.1
INF [0x0] TEE-CORE:init_teecore:83: teecore inits done
and
Reserve memory for trust os.
dram reserve bank: base = 0x08400000, size = 0x01000000

BL32 seems to be not present in the working boot. One theory could be that 7.1.2 has some secure boot features enabled that is causing the abort?

Another theory could be that it has to do with hdmi. The next line in the working boot log is:
"hdmi_dev_config_video vic 4 color_output 3 color_output_depth 8" On the non-working boot it crashes right here.

A third observation is that the dpll clock has been increased from 792 to 800 MHz. Not sure that is significant though.

Hope this information can help.
Author: leung先森    Time: 3/1/2018 19:51
mansson Posted at 3/1/2018 16:25
Just confirming that reverting to the 7.1.1 label works OK. The main difference I can see in the log ...

./FFTools/make.sh -j4   
./FFTools/mkupdate/mkupdate.sh
command above for complie the whole image ,  it will make sure your whole image completely.

or try the trust.img , uboot.img ,rk3399_loader_v1.08.109.bin , flash them together.
Author: mansson    Time: 3/2/2018 17:19
Thanks,
I am already using the make and mkupdate scripts as described on http://wiki.t-firefly.com/index.php/Firefly-RK3399/Flash_image/en
Thank you for finding rk3399_loader_v1.08.109.bin for me. It doesn't however change anything.

The crash occurs in u-boot in either drivers/video/rockchip_fb.c or drivers/video/rockchip_vop.c. If I pull out the HDMI cable before boot there will be no crash but I will boot into recovery. Can anyone boot this release on a RK-3399 box with no panel but a 4K HDMI screen attached?

Author: mansson    Time: 3/2/2018 21:25
Update.
After Low-formatting and reflashing absolutely everything, I can actually get 7.1.2 to run. But still - I need to boot without HDMI and then reinsert the cable later. U-boot will crash otherwise. That's a degrade. I tried  different screens, same result.
Author: leung先森    Time: 3/5/2018 09:54
mansson Posted at 3/2/2018 21:25
Update.
After Low-formatting and reflashing absolutely everything, I can actually get 7.1.2 to run. ...

So weird.
Have you try the official firmware to confirm this ?
Author: mansson    Time: 3/5/2018 17:04
Not sure what you mean by official firmware.My origin is https://gitlab.com/TeeFirefly/FireNow-Nougat.git That's all there is, isn't it? Are there any prebuilt images of 7.1.2 for rk3399_firefly_box-userdebug available anywhere?

I'm doing a 'Make clean' followed by './FFTools/make.sh -j4 && ./FFTools/mkupdate/mkupdate.sh' again now, just to be sure, but I actually did that before. I also received an AIO board a couple of days ago so I can check if that board shows the same behavior. We are committed to 4K and 60 fps, so any confirmation that anyone got 7.1.2 working with such a screen and cable inserted at boot would be appreciated.

Author: mansson    Time: 3/19/2018 19:40
This is still unsolved. I am using the original gitlab 7.1.2, last commit is 6ef1ea24af
I build and flash:
sudo upgrade_tool di -b rockdev/Image-rk3399_firefly_box/boot.img
sudo upgrade_tool di -k rockdev/Image-rk3399_firefly_box/kernel.img
sudo upgrade_tool di -s rockdev/Image-rk3399_firefly_box/system.img
sudo upgrade_tool di -r rockdev/Image-rk3399_firefly_box/recovery.img
sudo upgrade_tool di -m rockdev/Image-rk3399_firefly_box/misc.img
sudo upgrade_tool di resource rockdev/Image-rk3399_firefly_box/resource.img
sudo upgrade_tool di -p rockdev/Image-rk3399_firefly_box/parameter.txt
sudo upgrade_tool ul ./u-boot/rk3399_loader_v1.08.109.bin
sudo upgrade_tool di trust rockdev/Image-rk3399_firefly_box/trust.img

Now the device does not boot unless I pull out the HDMI cable. It crashes in u-boot:
dw_rk_hdmi_register:fail to read deviceinfo
hdmi baseparamer 0x0@0-0
[EDID-EXTEND] It is a  CEA 861 Series Extension.
no baseparametr,find best edid mode,vic=1121
hdmi_dev->video.vic is 4
rk lcdc - 0 dclk set: dclk = 74250000HZ, pll select = 0, div = 1
"Synchronous Abort" handler, esr 0x96000004

/Tony
Author: leung先森    Time: 3/29/2018 19:53
mansson Posted at 3/19/2018 19:40
This is still unsolved. I am using the original gitlab 7.1.2, last commit is 6ef1ea24af
I build and ...

Thanks for report.
RK have update a way to solve some HDMI cannot get the edid causing no display.It will merge into the firefly sdk.





Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1