Dash:
[t2-trunk.git] / target / test / build.sh
blob516fecd380faa4fbe42d68a85f6d761e7c5daf0f
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: target/test/build.sh
5 # Copyright (C) 2006 - 2010 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 # filter to avoid some non-runtime stuff (static libs, man-pages, ...)
16 rescue_rootfs_filter ()
18 sed -i '/\.a$/d
19 /\.la$/d
20 /\/pkgconfig\//d
21 /\/include\//d
22 /\/locale\//d
23 /\/pkgconfig\//d
24 /\/info\//d
25 /\/man\//d
26 /\/doc\//d
27 /\/i18n\//d
28 /var\/adm/d
29 /usr\/src\//d' "$1"
30 cut -d ' ' -f 2- $build_root/var/adm/flists/gcc |
31 grep '/lib\(gcc\|std\).*.so' >> "$1"
33 filter_hook=rescue_rootfs_filter
35 # do not include some devel packages
36 var_append pkg_filter ' ' 'binutils gcc dietlibc autoconf automake libtool'
37 var_append pkg_filter ' ' 'flex bison texinfo ccache distcc m4 make cmake'
38 var_append pkg_filter ' ' 'scons python perl perl-xml-parser intltool'
40 . target/generic/build.sh
42 # now this is a hack - and x86 specific anyway :-(
43 if [ "$SDECFG_TARGET_RESCUE_STYLE" = "livecd" ]; then
44 if [[ $arch = x86* ]]; then
45 case "$SDECFG_X86_CD_LOADER" in
46 grub)
47 sed -i 's/kernel.*/& vga=0x317/' $isofsdir/boot/grub/menu.lst ;;
48 isolinux)
49 sed -i 's/APPEND.*/& vga=0x317/' $isofsdir/boot/isolinux/isolinux.cfg ;;
51 echo "Adapt target/rescue/build.sh for unknown boot loader: $SDECFG_X86_CD_LOADER" ;;
52 esac