Date:2011-08-03 03:54:49 (12 years 7 months ago)
Author:Xiangfu Liu
Commit:a6f250f0f757fb1f090d15b448677c035f3b153e
Message:nanonote-files update build script file

Files: nanonote-files/data/qi_lb60/scripts/compile-openwrt-xburst.sh (3 diffs)

Change Details

nanonote-files/data/qi_lb60/scripts/compile-openwrt-xburst.sh
11#!/bin/bash
2DATE=$(date "+%Y-%m-%d")
3TIME=$(date "+%H-%M-%S")
4DATE_TIME=`date +"%m%d%Y-%H%M"`
52
63# this script file is using in build host
7
84# $1: full_system minimal xbboot
5
96OPENWRT_DIR_NAME="openwrt-xburst."$1
7OPENWRT_DIR="/home/xiangfu/${OPENWRT_DIR_NAME}/"
108CONFIG_FILE_TYPE="config."$1
119
12# you may need change those Variables
13BASE_DIR="/home/xiangfu/compile-log/"
14OPENWRT_DIR="/home/xiangfu/${OPENWRT_DIR_NAME}/"
10MAKE_VARS=" V=99 IGNORE_ERRORS=m "
11
12########################################################################
13DATE=$(date "+%Y-%m-%d")
14TIME=$(date "+%H-%M-%S")
15DATE_TIME=`date +"%m%d%Y-%H%M"`
16
1517GET_FEEDS_VERSION_SH="/home/xiangfu/bin/get-feeds-revision.sh"
18PATCH_OPENWRT_SH="/home/xiangfu/bin/patch-openwrt.sh"
1619
20BASE_DIR="/home/xiangfu/compile-log/"
1721IMAGE_DIR="${BASE_DIR}/${OPENWRT_DIR_NAME}-${DATE_TIME}/"
22mkdir -p ${IMAGE_DIR}
23
1824BUILD_LOG="${IMAGE_DIR}/BUILD_LOG"
1925VERSIONS_FILE="${IMAGE_DIR}/VERSIONS"
2026
21MAKE_VARS=" V=99 IGNORE_ERRORS=m "
2227
2328########################################################################
2429cd ${OPENWRT_DIR}
...... 
5358mkdir -p files/etc && echo ${DATE} > files/etc/VERSION
5459
5560
61echo "patch openwrt "
62${PATCH_OPENWRT_SH} ${OPENWRT_DIR}
63
64
5665echo "starting compiling - this may take several hours..."
57mkdir -p ${IMAGE_DIR}
5866time make ${MAKE_VARS} > ${IMAGE_DIR}/BUILD_LOG 2>&1
5967if [ "$?" != "0" ]; then
6068    echo "ERROR: Build failed! Please refer to the log file"
6169    tail -n 100 ${IMAGE_DIR}/BUILD_LOG > ${IMAGE_DIR}/BUILD_LOG.`date +"%m%d%Y-%H%M"`.last100
70        echo -e "\
71say #qi-hardware The build has FAILED, \
72see log here: http://fidelio.qi-hardware.com/~xiangfu/compile-log/${OPENWRT_DIR_NAME}-${DATE_TIME}/\nclose" \
73             | nc turandot.qi-hardware.com 3858
74else
75echo -e "\
76say #qi-hardware The build was successfull, \
77see images here: http://fidelio.qi-hardware.com/~xiangfu/compile-log/${OPENWRT_DIR_NAME}-${DATE_TIME}/\nclose" \
78     | nc turandot.qi-hardware.com 3858
6279fi
6380
6481
...... 
6885
6986echo "copy all files to IMAGE_DIR..."
7087cp .config ${IMAGE_DIR}/config
88cp build_dir/linux-xburst_qi_lb60/linux-2.6*/.config ${IMAGE_DIR}/kernel.config
7189cp feeds.conf ${IMAGE_DIR}/
7290cp -a bin/xburst/* ${IMAGE_DIR} 2>/dev/null
7391mkdir -p ${IMAGE_DIR}/files
7492cp -a files/* ${IMAGE_DIR}/files/
7593
7694(cd ${IMAGE_DIR}; \
95 grep -E "ERROR:\ package.*failed to build" BUILD_LOG | grep -v "package/kernel" > failed_packages.txt; \
7796 bzip2 -z BUILD_LOG; \
7897 bzip2 -z openwrt-xburst-qi_lb60-root.ubi; \
7998)

Archive Download the corresponding diff file



interactive