source: grub-pc/trunk/fuentes/debian/patches/uefi_firmware_setup.patch @ 22

Last change on this file since 22 was 22, checked in by mabarracus, 4 years ago

updated version and apply net.ifnames=0 into debian/rules

File size: 2.5 KB
  • Makefile.util.def

    From e9ae6a0c90aeece56980bb6ae5f016b3e382cd44 Mon Sep 17 00:00:00 2001
    From: Steve Langasek <steve.langasek@ubuntu.com>
    Date: Mon, 13 Jan 2014 12:13:12 +0000
    Subject: Output a menu entry for firmware setup on UEFI FastBoot systems
    
    Forwarded: no
    Last-Update: 2015-09-04
    
    Patch-Name: uefi_firmware_setup.patch
    ---
     Makefile.util.def               |  6 ++++++
     util/grub.d/30_uefi-firmware.in | 46 +++++++++++++++++++++++++++++++++++++++++
     2 files changed, 52 insertions(+)
     create mode 100644 util/grub.d/30_uefi-firmware.in
    
    diff --git a/Makefile.util.def b/Makefile.util.def
    index f659fb4..e1f6089 100644
    a b script = { 
    508508};
    509509
    510510script = {
     511  name = '30_uefi-firmware';
     512  common = util/grub.d/30_uefi-firmware.in;
     513  installdir = grubconf;
     514};
     515
     516script = {
    511517  name = '40_custom';
    512518  common = util/grub.d/40_custom.in;
    513519  installdir = grubconf;
  • new file util/grub.d/30_uefi-firmware.in

    diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in
    new file mode 100644
    index 0000000..3c9f533
    - +  
     1#! /bin/sh
     2set -e
     3
     4# grub-mkconfig helper script.
     5# Copyright (C) 2012  Free Software Foundation, Inc.
     6#
     7# GRUB is free software: you can redistribute it and/or modify
     8# it under the terms of the GNU General Public License as published by
     9# the Free Software Foundation, either version 3 of the License, or
     10# (at your option) any later version.
     11#
     12# GRUB is distributed in the hope that it will be useful,
     13# but WITHOUT ANY WARRANTY; without even the implied warranty of
     14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15# GNU General Public License for more details.
     16#
     17# You should have received a copy of the GNU General Public License
     18# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
     19
     20prefix="@prefix@"
     21exec_prefix="@exec_prefix@"
     22datarootdir="@datarootdir@"
     23
     24export TEXTDOMAIN=@PACKAGE@
     25export TEXTDOMAINDIR="@localedir@"
     26
     27. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
     28
     29efi_vars_dir=/sys/firmware/efi/vars
     30EFI_GLOBAL_VARIABLE=8be4df61-93ca-11d2-aa0d-00e098032b8c
     31OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"
     32
     33if [ -e "$OsIndications" ] && \
     34   [ "$(( $(printf 0x%x \'"$(cat $OsIndications | cut -b1)") & 1 ))" = 1 ]; then
     35  LABEL="System setup"
     36
     37  gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2
     38
     39  onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
     40
     41  cat << EOF
     42menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
     43        fwsetup
     44}
     45EOF
     46fi
Note: See TracBrowser for help on using the repository browser.