Skip to content

Commit

Permalink
chore: update efibootmgr to 18
Browse files Browse the repository at this point in the history
Log:
  • Loading branch information
xzl01 authored and Zeno-sole committed Jan 10, 2025
1 parent 096a995 commit 71119d7
Show file tree
Hide file tree
Showing 32 changed files with 926 additions and 598 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.*.sw?
*.E
*.o
*.patch
*.S
efibootmgr-*.tar.*
core.*
efibootmgr*.zip
efibootmgr.spec
.*.d
cov-int
scan-results/
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

134 changes: 134 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
rharwood AT redhat DOT com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

Empty file added MODULE_LICENSE_GPL2
Empty file.
9 changes: 9 additions & 0 deletions Make.fanalyzer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
GCC_BINARY ?= $(shell x=$$(which --skip-alias --skip-functions gcc 2>/dev/null) ; [ -n "$$x" ] && echo "$$x")

fanalyzer-test : ; $(if $(findstring /,$(GCC_BINARY)),,$(error gcc not found))

fanalyzer : | fanalyzer-test
fanalyzer : clean
$(MAKE) CC=gcc CCACHE_DISABLE=1 CFLAGS="-O2 -g -fanalyzer -Werror=analyzer-null-dereference"

.PHONY : fanalyzer
6 changes: 6 additions & 0 deletions Make.rules
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ define substitute-version =
-e "s,@@VERSION@@,$(VERSION),g" \
-e "s,@@LIBDIR@@,$(libdir),g" \
-e "s,@@LIBEXECDIR@@,$(libexecdir),g" \
-e "s,@@EFIDIR@@,$(EFIDIR),g" \
-e "s,@@EFI_LOADER@@,$(EFI_LOADER),g" \
-e 's,@@DEFAULT_LOADER@@,\\\\EFI\\\\$(EFIDIR)\\\\$(EFI_LOADER),g' \
$(1) > $(2)
endef

%.8 : %.8.in
@$(call substitute-version,$<,$@)

%.pc : %.pc.in
@$(call substitute-version,$<,$@)

Expand Down
2 changes: 1 addition & 1 deletion Make.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=17
VERSION=18
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include $(TOPDIR)/Make.version
include $(TOPDIR)/Make.rules
include $(TOPDIR)/Make.defaults
include $(TOPDIR)/Make.coverity
include $(TOPDIR)/Make.fanalyzer
include $(TOPDIR)/Make.scan-build

SUBDIRS := src
Expand Down Expand Up @@ -53,7 +54,7 @@ bumpver :
git commit -m "Bump version to $(GITTAG)" -s

tag:
git tag -s $(GITTAG) refs/heads/master
git tag -s $(GITTAG) refs/heads/main

archive: bumpver tag efibootmgr.spec
@rm -rf /tmp/efibootmgr-$(GITTAG) /tmp/efibootmgr-$(GITTAG)-tmp
Expand Down
1 change: 1 addition & 0 deletions NOTICE
77 changes: 40 additions & 37 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,37 @@ the next running boot option, and more.
Details on the EFI Boot Manager are available from the EFI
Specification, v1.02 or above, available from: http://www.uefi.org

Note: efibootmgr requires that the kernel module efivars be loaded
prior to use. Running 'modprobe efivars' should do the trick.
Note: efibootmgr requires either the efivarfs or the
legacy efivars kernel module to be loaded prior to use.

usage: efibootmgr [options]
-a | --active sets bootnum active
-A | --inactive sets bootnum inactive
-b | --bootnum XXXX modify BootXXXX (hex)
-B | --delete-bootnum delete bootnum
-c | --create create new variable bootnum and add to bootorder
-d | --disk disk (defaults to /dev/sda) containing loader
-e | --edd [1|3|-1] force EDD 1.0 or 3.0 creation variables, or guess
-E | --device num EDD 1.0 device number (defaults to 0x80)
-g | --gpt force disk w/ invalid PMBR to be treated as GPT
-i | --iface name create a netboot entry for the named interface
-l | --loader name (defaults to \elilo.efi)
-L | --label label Boot manager display label (defaults to "Linux")
-n | --bootnext XXXX set BootNext to XXXX (hex)
-N | --delete-bootnext delete BootNext
-o | --bootorder XXXX,YYYY,ZZZZ,... explicitly set BootOrder (hex)
-O | --delete-bootorder delete BootOrder
-p | --part part (defaults to 1) containing loader
-q | --quiet be quiet
-t | --timeout seconds Boot manager timeout
-T | --delete-timeout delete Timeout value
-u | --unicode | --UCS-2 pass extra args as UCS-2 (default is ASCII)
-v | --verbose print additional information
-V | --version return version and exit
-w | --write-signature write unique sig to MBR if needed
-@ | --append-binary-args append extra variable args from
-a | --active Set bootnum active.
-A | --inactive Set bootnum inactive.
-b | --bootnum XXXX Modify BootXXXX (hex).
-B | --delete-bootnum Delete bootnum.
-c | --create Create new variable bootnum and add to bootorder.
-d | --disk disk (Defaults to /dev/sda) containing loader.
-e | --edd [1|3|-1] Force EDD 1.0 or 3.0 creation variables, or guess.
-E | --device num EDD 1.0 device number (defaults to 0x80).
-f | --reconnect Re-connect devices after driver is loaded.
-F | --no-reconnect Do not re-connect devices after driver is loaded.
-g | --gpt Force disk w/ invalid PMBR to be treated as GPT.
-i | --iface name Create a netboot entry for the named interface.
-l | --loader name (Defaults to \elilo.efi).
-L | --label label Boot manager display label (defaults to "Linux").
-n | --bootnext XXXX Set BootNext to XXXX (hex).
-N | --delete-bootnext Delete BootNext.
-o | --bootorder XXXX,YYYY,ZZZZ,... Explicitly set BootOrder (hex).
-O | --delete-bootorder Delete BootOrder.
-p | --part part (Defaults to 1) containing loader.
-q | --quiet Be quiet.
-t | --timeout seconds Boot manager timeout.
-T | --delete-timeout Delete Timeout value.
-u | --unicode | --UCS-2 Pass extra args as UCS-2 (default is ASCII).
-v | --verbose Print additional information.
-V | --version Return version and exit.
-w | --write-signature Write unique sig to MBR if needed.
-@ | --append-binary-args Append extra variable args from
file (use - to read from stdin).


Expand All @@ -57,13 +59,13 @@ This shows:
BootCurrent - the boot entry used to start the currently running
system.

BootOrder - the boot order as would appear in the boot manager. The
boot manager tries to boot the first active entry on this list. If
BootOrder - the boot order as would appear in the boot manager. The
boot manager tries to boot the first active entry on this list. If
unsuccessful, it tries the next entry, and so on.

BootNext - the boot entry which is scheduled to be run on next boot.
This superceeds BootOrder for one boot only, and is deleted by the
boot manager after first use. This allows you to change the next boot
This supersedes BootOrder for one boot only, and is deleted by the
boot manager after first use. This allows you to change the next boot
behavior without changing BootOrder.

Timeout - the time in seconds between when the boot manager appears
Expand All @@ -76,27 +78,28 @@ active), and the name displayed on the screen.
Alternative use cases could be as follows:

1) An OS installer would call 'efibootmgr -c'. This assumes that
/boot/efi is your EFI System Partition, and is mounted at /dev/sda1.
/dev/sda1 is your EFI System Partition, and is mounted at /boot/efi.
This creates a new boot option, called "Linux", and puts it at the top
of the boot order list. Options may be passed to modify the
default behavior. The default OS Loader is elilo.efi.
default behavior. The default OS Loader is elilo.efi.

2) A system administrator wants to change the boot order. She would
2) A system administrator wants to change the boot order. She would
call 'efibootmgr -o 3,4' to specify PXE boot first, then Linux
boot.

3) A system administrator wants to change the boot order for the next
boot only. She would call 'efibootmgr -n 4' to specify that the
boot only. She would call 'efibootmgr -n 4' to specify that the
Linux entry be taken on next boot.

4) A system administrator wants to delete the Linux boot option from
the menu. 'efibootmgr -b 4 -B' deletes entry 4 and removes it
the menu. 'efibootmgr -b 4 -B' deletes entry 4 and removes it
from BootOrder.

5) A system administrator wants to create a boot option to network
boot (PXE). You create the boot entry with:
'efibootmgr -c -i eth0 -L netboot'

Please direct any bugs, features, patches, etc. to Peter Jones:
Please direct any bugs, features, patches, etc. to the Red Hat bootloader
team:

https://github.com/rhboot/efibootmgr
Loading

0 comments on commit 71119d7

Please sign in to comment.