Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 3 files changed
  • 0 comments
  • 1 contributor
84  build
... ...
@@ -1,84 +0,0 @@
1  
-#!/bin/bash
2  
-
3  
-set -e
4  
-
5  
-CURRENT_DIR=`pwd`
6  
-IMAGES_DIR=${CURRENT_DIR}/bin
7  
-VERSIONS=${CURRENT_DIR}/VERSIONS
8  
-
9  
-MILKYMIST_GIT_DIR=../milkymist
10  
-
11  
-get-feeds-revision() {
12  
-  cd $1
13  
-  repo=$(git config -l | grep remote.origin.url | cut -d "=" -f 2)
14  
-  rev=$(git log | head -n 1 | cut -b8-)
15  
-  branch=$(git branch | grep "*" | cut -b3-)
16  
-  echo "${repo}  ${branch} ${rev}" >> ${VERSIONS}
17  
-  cd ${CURRENT_DIR}
18  
-}
19  
-
20  
-
21  
-echo "prepare, mkdir ..."
22  
-mkdir -p ${IMAGES_DIR}
23  
-rm -f  ${IMAGES_DIR}/*
24  
-
25  
-
26  
-echo "update git ..."
27  
-make -C compile-flickernoise/ milkymist-git-update
28  
-
29  
-
30  
-echo "get git versions ..."
31  
-rm -f ${VERSIONS}
32  
-get-feeds-revision ${MILKYMIST_GIT_DIR}/milkymist.git
33  
-get-feeds-revision ${MILKYMIST_GIT_DIR}/rtems-milkymist.git
34  
-get-feeds-revision ${MILKYMIST_GIT_DIR}/mtk.git
35  
-get-feeds-revision ${MILKYMIST_GIT_DIR}/liboscparse.git
36  
-get-feeds-revision ${MILKYMIST_GIT_DIR}/rtems-yaffs2.git
37  
-get-feeds-revision ${MILKYMIST_GIT_DIR}/flickernoise.git
38  
-get-feeds-revision ${MILKYMIST_GIT_DIR}/autotest-m1.git
39  
-get-feeds-revision .
40  
-
41  
-
42  
-echo "compile ..."
43  
-(cd ${MILKYMIST_GIT_DIR}/milkymist.git && ./clean_all.sh)
44  
-make -C ${MILKYMIST_GIT_DIR}/milkymist.git/tools
45  
-
46  
-#the Xilinx libs(libstdc++.so.6) have some conflict
47  
-(source /opt/Xilinx/13.1/ISE_DS/settings64.sh && \
48  
- make -C ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash)
49  
-
50  
-export PATH=${MILKYMIST_GIT_DIR}/milkymist.git/tools:$PATH
51  
-make -C compile-flickernoise clean
52  
-make -C compile-flickernoise flickernoise.fbi
53  
-make -C compile-flickernoise autotest-m1-boot.bin
54  
-
55  
-
56  
-echo "copy images to bin/ ..."
57  
-cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/fjmem.bit ${IMAGES_DIR}
58  
-cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/standby.fpg ${IMAGES_DIR}
59  
-cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/soc.fpg ${IMAGES_DIR}
60  
-cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/bios.bin ${IMAGES_DIR}
61  
-cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/splash.raw ${IMAGES_DIR}
62  
-cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/soc-rescue.fpg ${IMAGES_DIR}
63  
-cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/bios-rescue.bin ${IMAGES_DIR}
64  
-cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/splash-rescue.raw ${IMAGES_DIR}
65  
-
66  
-cp ${MILKYMIST_GIT_DIR}/flickernoise.git/src/bin/* ${IMAGES_DIR}/
67  
-cp ${MILKYMIST_GIT_DIR}/autotest-m1.git/src/boot.bin ${IMAGES_DIR}/
68  
-
69  
-echo "build data patitions ..."
70  
-mkdir -p data.flash5/patchpool
71  
-find ${MILKYMIST_GIT_DIR}/flickernoise.git/patches -name "*.fnp" -exec cp {} ./data.flash5/patchpool \;
72  
-
73  
-make -C ${MILKYMIST_GIT_DIR}/rtems-yaffs2.git/utils mm-mkyaffs2image
74  
-${MILKYMIST_GIT_DIR}/rtems-yaffs2.git/utils/mm-mkyaffs2image data.flash5 ${IMAGES_DIR}/data.flash5.bin convert
75  
-chmod 644 ${IMAGES_DIR}/data.flash5.bin
76  
-
77  
-echo "generate md5sum ..."
78  
-(cd ${IMAGES_DIR}; md5sum --binary * > ${CURRENT_DIR}/md5sums)
79  
-mv ${VERSIONS} md5sums ${IMAGES_DIR}
80  
-cp reflash_m1.sh ${IMAGES_DIR}
81  
-
82  
-
83  
-cd /opt/ && tar cjvf Flickernoise-lm32-rtems-4.11-SDK-for-Linux-x86_64.tar.bz2 rtems-4.11/
84  
-mv Flickernoise-lm32-rtems-4.11-SDK-for-Linux-x86_64.tar.bz2 ${IMAGES_DIR}/
2  compile-flickernoise/Makefile
@@ -47,7 +47,7 @@ DL=$(if $(wildcard ../dl/.),../dl,dl)
47 47
 BUILD_DIR=build_dir
48 48
 
49 49
 MILKYMIST_GIT_URL:=git://github.com/milkymist
50  
-MILKYMIST_GIT_DIR:=../../milkymist
  50
+MILKYMIST_GIT_DIR?=../../milkymist
51 51
 
52 52
 CONFIGURE_VARS=CC=lm32-rtems4.11-gcc \
53 53
 	AR=lm32-rtems4.11-ar \
116  scripts/compile-milkymist-firmware.sh
... ...
@@ -0,0 +1,116 @@
  1
+#!/bin/bash
  2
+
  3
+DATE=$(date "+%Y-%m-%d")
  4
+TIME=$(date "+%H-%M-%S")
  5
+DATE_TIME=`date +"%m%d%Y-%H%M"`
  6
+
  7
+CURR_DIR="`pwd`"
  8
+IMAGE_DIR="${HOME}/.qi/milkymist/milkymist-firmware/${DATE_TIME}/"
  9
+mkdir -p ${IMAGE_DIR}
  10
+
  11
+BUILD_LOG="${IMAGE_DIR}/BUILD_LOG"
  12
+VERSIONS="${IMAGE_DIR}/VERSIONS"
  13
+touch ${BUILD_LOG} ${VERSIONS}
  14
+
  15
+MILKYMIST_GIT_DIR="../../milkymist"
  16
+SCRIPTS_GIT_DIR=".."
  17
+
  18
+MD5_BINARIES="bios.bin bios-rescue.bin boot.bin data.flash5.bin flickernoise flickernoise.bin flickernoise.fbi flickernoise.ralf soc.fpg soc-rescue.fpg splash.raw splash-rescue.raw standby.fpg"
  19
+
  20
+get-feeds-revision() {
  21
+    if [ -d "$1" ]; then
  22
+        cd $1
  23
+        repo=$(git config -l | grep remote.origin.url | cut -d "=" -f 2)
  24
+        rev=$(git log | head -n 1 | cut -b8-)
  25
+        branch=$(git branch | grep "*" | cut -b3-)
  26
+        echo "${repo}  ${branch} ${rev}" >> ${VERSIONS}
  27
+    fi
  28
+    cd ${CURR_DIR}
  29
+}
  30
+
  31
+
  32
+echo "update git ..."
  33
+(cd ${SCRIPTS_GIT_DIR} && git fetch -a && git reset --hard origin/master)
  34
+#make -C ${SCRIPTS_GIT_DIR}/compile-flickernoise/ milkymist-git-clone #no needs every build
  35
+MILKYMIST_GIT_DIR=${MILKYMIST_GIT_DIR}  make -C ${SCRIPTS_GIT_DIR}/compile-flickernoise/ milkymist-git-update
  36
+if [ "$?" != "0" ]; then
  37
+	echo "ERROR: milkymist-git-update"
  38
+        echo -e "\
  39
+say #milkymist ERROR: milkymist-git-update \
  40
+see log here: http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/milkymist-firmware-${DATE_TIME}/ \nclose" \
  41
+             | nc turandot.qi-hardware.com 3858
  42
+fi
  43
+
  44
+
  45
+echo "get git versions ..."
  46
+get-feeds-revision ${MILKYMIST_GIT_DIR}/autotest-m1.git
  47
+get-feeds-revision ${MILKYMIST_GIT_DIR}/flickernoise.git
  48
+get-feeds-revision ${MILKYMIST_GIT_DIR}/liboscparse.git
  49
+get-feeds-revision ${MILKYMIST_GIT_DIR}/milkymist.git
  50
+get-feeds-revision ${MILKYMIST_GIT_DIR}/mtk.git
  51
+get-feeds-revision ${MILKYMIST_GIT_DIR}/rtems.git
  52
+get-feeds-revision ${MILKYMIST_GIT_DIR}/rtems-yaffs2.git
  53
+get-feeds-revision ${SCRIPTS_GIT_DIR}/
  54
+
  55
+
  56
+echo "compile toolchain ..."
  57
+rm -rf /opt/rtems-4.11/
  58
+make -C ${SCRIPTS_GIT_DIR}/compile-lm32-rtems clean all >> ${BUILD_LOG} 2>&1
  59
+if [ "$?" != "0" ]; then
  60
+	echo "ERROR: compile-lm32-rtems toolchain "
  61
+fi
  62
+
  63
+
  64
+echo "compile tools ..."
  65
+(cd ${MILKYMIST_GIT_DIR}/milkymist.git && ./clean_all.sh)
  66
+make -C ${MILKYMIST_GIT_DIR}/milkymist.git/tools >> ${BUILD_LOG} 2>&1
  67
+if [ "$?" != "0" ]; then
  68
+	echo "ERROR: milkymist.git/tools"
  69
+fi
  70
+
  71
+echo "compile soc ..."
  72
+#the Xilinx libs(libstdc++.so.6) have some conflict
  73
+(source /home/Xilinx/13.2/ISE_DS/settings64.sh && \
  74
+ make -C ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash)  >> ${BUILD_LOG} 2>&1
  75
+if [ "$?" != "0" ]; then
  76
+	echo "ERROR: compile SOC"
  77
+fi
  78
+
  79
+
  80
+echo "compile flickernoise ..."
  81
+export PATH=${MILKYMIST_GIT_DIR}/milkymist.git/tools:$PATH
  82
+MILKYMIST_GIT_DIR=${MILKYMIST_GIT_DIR} make -C ${SCRIPTS_GIT_DIR}/compile-flickernoise \
  83
+         clean flickernoise.fbi autotest-m1-boot.bin  >> ${BUILD_LOG} 2>&1
  84
+if [ "$?" != "0" ]; then
  85
+	echo "ERROR: compile flickernoise"
  86
+fi
  87
+
  88
+
  89
+echo "copy images to bin/ ..."
  90
+cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/standby.fpg ${IMAGES_DIR}
  91
+cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/soc.fpg ${IMAGES_DIR}
  92
+cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/bios.bin ${IMAGES_DIR}
  93
+cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/splash.raw ${IMAGES_DIR}
  94
+cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/soc-rescue.fpg ${IMAGES_DIR}
  95
+cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/bios-rescue.bin ${IMAGES_DIR}
  96
+cp ${MILKYMIST_GIT_DIR}/milkymist.git/boards/milkymist-one/flash/splash-rescue.raw ${IMAGES_DIR}
  97
+
  98
+cp ${MILKYMIST_GIT_DIR}/flickernoise.git/src/bin/* ${IMAGES_DIR}/
  99
+cp ${MILKYMIST_GIT_DIR}/autotest-m1.git/src/boot.bin ${IMAGES_DIR}/
  100
+
  101
+echo "build data patitions ..."
  102
+mkdir -p ${IMAGE_DIR}/data.flash5/patchpool
  103
+find ${MILKYMIST_GIT_DIR}/flickernoise.git/patches -name "*.fnp" -exec cp {} ${IMAGE_DIR}/data.flash5/patchpool \;
  104
+
  105
+make -C ${MILKYMIST_GIT_DIR}/rtems-yaffs2.git/utils mm-mkyaffs2image
  106
+${MILKYMIST_GIT_DIR}/rtems-yaffs2.git/utils/mm-mkyaffs2image ${IMAGE_DIR}/data.flash5 ${IMAGES_DIR}/data.flash5.bin convert  >> ${BUILD_LOG} 2>&1
  107
+chmod 644 ${IMAGES_DIR}/data.flash5.bin
  108
+
  109
+echo "generate md5sum ..."
  110
+(cd ${IMAGES_DIR} && md5sum --binary * > ${IMAGES_DIR}/md5sums)
  111
+
  112
+
  113
+echo "create SDK ..."
  114
+(cd /opt/ && tar cjvf ${IMAGES_DIR}/Flickernoise-lm32-rtems-4.11-SDK-for-Linux-x86_64.tar.bz2 rtems-4.11/)
  115
+
  116
+echo "DONE!"

No commit comments for this range

Something went wrong with that request. Please try again.