Dash:
[t2-trunk.git] / target / rescue / build.sh
blob7425e8110a4940691bc73fb1f37304b7fd63222c
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: target/rescue/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 /\/include\//d
21 /\/locale\//d
22 /\/pkgconfig\//d
23 /\/info\//d
24 /\/man\//d
25 /\/doc\//d
26 /\/i18n\//d
27 /var\/adm/d
28 /usr\/src\//d' "$1"
29 cut -d ' ' -f 2- $build_root/var/adm/flists/gcc |
30 grep '/lib\(gcc\|std\).*.so' >> "$1"
32 filter_hook=rescue_rootfs_filter
34 # do not include some devel packages
35 var_append pkg_filter ' ' 'binutils gcc dietlibc autoconf automake libtool'
36 var_append pkg_filter ' ' 'flex bison texinfo ccache distcc m4 make cmake'
37 var_append pkg_filter ' ' 'scons python perl perl-xml-parser intltool'
39 . target/generic/build.sh
41 # now this is a hack - and x86 specific anyway :-(
42 if [ "$SDECFG_TARGET_RESCUE_STYLE" = "livecd" ]; then
43 if [[ $arch = x86* ]]; then
44 case "$SDECFG_X86_CD_LOADER" in
45 grub)
46 sed -i 's/kernel.*/& vga=0x317/' $isofsdir/boot/grub/menu.lst ;;
47 isolinux)
48 sed -i 's/APPEND.*/& vga=0x317/' $isofsdir/boot/isolinux/isolinux.cfg ;;
50 echo "Adapt target/rescue/build.sh for unknown boot loader: $SDECFG_X86_CD_LOADER" ;;
51 esac