Commit Graph

9747 Commits

Author SHA1 Message Date
Vladimir Serbinenko 24e37a8852 arm-coreboot: Start new port. 2017-05-08 20:53:28 +02:00
Vladimir Serbinenko 9808c3ef95 Rename uboot/datetime to dummy/datetime.
It's just a stub and is not UBoot-specific.
2017-05-08 19:40:14 +02:00
Vladimir Serbinenko 1daa716c70 Rename uboot/halt.c to dummy/halt.c.
It's not U-Boot specific and it's a stub.
2017-05-08 19:33:56 +02:00
Vladimir Serbinenko 461bfab7b7 coreboot: Split parts that are platform-independent.
We currently assume that coreboot is always i386, it's no longer the case,
so split i386-coreboot parts from generic coreboot code.
2017-05-08 19:10:24 +02:00
Vladimir Serbinenko d08c968514 Refactor arm-uboot code to make it genereic.
arm-coreboot startup code can be very similar to arm-uboot but current code has
U-Boot specific references. So split U-Boot part from generic part.
2017-05-08 17:47:57 +02:00
Vladimir Serbinenko a35ac85430 mkimage: Pass layout to mkimage_generate_elfXX rather than some fields.
This allows easier extension of this function without having too long of
arguments list.
2017-05-08 17:32:15 +02:00
Paulo Flabiano Smorigo d9f7de0ae3 Add Virtual LAN support.
This patch adds support for virtual LAN (VLAN) tagging. VLAN tagging allows
multiple VLANs in a bridged network to share the same physical network link
but maintain isolation:

http://en.wikipedia.org/wiki/IEEE_802.1Q

* grub-core/net/ethernet.c: Add check, get, and set vlan tag id.
* grub-core/net/drivers/ieee1275/ofnet.c: Get vlan tag id from bootargs.
* grub-core/net/arp.c: Add check.
* grub-core/net/ip.c: Likewise.
* include/grub/net/arp.h: Add vlantag attribute.
* include/grub/net/ip.h: Likewise.
2017-05-03 13:03:50 +02:00
Vladimir Serbinenko dc6e1b5af8 strtoull: Fix behaviour on chars between '9' and 'a'.
Reported by: Aaron Miller <aaronmiller@fb.com>
2017-05-03 12:59:58 +02:00
Vladimir Serbinenko ede6c96893 Add strtoull test. 2017-05-03 12:58:15 +02:00
Vladimir Serbinenko a827807a13 Fix shebang for termux.
Termux doesn't have a /bin/sh. So we needto use $SHELL.
Keep /bin/sh as much as possible.
2017-05-03 12:49:31 +02:00
Vladimir Serbinenko 1073ddb120 Add termux path to dict. 2017-05-03 12:48:00 +02:00
Vladimir Serbinenko 4341f82af0 po: Use @SHELL@ rather than /bin/sh.
/bin/sh might not exist.
2017-05-03 12:46:48 +02:00
Vladimir Serbinenko c2ea443446 Use $(SHELL) rather than /bin/sh.
/bin/sh doesn't exist under termux.
2017-05-03 12:46:38 +02:00
Vladimir Serbinenko 608bec5112 Support lseek64.
Android doesn't have 64-bit off_t, so use off64_t instead.
2017-05-03 12:24:43 +02:00
Vladimir Serbinenko 6dec3a26b3 Don't retrieve fstime when it's not useful. 2017-05-03 12:23:15 +02:00
Vladimir Serbinenko b43b8cacc8 support busybox date.
Busybox date doesn't understand weekdays in -d input,
so strip them beforehand.
2017-05-03 12:22:05 +02:00
Vladimir Serbinenko 37865c2c4a fs-tester: make sh-compatible 2017-05-03 12:19:44 +02:00
Vladimir Serbinenko 5a0c548ba3 Remove bashisms from tests.
Those tests don't actually need bash. Just use common shebang.
2017-05-03 12:10:36 +02:00
Vladimir Serbinenko b0bad6fd94 Bump version to 2.03 2017-05-03 11:55:52 +02:00
Vladimir Serbinenko e54c99aaff Increase version to 2.02. 2017-04-25 16:23:16 +02:00
Vladimir Serbinenko d454509bb8 Fix remaining cases of gcc 7 fallthrough warning.
They are all intended, so just add the relevant comment.
2017-04-12 01:42:38 +00:00
Andrei Borzenkov 007f0b407f Add gnulib-fix-gcc7-fallthrough.diff
As long as the code is not upstream, add it as explicit patch for the
case of gnulib refresh.
2017-04-04 19:37:47 +03:00
Andrei Borzenkov 4bd4a88725 i386, x86_64, ppc: fix switch fallthrough cases with GCC7
In util/getroot and efidisk slightly modify exitsing comment to mostly
retain it but still make GCC7 compliant with respect to fall through
annotation.

In grub-core/lib/xzembed/xz_dec_lzma2.c it adds same comments as
upstream.

In grub-core/tests/setjmp_tets.c declare functions as "noreturn" to
suppress GCC7 warning.

In grub-core/gnulib/regexec.c use new __attribute__, because existing
annotation is not recognized by GCC7 parser (which requires that comment
immediately precedes case statement).

Otherwise add FALLTHROUGH comment.

Closes: 50598
2017-04-04 19:23:55 +03:00
Andrei Borzenkov 6cef7f6079 btrfs: avoid "used uninitialized" error with GCC7
sblock was local and so considered new variable on every loop
iteration.

Closes: 50597
2017-04-04 19:22:32 +03:00
Andrei Borzenkov ec4af117c6 acpi: add missing efi_call wrapper to acpi command
Fixed loading of ACPI tables on EFI (side effect was apparent memory
corruption ranging from unpredictable behavior to system reset).

Reported by Nando Eva <nando4eva@ymail.com>
2017-04-02 14:47:20 +03:00
Vladimir Serbinenko 8014b7b337 Increment version to GRUB 2.02~rc2. 2017-03-15 09:20:29 +01:00
Vladimir Serbinenko fcea891e17 Use core2duo for bootcheck test on 64-bit EFI.
Obviously pentium2 can't run efi64.
2017-03-15 09:20:14 +01:00
Andrei Borzenkov c42cb97f08 efi: skip iPXE block device.
iPXE adds Simple File System Protocol to loaded image handle, as side
effect it also adds Block IO protocol (according to comments, to work
around some bugs in EDK2). GRUB assumes that every device with Block IO
is disk and skips network initialization entirely. But iPXE Block IO
implementation is just a stub which always fails for every operation
so cannot be used. Attempt to detect and skip such devices.

We are using media ID which iPXE sets to "iPXE" and block IO size in
hope that no real device would announce 1B block ...

Closes: 50518
2017-03-14 04:14:36 +00:00
phcoder bcf3c55531 xen: Fix wrong register in relocator.
This fixes chainloading of some GRUB variants.
2017-03-05 10:07:36 +01:00
Vladimir Serbinenko fb93c75bdd video_fb: Fix blue collor if using unoptimized blitter.
when unmapping the color what matters is the mode of source, not target.
2017-02-27 01:58:50 +00:00
Vladimir Serbinenko 641bb15fa4 legacy_initrd: Strip any additional arguments to initrd. 2017-02-27 00:43:54 +00:00
Andrei Borzenkov f34ed1f53c grub-fs-tester: improve squash4 tests
1. Make sure files are not multiple of block size. This will ensure tail packing
for squash4 and may also trigger more codes paths in other filesystems.

2. Call mksquashfs with -always-use-fragments to force tail packing.
2017-02-26 14:38:04 +03:00
Andrei Borzenkov 892dfbe113 efi: strip off final NULL from File Path in grub_efi_get_filename
UEFI 2.6 9.3.6.4 File Path Media Device Path says that Path Name is
"A NULL-terminated Path string including directory and file names".

Strip final NULL from Path Name in each File Path node when constructing
full path. To be on safe side, strip all of them.

Fixes failure chainloading grub from grub, when loaded grub truncates
image path and does not find its grub.cfg.

https://bugzilla.opensuse.org/show_bug.cgi?id=1026344

This was triggered by commit ce95549cc54b5d6f494608a7c390dba3aab4fba7;
before it we built Path Name without trailing NULL, and apparently all
other bootloaders use single File Path node, thus not exposing this bug.
2017-02-25 08:39:38 +03:00
Andrei Borzenkov 951306c509 squash4: fix handling of fragments and sparse files
1. Do not assume block list and fragment are mutually exclusive. Squash
can pack file tail as fragment (unless -no-fragments is specified); so
check read offset and read either from block list or from fragments as
appropriate.

2. Support sparse files with zero blocks.

3. Fix fragment read - frag.offset is absolute fragment position,
not offset relative to ino.chunk.

Reported and tested by Carlo Caione <carlo@endlessm.com>
2017-02-24 19:10:43 +03:00
Vladimir Serbinenko 512bb31cbc Whitelist sparc64-ieee1275 as having no video modules.
ieee1275_fb is not built on sparc64 due to virtual address issues.
2017-02-22 09:55:51 +01:00
Andrei Borzenkov 2fb8cd26a9 script: fix double free in lexer
yylex_destroy() already frees scanner.

Found by: Coverity scan.
CID: 176636
2017-02-12 09:23:34 +03:00
Vladimir Serbinenko 529818738f xen: Fix parsing of XZ kernel.
In case of xz, the uncompressed size is appended to xz data which confuses
our xz decompressor. Trim it.
2017-02-07 13:25:38 +01:00
Vladimir Serbinenko 8a96fc4093 xen: Fix handling of GRUB chainloading.
In case of GRUB we put remapper after domain pages and not at 0x0.
In this case we use max_addr to put remapper. Unfortunately we increment
max_addr as well in this case resulting in virt mapping mapping page
at old max_addr and trying to boot using new max_addr.

Closes 46014.
2017-02-07 00:42:43 +01:00
Vladimir Serbinenko f3df8f961f linguas: Don't skip ko.po.
Translation project doesn't require copyright disclaimers. They're independant
from us. They're responsible for their copyright story.
2017-02-04 00:06:57 +01:00
Vladimir Serbinenko ec4aca088a Fix truncated checksum.h. 2017-02-03 20:17:48 +01:00
Vladimir Serbinenko fcb1528d93 Regenerate checksums.h
Screenshots contain version, so we need new checksums.
2017-02-03 13:44:56 +01:00
Vladimir Serbinenko c36c0e05f1 Release 2.02-rc1. 2017-02-03 13:01:34 +01:00
Vladimir Serbinenko c96cfac167 Fix mingw compilation. 2017-02-03 13:01:34 +01:00
Daniel Kahn Gillmor bf94ef7fbd documentation: Clarify documentation for special environment variable "default".
The current documentation for the special environment variable
"default" is confusing and unclear.  This patch attempts to clean it
up.

In particular, the current documentation refers to the "number or
title", but then in the example it gives, the menu entries and
submenus all have numbers *in* their title; furthermore, there is no
example given about how to choose the number, or any indication about
whether counting is zero-indexed or 1-indexed.

Having a cleaner example and presenting all variants (numeric, title,
and id) should make it clearer to the user.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2017-02-03 12:32:25 +01:00
Vladimir Serbinenko 5412028d19 Avoid causing kernel oops in nilfs2 test.
1024-byte and 2048-byte blocks don't really work with some kernels, skip
them as we don't want any oops'es.
2017-02-03 00:34:07 +01:00
Vladimir Serbinenko c65d35b08b btrfs: Shorten label by one character.
mkfs.btrfs imposes a slightly lower limit than would be possible in btrfs.
2017-02-03 00:30:29 +01:00
Vladimir Serbinenko a5bd52990e grub-fs-tester: Fix mkudffs invocation.
With current invocation order of arguments is wrong and path is hardcoded.
2017-02-02 23:32:38 +01:00
Vladimir Serbinenko 1d4e3db907 grub-fs-tester: Fix fat test.
mkfs.vfat ignores -S when invoked on a disk, including loopback device,
so do an mkfs on underlying image.
2017-02-02 23:19:00 +01:00
Daniel Kiper 4e5414b2a1 i386/relocator: Align stack in grub_relocator64_efi relocator
Unified Extensible Firmware Interface Specification, Version 2.6,
section 2.3.4, x64 Platforms, boot services, says among others:
The stack must be 16-byte aligned. So, do it. Otherwise OS may
boot only by chance as it happens right now.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
2017-02-02 22:24:47 +01:00
Vladimir Serbinenko 1402cdd96a i386-ieee1275: Add missing bootcheck target. 2017-02-02 21:41:33 +01:00