~ubuntu-branches/ubuntu/oneiric/dell-recovery/oneiric-proposed

« back to all changes in this revision

Viewing changes to grub/build-binaries.sh

  • Committer: Package Import Robot
  • Author(s): Mario Limonciello
  • Date: 2011-09-13 12:52:05 UTC
  • Revision ID: package-import@ubuntu.com-20110913125205-etix9v2x6ewwh1c7
Tags: 1.05
* If binaries already have been built for dell-recovery-bootloader, don't
  build them again.
* Clean up all dell-recovery-bootloader built binaries on purge.
* Drop devicekit-disks references.
* Add extra variables to hide EFI recovery partition as well as legacy
  recovery partition.
* Add support to build grub-setup.exe for a mingw32 target in postinst.
* Add depends of ubiquity for dell-recovery-bootloader and -casper to force
  them to be removed during OOBE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
                configfile sleep keystatus normal true font"
9
9
 
10
10
#x86_64-efi, EFI target.  requires grub-efi-amd64-bin
11
 
if [ -d /usr/lib/grub/x86_64-efi ]; then
 
11
if [ -d /usr/lib/grub/x86_64-efi ] &&
 
12
   [ ! -f $TARGET/grubx64.efi ]; then
12
13
    echo "Building bootloader images for x86_64-efi"
13
14
    efi_modules="efi_uga efi_gop gfxterm part_gpt"
14
15
    grub-mkimage -c /usr/share/dell/grub/embedded.cfg \
18
19
fi
19
20
 
20
21
#i386-pc, legacy target.  reguires grub-pc-bin
21
 
if [ -d /usr/lib/grub/i386-pc ]; then
 
22
if [ -d /usr/lib/grub/i386-pc ] &&
 
23
   [ ! -f $TARGET/core.img ]; then
22
24
    echo "Building bootloader images for i386-pc"
23
25
    x86_modules="biosdisk part_msdos vga vga_text"
24
26
    #build core image
38
40
 
39
41
#blank grubenv so we can fail installs
40
42
grub-editenv $TARGET/grubenv unset recordfail
 
43
 
 
44
#grub-setup.exe
 
45
if [ -d /usr/lib/gcc/i586-mingw32msvc ] &&
 
46
   [ -d /usr/share/dell/grub/patches ]  &&
 
47
   [ -x /usr/bin/quilt ] &&
 
48
   [ -x /usr/bin/autogen ] &&
 
49
   [ -x /usr/bin/autoreconf ] &&
 
50
   [ -x /usr/bin/libtoolize ] &&
 
51
   [ -x /usr/bin/bison ] &&
 
52
   [ -x /usr/bin/flex ] &&
 
53
   [ ! -f $TARGET/grub-setup.exe ]; then
 
54
    echo "Building bootloader installer for mingw32"
 
55
    BUILD_DIR=$(mktemp -d)
 
56
    cd $BUILD_DIR
 
57
    apt-get source -qq grub2
 
58
    cd grub2*
 
59
    for item in $(ls /usr/share/dell/grub/patches); do
 
60
        echo $item >> debian/patches/series
 
61
        cp -f /usr/share/dell/grub/patches/$item debian/patches
 
62
    done
 
63
    QUILT_PATCHES=debian/patches quilt push -a -q
 
64
    ./autogen.sh >/dev/null 2>&1
 
65
    CC=i586-mingw32msvc-gcc ./configure --host=i586-mingw32msvc >/dev/null
 
66
    cd grub-core/gnulib && make > /dev/null && cd ../..
 
67
    make grub_script.tab.h grub_script.yy.h grub-setup.exe >/dev/null
 
68
    cp grub-setup.exe $TARGET
 
69
    rm -rf $BUILD_DIR
 
70
fi