summaryrefslogtreecommitdiff
path: root/src/boot
AgeCommit message (Collapse)Author
2016-07-21bootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI".Alexander Kurtz
If the ESP is not mounted with "iocharset=ascii", but with "iocharset=utf8" (which is for example the default in Debian), the file system becomes case sensitive. This means that a file created as "FooBarBaz" cannot be accessed as "foobarbaz" since those are then considered different files. Moreover, a file created as "FooBar" can then also not be accessed as "foobar", and it also prevents such a file from being created, as both would use the same 8.3 short name "FOOBAR". Even though the UEFI specification [0] does give the canonical spelling for the files mentioned above, not all implementations completely conform to that, so it's possible that those files would already exist, but with a different spelling, causing subtle bugs when scanning or modifying the ESP. While the proper fix would of course be that everybody conformed to the standard, we can work around this problem by just referencing the files by their 8.3 short names, i.e. using upper case. Fixes: #3740 [0] <http://www.uefi.org/specifications>, version 2.6, section 3.5.1.1
2016-07-21bootctl: Use lower case string constants in case-insensitive comparisons.Alexander Kurtz
2016-07-18sd-boot: Fix waiting for keyboard input (#3735)Jan Janssen
WaitForKeyEx may never return on some UEFI systems depending on firmware, hardware configuration and the phase of the moon. Use ConIn->WaitForKey unconditionally instead. Fixes #3632
2016-07-12Various fixes for typos found by lintian (#3705)Michael Biebl
2016-05-09tree-wide: rename draw_special_char to special_glyphZbigniew Jędrzejewski-Szmek
That function doesn't draw anything on it's own, just returns a string, which sometimes is more than one character. Also remove "DRAW_" prefix from character names, TREE_* and ARROW and BLACK_CIRCLE are unambigous on their own, don't draw anything, and are always used as an argument to special_glyph(). Rename "DASH" to "MDASH", as there's more than one type of dash.
2016-02-23tree-wide: minor formatting inconsistency cleanupsVito Caputo
2016-02-11sd-boot: put hashed kernel command line in a PCR of the TPMHarald Hoyer
The UEFI BIOS already hashes the contents of the loaded image, so the initrd and the command line of the binary are recorded. Because manually added LoadOptions are not taken into account, these should be recorded also. This patch logs and extends a TPM PCR register with the LoadOptions. This feature can be enabled with configure --enable-tpm The PCR register index can be specified with configure --with-tpm-pcrindex=<NUM>
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2016-01-31bootctl: replace readdir() loops with FOREACH_DIRENTMichal Sekletar
2016-01-20bootctl: use DRAW_TREE_RIGHT rather than hard-coded UTF-8 characterDaniel Mack
Fixes #2384
2015-11-16tree-wide: sort includesThomas Hindoe Paaboel Andersen
Sort the includes accoding to the new coding style.
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: move more locale-related calls to locale-util.[ch]Lennart Poettering
2015-10-27util-lib: move more file I/O related calls into fileio.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-09-29util: introduce common version() implementation and use it everywhereLennart Poettering
This also allows us to drop build.h from a ton of files, hence do so. Since we touched the #includes of those files, let's order them properly according to CODING_STYLE.
2015-09-09tree-wide: update empty-if coccinelle script to cover empty-while and moreLennart Poettering
Let's also clean up single-line while and for blocks.
2015-08-27tree-wide: we place the opening bracket on the same line as the function nameLennart Poettering
Let's do this everywhere the same way.
2015-08-06bootctl: fix path in log messageKarel Zak
2015-07-30systemd-boot: sort /EFI/Linux/*.efi filesKay Sievers
2015-07-29Merge pull request #779 from poettering/fflush-and-checkDaniel Mack
tree-wide: port everything over to fflush_and_check()
2015-07-29tree-wide: port everything over to fflush_and_check()Lennart Poettering
Some places invoked fflush() directly with their own manual error checking, let's unify all that by using fflush_and_check(). This also unifies the general error paths of fflush()+rename() file writers.
2015-07-29sd-boot: stub - export LoaderDevicePartUUIDKay Sievers
2015-07-26systemd-boot: fix whitespaceKay Sievers
2015-07-26Merge pull request #634 from icarlosvenegas/sd-boot-show-efi-cmdline_v2Kay Sievers
sd-boot: Show stub cmdline when edit (v2)
2015-07-25bootctl: add missing newlineKay Sievers
2015-07-20sd-boot:Show stub cmdline when editJose Carlos Venegas Munoz
If Linux efi stub is used, embedded cmdline in efi stub is not shown. As a result, it is required to rewrite all the line, if is only required to modify it. This behavior only happen using Linux efi stub. This patch allows boot loader to show embedded cmdline when 'e' key is pressed to edit boot loader options.
2015-07-15sd-boot: ignore missing /etc/machine-idDavid Herrmann
If /etc/machine-id is missing (eg., gold images), we should not fail installing sd-boot. This is a perfectly fine use-case and we should simply skip installing the default loader config in that case.
2015-07-09boot: use BUILD_ID if VERSION_ID is not presentDavid Herrmann
According to os-release(5), VERSION_ID is not mandatory and BUILD_ID only needs to be unique underneath VERSION_ID. Therefore, assuming a missing VERSION_ID field means 'empty', we can rely on BUILD_ID to be unique. Use BUILD_ID if VERSION_ID is not present. This way, rolling-release distros can still provide a proper os-release entry without crafting random VERSION_ID strings. This fixes #186.
2015-07-09boot: fix memleaks in os-release parserDavid Herrmann
There is no guarantee that the os-release section contains each key only once, nor any guarantee that all keys are present. Make sure we properly free memory in both cases. Not that it matters much, as we're short-living, anyway. But correct code is always nicer to read..
2015-07-04bootctl: fix sdboot to systemd-bootMiguel Bernal Marin
sdboot was renamed to systemd-boot Fixes: e7dd673d1e0a ("gummiboot/sd-boot/systemd-boot: rename galore") Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2015-05-23bootctl: fix an error checkThomas Hindoe Paaboel Andersen
2015-05-22bootctl: ferror must be called before FILE is closedThomas Hindoe Paaboel Andersen
Otherwise it will not show any error stored
2015-05-19bootctl: try to catch all errorsZbigniew Jędrzejewski-Szmek
Do not print garbage on non-EFI installations.
2015-05-19bootctl: modernizationZbigniew Jędrzejewski-Szmek
Use strjoina to avoid error handling, and openat to simplify things. Some fixes on the way: - ferror does not set errno, so the return value was wrong in some cases - errors are propagated in more cases - EFI/systemd was created, but EFI/systemd-boot was deleted - something is always printed on error - when checking the version, comparison was done against "systemd-bo" for some reason - return value was converted from negative to EXIT_SUCCESS/EXIT_FAILURE twice, resulting in EXIT_SUCCESS all the time
2015-05-12boot: function parameters are separated by commaKay Sievers
2015-04-11boot/util: add ticks_read() stubKoen Kooi
2015-04-11boot/util: use x86 ASM only on x86 platforms.Koen Kooi
2015-04-08remove duplicated includesRonny Chevalier
2015-04-06util: rework rm_rf() logicLennart Poettering
- Move to its own file rm-rf.c - Change parameters into a single flags parameter - Remove "honour sticky" logic, it's unused these days
2015-03-19bootctl: drop redundant parse_argv()David Herrmann
We already call parse_argv() from main(), don't call it here again.
2015-03-13efi: widen operand to avoid overflowZbigniew Jędrzejewski-Szmek
CID #1287141.
2015-03-11boot: efi - add config option to disable the command line editorKay Sievers
2015-03-09boot/efi: do not assign variable twiceZbigniew Jędrzejewski-Szmek
If the highlighted line did not move outside of the visible region, it should not be necessary to update idx_last. CID #1287137, #1287138.
2015-03-01boot: efi - ignore .conf snippets starting with "auto-"Kay Sievers
2015-03-01boot: efi - remove a couple of Loader* variablesKay Sievers
2015-02-27bootctl: avoid NULL pointer dereferenceZbigniew Jędrzejewski-Szmek
2015-02-27boot: efi - fix missing includeMarcel Holtmann
src/boot/efi/splash.c:312:9: warning: implicit declaration of function ‘graphics_mode’ [-Wimplicit-function-declaration] err = graphics_mode(TRUE); ^
2015-02-26boot: efi - remove custom splash supportKay Sievers