Commit d8dc19a3 authored by Ophélie Gagnard's avatar Ophélie Gagnard Committed by Ophélie Gagnard

Add kernel image in dracut image.

parent b15f89ba
......@@ -3,6 +3,7 @@ add_dracutmodules="metadata-collect"
compress=xz
hostonly=no
hostonly_cmdline=no
kernel_image=%KERNEL_IMAGE%
# model kernel command, see more in /boot/grub.cfg
#linux /boot/vmlinuz-4.19.0-17-amd64 root=UUID=c962bb70-ee0c-4561-9edd-56c269ef7e51 ro single mitigations=off console=ttyS1,57600
#kernel_cmdline="root=LABEL=ROOT ip=dhcp rd.neednet=1 ro single mitigations=off console=ttyS1,57600"
......
......@@ -19,6 +19,7 @@ SIGNING_KEY_NAME=db.key
### DO NOT MODIFY ###
KERNEL_COMPILATION_DIR="$GIT_ROOT"/generation/kernel-compilation
KERNEL_DIR="$KERNEL_COMPILATION_DIR"/extracted-image-package
KERNEL_IMAGE="$KERNEL_DIR"/boot/vmlinuz-"$KERNEL_VERSION"-amd64
# used mainly in dracut.module/configure
MCA_NAME_AND_VERSION=${MCA_PACKAGE_NAME}_${MCA_VERSION}
FLB_NAME_AND_VERSION=${FLB_PACKAGE_NAME}_${FLB_VERSION}
......
......@@ -130,7 +130,7 @@ make install
cd -
# 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"
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"
cd dracut.module
sed "${dracut_conf_regex}" dracut.conf.in > dracut.conf
cd -
......@@ -139,5 +139,5 @@ cd -
additional_dracut_options=
# Create an initramfs image
rm -f "$dracut_output_file"
dracut -c ./dracut.module/dracut.conf "$uefi_image_name" --no-hostonly --force "$additional_dracut_options" |& tee -a "$dracut_output_file"
dracut -c ./dracut.module/dracut.conf "$uefi_image_name" -force "$additional_dracut_options" |& tee -a "$dracut_output_file"
echo New initramfs image: $(pwd)/"$uefi_image_name"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment