make sure the activation callback is notified of the bitmap. when the bitmap receives...
[AROS.git] / scripts / gimmearos-v1.sh
blob81649515586f289652c94cd750679c688977ecca
1 #!/bin/bash
3 # Script for building AROS from the Subversion repository
5 # Currently only a limited amount of Linux distros is supported.
6 # If you improve this script, send modifications back to me, please.
7 # Matthias Rustler, mailto:mrustler@gmx.de
9 # This script is public domain. Use it at your own risk.
11 # $VER: gimmearos-v1.sh 1.13 (03.09.2017)
13 curdir="`pwd`"
14 srcdir="aros-src"
15 portsdir="$HOME/aros-ports-src"
16 tooldir="$HOME/aros-toolchain"
17 makeopts="-j3 -s"
18 configopts="--with-binutils-version=2.25 --with-gcc-version=6.3.0 --disable-sdl-hidd --with-portssources="$portsdir""
20 install_pkg()
22 if [ $# -ne 2 ]
23 then
24 echo "install_pkg() needs 2 arguments"
25 exit 100
27 echo -e "\nInstalling " $2
28 sudo $1 $2
29 if [ $? -ne 0 ]
30 then
31 echo -e "\n install failed. Script cancelled."
32 exit 100
37 echo -e "\n\n\n\n\n"
38 echo -e "***********************************************"
39 echo -e "* Script for downloading and building of AROS *"
40 echo -e "***********************************************"
41 echo -e "\n\n"
42 echo -e "*********************************"
43 echo -e "* Step 1: install prerequisites *"
44 echo -e "*********************************"
45 echo -e "The build system needs some packages to do its job."
46 echo -e "If you are asked for a password enter you admin password."
47 echo -e "\n1 .. Get packages with apt-get for Debian and similar (e.g. Ubuntu)"
48 echo -e " for building 32-bit AROS on 32-bit Linux or 64-bit-AROS on 64-bit-Linux"
49 echo -e "2 .. As 1) but with additional packages for building 32-bit AROS"
50 echo -e " on 64-bit Linux"
51 echo -e "3 .. Get packages with yum for Fedora"
52 echo -e "4 .. Get packages with pacman for Arch"
53 echo -e "5 .. Get packages with zypper for openSuse"
54 echo -e "6 .. As 5) but with additional packages for building 32-bit AROS"
55 echo -e " on 64-bit Linux"
56 echo -e "99 ..Skip this step"
57 echo -e "0 .. Exit"
59 echo -e "\nEnter number and press <Enter>:"
61 read input
62 case "$input" in
63 1 ) echo -e "\nInstalling prerequisites with apt-get..."
64 install_pkg "apt-get install" subversion
65 install_pkg "apt-get install" git-core
66 install_pkg "apt-get install" gcc
67 install_pkg "apt-get install" g++
68 install_pkg "apt-get install" make
69 install_pkg "apt-get install" gawk
70 install_pkg "apt-get install" bison
71 install_pkg "apt-get install" flex
72 install_pkg "apt-get install" bzip2
73 install_pkg "apt-get install" netpbm
74 install_pkg "apt-get install" autoconf
75 install_pkg "apt-get install" automake
76 install_pkg "apt-get install" libx11-dev
77 install_pkg "apt-get install" libxext-dev
78 install_pkg "apt-get install" libc6-dev
79 install_pkg "apt-get install" liblzo2-dev
80 install_pkg "apt-get install" libxxf86vm-dev
81 install_pkg "apt-get install" libpng-dev
82 install_pkg "apt-get install" gcc-multilib
83 install_pkg "apt-get install" libsdl1.2-dev
84 install_pkg "apt-get install" byacc
87 2 ) echo -e "\nInstalling prerequisites with apt-get..."
88 install_pkg "apt-get install" subversion
89 install_pkg "apt-get install" git-core
90 install_pkg "apt-get install" gcc
91 install_pkg "apt-get install" g++
92 install_pkg "apt-get install" make
93 install_pkg "apt-get install" gawk
94 install_pkg "apt-get install" bison
95 install_pkg "apt-get install" flex
96 install_pkg "apt-get install" bzip2
97 install_pkg "apt-get install" netpbm
98 install_pkg "apt-get install" autoconf
99 install_pkg "apt-get install" automake
100 install_pkg "apt-get install" libx11-dev
101 install_pkg "apt-get install" libxext-dev
102 install_pkg "apt-get install" libc6-dev
103 install_pkg "apt-get install" liblzo2-dev
104 install_pkg "apt-get install" libxxf86vm-dev
105 install_pkg "apt-get install" libpng-dev
106 install_pkg "apt-get install" gcc-multilib
107 install_pkg "apt-get install" libsdl1.2-dev
108 install_pkg "apt-get install" byacc
110 install_pkg "apt-get install" libc6-dev-i386
111 install_pkg "apt-get install" lib32gcc1
112 install_pkg "apt-get install" ia32-libs
115 3 ) echo -e "\nInstalling prerequisites with yum..."
116 install_pkg "yum install" subversion
117 install_pkg "yum install" git-core
118 install_pkg "yum install" gcc
119 install_pkg "yum install" gawk
120 install_pkg "yum install" bison
121 install_pkg "yum install" flex
122 install_pkg "yum install" bzip2
123 install_pkg "yum install" netpbm
124 install_pkg "yum install" autoconf
125 install_pkg "yum install" automake
126 install_pkg "yum install" libX11-devel
127 install_pkg "yum install" glibc-devel
128 install_pkg "yum install" lzo-devel
131 4 ) echo -e "\nInstalling prerequisites with pacman.."
132 echo -e "\nUpdating the List of software"
133 echo -e "\nEnter sudo password"
134 sudo pacman -Sy
135 install_pkg "pacman --needed --noconfirm -S" subversion
136 install_pkg "pacman --needed --noconfirm -S" git-core
137 install_pkg "pacman --needed --noconfirm -S" gcc
138 install_pkg "pacman --needed --noconfirm -S" gawk
139 install_pkg "pacman --needed --noconfirm -S" bison
140 install_pkg "pacman --needed --noconfirm -S" flex
141 install_pkg "pacman --needed --noconfirm -S" bzip2
142 install_pkg "pacman --needed --noconfirm -S" netpbm
143 install_pkg "pacman --needed --noconfirm -S" autoconf
144 install_pkg "pacman --needed --noconfirm -S" automake
145 #it appears as though the libx11-dev,libc6-dev,liblzo2-dev is not needed on arch
148 5 ) echo -e "\nInstalling prerequisites with zypper..."
149 # tools
150 install_pkg "zypper --non-interactive install" subversion
151 install_pkg "zypper --non-interactive install" git-core
152 install_pkg "zypper --non-interactive install" gcc
153 install_pkg "zypper --non-interactive install" gcc-c++
154 install_pkg "zypper --non-interactive install" make
155 install_pkg "zypper --non-interactive install" gawk
156 install_pkg "zypper --non-interactive install" bison
157 install_pkg "zypper --non-interactive install" flex
158 install_pkg "zypper --non-interactive install" bzip2
159 install_pkg "zypper --non-interactive install" netpbm
160 install_pkg "zypper --non-interactive install" autoconf
161 install_pkg "zypper --non-interactive install" automake
162 install_pkg "zypper --non-interactive install" patch
163 install_pkg "zypper --non-interactive install" cmake
164 install_pkg "zypper --non-interactive install" gperf
165 install_pkg "zypper --non-interactive install" perl-Switch
166 install_pkg "zypper --non-interactive install" byacc
168 # libs
169 install_pkg "zypper --non-interactive install" libXxf86vm1
170 install_pkg "zypper --non-interactive install" alsa-plugins-pulse
172 #devel
173 install_pkg "zypper --non-interactive install" libX11-devel
174 install_pkg "zypper --non-interactive install" glibc-devel
175 install_pkg "zypper --non-interactive install" libpng12-devel
176 install_pkg "zypper --non-interactive install" alsa-devel
179 6 ) echo -e "\nInstalling prerequisites with zypper..."
180 # tools
181 install_pkg "zypper --non-interactive install" subversion
182 install_pkg "zypper --non-interactive install" git-core
183 install_pkg "zypper --non-interactive install" gcc
184 install_pkg "zypper --non-interactive install" gcc-c++
185 install_pkg "zypper --non-interactive install" make
186 install_pkg "zypper --non-interactive install" gawk
187 install_pkg "zypper --non-interactive install" bison
188 install_pkg "zypper --non-interactive install" flex
189 install_pkg "zypper --non-interactive install" bzip2
190 install_pkg "zypper --non-interactive install" netpbm
191 install_pkg "zypper --non-interactive install" autoconf
192 install_pkg "zypper --non-interactive install" automake
193 install_pkg "zypper --non-interactive install" patch
194 install_pkg "zypper --non-interactive install" cmake
195 install_pkg "zypper --non-interactive install" gperf
196 install_pkg "zypper --non-interactive install" perl-Switch
197 install_pkg "zypper --non-interactive install" byacc
199 # libs
200 install_pkg "zypper --non-interactive install" libXxf86vm1
201 install_pkg "zypper --non-interactive install" alsa-plugins-pulse
203 #devel
204 install_pkg "zypper --non-interactive install" libX11-devel
205 install_pkg "zypper --non-interactive install" glibc-devel
206 install_pkg "zypper --non-interactive install" libpng12-devel
208 # 32-bit support
209 install_pkg "zypper --non-interactive install" gcc-32bit
210 install_pkg "zypper --non-interactive install" gcc-c++-32bit
211 install_pkg "zypper --non-interactive install" glibc-devel-32bit
212 install_pkg "zypper --non-interactive install" libXxf86vm1-32bit
213 install_pkg "zypper --non-interactive install" alsa-plugins-pulse-32bit
214 install_pkg "zypper --non-interactive install" alsa-devel-32bit
217 0 ) exit 0
219 esac
221 cd "$curdir"
223 input=""
224 until [ "$input" = "99" ]
226 echo -e "\n\n\n\n\n"
227 echo -e "***********************************************"
228 echo -e "* Step 2: get the sources from the repository *"
229 echo -e "***********************************************"
230 echo -e "\nYou can either use Subversion or Git. Git doesn't require"
231 echo -e "a password, but you'll get only read-only access."
232 echo -e "The repositories will be checked out into the current directory."
233 echo -e "\nABI V1 with | ABI V1 |"
234 echo -e "Subversion | with GIT | Content"
235 echo -e "------------+----------+--------------------------"
236 echo -e " 1 | 21 | Get AROS core (required)"
237 echo -e " 2 | 22 | Get contrib (optional)"
238 echo -e "\n 3 | 23 | Get ports source (optional, needs contrib)"
239 echo -e "\n 4 | --- | Get documentation source (optional)"
240 echo -e " 5 | --- | Get binaries (wallpapers, logos etc.) (optional)"
241 echo -e "\n99 .. Go to next step"
242 echo -e "0 .. Exit"
244 echo -e "\nEnter number and press <Enter>:"
246 read input
247 case "$input" in
248 1 ) echo -e "\nGetting AROS V1 core with Subversion...\n"
249 svn checkout https://svn.aros.org/svn/aros/trunk/AROS "$srcdir"
251 2 ) echo -e "\nGetting contrib V1 with Subversion...\n"
252 svn checkout https://svn.aros.org/svn/aros/trunk/contrib "$srcdir/contrib"
254 3 ) echo -e "\nGetting ports V1 with Subversion...\n"
255 svn checkout https://svn.aros.org/svn/aros/trunk/ports "$srcdir/ports"
257 4 ) echo -e "\nGetting documentation V1 with Subversion...\n"
258 svn checkout https://svn.aros.org/svn/aros/trunk/documentation "$srcdir/documentation"
260 5 ) echo -e "\nGetting binaries V1 with Subversion...\n"
261 svn checkout https://svn.aros.org/svn/aros/trunk/binaries "$srcdir/binaries"
264 21 ) echo -e "\nGetting AROS V1 core with Git...\n"
265 git clone git://repo.or.cz/AROS.git "$srcdir"
267 22 ) echo -e "\nGetting contrib V1 with Git...\n"
268 git clone git://repo.or.cz/AROS-Contrib.git "$srcdir/contrib"
270 23 ) echo -e "\nGetting ports V1 with Git...\n"
271 git clone git://repo.or.cz/AROS-Ports.git "$srcdir/ports"
274 0 ) exit 0
276 esac
277 done
279 cd "$curdir"
281 input=""
282 until [ "$input" = "99" ]
284 cd "$curdir"
286 echo -e "\n\n\n\n\n"
287 echo -e "*******************************"
288 echo -e "* Step 3: configure toolchain *"
289 echo -e "*******************************"
290 echo -e "\n 1 | i386 (32-bit)"
291 echo -e " 2 | x86_64 (64-bit)"
292 echo -e " 3 | m68k (32-bit)"
293 echo -e " 4 | armhf (32-bit)"
294 echo -e "\n99 .. Go to next step"
295 echo -e "0 .. Exit"
297 echo -e "\nEnter number and press <Enter>:"
299 read input
300 case "$input" in
301 1 ) echo -e "\nConfiguring i386 Toolchain...\n"
302 mkdir -p "$portsdir"
303 mkdir -p aros-i386-toolchain-builddir
304 cd aros-i386-toolchain-builddir
305 "../$srcdir/configure" $configopts --target=linux-i386 --with-aros-toolchain-install="$tooldir"-i386
307 2 ) echo -e "\nConfiguring x86_64 Toolchain...\n"
308 mkdir -p "$portsdir"
309 mkdir -p aros-x86_64-toolchain-builddir
310 cd aros-x86_64-toolchain-builddir
311 "../$srcdir/configure" $configopts --target=linux-x86_64 --with-aros-toolchain-install="$tooldir"-x86_64
313 3 ) echo -e "\nConfiguring m68k Toolchain...\n"
314 mkdir -p "$portsdir"
315 mkdir -p aros-m68k-toolchain-builddir
316 cd aros-m68k-toolchain-builddir
317 "../$srcdir/configure" $configopts --target=amiga-m68k --with-aros-toolchain-install="$tooldir"-m68k
319 4 ) echo -e "\nConfiguring armhf Toolchain...\n"
320 mkdir -p "$portsdir"
321 mkdir -p aros-armhf-toolchain-builddir
322 cd aros-armhf-toolchain-builddir
323 "../$srcdir/configure" $configopts --target=raspi-armhf --with-aros-toolchain-install="$tooldir"-armhf
326 0 ) exit 0
328 esac
329 done
332 cd "$curdir"
334 input=""
335 until [ "$input" = "99" ]
337 cd "$curdir"
339 echo -e "\n\n\n\n\n"
340 echo -e "***************************"
341 echo -e "* Step 4: build toolchain *"
342 echo -e "***************************"
343 echo -e "\nYou can only build what you've already configured."
344 echo -e "\n 1 | i386 (32-bit)"
345 echo -e " 2 | x86_64 (64-bit)"
346 echo -e " 3 | m68k (32-bit)"
347 echo -e " 4 | armhf (32-bit)"
348 echo -e "\n9 .. Go to next step"
349 echo -e "0 .. Exit"
350 echo -e "\nEnter number and press <Enter>:"
352 read input
353 case "$input" in
354 1 ) echo -e "\nBuilding i386 Toolchain...\n"
355 cd aros-i386-toolchain-builddir
356 make $makeopts crosstools
357 cd "$curdir"
358 rm -rf aros-i386-toolchain-builddir
360 2 ) echo -e "\nBuilding x86_64 Toolchain...\n"
361 cd aros-x86_64-toolchain-builddir
362 make $makeopts crosstools
363 cd "$curdir"
364 rm -rf aros-x86_64-toolchain-builddir
366 3 ) echo -e "\nBuilding m68k Toolchain...\n"
367 cd aros-m68k-toolchain-builddir
368 make $makeopts crosstools
369 cd "$curdir"
370 rm -rf aros-m68k-toolchain-builddir
372 4 ) echo -e "\nBuilding armhf Toolchain...\n"
373 cd aros-armhf-toolchain-builddir
374 make $makeopts crosstools
375 cd "$curdir"
376 rm -rf aros-armhf-toolchain-builddir
379 0 ) exit 0
381 esac
382 done
385 cd "$curdir"
387 input=""
388 until [ "$input" = "99" ]
390 cd "$curdir"
392 echo -e "\n\n\n\n\n"
393 echo -e "**************************"
394 echo -e "* Step 5: configure AROS *"
395 echo -e "**************************"
396 echo -e "\n 1 | linux-i386 (32-bit) debug"
397 echo -e " 2 | linux-i386 (32-bit)"
398 echo -e " 3 | linux-x86_64 (64-bit) debug"
399 echo -e " 4 | linux-x86_64 (64-bit)"
400 echo -e " 5 | pc-i386 (32-bit)"
401 echo -e " 6 | pc-x86_64 (64-bit)"
402 echo -e " 7 | pc-x86_64 SMP (64-bit)"
403 echo -e " 8 | amiga-m68k (32-bit)"
404 echo -e " 9 | raspi-armhf (32-bit)"
405 echo -e "\n99 .. Go to next step"
406 echo -e "0 .. Exit"
408 echo -e "\nEnter number and press <Enter>:"
410 read input
411 case "$input" in
412 1 ) echo -e "\nConfiguring linux-i386 V1 with full debug...\n"
413 mkdir -p "$portsdir"
414 mkdir -p aros-linux-i386-dbg
415 cd aros-linux-i386-dbg
416 "../$srcdir/configure" $configopts --target=linux-i386 --enable-debug --with-aros-toolchain-install="$tooldir"-i386 --with-aros-toolchain=yes
418 2 ) echo -e "\nConfiguring linux-i386 V1 without debug...\n"
419 mkdir -p "$portsdir"
420 mkdir -p aros-linux-i386
421 cd aros-linux-i386
422 "../$srcdir/configure" $configopts --target=linux-i386 --with-aros-toolchain-install="$tooldir"-i386 --with-aros-toolchain=yes
424 3 ) echo -e "\nConfiguring linux-x86_64 V1 with full debug...\n"
425 mkdir -p "$portsdir"
426 mkdir -p aros-linux-x86_64-dbg
427 cd aros-linux-x86_64-dbg
428 "../$srcdir/configure" $configopts --target=linux-x86_64 --enable-debug --with-aros-toolchain-install="$tooldir"-x86_64 --with-aros-toolchain=yes
430 4 ) echo -e "\nConfiguring linux-x86_64 V1 without debug...\n"
431 mkdir -p "$portsdir"
432 mkdir -p aros-linux-x86_64
433 cd aros-linux-x86_64
434 "../$srcdir/configure" $configopts --target=linux-x86_64 --with-aros-toolchain-install="$tooldir"-x86_64 --with-aros-toolchain=yes
436 5 ) echo -e "\nConfiguring pc-i386 V1...\n"
437 mkdir -p "$portsdir"
438 mkdir -p aros-pc-i386
439 cd aros-pc-i386
440 "../$srcdir/configure" $configopts --target=pc-i386 --with-aros-toolchain-install="$tooldir"-i386 --with-aros-toolchain=yes
442 6 ) echo -e "\nConfiguring pc-x86_64 V1...\n"
443 mkdir -p "$portsdir"
444 mkdir -p aros-pc-x86_64
445 cd aros-pc-x86_64
446 "../$srcdir/configure" $configopts --target=pc-x86_64 --with-aros-toolchain-install="$tooldir"-x86_64 --with-aros-toolchain=yes
448 7 ) echo -e "\nConfiguring pc-x86_64 SMP V1...\n"
449 mkdir -p "$portsdir"
450 mkdir -p aros-pc-x86_64-smp
451 cd aros-pc-x86_64-smp
452 "../$srcdir/configure" $configopts --target=pc-x86_64 --enable-target-variant=smp --with-aros-toolchain-install="$tooldir"-x86_64 --with-aros-toolchain=yes
454 8 ) echo -e "\nConfiguring amiga-m68k V1...\n"
455 mkdir -p "$portsdir"
456 mkdir -p aros-amiga-m68k
457 cd aros-amiga-m68k
458 "../$srcdir/configure" $configopts --target=amiga-m68k --with-serial-debug=yes --with-aros-toolchain-install="$tooldir"-m68k --with-aros-toolchain=yes
460 9 ) echo -e "\nConfiguring raspi-armhf V1...\n"
461 mkdir -p "$portsdir"
462 mkdir -p aros-raspi-armhf
463 cd aros-raspi-armhf
464 "../$srcdir/configure" $configopts --target=raspi-armhf --with-aros-toolchain-install="$tooldir"-armhf --with-aros-toolchain=yes
467 0 ) exit 0
469 esac
470 done
473 cd "$curdir"
475 input=""
476 until [ "$input" = "99" ]
478 cd "$curdir"
480 echo -e "\n\n\n\n\n"
481 echo -e "*****************"
482 echo -e "* Step 6: build *"
483 echo -e "*****************"
484 echo -e "\nYou can only build what you've already configured."
485 echo -e "\n 1 | linux-i386 (32-bit) debug"
486 echo -e " 2 | linux-i386 (32-bit)"
487 echo -e " 3 | linux-x86_64 (64-bit) debug"
488 echo -e " 4 | linux-x86_64 (64-bit)"
489 echo -e " 5 | pc-i386 (32-bit)"
490 echo -e " 6 | pc-x86_64 (64-bit)"
491 echo -e " 7 | pc-x86_64 SMP (64-bit)"
492 echo -e " 8 | amiga-m68k (32-bit)"
493 echo -e " 9 | raspi-armhf (32-bit)"
494 echo -e "\n99 .. Go to next step"
495 echo -e "0 .. Exit"
496 echo -e "\nEnter number and press <Enter>:"
498 read input
499 case "$input" in
500 1 ) echo -e "\nBuilding linux-i386 V1 with full debug...\n"
501 cd aros-linux-i386-dbg
502 make $makeopts
503 make $makeopts contrib
504 make $makeopts ports
505 echo -e "\nIf everything went well AROS will be available"
506 echo -e "in the directory aros-linux-i386-dbg/bin/<target>/AROS"
508 2 ) echo -e "\nBuilding linux-i386 V1 without debug...\n"
509 cd aros-linux-i386
510 make $makeopts
511 make $makeopts contrib
512 make $makeopts ports
513 echo -e "\nIf everything went well AROS will be available"
514 echo -e "in the directory aros-linux-i386/bin/<target>/AROS"
516 3 ) echo -e "\nBuilding linux-x86_64 V1 with full debug...\n"
517 cd aros-linux-x86_64-dbg
518 make $makeopts
519 make $makeopts contrib
520 make $makeopts ports
521 echo -e "\nIf everything went well AROS will be available"
522 echo -e "in the directory aros-linux-x86_64-dbg/bin/<target>/AROS"
524 4 ) echo -e "\nBuilding linux-x86_64 V1 without debug...\n"
525 cd aros-linux-x86_64
526 make $makeopts
527 make $makeopts contrib
528 make $makeopts ports
529 echo -e "\nIf everything went well AROS will be available"
530 echo -e "in the directory aros-linux-x86_64/bin/<target>/AROS"
532 5 ) echo -e "\nBuilding pc-i386 V1...\n"
533 cd aros-pc-i386
534 make $makeopts
535 make $makeopts contrib
536 make $makeopts ports
537 make $makeopts distfiles
538 echo -e "\nIf everything went well AROS will be available"
539 echo -e "in the directory aros-pc-i386/distfiles"
541 6 ) echo -e "\nBuilding pc-x86_64 V1...\n"
542 cd aros-pc-x86_64
543 make $makeopts
544 make $makeopts contrib
545 make $makeopts ports
546 make $makeopts distfiles
547 echo -e "\nIf everything went well AROS will be available"
548 echo -e "in the directory aros-pc-x86_64/distfiles"
550 7 ) echo -e "\nBuilding pc-x86_64 SMP V1...\n"
551 cd aros-pc-x86_64-smp
552 make $makeopts
553 make $makeopts contrib
554 make $makeopts ports
555 make $makeopts distfiles
556 echo -e "\nIf everything went well AROS will be available"
557 echo -e "in the directory aros-pc-x86_64-smp/distfiles"
559 8 ) echo -e "\nBuilding amiga-m68k V1...\n"
560 cd aros-amiga-m68k
561 make $makeopts
562 make $makeopts contrib
563 make $makeopts ports
564 make $makeopts distfiles
565 echo -e "\nIf everything went well AROS will be available"
566 echo -e "in the directory aros-amiga-m68k/distfiles"
568 9 ) echo -e "\nBuilding raspi-armhf V1...\n"
569 cd aros-raspi-armhf
570 make $makeopts
571 make $makeopts contrib
572 make $makeopts ports
573 make $makeopts distfiles
574 echo -e "\nIf everything went well AROS will be available"
575 echo -e "in the directory aros-raspi-armhf/distfiles"
578 0 ) exit 0
580 esac
581 done
583 cd "$curdir"
585 exit 0