Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Plague Kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Opt Out
Plague Kernel
Commits
2c140340
Verified
Commit
2c140340
authored
1 year ago
by
Opt Out
Browse files
Options
Downloads
Patches
Plain Diff
Script updates for end-user KVER selection
parent
257af18f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fedora_build.sh
+16
-2
16 additions, 2 deletions
fedora_build.sh
void_build.sh
+19
-5
19 additions, 5 deletions
void_build.sh
with
35 additions
and
7 deletions
fedora_build.sh
+
16
−
2
View file @
2c140340
#!/bin/bash
#!/bin/bash
# Set VAR
# Set VAR
KVER
=
'6.6.15-hardened1'
#
KVER='6.6.15-hardened1'
#KVER='5.10.145-hardened1'
#KVER='5.10.145-hardened1'
#KVER='5.15.74-hardened1'
# Dependencies
# Dependencies
sudo
dnf
install
binutils /usr/include/
{
libelf.h,openssl/pkcs7.h
}
\
sudo
dnf
install
binutils /usr/include/
{
libelf.h,openssl/pkcs7.h
}
\
/usr/bin/
{
bc,bison,flex,gcc,git,openssl,make,perl,pahole,zstd
}
/usr/bin/
{
bc,bison,flex,gcc,git,openssl,make,perl,pahole,zstd
}
function
set_kver
()
{
echo
"Enter the kernel version to use (e.g., '6.6.15-hardened1'):"
while
true
;
do
read
-e
-i
"
${
KVER
:-}
"
-p
""
KVER
if
[[
$(
echo
$KVER
|
grep
-E
'^[0-9]+\.[0-9]+\.[0-9]+(-hardened1)$'
)
==
''
]]
;
then
echo
"Invalid format."
;
else
break
;
fi
done
}
# Invoke function to prompt end-user for desired version (must be an active release in the Anthraxx Linux-Hardened repository)
set_kver
# Staging w/ error handling
# Staging w/ error handling
if
[[
!
-f
/usr/src/
"
$KVER
"
.tar.gz
]]
;
then
if
[[
!
-f
/usr/src/
"
$KVER
"
.tar.gz
]]
;
then
/usr/bin/curl
--verbose
--tlsv1
.3
--proto
=
https
-L
-O
--url
"https://github.com/anthraxx/linux-hardened/archive/refs/tags/"
$KVER
".tar.gz"
/usr/bin/curl
--verbose
--tlsv1
.3
--proto
=
https
-L
-O
--url
"https://github.com/anthraxx/linux-hardened/archive/refs/tags/"
$KVER
".tar.gz"
...
...
This diff is collapsed.
Click to expand it.
void_build.sh
+
19
−
5
View file @
2c140340
#!/bin/bash
#!/bin/bash
# Set
VAR
# Set
Kernel Version Variable
KVER
=
'6.6.15-hardened1'
#
KVER='6.6.15-hardened1'
#KVER='5.10.145-hardened1'
#KVER='5.10.145-hardened1'
#KVER='5.15.74-hardened1'
# Dependencies
# Dependencies
xbps-install
-Sy
make gcc xz elfutils elfutils-devel flex ncurses-devel openssl openssl-devel argp-standalone gcc-ada mpc libmpc-devel gmp-devel perl
xbps-install
-Sy
make gcc xz elfutils elfutils-devel flex ncurses-devel openssl openssl-devel argp-standalone gcc-ada mpc libmpc-devel gmp-devel perl
function
set_kver
()
{
echo
"Enter the kernel version to use (e.g., '6.6.15-hardened1'):"
while
true
;
do
read
-e
-i
"
${
KVER
:-}
"
-p
""
KVER
if
[[
$(
echo
$KVER
|
grep
-E
'^[0-9]+\.[0-9]+\.[0-9]+(-hardened1)$'
)
==
''
]]
;
then
echo
"Invalid format."
;
else
break
;
fi
done
}
# Invoke function to prompt end-user for desired version (must be an active release in the Anthraxx Linux-Hardened repository)
set_kver
# Staging w/ error handling
# Staging w/ error handling
if
[[
!
-f
/usr/src/
"
$KVER
"
.tar.gz
]]
;
then
if
[[
!
-f
/usr/src/
"
$KVER
"
.tar.gz
]]
;
then
/usr/bin/curl
--verbose
--tlsv1
.3
--proto
=
https
-L
-O
--url
"https://github.com/anthraxx/linux-hardened/archive/refs/tags/
$KVER
.tar.gz"
/usr/bin/curl
--verbose
--tlsv1
.3
--proto
=
https
-L
-O
--url
"https://github.com/anthraxx/linux-hardened/archive/refs/tags/
$KVER
.tar.gz"
...
@@ -31,8 +45,8 @@ make oldconfig
...
@@ -31,8 +45,8 @@ make oldconfig
make menuconfig
make menuconfig
echo
"Compiling "
$KVER
""
echo
"Compiling "
$KVER
""
make
-
-jobs
=
$(
nproc
)
make
-
j
$(
nproc
--all
)
make modules_install
make modules_install
INSTALL_MOD_STRIP
=
1
install
# Ensure /boot is rw
# Ensure /boot is rw
mount
-o
remount,rw /boot
mount
-o
remount,rw /boot
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment