]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: generate u-boot-rockchip.bin with binman for ARM64 boards
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Fri, 2 Sep 2022 13:10:52 +0000 (15:10 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Sun, 4 Sep 2022 12:00:39 +0000 (20:00 +0800)
This allows to build u-boot-rockchip.bin binary with binman for Rockchip
ARM64 boards instead of the legacy Makefile way.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Makefile
arch/arm/Kconfig
arch/arm/dts/px30-u-boot.dtsi
arch/arm/dts/rk3308-u-boot.dtsi
arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi
arch/arm/dts/rk3328-u-boot.dtsi
arch/arm/dts/rk3368-u-boot.dtsi
arch/arm/dts/rk3568-u-boot.dtsi
arch/arm/dts/rockchip-u-boot.dtsi

index dbe1aa254a7533c23ef7698f2291c21635faaace..1dee09eb3671307b4d94db5c689ce517743ffdf2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1005,8 +1005,7 @@ ifeq ($(CONFIG_ARCH_ROCKCHIP),y)
 # On ARM64 this target is produced by binman so we don't need this dep
 ifeq ($(CONFIG_ARM64),y)
 ifeq ($(CONFIG_SPL),y)
-# TODO: Get binman to generate this too
-INPUTS-y += u-boot-rockchip.bin
+INPUTS-y += u-boot.itb
 endif
 else
 ifeq ($(CONFIG_SPL),y)
@@ -1498,29 +1497,6 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
 u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
        $(call if_changed,pad_cat)
 
-ifeq ($(CONFIG_ARCH_ROCKCHIP),y)
-
-# TPL + SPL
-ifeq ($(CONFIG_SPL)$(CONFIG_TPL),yy)
-MKIMAGEFLAGS_u-boot-tpl-rockchip.bin = -n $(CONFIG_SYS_SOC) -T rksd
-tpl/u-boot-tpl-rockchip.bin: tpl/u-boot-tpl.bin FORCE
-       $(call if_changed,mkimage)
-idbloader.img: tpl/u-boot-tpl-rockchip.bin spl/u-boot-spl.bin FORCE
-       $(call if_changed,cat)
-else
-MKIMAGEFLAGS_idbloader.img = -n $(CONFIG_SYS_SOC) -T rksd
-idbloader.img: spl/u-boot-spl.bin FORCE
-       $(call if_changed,mkimage)
-endif
-
-ifeq ($(CONFIG_ARM64),y)
-OBJCOPYFLAGS_u-boot-rockchip.bin = -I binary -O binary \
-       --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff
-u-boot-rockchip.bin: idbloader.img u-boot.itb FORCE
-       $(call if_changed,pad_cat)
-endif # CONFIG_ARM64
-
-endif # CONFIG_ARCH_ROCKCHIP
 
 ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
 MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
index 0b72e4f6503e055b7734c37f4563e24870f7c27b..82cd456f51f13fac2d1893d73712f1457b5b16bb 100644 (file)
@@ -1974,7 +1974,7 @@ config ARCH_STM32MP
 config ARCH_ROCKCHIP
        bool "Support Rockchip SoCs"
        select BLK
-       select BINMAN if SPL_OPTEE || (SPL && !ARM64)
+       select BINMAN if SPL_OPTEE || SPL
        select DM
        select DM_GPIO
        select DM_I2C
index f102b2aef4207649e6c7cb9720bb138d42a540d0..462eaf68f825e709d5c5e4c9673ff43f07b52c5a 100644 (file)
@@ -3,6 +3,8 @@
  * (C) Copyright 2019 Rockchip Electronics Co., Ltd
  */
 
+#include "rockchip-u-boot.dtsi"
+
 / {
        aliases {
                mmc0 = &emmc;
index 4bfad31fbab15344f6a43f94aa069c99bc25d86a..ab5bfc2ce934212701a353c74c1a35a31727a73c 100644 (file)
@@ -3,6 +3,8 @@
  *(C) Copyright 2019 Rockchip Electronics Co., Ltd
  */
 
+#include "rockchip-u-boot.dtsi"
+
 / {
        aliases {
                mmc0 = &emmc;
index 95f26524948fd56ba9313b14bf26eecab8cb7bfb..16c33735eb297032722d1b01bf7658cb5feb4517 100644 (file)
@@ -3,6 +3,8 @@
  * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
  */
 
+#include "rockchip-u-boot.dtsi"
+
 / {
        chosen {
                u-boot,spl-boot-order = &sdmmc;
index 16335582642ab27e7f750214a64c5d9b0118a87f..d4a7540a92c5a60b37e83eb6901ae0ac420a3235 100644 (file)
@@ -3,6 +3,8 @@
  * (C) Copyright 2019 Rockchip Electronics Co., Ltd
  */
 
+#include "rockchip-u-boot.dtsi"
+
 / {
        aliases {
                mmc0 = &emmc;
index 2767c2678dba1ea78b1d8374053199fd1d537ab1..811d59ac346eaf70a689fc5cc17c01c579d69a9b 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/memory/rk3368-dmc.h>
+#include "rockchip-u-boot.dtsi"
 
 / {
        dmc: dmc@ff610000 {
index 5a80dda275b209971dc77f90b9a11363a78c1ca3..fa9b6ae23b9ab8e2cee8ff20e703101f6ab1500d 100644 (file)
@@ -3,6 +3,8 @@
  * (C) Copyright 2021 Rockchip Electronics Co., Ltd
  */
 
+#include "rockchip-u-boot.dtsi"
+
 / {
        aliases {
                mmc0 = &sdhci;
index ad72ca970071f39554ad93dae33813771e77a877..f90a8bf085f9897629b5452ec013545e7e2b9ca5 100644 (file)
                        };
                };
 
+#ifdef CONFIG_ARM64
+               blob {
+                       filename = "u-boot.itb";
+#else
                u-boot-img {
+#endif
                        offset = <CONFIG_SPL_PAD_TO>;
                };
        };