Skip to content

Commit

Permalink
Update to the newest version of everything
Browse files Browse the repository at this point in the history
Update atf, rockpro, and u-boot.

Also modify the default baud rate to be 115200 for better compatibility
with other stuff.

Signed-off-by: Corey Minyard <[email protected]>
  • Loading branch information
cminyard committed Jun 28, 2023
1 parent cc5865a commit cf5c3d8
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 7 deletions.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ arm-tf-clean:
# u-boot
################################################################################

U-BOOT_PATCHES = u-boot-rockpro64-115200baud.patch
U-BOOT_PATH = $(ROOT)/u-boot
U-BOOT_BUILD ?= $(U-BOOT_PATH)/build

Expand All @@ -65,7 +66,13 @@ U-BOOT_EXPORTS ?= \
BL31=${TF_A_OUT}/bl31/bl31.elf \
ARCH=arm64

u-boot: arm-tf
u-boot-patches-applied:
for i in $(U-BOOT_PATCHES); do \
(cd $(U-BOOT_PATH); patch -p1 <../$$i); \
done
touch u-boot-patches-applied

u-boot: arm-tf u-boot-patches-applied
if test ! -e $(U-BOOT_BUILD); then mkdir $(U-BOOT_BUILD); fi
if test ! -e $(U-BOOT_BUILD)/.config; then \
cd $(U-BOOT_PATH) && \
Expand All @@ -76,6 +83,8 @@ u-boot: arm-tf

u-boot-clean:
rm -rf $(U-BOOT_BUILD)
(cd $(U-BOOT_PATH); git reset --hard)
rm -f u-boot-patches-applied

################################################################################
# u-boot
Expand Down
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ SystemReady OSes.

## Building

To build it, you will need to install an aarch64 compiler, probably in
a package named "gcc-aarch64-linux-gnu". Then check out this repository
and "cd" do it. Then do:
To build it, you will need to install an aarch64 and arm compiler,
probably in packages named "gcc-aarch64-linux-gnu" and
"gcc-arm-none-eabi". You will also need "python3-setuptools". Then
check out this repository and "cd" do it. Then do:

```
git submodule init
Expand All @@ -26,6 +27,14 @@ files:
The makefile will spit out instruction on how to burn it at the end of
the run.

## Baud Rate

The standard baud rate for these boards is 1500000 baud, for some
strange reason. The default baud rate for an ARM systemready image is
115200. So there are patches here to adjust the baud rate to 115200.
If you are following the instructions elsewhere, be sure to account
for this.

## Installing

The rk3399 boots from SPI first, followed by eMMC, followed by the SD
Expand Down Expand Up @@ -82,6 +91,17 @@ where <size> is the size (in hex) reported by the download. You can
also "dd" it to /dev/mtdblock0 on Linux. Don't forget to sync before
rebooting.

## Upgrading

If you upgrade from an older version of this, in u-boot you may need
to run:

```
env default -a
env save
```
and the reset. The older environment will not work.

## Bypassing SPI boot

If your SPI gets messed up or the boot process fails for some reason,
Expand Down
1 change: 1 addition & 0 deletions RockPro64.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_BAUDRATE=115200
2 changes: 1 addition & 1 deletion atf
Submodule atf updated from 35f4c7 to d3e71e
2 changes: 1 addition & 1 deletion rkbin
Submodule rkbin updated 342 files
2 changes: 1 addition & 1 deletion u-boot
Submodule u-boot updated from 4debc5 to fd4ed6
13 changes: 13 additions & 0 deletions u-boot-rockpro64-115200baud.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/arch/arm/dts/rk3399-rockpro64.dtsi b/arch/arm/dts/rk3399-rockpro64.dtsi
index 6bff8db7d3..6cde7a4d10 100644
--- a/arch/arm/dts/rk3399-rockpro64.dtsi
+++ b/arch/arm/dts/rk3399-rockpro64.dtsi
@@ -17,7 +17,7 @@
};

chosen {
- stdout-path = "serial2:1500000n8";
+ stdout-path = "serial2:115200n8";
};

clkin_gmac: external-gmac-clock {

0 comments on commit cf5c3d8

Please sign in to comment.