Merge mainline into sparc-mkimage

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-03-14 15:21:04 +01:00
commit 313df2f552
23 changed files with 238 additions and 41 deletions

View file

@ -86,7 +86,15 @@ if [ "x${output_image}" = x ] ; then
exit 1
fi
iso9660_dir=`mktemp -d`
if test "x$TMP" != x; then
MKTEMP_TEMPLATE="$TMP/grub-mkrescue.XXXXXXXXXX"
elif test "x$TEMP" != x; then
MKTEMP_TEMPLATE="$TEMP/grub-mkrescue.XXXXXXXXXX"
else
MKTEMP_TEMPLATE="/tmp/grub-mkrescue.XXXXXXXXXX"
fi
iso9660_dir=`mktemp -d "$MKTEMP_TEMPLATE"`
mkdir -p ${iso9660_dir}/boot/grub
process_input_dir ()
@ -133,11 +141,11 @@ fi
# build coreboot core.img
if test -e "${coreboot_dir}" ; then
echo "Enabling coreboot support ..."
memdisk_img=`mktemp`
memdisk_dir=`mktemp -d`
memdisk_img=`mktemp "$MKTEMP_TEMPLATE"`
memdisk_dir=`mktemp -d "$MKTEMP_TEMPLATE"`
mkdir -p ${memdisk_dir}/boot/grub
# obtain date-based UUID
iso_uuid=$(date +%Y-%m-%d-%H-%M-%S-00)
iso_uuid=$(date -u +%Y-%m-%d-%H-%M-%S-00)
modules="$(cat ${coreboot_dir}/partmap.lst) ${modules}"
cat << EOF > ${memdisk_dir}/boot/grub/grub.cfg
@ -162,12 +170,12 @@ fi
# build BIOS core.img
if test -e "${pc_dir}" ; then
echo "Enabling BIOS support ..."
core_img=`mktemp`
core_img=`mktemp "$MKTEMP_TEMPLATE"`
grub-mkimage -d ${pc_dir}/ -o ${core_img} --prefix=/boot/grub/i386-pc \
iso9660 biosdisk
cat ${pc_dir}/cdboot.img ${core_img} > ${iso9660_dir}/boot/grub/i386-pc/eltorito.img
embed_img=`mktemp`
embed_img=`mktemp "$MKTEMP_TEMPLATE"`
cat ${pc_dir}/boot.img ${core_img} > ${embed_img}
rm -f ${core_img}

View file

@ -29,6 +29,8 @@
#include <stdlib.h>
#include <getopt.h>
#include "progname.h"
static struct option options[] = {
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},

View file

@ -180,6 +180,14 @@ for file in ${pkglibdir}/*.mod ${pkglibdir}/*.lst; do
cp -f $file ${grubdir} || exit 1
done
# Copy gettext files
mkdir -p ${grubdir}/locale/
for file in ${grubdir}/locale/*.mo ${pkglibdir}/locale/*.mo; do
if test -f "$file"; then
cp -f "$file" ${grubdir}/locale/
fi
done
if ! test -f ${grubdir}/grubenv; then
$grub_editenv ${grubdir}/grubenv create
fi

View file

@ -418,7 +418,7 @@ unable_to_embed:
grub_util_warn (_("Embedding is not possible. GRUB can only be installed in this "
"setup by using blocklists. However, blocklists are UNRELIABLE and "
"its use is discouraged."));
"their use is discouraged."));
if (! force)
grub_util_error (_("if you really want blocklists, use --force"));

View file

@ -62,6 +62,7 @@ mdblocksizes = {"_gcry_digest_spec_crc32" : 64,
"_gcry_digest_spec_whirlpool" : 64}
cryptolist = open (os.path.join (cipher_dir_out, "crypto.lst"), "w")
conf.write ("MAINTAINER_CLEANFILES += $(srcdir)/conf/gcry.rmk $(srcdir)/lib/libgcrypt-grub/cipher/ChangeLog $(srcdir)/lib/libgcrypt-grub/cipher/cipher.h $(srcdir)/lib/libgcrypt-grub/cipher/crypto.lst $(srcdir)/lib/libgcrypt-grub/cipher/g10lib.h $(srcdir)/lib/libgcrypt-grub/cipher/memory.h $(srcdir)/lib/libgcrypt-grub/cipher/types.h\n");
# rijndael is the only cipher using aliases. So no need for mangling, just
# hardcode it
@ -87,6 +88,7 @@ for cipher_file in cipher_files:
continue
nch = False
if re.match (".*\.[ch]$", cipher_file):
conf.write ("MAINTAINER_CLEANFILES += $(srcdir)/lib/libgcrypt-grub/cipher/" + cipher_file + "\n");
isc = re.match (".*\.c$", cipher_file)
f = open (infile, "r")
fw = open (outfile, "w")