[v4,1/7] Makefile: Add rockchip image type

Message ID 20191023195652.7158-2-jagan@amarulasolutions.com
State New
Headers show
Series
  • rockchip: Add Binman support
Related show

Commit Message

Jagan Teki Oct. 23, 2019, 7:56 p.m. UTC
Add rockchip image type support. right now the image
type marked with rksd, So create image type variable
with required image type like rksd or rkspi.

Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Kever Yang Nov. 10, 2019, 2:17 p.m. UTC | #1
On 2019/10/24 上午3:56, Jagan Teki wrote:
> Add rockchip image type support. right now the image
> type marked with rksd, So create image type variable
> with required image type like rksd or rkspi.
>
> Cc: Kever Yang <kever.yang@rock-chips.com>
> Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   Makefile | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 6fda3268e7..3e05d3fcfe 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1334,7 +1334,15 @@ u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
>   	$(call if_changed,pad_cat)
>   
>   ifeq ($(CONFIG_ARCH_ROCKCHIP),y)
> -MKIMAGEFLAGS_u-boot-tpl.img = -n $(CONFIG_SYS_SOC) -T rksd
> +
> +# rockchip image type
> +ifeq ($(CONFIG_SPI_FLASH_SUPPORT),y)
> +ROCKCHIP_IMG_TYPE := rkspi
> +else
> +ROCKCHIP_IMG_TYPE := rksd
> +endif
> +
> +MKIMAGEFLAGS_u-boot-tpl.img = -n $(CONFIG_SYS_SOC) -T $(ROCKCHIP_IMG_TYPE)
>   tpl/u-boot-tpl.img: tpl/u-boot-tpl.bin FORCE
>   	$(call if_changed,mkimage)
>   idbloader.img: tpl/u-boot-tpl.img spl/u-boot-spl.bin FORCE

Patch

diff --git a/Makefile b/Makefile
index 6fda3268e7..3e05d3fcfe 100644
--- a/Makefile
+++ b/Makefile
@@ -1334,7 +1334,15 @@  u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
 	$(call if_changed,pad_cat)
 
 ifeq ($(CONFIG_ARCH_ROCKCHIP),y)
-MKIMAGEFLAGS_u-boot-tpl.img = -n $(CONFIG_SYS_SOC) -T rksd
+
+# rockchip image type
+ifeq ($(CONFIG_SPI_FLASH_SUPPORT),y)
+ROCKCHIP_IMG_TYPE := rkspi
+else
+ROCKCHIP_IMG_TYPE := rksd
+endif
+
+MKIMAGEFLAGS_u-boot-tpl.img = -n $(CONFIG_SYS_SOC) -T $(ROCKCHIP_IMG_TYPE)
 tpl/u-boot-tpl.img: tpl/u-boot-tpl.bin FORCE
 	$(call if_changed,mkimage)
 idbloader.img: tpl/u-boot-tpl.img spl/u-boot-spl.bin FORCE