Andrei Borzenkov
64440daa21
util/setup: fix memory leak.
...
Found by: Coverity scan.
2015-01-26 23:04:09 +03:00
Vladimir Serbinenko
11eed6abce
util/misc.c: Check ftello return value.
...
Found by: Coverity scan.
2015-01-26 09:56:24 +01:00
Vladimir Serbinenko
5d61a6a612
grub-macbless: Fix resource leak.
...
Found by: Coverity scan.
2015-01-26 09:55:58 +01:00
Vladimir Serbinenko
3c6384832b
grub-install: Fix memory leak.
...
Found by: Coverity scan.
2015-01-26 09:55:30 +01:00
Vladimir Serbinenko
c3f5230597
grub-install-common: Fix sizeof usage.
...
Found by: Coverity scan.
2015-01-26 09:54:50 +01:00
Vladimir Serbinenko
866f469683
util/getroot: Add missing grub_disk_close.
...
Found by: Coverity scan.
2015-01-26 09:54:14 +01:00
Vladimir Serbinenko
eeea31b220
util/grub-mkrescue.c: Always include part_msdos and part_gpt on EFI.
...
When booted from stick, EFI would use GPT partition and our root
device detection algortihm depends on GRUB's ability to see the same
partitions. Hence include msdos and gpt partmap modules on EFI even when
they're not needed to access root filesystem.
2015-01-24 17:45:16 +01:00
Andrei Borzenkov
cdae5bf208
Avoid use of non-portable echo -n in grub-mkconfig
...
util/grub-mkconfig_lib.in(version_test_gt): "echo -n" is not really needed,
final newline is stripped by command substitution.
util/grub.d/10_kfreebsd.in, util/grub.d/10_linux.in,
util/grub.d/20_linux_xen.in: change how list is built, to avoid echo -n
completely.
util/grub.d/30_os-prober.in: add spaces to printed line directly
Closes 43668.
2014-12-07 14:56:17 +03:00
Andrei Borzenkov
740c08ed2f
Use ssize_t for grub_util_fd_read result
...
Fixes commit 0415dbe28f
.
2014-11-28 21:43:07 +03:00
Andrei Borzenkov
0415dbe28f
grub-install-common: avoid out of bound access when read failed
...
Check that modinfo.sh could be read successfully; abort on error. Avoids
potential out-of-bound array access.
CID: 73819
2014-11-28 20:45:27 +03:00
Andrei Borzenkov
478b567520
grub-mkstandalone: out of bound access to tar header magic
...
Magic size is 6 bytes and we copied 7 bytes in it.
CID: 73587, 73888
Closes bug 43690
2014-11-28 20:39:22 +03:00
Andrey Borzenkov
954fe77163
cleanup: grub_cpu_to_XXX_compile_time for constants
...
This tries to catch all cases where grub_cpu_to_XXX was used for constant
expressions (including sizeof).
2014-09-22 20:47:10 +04:00
Andrey Borzenkov
c291f47b2c
Fix typo (gettext_print instead of gettext_printf)
2014-08-14 21:02:31 +04:00
Colin Watson
0901e7855f
Fix an infinite loop in grub-mkconfig
...
* util/grub.d/10_hurd.in: Make kernel list progression not fail on
kernels whose paths contain regex metacharacters.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.
Reported by: Heimo Stranner.
2014-07-08 23:54:30 +01:00
Glenn Washburn
fa33530870
* util/grub-install.c: Fix handling of --disk-module.
2014-06-22 01:45:11 +02:00
Trevor Woerner
87de66d9d8
* util/grub-gen-asciih.c (add_glyph): Fix uninitialised variable.
2014-06-21 20:26:47 +02:00
Colin Watson
3a310e842f
Tolerate devices with no filesystem UUID returned by os-prober
...
* util/grub.d/30_os-prober.in: Tolerate devices with no filesystem
UUID. Other parts of grub-mkconfig tolerate these, they were
previously allowed here up to commit
55e706c918
, and they can arise in
practice when the system has active LVM snapshots.
Fixes Ubuntu bug #1287436 .
2014-04-10 16:54:33 +01:00
Colin Watson
24024dac7f
Fix partmap, cryptodisk, and abstraction handling in grub-mkconfig.
...
Commit 588744d0dc
caused grub-mkconfig
no longer to be forgiving of trailing spaces on grub-probe output
lines, which among other things means that util/grub.d/10_linux.in
no longer detects LVM. To fix this, make grub-probe's output
delimiting more consistent. As a bonus, this improves the coverage
of the -0 option.
Fixes Debian bug #735935 .
* grub-core/disk/cryptodisk.c
(grub_util_cryptodisk_get_abstraction): Add a user-data argument.
* grub-core/disk/diskfilter.c (grub_diskfilter_get_partmap):
Likewise.
* include/grub/cryptodisk.h (grub_util_cryptodisk_get_abstraction):
Update prototype.
* include/grub/diskfilter.h (grub_diskfilter_get_partmap): Likewise.
* util/grub-install.c (push_partmap_module, push_cryptodisk_module,
probe_mods): Adjust for extra user-data arguments.
* util/grub-probe.c (do_print, probe_partmap, probe_cryptodisk_uuid,
probe_abstraction): Use configured delimiter. Update callers.
2014-03-31 14:48:46 +01:00
Colin Watson
9b35fe819f
Fix grub-probe -0 option
...
* util/grub-probe,c (options): Make -0 work again (broken by
conversion to argp).
(main): Simplify logic.
2014-03-31 13:51:17 +01:00
Vladimir Serbinenko
006c78f378
* util/grub-mkrescue.c: Build fix for argp.h with older gcc.
2014-02-03 14:35:51 +01:00
Vladimir Serbinenko
511ece7ceb
* util/grub-mkfont.c: Build fix for argp.h with older gcc.
2014-02-03 14:34:27 +01:00
Vladimir Serbinenko
ba424f37a9
* util/grub-mkfont.c: Downgrade warnings about unhandled features
...
to debug.
2014-01-29 23:41:48 +01:00
Andrey Borzenkov
5ae584c0b0
fix Mingw W64-32 cross compile failure due to printf redefinition in libintl.h
...
In file included from util/misc.c:36:0:
./include/grub/emu/misc.h:56:1: error: 'libintl_printf' is an unrecognized format function type [-Werror=format=]
char * EXPORT_FUNC(xasprintf) (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))) WARN_UNUSED_RESULT;
^
./include/grub/emu/misc.h:58:1: error: 'libintl_printf' is an unrecognized format function type [-Werror=format=]
The reason is libintl.h which redefines printf as libintl_printf. The problem
is not present in native MinGW build which avoids redefinition. Use
(format (__printf__) instead which is valid replacement in GCC.
v2: add grub-core/lib/libgcrypt/src/g10lib.h
v3: modify g10lib.h during import
2014-01-25 21:49:41 +04:00
Andrey Borzenkov
1440b7ebae
do not set default prefix in grub-mkimage
...
Default prefix is likely wrong on Unix and completely wrong on Windows.
Let caller set it explicitly to avoid any ambiguity.
2014-01-25 19:54:51 +04:00
Vladimir Serbinenko
61c8482b20
Fix several translatable strings.
...
Suggested by: D. Prévot.
2014-01-24 18:20:27 +01:00
Vladimir Serbinenko
95cd131ea0
* util/grub-install.c: List available targets.
2014-01-24 18:09:25 +01:00
Colin Watson
d08059309f
* util/grub-install.c (write_to_disk): Add an info message.
2014-01-23 12:05:36 +00:00
Vladimir Serbinenko
b204b718cc
* util/grub-install.c: Fix a typo.
2014-01-18 20:02:51 +01:00
Vladimir Serbinenko
ae80f31270
* util/grub-mount.c: Extend GCC warning workaround to grub-mount.
2014-01-18 16:43:29 +01:00
Colin Watson
ff66b8e7d8
Prefer more portable test(1) constructs
...
* util/grub.d/00_header.in (make_timeout): Use && rather than test
-a.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/10_netbsd.in (netbsd_load_fs_module): Use || rather
than test -o.
* util/grub.d/30_os-prober.in: Use && rather than test -a, and ||
rather than test -o.
2014-01-17 15:29:43 +00:00
Andrey Borzenkov
0776112c53
add part_apple to EFI rescue image to fix missing prefix
...
On Mac rescue image is booted from HFS+ partition, so bootpath looks like
/ACPI(a0341d0,0)/PCI(1,1f)/ATAPI(0,0,0)/HD(3,5d1,ca3,0000000000000000,20,0)/EndEntire
grub fails to find device for this path because it cannot scan partition
table. The simplest fix is to add part_apple by default.
2014-01-12 15:29:21 +04:00
Andrey Borzenkov
e7cfa8d5e1
Change grub-mkrescue to use bootaa64.efi too
...
Also add ChangeLog entry for previous change.
2014-01-07 20:34:25 +04:00
Andrey Borzenkov
c9e839e2ca
use {grub,boot}aa64.efi for boot images on AArch64
...
According to UEFI 2.4 specification, default boot file name on AArch64
is BOOTAA64.EFI (3.4.1.1 Removable Media Boot Behavior). Also set default
GRUB image name to grubaa64.efi to match it.
2014-01-07 10:38:54 +04:00
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
Leif Lindholm
15a463d742
ARM 64 port by Leif Lindholm
2013-11-16 20:52:55 +01:00
Vladimir Serbinenko
cd46aa6cef
Rewrite grub-install, grub-mkrescue, grub-mkstandalone and grub-mknetdir
...
the function of these files exceeds what can be sanely handled in shell
in posix-comaptible way. Also writing it in C extends the functionality
to non-UNIX-like OS and minimal environments.
2013-11-16 20:21:16 +01:00
Colin Watson
23012db921
* util/grub-reboot.in (usage): Fix a typo.
2013-11-15 14:32:03 +00:00
Colin Watson
0de172a0c0
* util/grub-install_header: Set localedir here, since this file is
...
where it's used.
* util/grub-install.in: Remove setting of localedir.
* util/grub-mkrescue.in: Likewise.
2013-11-14 16:45:27 +00:00
Colin Watson
1326b9ae2a
* util/getroot.c (grub_util_biosdisk_get_grub_dev) [__GNU__]: Remove
...
unused variables.
2013-11-14 15:08:37 +00:00
Colin Watson
11b2a9b70b
* util/grub-install.in (efi_quiet): Fix inverted logic: make
...
efibootmgr quiet when --debug is not used, rather than when it is.
2013-11-13 13:05:39 +00:00
Colin Watson
d0d1e3dacb
* util/grub-editenv.c (help_filter, argp): Document how to delete
...
the whole environment block.
Reported by Dan Jacobson. Fixes Debian bug #726265 .
2013-11-13 02:15:57 +00:00
Lukas Schwaighofer
2d357558fb
* util/grub.d/20_linux_xen.in: Don't decompress initrd.
2013-11-12 21:03:27 +01:00
Vladimir Serbinenko
66acd9d64c
* util/getroot.c (grub_util_biosdisk_get_grub_dev) [__APPLE__]:
...
Add missing semicolon.
2013-11-11 22:49:52 +01:00
Vladimir Serbinenko
348d05359c
* util/grub-macho2img.c: Use plain fopen rather than grub_util_fopen.
2013-11-11 22:48:43 +01:00
Vladimir Serbinenko
0d2d30bb39
* configure.ac: Check for lzma.h for enabling liblzma and allow
...
manual disabling.
2013-11-11 22:47:48 +01:00
Fam Zheng
e756ec8284
* util/grub.d/30_os-prober.in: Add minix entry.
2013-11-11 00:24:49 +01:00
Vladimir Serbinenko
881c6a1049
* util/grub-mkimagexx.c (generate_elf): Fix module address on coreboot.
2013-11-10 19:34:19 +01:00
Vladimir Serbinenko
9612ebc00e
Add new ports: i386-xen and x86_64-xen. This allows running GRUB in
...
XEN PV environment and load kernels.
2013-11-09 21:29:11 +01:00
Vladimir Serbinenko
d1307d873a
Import libgcrypt 1.5.3.
2013-11-07 06:35:50 +01:00
Vladimir Serbinenko
ec0ebb3fc2
Remove vestiges of -Wunsafe-loop-optimisations.
...
* conf/Makefile.common (CFLAGS_GNULIB): Remove
-Wno-unsafe-loop-optimisations.
* grub-core/commands/legacycfg.c: Remove -Wunsafe-loop-optimisations
pragma.
* grub-core/io/gzio.c: Likewise.
* grub-core/script/parser.y: Likewise.
* grub-core/script/yylex.l: Likewise.
* util/grub-mkfont.c: Likewise.
2013-11-07 02:25:31 +01:00
Vladimir Serbinenko
6ab537e324
* util/grub-mkfont.c (process_cursive): Remove nested function.
2013-11-07 02:13:30 +01:00
Vladimir Serbinenko
7cb24eb5ff
* util/grub-mkimagexx.c (relocate_symbols): Remove unneeded brackets.
2013-11-07 01:04:06 +01:00
Vladimir Serbinenko
5701750c2c
* util/mkimage.c (SzAlloc): Use attribute unused rather than dubious
...
assigning to itself.
2013-11-07 00:30:41 +01:00
Vladimir Serbinenko
323de05ba2
Support GRUB_DISABLE_SUBMENU config.
...
Inspired by patch from Prarit Bhargava.
2013-11-04 00:15:31 +01:00
Vladimir Serbinenko
bed78ef4e6
Revert "Attempts at ZFS options"
...
It was accidently committed to wrong branch
This reverts commit 0ee5cdfe9f
.
2013-11-03 16:52:33 +01:00
Vladimir Serbinenko
0ee5cdfe9f
Attempts at ZFS options
2013-11-03 16:40:32 +01:00
Vladimir Serbinenko
fb9f12a02d
* util/grub.d/30_os-prober.in: Add unhiding of partition if on msdos.
2013-11-02 22:00:59 +01:00
Vladimir Serbinenko
4685200fa9
* util/grub-mount.c: Handle symlinks to directories.
2013-11-02 20:30:39 +01:00
Vladimir Serbinenko
a0c9d5c6d9
* util/grub-mkimagexx.c (locate_sections): Reject mislinked images.
2013-11-02 19:16:36 +01:00
Vladimir Serbinenko
cb72aa1809
Rewrite blocklist functions in order to get progress when
...
reading large extents and decrease amount of blocklist hook calls.
2013-11-01 23:28:03 +01:00
Vladimir Serbinenko
9a021c5580
* util/grub-mkrescue.in: Do not use UUID search on EFI.
2013-11-01 16:05:15 +01:00
Vladimir Serbinenko
5177391ebe
* include/grub/emu/hostdisk.h: Add proper declaration for grub_host_init
...
and grub_hostfs_init.
2013-10-28 13:33:12 +01:00
Vladimir Serbinenko
30fd7198fe
* util/grub-mkfont.c (main): Show error message when FT_Set_Pixel_Sizes
...
fails.
2013-10-27 20:38:32 +01:00
Vladimir Serbinenko
cf880639f6
Revert " * util/grub-mkstandalone.in: Remove needless copying since we already"
...
The copying in question was needed.
This reverts commit 8154884dd4
.
2013-10-27 12:22:52 +01:00
Grégoire Sutre
f37bf9c778
* util/grub.d/00_header.in: Don't use LANG if it's not set.
2013-10-26 20:11:55 +02:00
Grégoire Sutre
67811a6fd4
* util/grub-mkconfig.in: Replace $0 with $self.
...
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
2013-10-26 20:05:29 +02:00
Vladimir 'phcoder' Serbinenko
cd78a56fb2
Move stat () and device mode checking into OS-dependent files as
...
long as performance doesn't suffer.
2013-10-19 16:29:20 +02:00
Vladimir 'phcoder' Serbinenko
663f6eb195
* util/grub-mkimagexx.c (make_reloc_section): Fix memory leak.
...
(load_image): Likewise.
2013-10-19 02:39:06 +02:00
Vladimir 'phcoder' Serbinenko
6f65237374
* util/grub-render-label.c: Move backend part to ...
...
* util/render-label.c: ... here.
2013-10-19 02:37:01 +02:00
Vladimir 'phcoder' Serbinenko
44d1c20a13
* util/grub-render-label.c: Move backend part to ...
...
* util/render-label.c: ... here.
2013-10-19 02:34:18 +02:00
Vladimir 'phcoder' Serbinenko
8154884dd4
* util/grub-mkstandalone.in: Remove needless copying since we already
...
pass the files to tar.
2013-10-17 01:12:22 +02:00
Hiroyuki YAMAMORI
ceca6ddf26
Handle Japanese special keys.
...
Reported by: Hiroyuki YAMAMORI.
Codes supplied by: Hiroyuki YAMAMORI.
2013-10-17 00:49:05 +02:00
Vladimir 'phcoder' Serbinenko
593816780e
* util/editenv.c (grub_util_create_envblk_file): Use grub_util_rename.
2013-10-15 21:25:18 +02:00
Vladimir 'phcoder' Serbinenko
bacfefbb0e
* util/grub-editenv.c (create_envblk_file): More from here ...
...
* util/editenv.c (grub_util_create_envblk_file): ... to here.
2013-10-15 21:23:54 +02:00
Vladimir 'phcoder' Serbinenko
df1e64c98e
Define grub_util_is_directory/regular/special_file and
...
use OS-dependent versions rather than to rely on stat().
2013-10-15 20:27:58 +02:00
Vladimir 'phcoder' Serbinenko
ec16e02639
* util/grub-mkimage.c: Move backend part to ...
...
* util/mkimage.c: ... here.
2013-10-15 19:14:55 +02:00
Vladimir 'phcoder' Serbinenko
f4e0adc0f9
Remove leftover references to some of the system headers.
2013-10-15 17:59:54 +02:00
Vladimir 'phcoder' Serbinenko
5a869940de
Split out blocklist retrieving from setup.c to
...
grub-core/osdep/blocklist.c and add windows implementation since
generic version doesn't work on NTFS on Windows due to aggressive
unflushable cache.
2013-10-15 17:02:26 +02:00
Vladimir 'phcoder' Serbinenko
c06c75201c
Split grub-setup.c into frontend (grub-setup.c) and backend (setup.c)
...
files.
2013-10-15 16:16:04 +02:00
Vladimir 'phcoder' Serbinenko
588744d0dc
* util/grub-probe.c (probe): Separate different drives in hint-str
...
by spaces and not newlines.
* util/grub-mkconfig_lib.in: Handle multidevice filesystem.
2013-10-14 18:27:29 +02:00
Vladimir 'phcoder' Serbinenko
66a1b3eeb7
* util/misc.c (grub_util_get_image_size): Use FILE functions rather than
...
stat.
2013-10-13 23:45:22 +02:00
Vladimir 'phcoder' Serbinenko
e19bec1715
* util/grub-editenv.c: Remove leftover set_program_name and init_nls.
2013-10-13 23:44:07 +02:00
Vladimir 'phcoder' Serbinenko
bb338aaf24
Add a wrapper for fopen. On unix-like systems just pass-through. On
...
windows use unicode version.
2013-10-13 20:36:28 +02:00
Vladimir 'phcoder' Serbinenko
ae5540d3d4
Move set_program_name and init_nls to host_init. On windows
...
fix in this fuction console and argument charset as well.
2013-10-13 20:03:42 +02:00
Andrey Borzenkov
4cd3c4fec7
Fix inconsistent use of GRUB_CRYPTODISK_ENABLE and
...
GRUB_ENABLE_CRYPTODISK.
* util/grub-install.in: Rename all GRUB_CRYPTODISK_ENABLE to
GRUB_ENABLE_CRYPTODISK.
* util/grub-mkconfig_lib.in: Likewise.
2013-10-12 08:17:05 +02:00
Vladimir 'phcoder' Serbinenko
ba9baabecd
* util/grub-setup.c (setup): Move copying of partition table as
...
futher up as possible to avoid possible overwrite by floppy routines.
2013-10-11 16:15:43 +02:00
Vladimir 'phcoder' Serbinenko
3530bc9d90
* util/getroot.c (make_device_name): Remove dos_part and bsd_part as
...
it's mostly unused. Move vestiges to the callers.
2013-10-10 10:21:07 +02:00
Vladimir 'phcoder' Serbinenko
fb9f59c3ce
* util/grub-mkpasswd-pbkdf2.c: Remove temporary buffers for hex
...
version of salt and hash. Use grub_snprintf rather than snprintf.
2013-10-10 10:16:37 +02:00
Vladimir 'phcoder' Serbinenko
71c1d67a34
Avoid including hostfile.h when not necessarry as it pulls
...
in OS-specific headers which may redefine generic names
like "far".
2013-10-10 09:18:06 +02:00
Vladimir 'phcoder' Serbinenko
f7676b7016
* util/grub-mkimage.c (generate_image): Use size_t instead of
...
grub_size_t.
* util/grub-mkimagexx.c (locate_sections): Likewise.
(load_image): Likewise.
2013-10-09 05:36:00 +02:00
Vladimir 'phcoder' Serbinenko
22f98db270
* util/misc.c (grub_util_write_image_at): Don't use PRIxGRUB_SIZE for
...
size_t.
(grub_util_write_image): Likewise.
2013-10-09 05:33:09 +02:00
Vladimir 'phcoder' Serbinenko
acbbe5cbad
* include/grub/util/lvm.h: Removed.
2013-10-08 21:01:09 +02:00
Vladimir 'phcoder' Serbinenko
9a2c903f28
* util/ieee1275/ofpath.c: Move to ...
...
* grub-core/osdep/linux/ofpath.c: ..here, split stub into ...
* grub-core/osdep/basic/ofpath.c: ..here.
2013-10-08 18:25:49 +02:00
Vladimir 'phcoder' Serbinenko
c1ca424476
Move sleep routines to grub-core/osdep.
2013-10-08 17:38:46 +02:00
Vladimir 'phcoder' Serbinenko
672fa55e81
Move OS-dependent files to grub-core/osdep and document it.
2013-10-08 17:30:22 +02:00
Vladimir 'phcoder' Serbinenko
f8772ea7f5
* util/misc.c: Remove leftover inclusion of malloc.h.
2013-10-08 17:02:22 +02:00
Vladimir 'phcoder' Serbinenko
cef86fefda
* util/raid.c: Fold into ...
...
* util/getroot_linux.c: ... here. Make all functions static.
2013-10-08 16:59:50 +02:00
Vladimir 'phcoder' Serbinenko
de300af2ac
* util/random_unix.c: Add NetBSD and Mac OS X to verified list.
2013-10-08 16:35:21 +02:00
Samuel Thibault
1db3830418
* util/grub.d/10_hurd.in: Use version_find_latest
to sort gnumach
...
kernels by version order.
2013-10-06 01:52:24 +02:00
Vladimir 'phcoder' Serbinenko
fb295fc070
* util/random_unix.c: Add kFreeBSD to the list of secure RNG.
2013-10-04 02:39:31 +02:00
Vladimir 'phcoder' Serbinenko
47345010a4
Add AROS hostdisk and getroot routines.
2013-10-04 02:35:03 +02:00