blob: 6c21096f322f5fc9a875ad55177ff18358cde930 (
plain)
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
|
#!/bin/bash
#
# This script is the second stage in bootstrapping a Fedora build to a
# new platform or architecture. Running with no arguments builds a
# cross-development environment, then cross-builds a minimal rootfs.
# Once you have this minimal rootfs booted, run stage2 in that rootfs
# to build the rest of the bootstrap packages.
#
# This script assumes that all the needed sources are installed in
# $SRC (below). Each build installs into /usr.
#
# You may pass a single package name on the command line to rebuild
# just that one package.
#
# ------------------------------------------------------------
TOP=/stage2
MYDIR=${0%/*}
STAGE2=$MYDIR/stage2
SRC=$TOP/rpmbuild/BUILD
J=-j2
BUILDDIR=$TOP/builds
# The cross-compiler target
TARGET=armv7hl-redhat-linux-gnueabi
if [ -f $MYDIR/local.conf ]
then
. $MYDIR/local.conf
fi
# ------------------------------------------------------------
mkdirp()
{
test -d $1 || mkdir -p $1
}
mkdirp $ROOTFS
mkdirp $PREFIX
mkdirp $BUILDDIR
export PATH=$PREFIX/bin:$PATH
go()
{
"$0" "$@"
}
mcd()
{
test -d $1 || mkdir -p $1
cd $1
}
notparallel()
{
echo .NOTPARALLEL: >> Makefile
}
fix_la()
{
for la in $ROOTFS/usr/lib/*$1*.la
do
rm $la
done
}
case "$1" in
"" )
go clean
go cpio
go ncurses
go m4
go flex
go bison
go texinfo
go gdb
go curl
# go nspr # not yet
# go rpm # not yet
;;
"clean" )
;;
#--------------------------------------------------
cpio )
mcd $BUILDDIR/$1
$SRC/${1}-*/configure $TCONFIGARGS
notparallel
make $J
make $J install
;;
ncurses )
mcd $BUILDDIR/ncurses
$SRC/ncurses-*/configure $TCONFIGARGS \
--with-shared --without-ada --with-ospeed=unsigned \
--enable-hard-tabs --enable-xmc-glitch --enable-colorfgbg \
--enable-overwrite \
--enable-pc-files \
--with-termlib=tinfo \
--with-chtype=long \
--with-ticlib
notparallel
make $J
make $J install
;;
m4 )
mcd $BUILDDIR/m4
$SRC/m4-*/configure $TCONFIGARGS
make $J -k
make $J -k install
;;
flex )
mcd $BUILDDIR/flex
$SRC/flex-*/configure $TCONFIGARGS --disable-dependency-tracking
make $J -k
make $J -k install
;;
bison )
mcd $BUILDDIR/bison
$SRC/bison-*/configure $TCONFIGARGS
make $J -k
make $J -k install
;;
texinfo )
mcd $BUILDDIR/texinfo
$SRC/texinfo-*/configure $TCONFIGARGS
make $J -k
make $J -k install
;;
gdb )
mcd $BUILDDIR/gdb
$SRC/gdb-*/configure $TCONFIGARGS --without-rpm
notparallel
make $J -k
make $J -k install
;;
curl )
mcd $BUILDDIR/curl
$SRC/curl-*/configure $TCONFIGARGS
make $J
make $J install
;;
nspr )
mcd $BUILDDIR/nspr
$SRC/nspr-*/mozilla/nsprpub/configure $TCONFIGARGS --enable-thumb2
make $J
make $J install
;;
rpm )
mcd $BUILDDIR/rpm
$SRC/${1}-*/configure $TCONFIGARGS
notparallel
make $J
make $J install
;;
esac
exit 0
|