Andrey Borzenkov
46f8d358ef
* util/grub-probe.c: Improve help message and simplify list handling.
2013-12-24 20:30:16 +01:00
Vladimir Serbinenko
faf4a65e1e
Revert grub-file usage in grub-mkconfig.
2013-12-24 17:47:27 +01:00
Andrey Borzenkov
569766e49b
* util/grub.d/00_header.in: Improve compatibility with old config.
2013-12-24 17:26:05 +01:00
Vladimir Serbinenko
e88f0420b9
Make grub_util_devmapper_part_to_disk and grub_util_find_partition_start
...
follow the same algorithm to avoid method mismatch. Don't assume
DMRAID- UUID to mean full disk but instead check that mapping is linear.
2013-12-24 14:16:57 +01:00
Vladimir Serbinenko
808e97c4e7
ARM64 support for grub-mkrescue.
2013-12-23 18:17:09 +01:00
Vladimir Serbinenko
e388db904c
Install modinfo.sh to keep build information around.
2013-12-23 18:17:09 +01:00
Vladimir Serbinenko
a4d610026f
ARM64 grub-file and grub-mkconfig support.
2013-12-23 18:17:09 +01:00
Andrey Borzenkov
77ec462a56
grub-mkconfig: fix Xen platform conditions
2013-12-22 23:47:26 +04:00
Andrey Borzenkov
3bf2db8959
split grub-mkresecue help text to facilitate translations
...
Split single string in help message into several strings used before in shell
grub-mkrescue to minimize changes to existing translations.
Reported by Benno Schulenberg
2013-12-22 22:51:54 +04:00
Lars Wendler
3deedfc033
* util/grub-mkconfig.in: Skip non-executable files.
2013-12-22 16:38:28 +01:00
Vladimir Serbinenko
ca3e20886e
Build fixes for argp.h with older gcc.
2013-12-21 18:08:25 +01:00
Vladimir Serbinenko
27db1a9b64
* util/grub-glue-efi.c: Use "universal binary" rather "fat binary"
...
in strings.
Suggested by: David Prévot.
2013-12-21 16:12:24 +01:00
Vladimir Serbinenko
ae558c2ccf
Enable -Wformat=2 if it's supported.
2013-12-21 15:28:28 +01:00
Vladimir Serbinenko
74763e9615
* util/misc.c (grub_util_get_image_size): Check for overflow.
2013-12-21 14:28:14 +01:00
Vladimir Serbinenko
62ce03cf40
* util/import_gcry.py: Skip sample keys.
2013-12-21 14:07:42 +01:00
Vladimir Serbinenko
f4d70fd02b
* util/misc.c (grub_qsort_strcmp): Don't discard const attribute.
2013-12-21 14:04:50 +01:00
Vladimir Serbinenko
579ee114b1
Add missing static qualifiers.
2013-12-21 13:50:13 +01:00
Vladimir Serbinenko
ee5283d66b
Add missing includes.
2013-12-21 13:47:27 +01:00
David Prévot
496a6b3024
Correct some translatable strings.
2013-12-21 03:03:31 +01:00
Colin Watson
971038be55
* util/grub-mkrescue.c: Rephrase mkrescue description.
2013-12-21 02:37:14 +01:00
Vladimir Serbinenko
bfdfeb2508
Clarify several translatable messages.
2013-12-21 01:41:16 +01:00
Vladimir Serbinenko
c00c34efe1
Merge branch 'master' of git.sv.gnu.org:/srv/git/grub
2013-12-20 17:13:24 +01:00
Vladimir Serbinenko
871aa709af
* util/grub-install.c: Inform user about install platform.
2013-12-20 16:57:48 +01:00
Colin Watson
3bc1b2daab
Fix various build problems on GNU/Hurd.
...
* grub-core/osdep/unix/getroot.c (strip_extra_slashes): Move inside
!defined (__GNU__).
(xgetcwd): Likewise.
* include/grub/emu/hostdisk.h (grub_util_hurd_get_disk_info)
[__GNU__]: Add prototype.
* util/getroot.c (grub_util_biosdisk_get_grub_dev) [__GNU__]: Format
long int using %ld rather than %d.
2013-12-20 14:02:27 +00:00
Vladimir Serbinenko
57a691b7e7
Decrease number of strings to translate.
2013-12-18 07:26:13 +01:00
Vladimir Serbinenko
636977b089
Mark strings for translation and add remaining ones to exclude list.
2013-12-18 06:50:24 +01:00
Vladimir Serbinenko
ee4450eb6f
* util/grub-file.c (main): Fix sizeof usage.
2013-12-18 06:20:20 +01:00
Vladimir Serbinenko
8f5add13ff
Implement syslinux parser.
2013-12-18 05:28:05 +01:00
Vladimir Serbinenko
f4dab3d1ac
Use grub_xasprintf to format translated error messages containing
...
64-bit quantity.
2013-12-17 16:41:09 +01:00
Vladimir Serbinenko
d6c2782a90
Unify message for unsupported relocation.
2013-12-17 16:17:46 +01:00
Vladimir Serbinenko
50d2e9596f
Mark miscompile error for translation.
2013-12-17 16:05:39 +01:00
Vladimir Serbinenko
18e76955be
Use %I64 and not %ll when using OS printf if compiling for windows.
2013-12-17 16:04:47 +01:00
Vladimir Serbinenko
d218ec9738
Update Mac code to match new register_efi prototype.
2013-12-17 16:02:36 +01:00
Vladimir Serbinenko
b8765fa082
Implement better integration with Mac firmware.
2013-12-17 15:21:02 +01:00
Vladimir Serbinenko
ec824e0f2a
Implement grub_file tool and use it to implement generating of config
...
in separate root.
2013-12-17 14:39:48 +01:00
Vladimir Serbinenko
a82010503e
Update exclude.pot and mark few strings for translation.
2013-12-17 01:18:09 +01:00
Vladimir Serbinenko
6cc8959712
* util/grub-mkrescue.c: Fix incorrect file usage in fallback code.
...
Reported by: Jon McCune
2013-12-17 00:33:55 +01:00
Vladimir Serbinenko
6f1f6a0c82
Add support for converting PE+ to Elf64.
2013-12-16 15:30:50 +01:00
Vladimir Serbinenko
f4171ebd34
Handle X86_64_PC64 relocation.
...
Those are generated by some cygwin compilers.
2013-12-16 14:24:19 +01:00
Vladimir Serbinenko
e7c418c58f
* util/grub-mkimagexx.c (relocate_addresses): Display offset rather
...
than almost useless pointer.
2013-12-15 14:18:30 +01:00
Vladimir Serbinenko
7e47e27bd8
Add gcc_struct to all packed structures when compiling with mingw.
...
Just "packed" doesn't always pack the way we expect.
2013-12-15 14:14:30 +01:00
Vladimir Serbinenko
74e7ad6604
* util/grub-pe2elf.c: Fix handling of .bss.
2013-12-15 00:55:17 +01:00
Vladimir Serbinenko
a24725cc6e
Change grub_install_register_efi interface to pass GRUB device.
...
This allows grub_install_register_efi to request partition info
directly.
2013-12-14 23:31:56 +01:00
Vladimir Serbinenko
60b967be7e
Make i386-* other than i386-pc compileable under cygwin.
2013-12-14 23:12:53 +01:00
Vladimir Serbinenko
954c723acc
* util/config.c: Remove trailing newline from distributor in simple
...
parsing.
2013-12-14 21:50:36 +01:00
Jon McCune
dd73313cba
Add --no-rs-codes flag to optionally disable reed-solomon codes in grub-install and grub-bios-setup for x86 BIOS targets.
2013-12-09 16:52:12 -08:00
Colin Watson
fe4ae21331
* util/grub-mkconfig.in: Add missing newline to output.
2013-12-09 00:14:59 +00:00
Vladimir Serbinenko
c8fd2ddf6d
* util/grub-mkfont.c: Replace stpcpy with grub_stpcpy.
2013-12-07 23:28:20 +01:00
Vladimir Serbinenko
f23bc65103
Transform -C option to grub-mkstandalone to --core-compress available
...
in all grub-install flavours.
2013-12-07 16:18:22 +01:00
Vladimir Serbinenko
4c4ea9c7b5
Merge GRUBFS and GRUB_FS variables.
2013-12-07 16:09:39 +01:00
Andrey Borzenkov
92e9352ded
second attempt to fix using grub device name as install device
...
grub-install already resolved passed install device to grub device. So do the
same as grub-setup and strip parenthesis if we get legacy (hdX).
I accidentally commited revert of 69ca97c820
and
this patch as part of f585c90505
. So this commit
just adds ChangeLog entry and cosmetic whitespace fix.
2013-12-07 18:58:19 +04:00
Andrey Borzenkov
f585c90505
fix partition module names when /boot is on diskfilter
...
/usr/local/grub2/sbin/grub-install: info: grub-mkimage --directory '/usr/local/grub2/lib/grub/i386-pc' --prefix '(mduuid/e6d1dcf06cea72140bafae74a8677f36)/grub' --output '/boot/grub/i386-pc/core.img' --format 'i386-pc' --compression 'auto' 'ext2' 'msdos' 'msdos' 'diskfilter' 'mdraid1x' 'biosdisk'
.
/usr/local/grub2/sbin/grub-install: error: cannot open `/usr/local/grub2/lib/grub/i386-pc/msdos.mod': No such file or directory.
Introduce common helper for both diskfilter and non-diskfilter case that
converts partition map names into module names.
2013-12-07 15:00:37 +04:00
Andrey Borzenkov
3100cdc7f9
add grub_qsort_strcmp to use when sorting array of strings
...
Compare function used in qsort gets arguments by reference, so strcmp
cannot be used directly - it expects pointer to char, but gets pointer
to pointer to char.
Introduce new helper grub_qsort_strcmp and use it in grub-install.
This helper is going to be used in a couple more places as well so
add it to global file, not in grub-install.c.
2013-12-07 14:29:00 +04:00
Andrey Borzenkov
ad73cc3312
fix use of grub-probe instead of ${grub_probe}
2013-12-07 14:24:25 +04:00
Vladimir Serbinenko
8c534b85f1
Revamp relocation handling.
...
Move more code to common dl.c. Add missing veneers for arm and arm64.
Decreases kernel size by 70 bytes on i386-pc (40-50 compressed)
2013-12-06 09:18:55 +01:00
Vladimir Serbinenko
a846dd4b3a
* util/grub-mkimagexx.c: Fix reloc section generation for ia64.
2013-12-05 23:07:10 +01:00
Vladimir Serbinenko
b0f311f412
* util/grub-install.c: Mention Boot* variable.
2013-12-05 17:05:21 +01:00
Vladimir Serbinenko
e5ed2f6947
Handle unaligned .bss on sparc64.
...
Current code improperly assumes that both __bss_start and _end are
aligned to 8-bytes. Eliminating this assumption and explicitly align
modules.
2013-12-05 06:35:19 +01:00
Colin Watson
3a82f8bb48
Fix grub-shell to avoid breaking "make distcheck"
...
Copying the themes directory in grub-shell isn't
parallel-test-friendly and breaks on the second test when the source
directory is read-only (as in "make distcheck"). Instead, add a
hidden --themes-directory option to grub-mkrescue et al, and use it
in grub-shell.
2013-12-04 13:36:34 +00:00
Colin Watson
44d4884779
Merge branch 'cjwatson/timeout-style'
2013-12-03 16:15:45 +00:00
Vladimir Serbinenko
9e4e6ddfbf
* util/config.c: Add missing pointer adjustment.
...
Reported by: qwertial
2013-12-02 06:51:13 +01:00
Leif Lindholm
b29b77fee2
New port arm64-efi
2013-11-30 16:50:31 +01:00
Colin Watson
9b70860ecc
Consolidate timeout generation code a bit.
2013-11-29 16:11:53 +00:00
Colin Watson
095588ef34
Consistently ignore GRUB_TIMEOUT if GRUB_HIDDEN_TIMEOUT is set
...
Pointed out by Vladimir Serbinenko.
2013-11-29 15:30:44 +00:00
Colin Watson
53cc63bf85
Add GRUB_TIMEOUT_STYLE_BUTTON support
...
Suggested by Vladimir Serbinenko.
2013-11-29 15:18:05 +00:00
Colin Watson
fd0df6d098
Fix build with FreeType 2.5.1
...
* util/grub-gen-asciih.c: Include FT_SYNTHESIS_H rather than
<freetype/ftsynth.h>, fixing build with FreeType 2.5.1.
* util/grub-gen-widthspec.c: Likewise.
* util/grub-mkfont.c: Likewise.
2013-11-29 12:19:36 +00:00
Andrey Borzenkov
69ca97c820
fix using grub device name as install device
...
Shell version of grub-install called grub-setup which resolved
install device name and called main setup routine. C version of
grub-install calls main setup routine directly, which leads
to the error:
grub2-install: info: grub-bios-setup --verbose --force --skip-fs-probe --directory='/boot/grub2/i386-pc' --device-map='/boot/grub2/device.map' '(hd2)'.
grub2-install: info: reading /boot/grub2/i386-pc/boot.img.
grub2-install: info: reading /boot/grub2/i386-pc/core.img.
grub2-install: info: root is `(null)', dest is `(hd2)'.
grub2-install: info: Opening dest.
grub2-install: info: drive = -1.
grub2-install: error: disk `(hd2)' not found.
Move resolving of destination device name into main setup routine
so it is done consistently in both cases.
2013-11-29 11:32:34 +04:00
Vladimir Serbinenko
621e167fd6
* util/grub-fstest.c: Remove variable length arrays.
2013-11-29 05:50:32 +01:00
Vladimir Serbinenko
c8a0f1b229
* util/mkimage.c (grub_install_generate_image): Use grub_crypto_hash for
...
computing crc32 rather than handling with md fundtions directly.
2013-11-29 04:14:26 +01:00
Vladimir Serbinenko
726409a513
* util/mkimage.c (grub_install_generate_image): Use grub_crypto_hash for
...
checking fwstart.img rather than md fundtions directly.
2013-11-29 04:05:44 +01:00
Vladimir Serbinenko
422e6e886c
* util/grub-mkrescue.c (main): Check that fread succeeded.
2013-11-29 03:54:21 +01:00
Colin Watson
8f236c1419
Revamp hidden timeout handling
...
Add a new timeout_style environment variable and a corresponding
GRUB_TIMEOUT_STYLE configuration key for grub-mkconfig. This
controls hidden-timeout handling more simply than the previous
arrangements, and pressing any hotkeys associated with menu entries
during the hidden timeout will now boot the corresponding menu entry
immediately.
GRUB_HIDDEN_TIMEOUT=<non-empty> + GRUB_TIMEOUT=<non-zero> now
generates a warning, and if it shows the menu it will do so as if
the second timeout were not present. Other combinations are
translated into reasonable equivalents.
2013-11-28 02:29:15 +00:00
Vladimir Serbinenko
4f9541226c
Introduce grub_util_file_sync and use it instead of fsync(fileno(f)).
...
Fixes build for windows.
2013-11-27 14:13:50 +01:00
Colin Watson
5c7206e45e
Speed up test suite by avoiding fsync
...
Add grub_util_disable_fd_syncs call to turn grub_util_fd_sync calls into
no-ops, and use it in programs that copy files but do not need to take
special care to sync writes (grub-mknetdir, grub-rescue,
grub-mkstandalone).
On my laptop, this reduces partmap_test's runtime from 1236 seconds to
204 seconds.
2013-11-27 10:10:22 +00:00
Vladimir Serbinenko
bee1b5ce3f
* util/grub-mknetdir.c: Look for platform directories under pkglibdir
...
and not pkgdatadir.
2013-11-25 19:16:05 +01:00
Colin Watson
07e3b04742
Add a --locale-directory option to grub-install and related tools.
...
* include/grub/util/install.h (GRUB_INSTALL_OPTIONS): Add
--locale-directory option.
(enum grub_install_options): Add
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY.
* util/grub-install-common.c (grub_install_help_filter): Handle
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY.
(grub_install_parse): Likewise.
(get_localedir): New function to check for a user-provided option
before trying grub_util_get_localedir.
(copy_locales): Use get_localedir rather than
grub_util_get_localedir. Handle differing locale directory layouts.
(grub_install_copy_files): Likewise.
2013-11-25 18:04:50 +00:00
Vladimir Serbinenko
d6c92cdc34
Merge branch 'master' into leiflindholm/arm64
...
Conflicts:
include/grub/util/install.h
2013-11-25 13:02:27 +01:00
Keshav Padram Amburay
5ae5c54c7e
* util/grub-install.c (update_nvram): Support --no-nvram flag
...
for EFI targets.
2013-11-23 13:02:12 +01:00
Vladimir Serbinenko
e67566ce0a
* util/garbage-gen.c: Add missing include of sys/time.h.
2013-11-23 12:42:30 +01:00
Vladimir Serbinenko
4a23e2fe29
Add *-xen to the list of grub-install-common platforms.
2013-11-22 14:21:16 +01:00
Vladimir Serbinenko
4906052019
Unify GOT/trampoline handling between PPC, MIPS and IA64 as they
...
do essentially the same thing, do it in similar way.
2013-11-21 21:54:33 +01:00
Colin Watson
c6a823e267
* util/grub-mkrescue.c (main): If a source directory is not
...
specified, read platform-specific files from subdirectories of
pkglibdir, not pkgdatadir.
2013-11-21 17:36:45 +00:00
Vladimir Serbinenko
7dd0a30361
* grub-core/lib/crypto.c (grub_crypto_hash): Remove variable length
...
array.
2013-11-20 20:09:18 +01:00
Vladimir Serbinenko
ca120e31f2
* util/grub-mkconfig.in: Say explicit "grub configuration" rather
...
than grub.cfg.
2013-11-20 10:18:19 +01:00
Axel Kellermann
55e706c918
* util/grub.d/30_os-prober.in: Add GRUB_OS_PROBER_SKIP_LIST to
...
selectively skipping systems.
2013-11-19 23:39:51 +01:00
Vladimir Serbinenko
7d44ff7de6
Add automated filesystem checking based on scripts I've used now for
...
quite some time locally. Most of the test require root so they are
skipped when run without necessarry privelegies.
2013-11-19 21:05:59 +01:00
Colin Watson
a8c3e5e3c7
* util/grub-install.c (main): Adjust info messages to match
...
installed paths of grub-bios-setup and grub-sparc64-setup.
2013-11-19 18:43:05 +00:00
Colin Watson
4402db3ecc
* util/grub-install-common.c (copy_locales): Consistently use
...
grub_util_get_localedir () rather than LOCALEDIR.
(grub_install_copy_files): Likewise.
2013-11-19 15:35:44 +00:00
Vladimir Serbinenko
d3def58c52
Add missing arm64 declaration
2013-11-18 17:52:57 +01:00
Vladimir Serbinenko
96fa2d9d02
Merge branch 'master' into leiflindholm/arm64
2013-11-18 17:51:28 +01:00
Colin Watson
a1f00cc557
* util/grub-mkrescue.c (main): Fix typo.
2013-11-18 15:30:47 +00:00
Vladimir Serbinenko
b40ce65180
* util/grub-install-common.c (grub_install_copy_files): Fix module
...
destination directory.
2013-11-18 15:59:55 +01:00
Vladimir Serbinenko
96adefdb12
* util/grub-mkrescue.c (main): Fix a typo to make yeeloong part
...
work again.
2013-11-18 14:36:31 +01:00
Vladimir Serbinenko
a284320e1e
Fix handling of install lists.
2013-11-18 11:38:00 +01:00
Vladimir Serbinenko
4336b5d85e
* util/grub-mkrescue.c (make_image_fwdisk_abs): Insert all partmap
...
modules to be in line with make_image_abs.
2013-11-18 02:03:36 +01:00
Vladimir Serbinenko
6aa6077bcc
* util/grub-mkrescue.c (main): Add trailing \n in
...
.disk_label.contentDetails to be in line with previous shell script.
2013-11-17 02:05:45 +01:00
Vladimir Serbinenko
66c00cb159
* util/grub-mkrescue.c (main): Use right source file for bootinfo.txt.
2013-11-17 02:03:03 +01:00
Vladimir Serbinenko
3a129dba59
* util/grub-install-common.c (grub_install_parse): Recognize
...
--compress=none like shell script did.
2013-11-17 02:01:21 +01:00
Vladimir Serbinenko
d4d55b29e0
* util/grub-install-common.c (platforms): Fix the order of entries and
...
remove useless field val.
2013-11-17 00:54:40 +01:00
Vladimir Serbinenko
55e2c84fe3
* util/grub-install.c: Add new option --no-bootsector to skip
...
installing of bootsector. Accept --grub-setup=/bin/true as
backwards-compatible synonym.
2013-11-16 21:11:01 +01:00