All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] ti-tisdk-makefile: add k3 U-Boot for R5
@ 2018-08-24 19:25 Jacob Stiffler
  2018-08-24 19:25 ` [PATCH 2/4] packagegroup-*-sdk-host: k3: add missing sources Jacob Stiffler
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jacob Stiffler @ 2018-08-24 19:25 UTC (permalink / raw)
  To: meta-arago

* Add a custom U-Boot target for k3 as there are multiple differences
  from previous machines:
  - Two U-Boot images. One for A53, one for R5.
  - Each U-Boot image is combined into a fitImage with other images
   (e.g. ATF, OPTEE, SYSFW).
* Also make additions to the Rules.make as the R5 uses the armv7
  toolchain while the A53 uses the armv8 toolchain.

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
 .../ti-tisdk-makefile/k3/Makefile_u-boot-spl       | 61 ++++++++++++++++++++++
 .../ti-tisdk-makefile/ti-tisdk-makefile_1.0.bb     |  9 ++++
 2 files changed, 70 insertions(+)
 create mode 100644 meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile/k3/Makefile_u-boot-spl

diff --git a/meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile/k3/Makefile_u-boot-spl b/meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile/k3/Makefile_u-boot-spl
new file mode 100644
index 0000000..7a0ec22
--- /dev/null
+++ b/meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile/k3/Makefile_u-boot-spl
@@ -0,0 +1,61 @@
+
+# u-boot build targets
+u-boot-spl: u-boot
+u-boot-spl_clean: u-boot_clean
+u-boot-spl_install: u-boot_install
+
+UBOOT_A53_BUILD_DIR=$(TI_SDK_PATH)/board-support/u-boot_build/a53
+UBOOT_R5_BUILD_DIR=$(TI_SDK_PATH)/board-support/u-boot_build/r5
+
+UBOOT_ATF=$(TI_SDK_PATH)/board-support/prebuilt-images/bl31.bin
+UBOOT_TEE=$(TI_SDK_PATH)/board-support/prebuilt-images/bl32.bin
+UBOOT_SYSFW=$(TI_SDK_PATH)/board-support/prebuilt-images/sysfw.bin
+
+u-boot: u-boot-a53 u-boot-r5
+u-boot_clean: u-boot-a53_clean u-boot-r5_clean
+
+u-boot-a53:
+	@echo ===================================
+	@echo    Building U-boot for A53
+	@echo ===================================
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) \
+		 $(UBOOT_MACHINE) O=$(UBOOT_A53_BUILD_DIR)
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) \
+		CONFIG_MKIMAGE_DTC_PATH=$(UBOOT_A53_BUILD_DIR)/scripts/dtc/dtc \
+		ATF=$(UBOOT_ATF) TEE=$(UBOOT_TEE) \
+		O=$(UBOOT_A53_BUILD_DIR)
+
+u-boot-a53_clean:
+	@echo ===================================
+	@echo    Cleaining U-boot for A53
+	@echo ===================================
+	$(MAKE) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) \
+		O=$(UBOOT_A53_BUILD_DIR) distclean
+	@rm -rf $(UBOOT_A53_BUILD_DIR)
+
+
+u-boot-r5:
+	@echo ===================================
+	@echo    Building U-boot for R5
+	@echo ===================================
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE_ARMV7) \
+		 $(UBOOT_MACHINE_R5) O=$(UBOOT_R5_BUILD_DIR)
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE_ARMV7) \
+		CONFIG_MKIMAGE_DTC_PATH=$(UBOOT_R5_BUILD_DIR)/scripts/dtc/dtc \
+		SYSFW=$(UBOOT_SYSFW) \
+		O=$(UBOOT_R5_BUILD_DIR)
+
+u-boot-r5_clean:
+	@echo ===================================
+	@echo    Cleaining U-boot for R5
+	@echo ===================================
+	$(MAKE) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE_ARMV7) \
+		O=$(UBOOT_R5_BUILD_DIR) distclean
+	@rm -rf $(UBOOT_R5_BUILD_DIR)
+
+u-boot_install:
+	@echo ===================================
+	@echo    Installing U-boot
+	@echo ===================================
+	@echo "Nothing to do"
+
diff --git a/meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile_1.0.bb b/meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile_1.0.bb
index f296ffa..75a9392 100644
--- a/meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile_1.0.bb
+++ b/meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile_1.0.bb
@@ -282,6 +282,15 @@ do_install () {
 
 }
 
+do_install_append_k3() {
+    cat >> ${D}/Rules.make << __EOF__
+
+# Add CROSS_COMPILE and UBOOT_MACHINE for the R5
+export CROSS_COMPILE_ARMV7=\$(LINUX_DEVKIT_PATH)/sysroots/${SDKMACHINE}-arago-linux/usr/bin/arm-linux-gnueabihf-
+UBOOT_MACHINE_R5=am65x_evm_r5_defconfig
+__EOF__
+}
+
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 FILES_${PN} = "/*"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-24 20:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-24 19:25 [PATCH 1/4] ti-tisdk-makefile: add k3 U-Boot for R5 Jacob Stiffler
2018-08-24 19:25 ` [PATCH 2/4] packagegroup-*-sdk-host: k3: add missing sources Jacob Stiffler
2018-08-24 20:31   ` Denys Dmytriyenko
2018-08-24 19:25 ` [PATCH 3/4] ti-tisdk-makefile: k3: add missing targets Jacob Stiffler
2018-08-24 19:25 ` [PATCH 4/4] ti-tisdk-makefile: k3: fix installation of kernel and DTBs Jacob Stiffler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.