u-boot (forks) status
#1
Bug 
Hello.

I need to enable some addons in u-boot. Yesterday I resolved many problems/bugs/workarounds in simple enabling "usbkbd" in u-boot (with ayufan-rock64/linux-u-boot (rockchip-master)).

Actual (few) versions u-boot:
upstream
   - with independent rockchip development ?
   - missing support for Rock64
  -> fork rockchip-linux/u-boot
         - "release" branch - pulling randomly from upstream (actively developed) ?
         - missing support for Rock64
    -> fork ayufan-rock64/linux-u-boot
         - "rockchip-master" branch - last rebased/merged 12/2017 (actively developed)
         - "rebased-all-changes-on-release" branch - last rebased 04/2018 + summary commit 06/2018  
         - "mainline-master" branch - last rebased 06/2018 from upstream (not from rockchip-linux)

What is the best u-boot fork/branch for Rock64 ?
How many features/bugfixes are missing from u-boot upstream in rockchip-linux/u-boot fork and vice-versa ?
Is there any chance to that Rockchip joins u-boot upstream ?

For example differences in ehci-generic.c (used in Rock64):
upstream (+2/-1 patches) X rockchip-linux/u-boot (release) (+1/-2 patches)  X ayufan-rock64/linux-u-boot (rockchip-master) (-3 patches)
I left this community in Aug 2019 due to PINE64 refusal to produce/deliver ROCK64-1G version 3 after more than one year of changing statuses to "planning", "evaluating", "releasing", "availability", "estimated availability" and finally "no schedule" Angry. ROCK64 is dead platform without any advantage. Buy Raspberry PI 4 !
Away
  Reply
#2
(07-21-2018, 06:51 PM)mcerveny Wrote:          - missing support for Rock64
Wrong there is support for rock64, you can build u-boot using evb-rk3328_defconfig both mainline and rockchip-uboot

(07-21-2018, 06:51 PM)mcerveny Wrote: What is the best u-boot fork/branch for Rock64 ?
I've been playing with all the forks you mention,
so far my conclusion is: ayufan-uboot FTW.

(07-21-2018, 06:51 PM)mcerveny Wrote: How many features/bugfixes are missing from u-boot upstream in rockchip-linux/u-boot fork and vice-versa ?
Ayufan's u-boot has gmac and efuse  support,
thus it is able to get mac address (actually it reads the serial and transforms it into a mac) from efuse and pass it to the kernel,
the others can not, thus on each reboot you'll get a random mac which sucks if you assign "static" ip to the board via your dhcp server.

Ayufan's u-boot has spl support for rk3328 - easier building, no need for crap rockchip binaries in order to prepare final u-boot img.
I haven't checked other fetures as I don't need them, I was having problems with emmc calibration on soft reboot
and I thought u-boot was to blame, so I decided to find out which fork is more stable, however the problem was in kernel's dtb,
I screwed it up while porting a patch from somewhere.

(07-21-2018, 06:51 PM)mcerveny Wrote: Is there any chance to that Rockchip joins u-boot upstream ?
This question is better asked at rockchip's github repo, however their devs are not responsive at all and their support sucks.
  Reply
#3
(07-28-2018, 12:28 PM)asavah Wrote:
(07-21-2018, 06:51 PM)mcerveny Wrote:          - missing support for Rock64
Wrong there is support for rock64, you can build u-boot using evb-rk3328_defconfig both mainline and rockchip-uboot
No, generic "evb" is unusable on u-boot level for rock64 - no boot from SPI, no env save to SPI, no MAC-addresses (so no correct network boot), no Serial#, no LED (white+red).

(07-28-2018, 12:28 PM)asavah Wrote:
(07-21-2018, 06:51 PM)mcerveny Wrote: Is there any chance to that Rockchip joins u-boot upstream ?
This question is better asked at rockchip's github repo, however their devs are not responsive at all and their support sucks.
Yes, the same negative experience with rockchip  Angry .
I left this community in Aug 2019 due to PINE64 refusal to produce/deliver ROCK64-1G version 3 after more than one year of changing statuses to "planning", "evaluating", "releasing", "availability", "estimated availability" and finally "no schedule" Angry. ROCK64 is dead platform without any advantage. Buy Raspberry PI 4 !
Away
  Reply
#4
(07-28-2018, 02:05 PM)mcerveny Wrote: No, generic "evb" is unusable on u-boot level for rock64 - no boot from SPI, no env save to SPI, no MAC-addresses (so no correct network boot), no Serial#, no LED (white+red).

Well, that depends on the use case,  Tongue , I don't need network boot or SPI flash, I only need the damn thing to boot properly from emmc/sd. 
it's actually not *-defconfig or dtb/dtsi issue, but the lack of actual code - rockchip-uboot has the efuse and gmac code, but it lacks https://github.com/ayufan-rock64/linux-u...328.c#L159 ,
and some other goodies. For me both mainline and rockchip booted fine, except for the mac address,
honestly I was surprised when the board booted with mainline 2018.07 

Currently I'm going to stick with ayufan's repo but keep an eye on the other two.
  Reply
#5
I plan to switch with as much as possible to mainline uboot. My u-boot currently gets quickly outdated even against rockchip's u-boot Smile
Homepage: https://ayufan.eu

Releases:
Rock/Pro 64/Pinebook Pro: LinuxChromium OS
So/Pine A64/Pinebook: LinuxAndroid 6.0Android 7.1

Buy me a Beer
  Reply
#6
I've been doing a bit of work with mainline U-Boot recently and am happy to report that with a few patches applied, the latest revision works with the ROCK64 and allows the use of U-Boot's own tertiary program loader (TPL) in place of Rockchip's proprietary miniloader, removing another piece of non-free software from the stack.

I wasn't aware that ayufan's branch offered additional functionality (eFuse support, etc.) but will be doubling back at some point to see about getting these ported to the mainline version. Right now I'm working on identifying what's unique about ayufan's ARM Trusted Firmware branch and getting those changes pulled into separate patches so it can be brought up-to-date as well.

I'll write up a lengthier tutorial when I'm done but to start using the mainline version of U-Boot, assuming you have the prerequisites taken care of (the cross-compilation toolchain installed if needed, the ARM Trusted Firmware BL31 built and the CROSS_COMPILE and BL31 environment variables set appropriately), you'll need to

  1. Obtain a current version of the U-Boot source tree, either by downloading version 2019.10 from the U-Boot ftp site or by checking out the latest version from git with

    git clone git://git.denx.de/u-boot.git

  2. Apply these required patches, to fix issues with the RK3328 SDRAM driver that led to instability on the ROCK64:

    ram: rk3328: Use correct frequency units in function
    ram: rk3328: Fix loading of skew values

  3. Optionally, apply these recommended patches, especially the first if you intend to boot from a microSD card while having an eMMC module installed:

    rockchip: dts: rk3328: rock64: Add same-as-spl order
    clk: rockchip: rk3328: Configure CPU clock

  4. Build U-Boot as usual, with commands like the following:

    rm -f ./idbloader.img; make distclean
    make rock64-rk3328_defconfig all u-boot.itb

  5. Install U-Boot to a microSD card with commands like

    sudo dd if=./idbloader.img of=/dev/mmcblk0 seek=64
    sudo dd if=./u-boot.itb of=/dev/mmcblk0 seek=16384

You'll find a bit more detail in doc/README.rockchip and in U-Boot's main README file in the root folder.

More to follow. (If anyone else is working on bringing the ROCK64's software up-to-date relative to the mainline versions, I'd be happy to hear from you so we can coordinate our efforts.)
  Reply
#7
I'm now working on switching to mainline u-boot for all my distros and to provide exact same functionality. Seems fairly doable Smile
Homepage: https://ayufan.eu

Releases:
Rock/Pro 64/Pinebook Pro: LinuxChromium OS
So/Pine A64/Pinebook: LinuxAndroid 6.0Android 7.1

Buy me a Beer
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  doesn't boot, no video cjyar 7 234 11-15-2019, 03:45 PM
Last Post: ab1jx
  Unable to boot from SPI stevefan1999 4 791 05-01-2019, 04:47 PM
Last Post: rhens1
  No Boot, Red Green and White flash at 1 sec intervals wesleykonrad 2 313 01-28-2019, 11:54 PM
Last Post: wesleykonrad
  boot priority - has precedence changed? jovval 1 737 09-22-2018, 02:02 AM
Last Post: mcerveny
  Sent support order status , no responses RockPro64Newbie 2 237 09-16-2018, 11:57 AM
Last Post: RockPro64Newbie
  Enable I2C, I2s, SPI in boot-config file? HelgeMK 3 1,632 08-14-2018, 10:59 AM
Last Post: pas059
  New ROCK64 doesn't boot p3ntium 18 1,412 06-03-2018, 06:06 PM
Last Post: Rocklobster
  boot logs shows chinese ip trying to login ssh i69fstop 6 478 06-02-2018, 07:25 PM
Last Post: Z80
  Boot Problems, LEDs lit continuously Facecreator 22 2,873 05-14-2018, 10:24 PM
Last Post: pfeerick
  No boot at all Arkadiusz 4 852 04-18-2018, 08:48 PM
Last Post: pfeerick

Forum Jump:


Users browsing this thread: 1 Guest(s)