#!/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 APP_SRC_DIR=app APP_OUT_DIR=app/release 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 - cd ${APP_SRC_DIR} echo "==============================================" echo " Build applications [ $(pwd) ]" echo " IMAGE_DIR: ${IMAGE_DIR}" echo "==============================================" CP_DIR=${IMAGE_DIR} ./make.sh cd - cp -Ra files/* ${IMAGE_DIR} cp scripts/mk-app.sh ${IMAGE_DIR}