-
Notifications
You must be signed in to change notification settings - Fork 2
/
make-rtl865xb-nofpu
executable file
·146 lines (127 loc) · 4.36 KB
/
make-rtl865xb-nofpu
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
#!/bin/sh
INSTALL_DIR=/home/`whoami`/FlyRouterBIN
mkdir -p ${INSTALL_DIR}/download
rm -rf ./dl
ln -s ${INSTALL_DIR}/download dl
download_component(){
# Download stripped Netgear kernel, sorry
wget -c -O dl/linux-2.4.26-rp614v4v106.tar.bz2 \
http://midge.vlad.org.ua/zig/source/rtl865xb/linux-2.4.26-rp614v4v106.tar.bz2
# Download RTL865xB source for Flash
wget -c -O dl/rtl865x-flash.tgz \
http://midge.vlad.org.ua/zig/source/rtl865xb/rtl865x-flash.tgz
}
hack_toolchain_my(){
STAGDIR="staging_dir_mips_nofpu"
rm -rf $STAGDIR; mkdir -p $STAGDIR
cp -r /home/builder/0-zero/build/toolchain/* $STAGDIR
ln -f $STAGDIR/mips-linux-uclibc/lib/* $STAGDIR/lib/
mkdir -p /opt/gcc-3.3.3/toolchain_build_mips_nofpu/ccache-2.3/cache
ln -fs `pwd`/${STAGDIR} /home/builder/0-zero/build/toolchain
mkdir $STAGDIR/stampfiles
touch \
$STAGDIR/stampfiles/.toolchain_binutils-compile \
$STAGDIR/stampfiles/.toolchain_binutils-install \
$STAGDIR/stampfiles/.toolchain_binutils-prepare \
$STAGDIR/stampfiles/.toolchain_gcc-compile \
$STAGDIR/stampfiles/.toolchain_gcc-install \
$STAGDIR/stampfiles/.toolchain_gcc-prepare \
$STAGDIR/stampfiles/.toolchain_gdb-compile \
$STAGDIR/stampfiles/.toolchain_gdb-install \
$STAGDIR/stampfiles/.toolchain_gdb-prepare \
$STAGDIR/stampfiles/.toolchain_kernel-headers-prepare \
$STAGDIR/stampfiles/.toolchain_libnotimpl-compile \
$STAGDIR/stampfiles/.toolchain_libnotimpl-install \
$STAGDIR/stampfiles/.toolchain_libnotimpl-prepare \
$STAGDIR/stampfiles/.toolchain_uClibc-compile \
$STAGDIR/stampfiles/.toolchain_uClibc-install \
$STAGDIR/stampfiles/.toolchain_uClibc-prepare
#
echo "3.3.3" > $STAGDIR/gcc_version
echo "0.9.26" > $STAGDIR/uclibc_version
}
clean_root(){
make root_clean
}
clean_linux(){
rm -rf build_mips_nofpu/linux*
}
clean_build(){
rm -rf build_mips_nofpu
}
install(){
rev=`cat Revision | head -n 1 | awk '/^Revision:/ { print $2 }'`
#
mkdir -p $INSTALL_DIR/firmware-mips-beerouter/ $INSTALL_DIR/packages-mips-beerouter/
cp -af build_mips_nofpu/linux-2.4-rtl865xb/br6214k.bix $INSTALL_DIR/firmware-mips-beerouter/$1-r${rev}-`date +%Y%m%d%H%M`.bix
cp -af build_mips_nofpu/linux-2.4-rtl865xb/br6214k_crypted.bix $INSTALL_DIR/firmware-mips-beerouter/$1_up-r${rev}-`date +%Y%m%d%H%M`.bin
cp -af build_mips_nofpu/linux-2.4-rtl865xb/dir120.bix $INSTALL_DIR/firmware-mips-beerouter/$1-r${rev}-`date +%Y%m%d%H%M`.bix
cp -af build_mips_nofpu/linux-2.4-rtl865xb/dir120_crypted.bix $INSTALL_DIR/firmware-mips-beerouter/$1_up-r${rev}-`date +%Y%m%d%H%M`.bin
cp -f bin/packages/* $INSTALL_DIR/packages-mips-beerouter/
chmod 644 /var/www/download/br6214k/*
rm -rf bin
}
build(){
local ver=$1
local config=$2
export BEE_CONFIG=$2
clean_build
clean_root
temp=`tempfile -p linux -s -config`
if [ -r target/linux/rtl865xb-$ver/config-$config ]; then
cp target/linux/rtl865xb-$ver/config $temp
cp target/linux/rtl865xb-$ver/config-$config target/linux/rtl865xb-$ver/config
fi
cp target/linux/rtl865xb-$ver/system-$config .config
make oldconfig DEVELOPER=1
#make --jobs=4
make --jobs=1 V=99
ret=$?
if [ "$ret" = 0 ]; then
rename "s/.bin/-$config.bin/" bin/*
install $config
fi
if [ -s $temp ]; then
cp $temp target/linux/rtl865xb-$ver/config
fi
rm $temp
[ "$ret" != 0 ] && exit 1
}
upload_firmware() {
DESTINATION="vu2049@hosting:~/htdocs/downloads/software"
scp ${INSTALL_DIR}/firmware-mips-beerouter/*_up* $DESTINATION/beerouter/upgrade/2009-testing/
}
upload_packages() {
DESTINATION="vu2049@hosting:~/htdocs/downloads/software"
scp ${INSTALL_DIR}/packages-mips-beerouter/* $DESTINATION/beerouter/packages/
}
#
#download_component
rm -rf bin
#
# rebuild toolchain
rm -rf staging_dir_mips_nofpu toolchain_build_mips_nofpu
hack_toolchain_my
#
#
### Edimax section ###
#build 2.4 beerouter-3g_arlix_nweb
#build 2.4 beerouter-3g_flash_nweb
#build 2.4 beerouter-3g_mpcs_nweb
#build 2.4 beerouter-3g_mpcs-cs_nweb
#build 2.4 beerouter-3g_multimedia_nweb
#build 2.4 beerouter-3g_navigator_nweb
#build 2.4 beerouter-3g_ovpn_nssl_nweb
#build 2.4 beerouter-3g_ppx_mpcs_nweb
#build 2.4 beerouter-3g_serial_nweb
build 2.4 beerouter-3g_admin_nweb
#
### D-Link section ###
#build 2.4 beerouter-3g_4m_bluepoint
#build 2.4 beerouter-3g_4m_ovpn_ssl
#build 2.4 beerouter-3g_4m_mpcs_web
#
#aplay /home/builder/trunk/complete.wav /home/builder/trunk/complete.wav /home/builder/trunk/complete.wav
#
upload_firmware
upload_packages