#!/bin/sh git clean -x -f -d . git checkout -- . git pull UBOOT_SRC_DIR=bootloader/u-boot_2015_04 UBOOT_OUT_DIR=bootloader/output-u-boot_2015_04 KERNEL_SRC_DIR=kernel/linux-imx6_3.14.28 KERNEL_OUT_DIR=kernel/output-linux-imx6_3.14.28 BUILDROOT_SRC_DIR=buildroot/buildroot-2016.08.1 BUILDROOT_OUT_DIR=buildroot/output-buildroot-2016.08.1 TAG=`git log -1 --pretty=format:%h` IMAGE_DIR=`realpath $(pwd)/../images_${TAG}` cd ${UBOOT_SRC_DIR} echo "==============================================" echo " Build u-boot [ $(pwd) ]" echo " IMAGE_DIR: ${IMAGE_DIR}" echo "==============================================" CP_DIR=${IMAGE_DIR} ./make.sh cd - cd ${KERNEL_SRC_DIR} echo "==============================================" echo " Build kernel [ $(pwd) ]" echo " IMAGE_DIR: ${IMAGE_DIR}" echo "==============================================" CP_DIR=${IMAGE_DIR} ./make.sh cd - cd ${BUILDROOT_SRC_DIR} echo "==============================================" echo " Build buildroot [ $(pwd) ]" echo " IMAGE_DIR: ${IMAGE_DIR}" echo "==============================================" CP_DIR=${IMAGE_DIR} ./make.sh image cd - cp -Ra files/* ${IMAGE_DIR}