From 88d027c5d1a6e56c1af087024d902db085f9b860 Mon Sep 17 00:00:00 2001 From: Jens Wiklander <jens.wiklander@linaro.org> Date: Wed, 9 May 2018 10:12:03 +0200 Subject: [PATCH] am32xx am57xx dra7xx: build using buildroot Acked-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> --- am43xx.mk | 4 +++- am57xx.mk | 4 +++- common.mk | 1 + dra7xx.mk | 4 +++- ti/ti-common.mk | 55 +++++++++++++------------------------------------ 5 files changed, 24 insertions(+), 44 deletions(-) diff --git a/am43xx.mk b/am43xx.mk index 9d60ea0..d608899 100644 --- a/am43xx.mk +++ b/am43xx.mk @@ -8,6 +8,9 @@ override COMPILE_NS_KERNEL := 32 override COMPILE_S_USER := 32 override COMPILE_S_KERNEL := 32 +# Need to set this before including common.mk +BUILDROOT_GETTY_PORT ?= ttyS0 + ############################################################################### # Includes ############################################################################### @@ -28,7 +31,6 @@ FIT_MAKEFILE ?= $(BUILD_PATH)/ti/Makefile OPTEE_PLATFORM ?= ti-am43xx U-BOOT_CONFIG ?= am43xx_hs_evm_defconfig CONFIG_TYPE ?= ti_sdk_am4x_debug -BUSYBOX_TARGET ?= am43xx ############################################################################### # Include common to TI builds diff --git a/am57xx.mk b/am57xx.mk index 5181b95..dac9f30 100644 --- a/am57xx.mk +++ b/am57xx.mk @@ -8,6 +8,9 @@ override COMPILE_NS_KERNEL := 32 override COMPILE_S_USER := 32 override COMPILE_S_KERNEL := 32 +# Need to set this before including common.mk +BUILDROOT_GETTY_PORT ?= ttyS2 + ############################################################################### # Includes ############################################################################### @@ -29,7 +32,6 @@ OPTEE_PLATFORM ?= ti-am57xx U-BOOT_CONFIG ?= am57xx_hs_evm_defconfig # using the same configs as for DRA7xx CONFIG_TYPE ?= ti_sdk_dra7x_debug -BUSYBOX_TARGET ?= dra7xx ############################################################################### # Include common to TI builds diff --git a/common.mk b/common.mk index 7d25cb7..39d2878 100644 --- a/common.mk +++ b/common.mk @@ -20,6 +20,7 @@ OPTEE_EXAMPLES_PATH ?= $(ROOT)/optee_examples BENCHMARK_APP_PATH ?= $(ROOT)/optee_benchmark BENCHMARK_APP_OUT ?= $(BENCHMARK_APP_PATH)/out LIBYAML_LIB_OUT ?= $(BENCHMARK_APP_OUT)/libyaml/out/lib +BUILDROOT_TARGET_ROOT ?= $(ROOT)/out-br/target # default high verbosity. slow uarts shall specify lower if prefered CFG_TEE_CORE_LOG_LEVEL ?= 3 diff --git a/dra7xx.mk b/dra7xx.mk index f547296..e7f8a59 100644 --- a/dra7xx.mk +++ b/dra7xx.mk @@ -8,6 +8,9 @@ override COMPILE_NS_KERNEL := 32 override COMPILE_S_USER := 32 override COMPILE_S_KERNEL := 32 +# Need to set this before including common.mk +BUILDROOT_GETTY_PORT ?= ttyS0 + ############################################################################### # Includes ############################################################################### @@ -28,7 +31,6 @@ FIT_MAKEFILE ?= $(BUILD_PATH)/ti/Makefile OPTEE_PLATFORM ?= ti-dra7xx U-BOOT_CONFIG ?= dra7xx_hs_evm_defconfig CONFIG_TYPE ?= ti_sdk_dra7x_debug -BUSYBOX_TARGET ?= dra7xx ############################################################################### # Include common to TI builds diff --git a/ti/ti-common.mk b/ti/ti-common.mk index bea9ac7..27ebceb 100644 --- a/ti/ti-common.mk +++ b/ti/ti-common.mk @@ -3,10 +3,8 @@ ############################################################################### .PHONY: all clean cleaner prepare -all: u-boot linux optee-os optee-client xtest build-fit \ - update_rootfs optee-examples -clean: linux-clean busybox-clean u-boot-clean optee-os-clean \ - optee-client-clean build-fit-clean optee-examples-clean +all: u-boot linux optee-os build-fit buildroot +clean: linux-clean u-boot-clean optee-os-clean build-fit-clean buildroot-clean cleaner: clean prepare-cleaner busybox-cleaner linux-cleaner include toolchain.mk @@ -66,34 +64,6 @@ optee-os-clean: optee-os-clean-common optee-client: optee-client-common optee-client-clean: optee-client-clean-common -############################################################################### -# xtest / optee_test -############################################################################### -.PHONY: xtest xtest-clean xtest-patch - -xtest: xtest-common -xtest-clean: xtest-clean-common -xtest-patch: xtest-patch-common - -################################################################################ -# Sample applications / optee_examples -################################################################################ -optee-examples: optee-examples-common - -optee-examples-clean: optee-examples-clean-common - -############################################################################### -# Busybox -############################################################################### -.PHONY: busybox busybox-clean busybox-cleaner - -BUSYBOX_COMMON_TARGET = $(BUSYBOX_TARGET) -BUSYBOX_CLEAN_COMMON_TARGET = $(BUSYBOX_COMMON_TARGET) clean - -busybox: busybox-common -busybox-clean: busybox-clean-common -busybox-cleaner: busybox-cleaner-common - ############################################################################### # Build FIT ############################################################################### @@ -117,12 +87,15 @@ build-fit-clean: ############################################################################### # Root FS ############################################################################### -.PHONY: filelist-tee update_rootfs - -filelist-tee: filelist-tee-common u-boot build-fit - @echo "dir /boot 755 0 0" >> $(GEN_ROOTFS_FILELIST) - @echo "file /boot/MLO $(UBOOT_SPL) 644 0 0" >> $(GEN_ROOTFS_FILELIST) - @echo "file /boot/u-boot.img $(UBOOT_IMG) 644 0 0" >> $(GEN_ROOTFS_FILELIST) - @echo "file /boot/fitImage $(STAGING_AREA)/fitImage 644 0 0" >> $(GEN_ROOTFS_FILELIST) - -update_rootfs: update_rootfs-common +.PHONY: update_rootfs +# Make sure this is built before the buildroot target which will create the +# root file system based on what's in $(BUILDROOT_TARGET_ROOT) +buildroot: update_rootfs + +update_rootfs: u-boot build-fit + @mkdir -p --mode=755 $(BUILDROOT_TARGET_ROOT)/boot + @install -v -p --mode=644 $(UBOOT_SPL) $(BUILDROOT_TARGET_ROOT)/boot/MLO + @install -v -p --mode=644 $(UBOOT_IMG) \ + $(BUILDROOT_TARGET_ROOT)/boot/u-boot.img + @install -v -p --mode=644 $(STAGING_AREA)/fitImage \ + $(BUILDROOT_TARGET_ROOT)/boot/fitImage -- GitLab