Skip to content

Instantly share code, notes, and snippets.

@openedev
Created April 26, 2019 06:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save openedev/f6a77fb43e20e7229edea0a65c70705c to your computer and use it in GitHub Desktop.
Save openedev/f6a77fb43e20e7229edea0a65c70705c to your computer and use it in GitHub Desktop.
diff --git a/Makefile b/Makefile
index 92e04dd689..e7f68d63c7 100644
--- a/Makefile
+++ b/Makefile
@@ -851,6 +851,11 @@ ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_SPL),yy)
ALL-y += u-boot-sunxi-with-spl.bin
endif
+# Build a combined spl + u-boot image for rockchip
+ifdef CONFIG_ROCKCHIP_RK3399
+ALL-$(CONFIG_ARCH_ROCKCHIP) += u-boot-rockchip-with-spl.bin
+endif
+
# enable combined SPL/u-boot/dtb rules for tegra
ifeq ($(CONFIG_TEGRA)$(CONFIG_SPL),yy)
ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin
@@ -1366,6 +1371,11 @@ u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
endif
endif
+ifeq ($(CONFIG_ROCKCHIP_RK3399),y)
+u-boot-rockchip-with-spl.bin: spl/u-boot-spl-rockchip.bin u-boot.itb FORCE
+ @$(call if_changed,binman)
+endif # CONFIG_ROCKCHIP_RK3399
+
ifneq ($(CONFIG_TEGRA),)
ifneq ($(CONFIG_BINMAN),)
# Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin
@@ -1664,6 +1674,9 @@ spl/u-boot-spl: tools prepare \
spl/sunxi-spl.bin: spl/u-boot-spl
@:
+spl/u-boot-spl-rockchip.bin: spl/u-boot-spl
+ @:
+
spl/sunxi-spl-with-ecc.bin: spl/sunxi-spl.bin
@:
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
index 3922ccbd21..20b4c4a3d8 100644
--- a/arch/arm/dts/rk3399-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-u-boot.dtsi
@@ -3,6 +3,20 @@
* Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com>
*/
+/ {
+ binman {
+ filename = "u-boot-rockchip-with-spl.bin";
+ pad-byte = <0xff>;
+ blob {
+ filename = "spl/u-boot-spl-rockchip.bin";
+ };
+ u-boot-img {
+ filename = "u-boot.itb";
+ offset = <16448>;
+ };
+ };
+};
+
&pmu {
u-boot,dm-pre-reloc;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment