Skip to content

Commit

Permalink
Merge pull request #30 from corrmaan/master
Browse files Browse the repository at this point in the history
Add option to disable Suspend
  • Loading branch information
sakaki- authored Mar 8, 2020
2 parents 989689c + b6d9764 commit 56d346f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
12 changes: 9 additions & 3 deletions buildkernel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ shopt -s nullglob
# ********************** variables *********************
PROGNAME="$(basename "${0}")"
CONFFILE="/etc/${PROGNAME}.conf"
VERSION="1.0.35"
VERSION="1.0.36"
ETCPROFILE="/etc/profile"
DEFAULTEFIBOOTFILE="bootx64.efi"
EFIBOOTFILE="${DEFAULTEFIBOOTFILE}"
Expand Down Expand Up @@ -77,6 +77,7 @@ declare -i DEFAULTCREATEEFIBOOT=1
declare -i CREATEEFIBOOT="${DEFAULTCREATEEFIBOOT}"
declare -i DEFAULTCOMPRESSINITRAMFS=1
declare -i COMPRESSINITRAMFS="${DEFAULTCOMPRESSINITRAMFS}"
declare -i DISABLE_SUSPEND=0
declare -i DISABLE_HIBERNATION=0
declare -i DISABLE_LVM=0
# you can use xconfig etc if you like - override in /etc/buildkernel.conf
Expand Down Expand Up @@ -1744,8 +1745,13 @@ conform_config_file() {
set_kernel_config_list_to_y "RTC_CLASS RTC_HCTOSYS RTC_SYSTOHC"
set_kernel_config "RTC_HCTOSYS_DEVICE" "rtc0"
set_kernel_config_list_to_y "RTC_INTF_SYSFS RTC_INTF_PROC RTC_INTF_DEV RTC_DRV_CMOS"
show "Enabling suspend support..."
set_kernel_config_list_to_y "SUSPEND"
if ((DISABLE_SUSPEND==0)); then
show "Enabling suspend support..."
set_kernel_config_list_to_y "SUSPEND"
else
show "Disabling suspend support..."
unset_kernel_config "SUSPEND"
fi
if ((DISABLE_HIBERNATION==0)); then
show "Enabling hibernation support..."
set_kernel_config_list_to_y "HIBERNATION"
Expand Down
2 changes: 1 addition & 1 deletion buildkernel.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH BUILDKERNEL 8 "Version 1.0.35: April 2019"
.TH BUILDKERNEL 8 "Version 1.0.36: February 2020"
.SH NAME
buildkernel \- build secure boot kernel, save to EFI system partition
.SH SYNOPSIS
Expand Down
4 changes: 4 additions & 0 deletions buildkernel.conf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
#KERNEL_SIGNING_CERT="auto"
#KERNEL_SIGNING_KEY="auto"

# if you don't wish to enable suspend, uncomment below. Default is 0
# (Suspend enabled).
#DISABLE_SUSPEND=1

# if you don't wish to enable hibernation, uncomment below. Default is 0
# (Hibernation enabled).
#DISABLE_HIBERNATION=1
Expand Down
7 changes: 6 additions & 1 deletion buildkernel.conf.5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH BUILDKERNEL 5 "Version 1.0.35: April 2019"
.TH BUILDKERNEL 5 "Version 1.0.36: February 2020"
.SH NAME
buildkernel.conf \- a configuration file for \fBbuildkernel\fR(8)
.SH SYNOPSIS
Expand Down Expand Up @@ -216,6 +216,11 @@ By default this is not set and causes external modules to not be signed.
Requires that the \fBKERNEL_SIGNING_CERT\fR variable is set.
.br
.TP
.BR DISABLE_SUSPEND
If you wish to disable suspend, set this to \fB1\fR. This is set to
\fB0\fR (Suspend enabled) by default.
.br
.TP
.BR DISABLE_HIBERNATION
If you wish to disable hibernation, set this to \fB1\fR. This is set to
\fB0\fR (Hibernation enabled) by default.
Expand Down

0 comments on commit 56d346f

Please sign in to comment.