From 2eae960b2969fdf9601f2a56ec68ca0666396582 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Fri, 10 Nov 2023 22:04:45 +0530 Subject: [PATCH] make specifying BL31 and ROCKCHIP_TPL better-er --- orangepi-5-plus-rk3588.spec | 4 ++++ orangepi-5-rk3588s.spec | 4 ++++ package.inc | 9 ++++++--- rock5b-rk3588.spec | 4 ++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/orangepi-5-plus-rk3588.spec b/orangepi-5-plus-rk3588.spec index bfc2ccb..ab12b33 100644 --- a/orangepi-5-plus-rk3588.spec +++ b/orangepi-5-plus-rk3588.spec @@ -6,6 +6,10 @@ %global non_standard_release master +%global rkbin_dir %{_builddir}/rkbin-%{rkbin_git_commit} +%global BL31 %{rkbin_dir}/bin/rk35/rk3588_bl31_v1.40.elf +%global ROCKCHIP_TPL %{rkbin_dir}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.12.bin + Source1: package.inc Source3: https://github.com/rockchip-linux/rkbin/archive/%{rkbin_git_commit}.tar.gz %include %{SOURCE1} diff --git a/orangepi-5-rk3588s.spec b/orangepi-5-rk3588s.spec index c0d9f82..3172d93 100644 --- a/orangepi-5-rk3588s.spec +++ b/orangepi-5-rk3588s.spec @@ -6,6 +6,10 @@ %global non_standard_release master +%global rkbin_dir %{_builddir}/rkbin-%{rkbin_git_commit} +%global BL31 %{rkbin_dir}/bin/rk35/rk3588_bl31_v1.40.elf +%global ROCKCHIP_TPL %{rkbin_dir}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.12.bin + Source1: package.inc Source3: https://github.com/rockchip-linux/rkbin/archive/%{rkbin_git_commit}.tar.gz %include %{SOURCE1} diff --git a/package.inc b/package.inc index 89ef178..2733337 100644 --- a/package.inc +++ b/package.inc @@ -39,11 +39,14 @@ This package contains images for the %{board_name}. pushd .. cp %{_sourcedir}/%{?rkbin_git_commit}.tar.gz . tar xf %{?rkbin_git_commit}.tar.gz -export RKBIN_DIRECTORY="%{_builddir}/rkbin-%{?rkbin_git_commit}" -export BL31="${RKBIN_DIRECTORY}/bin/rk35/rk3588_bl31_v1.40.elf" -export ROCKCHIP_TPL="${RKBIN_DIRECTORY}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.12.bin" popd %endif + +export BL31='%{BL31}' +%if "%{?ROCKCHIP_TPL}" != "" +export ROCKCHIP_TPL='%{ROCKCHIP_TPL}' +%endif + %{make} %install diff --git a/rock5b-rk3588.spec b/rock5b-rk3588.spec index c26ecc3..49d7c73 100644 --- a/rock5b-rk3588.spec +++ b/rock5b-rk3588.spec @@ -6,6 +6,10 @@ %global non_standard_release rc +%global rkbin_dir %{_builddir}/rkbin-%{rkbin_git_commit} +%global BL31 %{rkbin_dir}/bin/rk35/rk3588_bl31_v1.40.elf +%global ROCKCHIP_TPL %{rkbin_dir}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.12.bin + Source1: package.inc Source3: https://github.com/rockchip-linux/rkbin/archive/%{rkbin_git_commit}.tar.gz %include %{SOURCE1}