Commit Graph

255 Commits

Author SHA1 Message Date
Colin Watson 4517db3592 gnulib: Upgrade Gnulib and switch to bootstrap tool
Upgrade Gnulib files to 20190105.

It's much easier to maintain GRUB's use of portability support files
from Gnulib when the process is automatic and driven by a single
configuration file, rather than by maintainers occasionally running
gnulib-tool and committing the result.  Removing these
automatically-copied files from revision control also removes the
temptation to hack the output in ways that are difficult for future
maintainers to follow.  Gnulib includes a "bootstrap" program which is
designed for this.

The canonical way to bootstrap GRUB from revision control is now
"./bootstrap", but "./autogen.sh" is still useful if you just want to
generate the GRUB-specific parts of the build system.

GRUB now requires Autoconf >= 2.63 and Automake >= 1.11, in line with
Gnulib.

Gnulib source code is now placed in grub-core/lib/gnulib/ (which should
not be edited directly), and GRUB's patches are in
grub-core/lib/gnulib-patches/.  I've added a few notes to the developer
manual on how to maintain this.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2020-09-21 16:44:29 -04:00
Nick Terrell 572e56b789 btrfs: Add zstd support to grub btrfs
- Adds zstd support to the btrfs module.
- Adds a test case for btrfs zstd support.
- Changes top_srcdir to srcdir in the btrfs module's lzo include
  following comments from Daniel Kiper about the zstd include.

Tested on Ubuntu-18.04 with a btrfs /boot partition with and without zstd
compression. A test case was also added to the test suite that fails before
the patch, and passes after.

Signed-off-by: Nick Terrell <terrelln@fb.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2020-09-21 13:46:35 -04:00
Colin Watson f08b3133e5 build: Capitalise *freetype_* variables
Using FREETYPE_CFLAGS and FREETYPE_LIBS is more in line with the naming
scheme used by pkg-config macros.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2020-09-21 13:29:05 -04:00
Jaegeuk Kim 203047c756 fs: Add F2FS support
"F2FS (Flash-Friendly File System) is flash-friendly file system which was merged
into Linux kernel v3.8 in 2013.

The motive for F2FS was to build a file system that from the start, takes into
account the characteristics of NAND flash memory-based storage devices (such as
solid-state disks, eMMC, and SD cards).

F2FS was designed on a basis of a log-structured file system approach, which
remedies some known issues of the older log structured file systems, such as
the snowball effect of wandering trees and high cleaning overhead. In addition,
since a NAND-based storage device shows different characteristics according to
its internal geometry or flash memory management scheme (such as the Flash
Translation Layer or FTL), it supports various parameters not only for
configuring on-disk layout, but also for selecting allocation and cleaning
algorithm.", quote by https://en.wikipedia.org/wiki/F2FS.

The source codes for F2FS are available from:

http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git
http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git

This patch has been integrated in OpenMandriva Lx 3.
  https://www.openmandriva.org/

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Pete Batard <pete@akeo.ie>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2020-09-21 12:43:53 -04:00
David Michael e576eb0cbc Merge remote-tracking branch 'upstream/master' 2017-01-23 14:02:45 -08:00
Andrei Borzenkov ee83919e93 Makefile.util.def: add $LIBINTL to grub-macbless flags
Fixes compilation on OpenBSD 5.9.

Reported by Jiri B <jirib@devio.us>
2016-03-13 08:11:58 +03:00
Vladimir Serbinenko 36212460d3 mkimage.c: Split into separate files.
util/grub-mkimagexx.c is included in a special way into mkimage.c.
Interoperation between defines makes this very tricky. Instead
just have a clean interface and compile util/grub-mkimage*.c separately
from mkimage.c
2016-02-27 13:35:36 +01:00
Alex Crawford 53a4e99990 gpt: add search by disk uuid command 2015-08-31 16:20:37 -07:00
Michael Marineau 91391dc52b Merge pull request #14 from coreos/gnu
Merge upstream GRUB changes
2015-08-13 13:32:56 -07:00
Michael Marineau c7c750ecc2 Merge upstream changes as of April 29th 2015-07-31 15:41:48 -07:00
Vladimir Serbinenko 4622f4e1ee Switch procfs to use archelp.
This fixes handling of "." and "..".
2015-07-27 12:44:19 +02:00
Vladimir Serbinenko 1f23c87c19 Make Makefile.util.def independent of platform. 2015-03-27 14:04:41 +01:00
Vladimir Serbinenko d3d2e54911 Add test for syslinux converter 2015-02-16 15:58:59 +01:00
Andrei Borzenkov 1e047e53ae tests: add test command file tests
This requires access to files in both host and grub image, so
implementing as separate test unit instead of script test was
more easy.
2015-01-30 21:42:46 +03:00
Andrei Borzenkov 272e0466da add file filters tests
Tests file access with all filters enabled. It does it both for local
and network access, due to regression in signature checking over network.

This includes all files in distribution to not depend on existence
of compression tools and gpg. Test preloads all required modules to
avoid having to provide signatures for them.

Still not implemented is file offset filter (is not available in grub
script, needs extra module)
2014-12-05 21:04:06 +03:00
Michael Marineau c70627bc9f gpt: add search by partition label and uuid commands
Builds on the existing filesystem search code. Only for GPT right now.
2014-11-27 18:49:24 -08:00
Michael Marineau e49d5b587e gpt: new gptprio.next command for selecting priority based partitions
Basic usage would look something like this:

    gptprio.next -d usr_dev -u usr_uuid
    linuxefi ($usr_dev)/boot/vmlinuz mount.usr=PARTUUID=$usr_uuid

After booting the system should set the 'successful' bit on the
partition that was used.
2014-11-23 15:39:57 -07:00
Michael Marineau 051545ddf0 gpt: add write function and gptrepair command
The first hint of something practical, a command that can restore any of
the GPT structures from the alternate location. New test case must run
under QEMU because the loopback device used by the other unit tests does
not support writing.
2014-10-20 14:10:47 -07:00
Michael Marineau f82f65f338 gpt: start new GPT module
This module is a new implementation for reading GUID Partition Tables
which is much stricter than the existing part_gpt module and exports GPT
data directly instead of the generic grub_partition structure. It will
be the basis for modules that need to read/write/update GPT data.

The current code does nothing more than read and verify the table.
2014-10-18 13:54:54 -07:00
Mike Gilbert 6ba983559d * Makefile.util.def: Link grub-ofpathname with zfs libs. 2014-01-18 19:41:15 +01:00
Andrey Borzenkov 1ecf96fcc4 add BUILD_EXEEXT support to fix make clean on Windows
Add $(BUILD_EXEEXT) to ensure files are removed. Also add CLEANFILES where
appropriate.
2014-01-18 20:41:24 +04:00
Colin Watson ccd21a65ed * Makefile.util.def (grub-macbless): Change mansection to 8. 2014-01-08 11:05:20 +00:00
Vladimir Serbinenko faf4a65e1e Revert grub-file usage in grub-mkconfig. 2013-12-24 17:47:27 +01:00
Vladimir Serbinenko 8f5add13ff Implement syslinux parser. 2013-12-18 05:28:05 +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 814442ba69 Implement windows flavour of EFI install routines. 2013-12-14 23:35:58 +01:00
Vladimir Serbinenko d6c92cdc34 Merge branch 'master' into leiflindholm/arm64
Conflicts:
	include/grub/util/install.h
2013-11-25 13:02:27 +01:00
Colin Watson 4e7d433dfb * Makefile.util.def (grub-mkimage): Add
grub-core/osdep/aros/config.c to extra_dist.
* conf/Makefile.extra-dist (EXTRA_DIST): Add docs/autoiso.cfg,
docs/osdetect.cfg, grub-core/gnulib-fix-null-deref.diff,
grub-core/gnulib-fix-width.diff, grub-core/gnulib-no-abort.diff, and
grub-core/gnulib-no-gets.diff.
2013-11-19 20:39:16 +00: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
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
Vladimir Serbinenko a9f25a0819 * configure.ac: Probe for linking format rather than guessing it based
on target_os.
2013-11-14 23:17:18 +01:00
Andrey Borzenkov e11cb7268e Add grub-core/kern/disk_common.c to extra_dist 2013-10-27 22:55:11 +04:00
Vladimir Serbinenko 442b86de32 Move grub_disk_write out of kernel into disk.mod. 2013-10-27 15:44:55 +01:00
BVK Chaitanya 188929ebee * tests/test_unset.in: New test. 2013-10-26 14:52:54 +02:00
BVK Chaitanya 7994a09a9b * tests/test_sha512sum.in: New test. 2013-10-26 14:35:35 +02:00
Vladimir Serbinenko 3d695d7b93 * tests/date_unit_test.c: New test. 2013-10-26 02:48:19 +02:00
Vladimir 'phcoder' Serbinenko a4012f0764 Split make_system_path_relative_to_its_root into separate file
relpath.c from getroot.c as it's common between unix and haiku
	but otherwise haiku doesn't use any functions from unix getroot.c.
2013-10-19 16:21:08 +02:00
Vladimir 'phcoder' Serbinenko 40346de6d3 * grub-core/osdep/unix/getroot.c: Move exec functions to ...
* osdep/unix/exec.c: ... here. Add few additional exec_* variants.
2013-10-19 02:56:40 +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 8104063ce4 * Makefile.util.def: Add util/setup.c to extra_dist. 2013-10-19 02:12:06 +02:00
BVK Chaitanya 3d46c22f5b Added `tr' command support.
* grub-core/commands/tr.c: New file.
	* grub-core/Makefile.core.def: Build rules for new module.

	* tests/grub_cmd_tr.in: New test.
	* Makefile.util.def: Build rules for new test.
2013-10-17 19:06:29 +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 ec16e02639 * util/grub-mkimage.c: Move backend part to ...
* util/mkimage.c: ... here.
2013-10-15 19:14:55 +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
Andrey Borzenkov f8f3f15559 * Makefile.util.def: Add osdep/init.c to grub-mount files. 2013-10-14 15:21:51 +04: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