| | |
| | | git clone $GIT_URL/$src.git -b $BRANCH --depth=1 |
| | | |
| | | # do patch if patch file exist |
| | | PATCH_FILE=$PRJ_PATH/patches/$BOARD/$src-$BSP_VER.patch |
| | | if [ -s $PATCH_FILE ] ; then |
| | | patch_file=$PRJ_PATH/patches/$BOARD/$src-$BSP_VER.patch |
| | | if [ -s $patch_file ] ; then |
| | | pr_warn "do patch for $src now..." |
| | | cd $src |
| | | patch -p1 < $PATCH_FILE |
| | | patch -p1 < $patch_file |
| | | cd - |
| | | fi |
| | | |
| | | done |
| | | |
| | | |
| | |
| | | function build_uboot() |
| | | { |
| | | SRC=uboot-imx |
| | | patch_file=$PRJ_PATH/patches/$BOARD/$SRC-$BSP_VER.patch |
| | | defconfig=${BOARD}_defconfig |
| | | |
| | | pr_warn "start build $SRC" |
| | | cd $PRJ_PATH/${SRC} |
| | | |
| | | # do patch if not patched |
| | | if [ ! -s configs/$defconfig ] ; then |
| | | pr_warn "do patch for $SRC now..." |
| | | patch -p1 < $patch_file |
| | | fi |
| | | |
| | | if [ ! -f .config ] ; then |
| | | make ARCH=arm ${BOARD}_defconfig |
| | | fi |
| | | |
| | | make -j${JOBS} CROSS_COMPILE=${CROSS_COMPILE} ARCH=arm |
| | | |
| | | set -x |
| | |
| | | if [[ -n "$INST_PATH" && -w $INST_PATH ]] ; then |
| | | pr_info "install bootloader to '$INST_PATH'" |
| | | cp $PRFX_PATH/u-boot-${BOARD}.imx $INST_PATH |
| | | #sz $PRFX_PATH/u-boot-${BOARD}.imx |
| | | fi |
| | | } |
| | | |