Page 1 of 1

u-boot incompatibility

Posted: Tue Jan 14, 2020 3:34 pm
by simeon
Why can't I use u-boot.img generated from https://github.com/rockchip-linux/u-boot on FriendlyARM-devices?
When I flash original rockchip-MiniLoader I brick the SOM-RK3399 or NanoPC-T4 and need to recover with tweezers.
More specifically: nanopi4-v2014.10_oreo from https://github.com/friendlyarm/uboot-rockchip includes several .bin-Files in tools/rk_tools/bin/rk33, some for ddr access and some for the miniloader. As far as I understand they are combined to MiniLoader.bin and get flashed when using maskrom or rockchip-usb. Why must they be specific for FriendlyARM devices, and cannot be generic? Where comes the incompatibility from?

Re: u-boot incompatibility

Posted: Wed Jan 15, 2020 4:43 am
by v8dave
Did you use the correct branch when you cloned the u-boot repository? That was my mistake a few years ago with one of the other boards.

Re: u-boot incompatibility

Posted: Wed Jan 15, 2020 9:11 am
by simeon
What is the correct branch for SOM-RK3399 or NanoPC-T4? Rockchip recommends next-dev which I used. I see Rockchip does not provide the .bin files like in FriendlyARMS's tools/rk_tools/bin directory. Are they built as TPL/SPL on the fly?
Also when the original u-boot from rockchip works with FriendlyARM-Devices, why does FriendlyARM makes an own one?
I'm digging in the docs to understand relationships and software-stacks since weeks but still don't grasp fundamental stuff, so sorry for the newbie questions.

Re: u-boot incompatibility

Posted: Wed Jan 15, 2020 9:24 am
by v8dave
No issues with newbie questions. It's how we all started out. :D

I am new to the T4 and just getting my head around the kernel, u-boot and the Android OS as I need a custom version and want to remove a lot of the FA stuff I don't need.

When I downloaded the T4 Android build, it included the kernel and uboot in the same directory and you used a script file to select what you wanted to build. I have not pulled any separate u-boot or kernel and made the changes to the existing ones that came with the complete download.

I used the following to download the code from Gitlab.

http://wiki.friendlyarm.com/wiki/index. ... ource_Code

Re: u-boot incompatibility

Posted: Wed Jan 15, 2020 12:52 pm
by simeon
Thanks for your reply. Let me rephrase my question:

Rockchip is the manufacturer of the rk3399. As chip manufacturer they could only provide a bootloader until stage 1 (http://opensource.rock-chips.com/wiki_Boot_option). To help distributors they also provide a complete BSP including a full-fledged bootloader (u-boot), a linux kernel and various rootfs images, including their sources, but only for their devkits like rockchip-sapphire-excavator. The sources from Rockchip are available at: https://github.com/rockchip-linux/

FriendlyARM is a distributor of the rk3399 with their T4/SOM-RK3399 boards. They provide also BSP including loader 1 (pre-compiled), u-boot, kernel, rootfs. The sources from FriendlyARM are available at eg. https://github.com/friendlyarm/

Now the u-boot from Rockchip and FriendlyARM are different and not exchangeable. If I flash u-boot from Rockchip on a T4 it will not even enter the MaskROM mode when pressing the recovery key. Why?

Re: u-boot incompatibility

Posted: Thu Jan 16, 2020 9:54 am
by simeon
So http://opensource.rock-chips.com/wiki_Boot_option describes two boot options: Rockchip-Miniloader and U-Boot TPL

https://www.denx.de/wiki/pub/U-Boot/Min ... tation.pdf

A TPL (Tertiary Program Loader) is required due to SRAM/L2 cache limitations. It can barely init the DDR RAM, and won't do fancy automatic stuff, that's why all initialization stuff is static.

A possible explanation would be that the RAM options between sapphire excavator and NanoPC-T4 are different. Looking at the BOMs/Schematics reveal:

sapphire-excavator RAM: LPDDR3-1866: K4E6E304EB-EGCF

NanoPC-T4 RAM: LPDDR3-1866: K4E6E304EB-EGCF

RAM is identical.

Maybe eMMC different?

sapphire-excavator eMMC: KLM8G1GEAC-B031

NanoPC-T4 eMMC: KLMAG2WEMB-B031

eMMC is identical.

Let me rephrase my question:

If I flash eg. https://github.com/JeffyCN/meta-rockchip with rockchip-rk3399-sapphire-excavator as MACHINE, it should at least bring some debug output or let me enter the maskrom mode. Why does this not work?

Re: u-boot incompatibility

Posted: Fri Mar 27, 2020 6:30 am
by KyleJ
As far as I understand they are combined to MiniLoader.bin and get flashed when using maskrom or rockchip-usb. Why must they be specific for FriendlyARM devices. auto clicker