lanefu changed the topic of #armbian-rockchip to: Armbian - Linux for ARM development boards | Rockchip SoC | www.armbian.com | This channel is relayed to the equivalent Discord channel | this channel is logged
<DC-IRC> [Discord] <alexl83> Hello Friends!
<DC-IRC> [Discord] <alexl83> Guys does anyone have experience on cross-compiling u-boot for rk3588?
<DC-IRC> [Discord] <alexl83> I'd love to try out kwiboo rkxxx-2024.10 branch for my upcoming rock5b, but I'm stuck at ATF not supporting yet rk3588
<DC-IRC> [Discord] <alexl83> I know armbian goes without ATF by using BINMAN, but can't wrap my head around just by looking at board config
<DC-IRC> [Discord] <alexl83> u-boot README is way above my hackish-mcgyverish knowledge level
<DC-IRC> [Discord] <kwiboo> Please see https://docs.u-boot.org/en/latest/board/rockchip/rockchip.html#building, should be pretty easy to build U-Boot, export `ROCKCHIP_TPL` and `BL31`, then build using `make CROSS_COMPILE=aarch64-linux-gnu- rock5b-rk3588_defconfig all`
<DC-IRC> [Discord] <alexl83> Thanks @kwiboo reading now, I think I understand I have to clone rkbin and package u-boot with rockchip miniloader; it that correct?
<DC-IRC> [Discord] <alexl83> What would differ from using u-boot TPL/SPL?
<DC-IRC> [Discord] <kwiboo> Yes, you need the rkbin repo, but you do not need miniloader, just clone the rkbin repo and export reference to the bl31 and ddr blob, check under `To build rk3588 boards:`
<DC-IRC> [Discord] <alexl83> ok
<DC-IRC> [Discord] <kwiboo> After that you should have a `u-boot-rockchip.bin` (and possible also a `u-boot-rockchip-spi.bin`) that can be written to SD-card/eMMC (or flashed to SPI flash, not something I recommend unless you know what you are doing)
<DC-IRC> [Discord] <alexl83> Thank you!
<DC-IRC> [Discord] <alexl83> I'm trying to check radxa rock5b ddr speed, there are two ddr blobs, one 2400mhz and other 2736mhz speed
<DC-IRC> [Discord] <kwiboo> I would use the one with highest version number, sometime they forget to remove an older version when new versions is added
<DC-IRC> [Discord] <kwiboo> and also check https://github.com/rockchip-linux/rkbin/blob/master/doc/release/RK3588_EN.md for changes and bugfixes in the binary blobs
<DC-IRC> [Discord] <alexl83> wow, thanks a lot, I'm starting to understand!!
<DC-IRC> [Discord] <alexl83> I'm also changing config for my board, enabling /chosen/kasrl-seed and armv8_crypto
<DC-IRC> [Discord] <alexl83> hope it doesn't explode 😄
<DC-IRC> [Discord] <kwiboo> to my knowledge latest U-Boot `master` or the `v2024.10-rc3` (scheduled for tomorrow) should probably already include most to enable rng, kasrl and armv8 crypto extensions (currently used to speed up sha256 checksum check)
<DC-IRC> [Discord] <alexl83> in rock5b-defconfig where not enabled
<DC-IRC> [Discord] <alexl83> but code is def there
<DC-IRC> [Discord] <alexl83> let's see if it. builds
<DC-IRC> [Discord] <alexl83> is missing gnutls.h header
<DC-IRC> [Discord] <alexl83> need to find the right package
<DC-IRC> [Discord] <alexl83> done, it worked
<DC-IRC> [Discord] <alexl83> tomorrow hopefully I'll get my board and test it
<DC-IRC> [Discord] <alexl83> will integrate this version in armbian board definition in the meantime - thanks a lot @kwiboo 🙏🏻
<DC-IRC> [Discord] <kwiboo> there are defaults set for entire soc target beside the options listed in defconfig file, e.g in https://github.com/u-boot/u-boot/blob/master/arch/arm/mach-rockchip/Kconfig#L344-L376 etc, check your `.config` after initial `make <board>_defconfig` to see exact options that is enabled
<DC-IRC> [Discord] <alexl83> ok, doing now
<DC-IRC> [Discord] <kwiboo> ahh, `ARMV8_CRYPTO` may not be listed, it is possible it was left disabled on RK356x and RK3588 because it did not work, board froze or the sha256 checksum failed to validate
<DC-IRC> [Discord] <alexl83> # CONFIG_BOARD_RNG_SEED is not set
<DC-IRC> [Discord] <alexl83> # CONFIG_ARMV8_CRYPTO is not set
<DC-IRC> [Discord] <alexl83> yep
<DC-IRC> [Discord] <alexl83> will test them with userpatches hooks and see if that works or not, I'm confident rng_Seed will work
<DC-IRC> [Discord] <alexl83> I backported its patchset to 2024.07 and it works flawlessly
<DC-IRC> [Discord] <kwiboo> great, if I remember correctly there was some type of issue trying to use `ARMV8_CRYPTO` on RK35xx back when I enabled it by default for RK33xx
<DC-IRC> [Discord] <alexl83> I'll try it out and keep you posted; love tinkering with this things
<DC-IRC> [Discord] <alexl83> hopefully rk3588 support in ATF will be merged in decent time
<DC-IRC> [Discord] <alexl83> big patchset on gerrit
<DC-IRC> [Discord] <alexl83> thanks bro, I learnt a lot !
<DC-IRC> [Discord] <kwiboo> no problem, and please let me know if you get `ARMV8_CRYPTO` working 🙂
<DC-IRC> [Discord] <alexl83> yep!