10-14-2019, 09:55 AM
(This post was last modified: 10-14-2019, 10:04 AM by simonsouth.
Edit Reason: Fix capitalization of ayufan's username
)
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
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.)
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
- 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
- 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
- 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
- Build U-Boot as usual, with commands like the following:
rm -f ./idbloader.img; make distclean
make rock64-rk3328_defconfig all u-boot.itb
- 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.)