merge with mainline
This commit is contained in:
commit
b2ffba9c08
10 changed files with 86 additions and 15 deletions
|
@ -42,6 +42,8 @@ rom_directory=
|
|||
override_dir=
|
||||
grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
|
||||
|
||||
xorriso=xorriso
|
||||
|
||||
# Usage: usage
|
||||
# Print the usage.
|
||||
usage () {
|
||||
|
@ -54,11 +56,15 @@ Make GRUB rescue image.
|
|||
-o, --output=FILE save output in FILE [required]
|
||||
--modules=MODULES pre-load specified modules MODULES
|
||||
--rom-directory=DIR save rom images in DIR [optional]
|
||||
--xorriso=FILE use FILE as xorriso [optional]
|
||||
--grub-mkimage=FILE use FILE as grub-mkimage
|
||||
|
||||
$self generates a bootable rescue image with specified source files or directories.
|
||||
$self generates a bootable rescue image with specified source files, source
|
||||
directories, or mkisofs options listed by: xorriso -as mkisofs -help
|
||||
Option -- switches to native xorriso command mode. or directories.
|
||||
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
Mail xorriso support requests to <bug-xorriso@gnu.org>.
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -119,11 +125,12 @@ do
|
|||
grub_mkimage=`argument $option "$@"`; shift ;;
|
||||
--grub-mkimage=*)
|
||||
grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
|
||||
-*)
|
||||
echo "Unrecognized option \`$option'" 1>&2
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
|
||||
--xorriso)
|
||||
xorriso=`argument $option "$@"`; shift ;;
|
||||
--xorriso=*)
|
||||
xorriso=`echo "${option}/" | sed 's/--xorriso=//'` ;;
|
||||
|
||||
*)
|
||||
source="${source} ${option} $@"; break ;;
|
||||
esac
|
||||
|
@ -207,7 +214,7 @@ EOF
|
|||
tar -C ${memdisk_dir} -cf ${memdisk_img} boot
|
||||
rm -rf ${memdisk_dir}
|
||||
$grub_mkimage -O ${platform} -d "${source_directory}" -m "${memdisk_img}" -o "$3" --prefix='(memdisk)/boot/grub' \
|
||||
search iso9660 configfile normal sh memdisk tar $4
|
||||
search iso9660 configfile normal memdisk tar $4
|
||||
rm -rf ${memdisk_img}
|
||||
}
|
||||
|
||||
|
@ -303,7 +310,7 @@ if [ -e "${iso9660_dir}/boot/coreboot.elf" ] && [ -d "${rom_directory}" ]; then
|
|||
fi
|
||||
|
||||
# build iso image
|
||||
xorriso -pathspecs on -as mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source}
|
||||
"${xorriso}" -as mkisofs -graft-points ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} --sort-weight 0 / --sort-weight 1 /boot ${source}
|
||||
rm -rf ${iso9660_dir}
|
||||
|
||||
rm -f ${embed_img}
|
||||
|
|
7
util/grub.d/41_custom.in
Normal file
7
util/grub.d/41_custom.in
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
cat <<EOF
|
||||
if [ -f \$prefix/custom.cfg ]; then
|
||||
source \$prefix/custom.cfg;
|
||||
fi
|
||||
EOF
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue