~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to util/powerpc/ieee1275/grub-mkrescue.in

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
 
1
#! /bin/sh
 
2
set -e
2
3
 
3
4
# Make GRUB rescue image
4
5
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008  Free Software Foundation, Inc.
30
31
platform=@platform@
31
32
pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
32
33
 
33
 
grub_mkimage=${bindir}/`echo grub-mkelfimage | sed ${transform}`
 
34
self=`basename $0`
 
35
 
 
36
grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
34
37
 
35
38
# Usage: usage
36
39
# Print the usage.
37
40
usage () {
38
41
    cat <<EOF
39
 
Usage: grub-mkrescue [OPTION] output_image
 
42
Usage: $self [OPTION] output_image
40
43
Make GRUB rescue image.
41
44
 
42
45
  -h, --help              print this message and exit
46
49
                          default: ${pkglibdir}
47
50
  --grub-mkimage=FILE     use FILE as grub-mkimage
48
51
 
49
 
grub-mkimage generates a bootable rescue CD image for PowerMac and CHRP.
 
52
$self generates a bootable rescue CD image for PowerMac and CHRP.
50
53
 
51
54
Report bugs to <bug-grub@gnu.org>.
52
55
EOF
53
56
}
54
57
 
 
58
argument () {
 
59
  opt=$1
 
60
  shift
 
61
 
 
62
  if test $# -eq 0; then
 
63
      echo "$0: option requires an argument -- '$opt'" 1>&2
 
64
      exit 1
 
65
  fi
 
66
  echo $1
 
67
}
 
68
 
55
69
input_dir=${pkglibdir}
56
70
 
57
71
# Check the arguments.
58
 
for option in "$@"; do
 
72
while test $# -gt 0
 
73
do
 
74
    option=$1
 
75
    shift
 
76
 
59
77
    case "$option" in
60
78
    -h | --help)
61
79
        usage
62
80
        exit 0 ;;
63
81
    -v | --version)
64
 
        echo "grub-mkrescue (GNU GRUB ${PACKAGE_VERSION})"
 
82
        echo "$self (${PACKAGE_NAME}) ${PACKAGE_VERSION}"
65
83
        exit 0 ;;
 
84
 
 
85
    --modules)
 
86
        modules=`argument $option "$@"`; shift ;;
66
87
    --modules=*)
67
88
        modules=`echo "$option" | sed 's/--modules=//'` ;;
 
89
 
 
90
    --pkglibdir)
 
91
        input_dir=`argument $option "$@"`; shift ;;
68
92
    --pkglibdir=*)
69
93
        input_dir=`echo "$option" | sed 's/--pkglibdir=//'` ;;
 
94
 
 
95
    --grub-mkimage)
 
96
        grub_mkimage=`argument $option "$@"`; shift ;;
70
97
    --grub-mkimage=*)
71
98
        grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
 
99
 
72
100
    -*)
73
101
        echo "Unrecognized option \`$option'" 1>&2
74
102
        usage
93
121
  modules=`cd ${input_dir}/ && ls *.mod`
94
122
fi
95
123
 
96
 
map_file=`mktemp`
 
124
map_file=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
97
125
cat >${map_file} <<EOF
98
126
# EXTN          XLate   CREATOR   TYPE     Comment
99
127
grub.img        Raw     'UNIX'    'tbxi'   "bootstrap"
100
128
EOF
101
129
 
102
 
iso_dir=`mktemp -d`
 
130
iso_dir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
103
131
boot_dir=${iso_dir}/boot/grub
104
132
mkdir ${iso_dir}/boot
105
133
mkdir ${boot_dir}
106
134
core_img=${boot_dir}/grub.img
107
 
${grub_mkimage} -n -d ${input_dir}/ -o ${core_img} ${modules}
 
135
${grub_mkimage} -O powerpc-ieee1275 -n -d ${input_dir}/ -o ${core_img} ${modules}
108
136
genisoimage -hfs -part -no-desktop -r -J -o ${output_image} \
109
137
 -map ${map_file} -hfs-bless ${boot_dir} -chrp-boot -sysid PPC \
110
138
 ${iso_dir}