File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # 本脚本用于编译龙芯1C的pmon
3
+ # 本脚本在debian5-debian12, 使用debian的 交叉编译工具 进行pmon编译
4
+ # 在win10的ubuntu子系统编译,也是可以的
5
+
6
+ if ! [ " $1 " ] ; then
7
+ echo $0 zloader.xxx
8
+ exit
9
+ fi
10
+ dir=$1
11
+ if ! [ -x $1 ] ; then
12
+ dir=" zloader.$1 "
13
+ if ! [ -x $dir ] ; then
14
+ echo not find $dir
15
+ exit
16
+ fi
17
+ fi
18
+ if ! [ " ` which mipsel-linux-gnu-gcc` " ] || ! [ -e /var/log/pmon_install.txt ] ; then
19
+ apt-get update
20
+ apt-get -y install gcc-mipsel-linux-gnu
21
+ if ! [ " ` which mipsel-linux-gnu-gcc` " ] ; then
22
+ echo 没有找到gcc-mipsel-linux-gnu包
23
+ exit
24
+ fi
25
+ apt-get -y install zlib1g make bison flex xutils-dev ccache
26
+ date > /var/log/pmon_install.txt
27
+ fi
28
+ PATH=` pwd` /ccache:` pwd` /tools/pmoncfg:$PATH
29
+
30
+ if ! [ " ` which pmoncfg` " ] ; then
31
+ cd tools/pmoncfg
32
+ make CPPFLAGS=-fcommon
33
+ cd ../..
34
+ fi
35
+
36
+
37
+
38
+ cd $dir
39
+ make cfg all tgt=rom CROSS_COMPILE=mipsel-linux-gnu- LANG=C
40
+ cp gzrom.bin ..
You can’t perform that action at this time.
0 commit comments