From c86360be8425c33595b0c6f630365ab0ba3c06b1 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 3 Oct 2013 12:45:34 -0600 Subject: Build using Makefiles, add separate bct/img targets In some situations, one may only need BCT binaries and not flashable image binaries. Hence, it's useful to allow BCTs and flashable image to be built separately, rather than always building both together. While re-writing the build system, convert from shell-scripts to Makefiles. Now, one can "make", "make bcts", or "make images", all with appropriate dependency checking. Many Avionic Design boards use a carrier/module design, with the carrier and module files stored in separate directories. Use symlinks to handle this, rather than complicating the build system with support for files from other directories. Signed-off-by: Stephen Warren --- .gitignore | 2 ++ build/gen-image-deps.sh | 34 ++++++++++++++++++ build/post.mk | 31 +++++++++++++++++ build/pre.mk | 19 ++++++++++ tegra114/nvidia/dalmore/Makefile | 33 ++++++++++++++++++ tegra114/nvidia/dalmore/build.sh | 18 +--------- tegra124/nvidia/venice2/Makefile | 29 ++++++++++++++++ tegra124/nvidia/venice2/build.sh | 8 +---- tegra20/avionic-design/medcom-wide/Makefile | 30 ++++++++++++++++ ...onten_T2_512MB_MEM2G16D2D-ABG-25_366MHz.bct.cfg | 1 + tegra20/avionic-design/medcom-wide/build.sh | 10 ++---- .../medcom-wide/tegra20-medcom-wide.img.cfg | 1 + tegra20/avionic-design/plutux/Makefile | 30 ++++++++++++++++ ...onten_T2_512MB_MEM2G16D2D-ABG-25_366MHz.bct.cfg | 1 + tegra20/avionic-design/plutux/build.sh | 10 ++---- .../avionic-design/plutux/tegra20-plutux.img.cfg | 1 + tegra20/avionic-design/tec/Makefile | 30 ++++++++++++++++ ...onten_T2_512MB_MEM2G16D2D-ABG-25_366MHz.bct.cfg | 1 + tegra20/avionic-design/tec/build.sh | 10 ++---- tegra20/avionic-design/tec/tegra20-tec.img.cfg | 1 + tegra20/compulab/trimslice/Makefile | 31 +++++++++++++++++ tegra20/compulab/trimslice/build.sh | 11 ++---- tegra20/nvidia/harmony/Makefile | 29 ++++++++++++++++ tegra20/nvidia/harmony/build.sh | 10 ++---- tegra20/nvidia/seaboard/Makefile | 29 ++++++++++++++++ tegra20/nvidia/seaboard/build.sh | 10 ++---- tegra20/nvidia/ventana/Makefile | 29 ++++++++++++++++ tegra20/nvidia/ventana/build.sh | 10 ++---- tegra20/nvidia/whistler/Makefile | 29 ++++++++++++++++ tegra20/nvidia/whistler/build.sh | 10 ++---- tegra20/toradex/colibri-t20/Makefile | 40 ++++++++++++++++++++++ tegra20/toradex/colibri-t20/build.sh | 24 ++----------- tegra30/avionic-design/tec-ng/Makefile | 30 ++++++++++++++++ ..._Nanya_1GB_NT5CC256M16CP-DI_750MHz_emmc.bct.cfg | 1 + tegra30/avionic-design/tec-ng/build.sh | 10 ++---- .../avionic-design/tec-ng/tegra30-tec-ng.img.cfg | 1 + tegra30/nvidia/beaver/Makefile | 29 ++++++++++++++++ tegra30/nvidia/beaver/build.sh | 10 ++---- tegra30/nvidia/cardhu/Makefile | 33 ++++++++++++++++++ tegra30/nvidia/cardhu/build.sh | 20 ++--------- 40 files changed, 551 insertions(+), 145 deletions(-) create mode 100755 build/gen-image-deps.sh create mode 100644 build/post.mk create mode 100644 build/pre.mk create mode 100644 tegra114/nvidia/dalmore/Makefile create mode 100644 tegra124/nvidia/venice2/Makefile create mode 100644 tegra20/avionic-design/medcom-wide/Makefile create mode 120000 tegra20/avionic-design/medcom-wide/Tamonten_T2_512MB_MEM2G16D2D-ABG-25_366MHz.bct.cfg create mode 120000 tegra20/avionic-design/medcom-wide/tegra20-medcom-wide.img.cfg create mode 100644 tegra20/avionic-design/plutux/Makefile create mode 120000 tegra20/avionic-design/plutux/Tamonten_T2_512MB_MEM2G16D2D-ABG-25_366MHz.bct.cfg create mode 120000 tegra20/avionic-design/plutux/tegra20-plutux.img.cfg create mode 100644 tegra20/avionic-design/tec/Makefile create mode 120000 tegra20/avionic-design/tec/Tamonten_T2_512MB_MEM2G16D2D-ABG-25_366MHz.bct.cfg create mode 120000 tegra20/avionic-design/tec/tegra20-tec.img.cfg create mode 100644 tegra20/compulab/trimslice/Makefile create mode 100644 tegra20/nvidia/harmony/Makefile create mode 100644 tegra20/nvidia/seaboard/Makefile create mode 100644 tegra20/nvidia/ventana/Makefile create mode 100644 tegra20/nvidia/whistler/Makefile create mode 100644 tegra20/toradex/colibri-t20/Makefile create mode 100644 tegra30/avionic-design/tec-ng/Makefile create mode 120000 tegra30/avionic-design/tec-ng/TamontenNG_Nanya_1GB_NT5CC256M16CP-DI_750MHz_emmc.bct.cfg create mode 120000 tegra30/avionic-design/tec-ng/tegra30-tec-ng.img.cfg create mode 100644 tegra30/nvidia/beaver/Makefile create mode 100644 tegra30/nvidia/cardhu/Makefile diff --git a/.gitignore b/.gitignore index 9750905..c9fa379 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.*.d +.*.swp *.bct *.img u-boot.bin diff --git a/build/gen-image-deps.sh b/build/gen-image-deps.sh new file mode 100755 index 0000000..10c4001 --- /dev/null +++ b/build/gen-image-deps.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +img_cfg_file=$1 +img_file=$2 +dep_file=$3 + +rm -f ${dep_file} +bct=`grep -i bctfile ${img_cfg_file} | sed -e 's/^.*=//' -e s'/[,;].*$//'` +bootloader=`grep -i bootloader ${img_cfg_file} | sed -e 's/^.*=//' -e s'/[,;].*$//'` + +cat > ${dep_file} <