-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·184 lines (165 loc) · 6.62 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
#!/bin/bash
>build.log
mkdir build && pushd build
echo -e "\nsrc package bash-3.0.16.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/bash-3.0.16.tar.gz
pushd bash-3.0.16
./configure | tee -a ../../build.log
make | tee -a ../../build.log
popd
echo -e "\nsrc package busybox-1.9.2.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/busybox-1.9.2.tar.gz
pushd busybox-1.9.2
tar zxvf ../../src/579.11.114/busybox-1.9.2-local-patch.tgz
cp -rf ipa-diff/* .
make oldconfig | tee -a ../../build.log
make | tee -a ../../build.log
popd
echo -e "\nsrc package cramfs-1.1.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/cramfs-1.1.tar.gz
pushd cramfs-1.1/
tar zxvf ../../src/579.11.114/cramfs-1.1-local-patch.tar.gz
cp -rf ipa-diff/* .
export OBJDIR=$PWD
make -f GNUmakefile | tee -a ../../build.log
popd
echo -e "\nsrc package u-boot-1.3.4.tar.bz2..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar jxvf ../src/u-boot-1.3.4.tar.bz2
pushd u-boot-1.3.4
cp ../../src/579.11.114/u-boot-1.3.4-local-patch-224.gz .
cp ../../src/579.11.114/u-boot-1.3.4-picochip-3.2.4-patch.gz .
gunzip *.gz
patch -p1 <u-boot-1.3.4-picochip-3.2.4-patch
patch -p1 <u-boot-1.3.4-local-patch-224
export TYPE=xc && make ipaccessip202ff_config | tee -a ../../build.log
cat >>common/main.c<<EOF
unsigned long long get_ticks(void)
{
return get_timer(0);
}
ulong get_tbclk (void)
{
ulong tbclk;
tbclk = CFG_HZ;
return tbclk;
}
int raise() { return 0; }
EOF
make | tee -a ../../build.log
popd
echo -e "\nsrc package strongswan-4.2.12.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/strongswan-4.2.12.tar.gz
pushd strongswan-4.2.12
tar zxvf ../../src/579.11.114/strongswan-4.2.12-official-patch.tar.gz
patch -p1 <patches_strongswan/04_swapped_ts_check_patch/strongswan-4.x.x._swapped_ts_check.patch
patch -p1 <patches_strongswan/03_invalid_ike_state_patch/strongswan-4.x.x_invalid_ike_state.patch
./configure | tee -a ../../build.log
make | tee -a ../../build.log
popd
echo -e "\nsrc package ethtool-6.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/ethtool-6.tar.gz
pushd ethtool-6
./configure | tee -a ../../build.log
make | tee -a ../../build.log
popd
echo -e "\nsrc package gcc-2008q3-72.tar.bz2..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar jxvf ../src/gcc-2008q3-72.tar.bz2
pushd gcc-4.3
mkdir build
pushd build
../configure --with-mpfr=/usr/local --with-gmp=/usr/local --disable-multilib | tee -a ../../../build.log
make | tee -a ../../../build.log
popd
popd
echo -e "\nsrc package glibc-2008q3-72.zip..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
unzip ../src/glibc-2008q3-72.zip
pushd glibc-2008q3-72/
tar jxvf glibc-2008q3-72.tar.bz2
pushd glibc-2.8/
cp ../../../src/579.11.114/glibc-2008q3-72-ipa.patch.gz .
gunzip glibc-2008q3-72-ipa.patch.gz
patch -p1 <glibc-2008q3-72-ipa.patch
mkdir build && pushd build
../configure --disable-sanity-checks | tee -a ../../../../build.log
make | tee -a ../../../../build.log
popd
popd
popd
echo -e "\nsrc package iproute2-2.6.26.tar.bz2..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar jxvf ../src/iproute2-2.6.26.tar.bz2
pushd iproute2-2.6.26
tar zxvf ../../src/579.11.114/iproute2-2.6.26-local-patch.tar.gz
cp -rf patches/* .
./configure | tee -a ../../build.log
make | tee -a ../../build.log
popd
echo -e "\nsrc package gmp-4.2.1.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/gmp-4.2.1.tar.gz
pushd gmp-4.2.1
./configure | tee -a ../../build.log
make | tee -a ../../build.log
popd
echo -e "\nsrc package linux-2.6.28.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/linux-2.6.28.tar.gz
pushd linux-2.6.28/
cp ../../src/579.11.114/linux* .
gunzip *.gz
cp ../../src/linux-2.6.28-dot-config .config
patch -p1 <linux-v2.6.28-picochip-3.2.4-patch
patch -p1 <linux-2.6.28-local-patch-224
# choose defaults
make oldconfig
make | tee -a ../../build.log
popd
echo -e "\nsrc package iptables-1.4.2.tar.bz2..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar jxvf ../src/iptables-1.4.2.tar.bz2
pushd iptables-1.4.2
tar zxvf ../../src/579.11.114/iptables-1.4.2-local-patch.tar.gz
cp -rf patches/* .
./configure | tee -a ../../build.log
make | tee -a ../../build.log
popd
echo -e "\nsrc package mtd-utils.tgz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/mtd-utils.tgz
pushd mtd-utils-1.0.0
make | tee -a ../../build.log
popd
echo -e "\nsrc package procps-3.2.7.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/procps-3.2.7.tar.gz
pushd procps-3.2.7
make | tee -a ../../build.log
popd
echo -e "\nsrc package smartmontools-5.37.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/smartmontools-5.37.tar.gz
pushd smartmontools-5.37
./configure | tee -a ../../build.log
make | tee -a ../../build.log
popd
echo -e "\nsrc package i2c-tools-3.0.2.tar.bz2..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar jxvf ../src/i2c-tools-3.0.2.tar.bz2
pushd i2c-tools-3.0.2
make | tee -a ../../build.log
popd
echo -e "\nsrc package ipkg-0.99.163.tar.gz..." | tee -a ../build.log
echo "________________________________________________________________________________" | tee -a ../build.log
tar zxvf ../src/ipkg-0.99.163.tar.gz
pushd ipkg-0.99.163
./configure | tee -a ../../build.log
make | tee -a ../../build.log
popd