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
adad0b19
Commit
adad0b19
authored
Jan 18, 2023
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generation: Add drivers in initramfs.
Add a kernel version in dracut command-line options.
parent
44a11e1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
generation/00env.sh
generation/00env.sh
+1
-0
generation/30generate-image.sh
generation/30generate-image.sh
+6
-12
No files found.
generation/00env.sh
View file @
adad0b19
...
@@ -20,6 +20,7 @@ SIGNING_KEY_NAME=db.key
...
@@ -20,6 +20,7 @@ SIGNING_KEY_NAME=db.key
KERNEL_COMPILATION_DIR
=
"
$GIT_ROOT
"
/generation/kernel-compilation
KERNEL_COMPILATION_DIR
=
"
$GIT_ROOT
"
/generation/kernel-compilation
KERNEL_DIR
=
"
$KERNEL_COMPILATION_DIR
"
/extracted-image-package
KERNEL_DIR
=
"
$KERNEL_COMPILATION_DIR
"
/extracted-image-package
KERNEL_IMAGE
=
"
$KERNEL_DIR
"
/boot/vmlinuz-
"
$KERNEL_VERSION
"
-amd64
KERNEL_IMAGE
=
"
$KERNEL_DIR
"
/boot/vmlinuz-
"
$KERNEL_VERSION
"
-amd64
DRIVERS_DIR
=
"
$KERNEL_DIR
"
/lib/modules/
"
$KERNEL_VERSION
"
-amd64
# used mainly in dracut.module/configure
# used mainly in dracut.module/configure
MCA_NAME_AND_VERSION
=
${
MCA_PACKAGE_NAME
}
_
${
MCA_VERSION
}
-1
MCA_NAME_AND_VERSION
=
${
MCA_PACKAGE_NAME
}
_
${
MCA_VERSION
}
-1
FLB_NAME_AND_VERSION
=
${
FLB_PACKAGE_NAME
}
_
${
FLB_VERSION
}
-1
FLB_NAME_AND_VERSION
=
${
FLB_PACKAGE_NAME
}
_
${
FLB_VERSION
}
-1
...
...
generation/30generate-image.sh
View file @
adad0b19
...
@@ -129,7 +129,7 @@ make install
...
@@ -129,7 +129,7 @@ make install
cd
-
cd
-
# Generation of dracut.module/dracut.conf
# Generation of dracut.module/dracut.conf
dracut_conf_regex
=
"s|%PROJECT_DIR%|
${
PROJECT_DIR
}
|g;s|%PUBLIC_CERT_DIR%|
${
PUBLIC_CERT_DIR
}
|g;s|%PRIVATE_KEYS_DIR%|
${
PRIVATE_KEYS_DIR
}
|g;s|%CERT_NAME%|
${
CERT_NAME
}
|;s|%SIGNING_KEY_NAME%|
${
SIGNING_KEY_NAME
}
|g;s|%ROOT_PARTITION_ID%|
${
ROOT_PARTITION_ID
}
|g;s|%DEFAULT_INTERFACE%|
${
DEFAULT_INTERFACE
}
|g;s|%DEFAULT_ROUTER%|
${
DEFAULT_ROUTER
}
|g;s|%DEFAULT_IP%|
${
DEFAULT_IP
}
|g;s|%FORMATTED_NETMASK%|
${
FORMATTED_NETMASK
}
|g;s|%TARGET_HOSTNAME%|
${
TARGET_HOSTNAME
}
|g;s|%KERNEL_IMAGE%|
${
KERNEL_IMAGE
}
|g"
dracut_conf_regex
=
"s|%PROJECT_DIR%|
${
PROJECT_DIR
}
|g;s|%PUBLIC_CERT_DIR%|
${
PUBLIC_CERT_DIR
}
|g;s|%PRIVATE_KEYS_DIR%|
${
PRIVATE_KEYS_DIR
}
|g;s|%CERT_NAME%|
${
CERT_NAME
}
|;s|%SIGNING_KEY_NAME%|
${
SIGNING_KEY_NAME
}
|g;s|%ROOT_PARTITION_ID%|
${
ROOT_PARTITION_ID
}
|g;s|%DEFAULT_INTERFACE%|
${
DEFAULT_INTERFACE
}
|g;s|%DEFAULT_ROUTER%|
${
DEFAULT_ROUTER
}
|g;s|%DEFAULT_IP%|
${
DEFAULT_IP
}
|g;s|%FORMATTED_NETMASK%|
${
FORMATTED_NETMASK
}
|g;s|%TARGET_HOSTNAME%|
${
TARGET_HOSTNAME
}
|g;s|%KERNEL_IMAGE%|
${
KERNEL_IMAGE
}
|g
;s|%DRIVERS_DIR%|
${
DRIVERS_DIR
}
|g
"
cd
dracut.module
cd
dracut.module
sed
"
${
dracut_conf_regex
}
"
dracut.conf.in
>
dracut.conf
sed
"
${
dracut_conf_regex
}
"
dracut.conf.in
>
dracut.conf
cd
-
cd
-
...
@@ -137,17 +137,11 @@ cd -
...
@@ -137,17 +137,11 @@ cd -
# Add files in initramfs
# Add files in initramfs
INCLUDE_DIR
=
files-to-include
INCLUDE_DIR
=
files-to-include
rm
-rf
"
$INCLUDE_DIR
"
rm
-rf
"
$INCLUDE_DIR
"
mkdir
-p
"
$INCLUDE_DIR
"
/usr
mkdir
-p
"
$INCLUDE_DIR
"
cp
-r
"
$KERNEL_DIR
"
/lib
"
$INCLUDE_DIR
"
/usr
cp
-r
"
$KERNEL_DIR
"
/lib
"
$INCLUDE_DIR
"
export
DRACUT_KMODDIR_OVERRIDE
=
1
#additional_dracut_options="-i /a /b"
#additional_dracut_options=" \
#-c ./dracut.module/dracut.conf \
#--force \
#--include $INCLUDE_DIR / \
#"
# Create an initramfs image
# Create an initramfs image
rm
-f
"
$dracut_output_file
"
rm
-f
"
$dracut_output_file
"
#dracut "$UEFI_IMAGE_NAME" "$additional_dracut_options" |& tee -a "$dracut_output_file"
dracut
"
$UEFI_IMAGE_NAME
"
"
$KERNEL_VERSION
"
-c
./dracut.module/dracut.conf
--force
--include
"
$INCLUDE_DIR
"
/ |&
tee
-a
"
$dracut_output_file
"
dracut
"
$UEFI_IMAGE_NAME
"
-c
./dracut.module/dracut.conf
--force
--include
"
$INCLUDE_DIR
"
/ |&
tee
-a
"
$dracut_output_file
"
echo
New initramfs image:
$(
pwd
)
/
"
$UEFI_IMAGE_NAME
"
echo
New initramfs image:
$(
pwd
)
/
"
$UEFI_IMAGE_NAME
"
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