Makefile: Use SoC variable to pick up relevant binaries and include paths
authorNishanth Menon <nm@ti.com>
Sat, 18 May 2019 12:19:28 +0000 (07:19 -0500)
committerAndreas Dannenberg <dannenberg@ti.com>
Mon, 10 Jun 2019 16:41:44 +0000 (11:41 -0500)
Let's use the define and use an SoC variable to pick up various include
definitions.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Suman Anna <s-anna@ti.com>
Makefile

index 257e8315c14f23a497d94b86ce4b01c27050d9ec..85e7b20b13aa47a49d490c56cb3971bcd8c84b26 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,8 @@
 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
+SOC ?= am65x
+
 # The HS SYSFW will only work on HS hardware when signed with valid
 # keys, warn HS users if the SECDEV environment variable is not set
 ifdef HS
@@ -45,10 +47,10 @@ endif
 
 # If using the default SYSFW make sure to manually copy/populate the unsigned
 # image into the root folder of this repository.
-SYSFW_PATH ?= ti-sci-firmware-am65x-gp.bin
-SYSFW_HS_PATH ?= ti-sci-firmware-am65x-hs-enc.bin
-SYSFW_HS_INNER_CERT_PATH ?= ti-sci-firmware-am65x-hs-cert.bin
-SYSFW_HS_CERTS_PATH ?= ti-sci-firmware-am65x-hs-certs.bin
+SYSFW_PATH ?= ti-sci-firmware-${SOC}-gp.bin
+SYSFW_HS_PATH ?= ti-sci-firmware-${SOC}-hs-enc.bin
+SYSFW_HS_INNER_CERT_PATH ?= ti-sci-firmware-${SOC}-hs-cert.bin
+SYSFW_HS_CERTS_PATH ?= ti-sci-firmware-${SOC}-hs-certs.bin
 
 # Must use FULL Git hash below, as it is used as part of an URL for direct DL
 SYSFW_GIT_HASH ?= b41c4f097ab6f341462645f76059f48f78bbd17e
@@ -69,7 +71,8 @@ CROSS_COMPILE ?= arm-linux-gnueabihf-
 
 CFLAGS ?= \
        -fno-builtin \
-       -Wall
+       -Wall \
+       -Iinclude/soc/${SOC}/
 
 BINS ?= \
        sysfw.bin \