Integrate grub-mkisofs into the build system.
This commit is contained in:
parent
cd2dbe8d2e
commit
7c4e16ff88
4 changed files with 30 additions and 4 deletions
|
@ -3,3 +3,8 @@
|
|||
* util/i386/coreboot/grub-mkrescue.in: New file.
|
||||
* conf/i386-coreboot.rmk (bin_SCRIPTS, grub_mkrescue_SOURCES): New
|
||||
variables.
|
||||
|
||||
* conf/common.rmk (bin_SCRIPTS): Add `grub-mkisofs'.
|
||||
(grub_mkisofs_SOURCES, grub_mkisofs_CFLAGS): New variables.
|
||||
* configure.ac: Add header and function checks to satisfy grub-mkisofs
|
||||
requirements.
|
||||
|
|
|
@ -28,6 +28,16 @@ ifeq ($(enable_grub_fstest), yes)
|
|||
bin_UTILITIES += grub-fstest
|
||||
endif
|
||||
|
||||
bin_SCRIPTS += grub-mkisofs
|
||||
grub_mkisofs_SOURCES = util/mkisofs/eltorito.c util/mkisofs/fnmatch.c \
|
||||
util/mkisofs/getopt1.c util/mkisofs/getopt.c \
|
||||
util/mkisofs/hash.c util/mkisofs/joliet.c \
|
||||
util/mkisofs/match.c util/mkisofs/mkisofs.c \
|
||||
util/mkisofs/multi.c util/mkisofs/name.c \
|
||||
util/mkisofs/rock.c util/mkisofs/tree.c \
|
||||
util/mkisofs/write.c
|
||||
grub_mkisofs_CFLAGS = -Iutil/mkisofs/include -Wno-all -Werror
|
||||
|
||||
# For grub-fstest.
|
||||
util/grub-fstest.c_DEPENDENCIES = grub_fstest_init.h
|
||||
grub_fstest_SOURCES = util/grub-fstest.c util/hostfs.c util/misc.c \
|
||||
|
|
|
@ -181,6 +181,13 @@ fi
|
|||
# Check for functions.
|
||||
AC_CHECK_FUNCS(posix_memalign memalign asprintf)
|
||||
|
||||
# For grub-mkisofs
|
||||
AC_HEADER_MAJOR
|
||||
AC_HEADER_DIRENT
|
||||
AC_CHECK_FUNCS(memmove sbrk strdup)
|
||||
AC_CHECK_HEADERS(sys/mkdev.h sys/sysmacros.h malloc.h termios.h sys/types.h)
|
||||
AC_CHECK_HEADERS(unistd.h string.h strings.h sys/stat.h sys/fcntl.h)
|
||||
|
||||
#
|
||||
# Check for target programs.
|
||||
#
|
||||
|
|
|
@ -31,12 +31,13 @@ platform=@platform@
|
|||
pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
|
||||
|
||||
grub_mkimage=${bindir}/`echo grub-mkelfimage | sed ${transform}`
|
||||
grub_mkisofs=${bindir}/`echo grub-mkisofs | sed ${transform}`
|
||||
|
||||
# Usage: usage
|
||||
# Print the usage.
|
||||
usage () {
|
||||
cat <<EOF
|
||||
Usage: grub-mkrescue [OPTION] output_image
|
||||
Usage: $0 [OPTION] output_image
|
||||
Make GRUB rescue image.
|
||||
|
||||
-h, --help print this message and exit
|
||||
|
@ -46,8 +47,9 @@ Make GRUB rescue image.
|
|||
(may be specified multiple times)
|
||||
--pkglibdir=DIR use images from directory DIR instead of ${pkglibdir}
|
||||
--grub-mkimage=FILE use FILE as grub-mkimage
|
||||
--grub-mkisofs=FILE use FILE as grub-mkisofs
|
||||
|
||||
grub-mkimage generates a bootable rescue image of the specified type.
|
||||
$0 generates a bootable rescue image.
|
||||
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
EOF
|
||||
|
@ -62,7 +64,7 @@ for option in "$@"; do
|
|||
usage
|
||||
exit 0 ;;
|
||||
-v | --version)
|
||||
echo "grub-mkrescue (GNU GRUB ${PACKAGE_VERSION})"
|
||||
echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
|
||||
exit 0 ;;
|
||||
--modules=*)
|
||||
modules=`echo "$option" | sed 's/--modules=//'` ;;
|
||||
|
@ -72,6 +74,8 @@ for option in "$@"; do
|
|||
input_dir=`echo "$option" | sed 's/--pkglibdir=//'` ;;
|
||||
--grub-mkimage=*)
|
||||
grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
|
||||
--grub-mkisofs=*)
|
||||
grub_mkisofs=`echo "$option" | sed 's/--grub-mkisofs=//'` ;;
|
||||
-*)
|
||||
echo "Unrecognized option \`$option'" 1>&2
|
||||
usage
|
||||
|
@ -137,7 +141,7 @@ for i in ${modules} ; do
|
|||
done > ${iso9660_dir}/boot/grub/grub.cfg
|
||||
|
||||
# build iso image
|
||||
grub-mkisofs \
|
||||
${grub_mkisofs} \
|
||||
--modification-date=$(echo ${iso_uuid} | sed -e s/-//g) \
|
||||
-o ${output_image} -r -J ${iso9660_dir}
|
||||
|
||||
|
|
Loading…
Reference in a new issue