Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
initramfs-with-mca
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
initramfs-with-mca
Commits
27b503a6
Commit
27b503a6
authored
Dec 12, 2022
by
Ophélie Gagnard
Committed by
Ophélie Gagnard
Dec 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generation: Add kernel compiling script.
parent
543100ed
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
0 deletions
+42
-0
generation/00env.sh
generation/00env.sh
+3
-0
generation/10install-dependencies.sh
generation/10install-dependencies.sh
+1
-0
generation/20compile-kernel.sh
generation/20compile-kernel.sh
+38
-0
generation/30generate-image.sh
generation/30generate-image.sh
+0
-0
generation/40upload-image.sh
generation/40upload-image.sh
+0
-0
No files found.
generation/00env.sh
View file @
27b503a6
...
@@ -5,6 +5,7 @@ GIT_ROOT=`git rev-parse --show-toplevel`
...
@@ -5,6 +5,7 @@ GIT_ROOT=`git rev-parse --show-toplevel`
PROJECT_DIR
=
$GIT_ROOT
PROJECT_DIR
=
$GIT_ROOT
### TO BE MODIFIED BY USERS ###
### TO BE MODIFIED BY USERS ###
KERNEL_VERSION
=
5.10.157
## Packages
## Packages
MCA_PACKAGE_NAME
=
mca--static
MCA_PACKAGE_NAME
=
mca--static
FLB_PACKAGE_NAME
=
fluent-bit
FLB_PACKAGE_NAME
=
fluent-bit
...
@@ -16,6 +17,8 @@ PLG_VERSION=0.2.1+1.0.293.nodep-1
...
@@ -16,6 +17,8 @@ PLG_VERSION=0.2.1+1.0.293.nodep-1
SIGNING_KEY_NAME
=
db.key
SIGNING_KEY_NAME
=
db.key
### DO NOT MODIFY ###
### DO NOT MODIFY ###
KERNEL_COMPILATION_DIR
=
"
$GIT_ROOT
"
/generation/kernel-compilation
KERNEL_DIR
=
"
$KERNEL_COMPILATION_DIR
"
/extracted-image-package
# used mainly in dracut.module/configure
# used mainly in dracut.module/configure
MCA_NAME_AND_VERSION
=
${
MCA_PACKAGE_NAME
}
_
${
MCA_VERSION
}
MCA_NAME_AND_VERSION
=
${
MCA_PACKAGE_NAME
}
_
${
MCA_VERSION
}
FLB_NAME_AND_VERSION
=
${
FLB_PACKAGE_NAME
}
_
${
FLB_VERSION
}
FLB_NAME_AND_VERSION
=
${
FLB_PACKAGE_NAME
}
_
${
FLB_VERSION
}
...
...
generation/10install-dependencies.sh
View file @
27b503a6
...
@@ -16,6 +16,7 @@ git config --local user.name "Ophelie Gagnard"
...
@@ -16,6 +16,7 @@ git config --local user.name "Ophelie Gagnard"
# building initramfs
# building initramfs
apt
-y
install
dracut-core dracut dracut-network sbsigntool pip
apt
-y
install
dracut-core dracut dracut-network sbsigntool pip
apt
-y
build-dep linux
#pip install slapos.libnetworkcache
#pip install slapos.libnetworkcache
NC_DIR
=
strategies_slapos.libnetworkcache
NC_DIR
=
strategies_slapos.libnetworkcache
cd
..
cd
..
...
...
generation/20compile-kernel.sh
0 → 100755
View file @
27b503a6
#!/bin/bash
set
-e
# get the root of the git repository
GIT_ROOT
=
$(
git rev-parse
--show-toplevel
)
cd
"
$GIT_ROOT
"
source
generation/00env.sh
KERNEL_COMPILATION_DIR
=
kernel-compilation
nproc
=
32
apt
-y
build-dep linux
mkdir
-p
"
$KERNEL_COMPILATION_DIR
"
&&
cd
"
$KERNEL_COMPILATION_DIR
"
if
[
!
-f
linux-
"
$KERNEL_VERSION
"
.tar.xz
]
;
then
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-
"
$KERNEL_VERSION
"
.tar.xz
tar
-xaf
linux-
"
$KERNEL_VERSION
"
.tar.xz
fi
cd
linux-
"
$KERNEL_VERSION
"
make olddefconfig
make menu config
./scripts/config
\
-d
CONFIG_MODULE_SIG_ALL
\
-d
CONFIG_MODULE_SIG_KEY
\
-d
CONFIG_SYSTEM_TRUSTED_KEYS
\
-d
CONFIG_DEBUG_INFO
\
-e
CONFIG_EFI_STUB
# include every modules in the kernel
cp
.config .config.backup
sed
-i
's/=m$/=y/g'
.config
make deb-pkg
-j
"
$(
nproc
)
"
LOCALVERSION
=
-
"
$(
dpkg
--print-architecture
)
"
KDEB_PKGVERSION
=
"
$(
make
$KERNEL_VERSION
)
-1"
cd
..
dpkg
-x
linux-image-
"
$KERNEL_VERSION
"
-amd64_
"
$KERNEL_VERSION
"
-1_amd64
.deb
"
$KERNEL_DIR
"
generation/
2
0generate-image.sh
→
generation/
3
0generate-image.sh
View file @
27b503a6
File moved
generation/
3
0upload-image.sh
→
generation/
4
0upload-image.sh
View file @
27b503a6
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment