Commit e2767bfd authored by Ophélie Gagnard's avatar Ophélie Gagnard

generation: Add script to get kernel package.

Download and extract the Linux Kernel's Debian package.
Generate module dependencies.
parent 3b25834c
......@@ -19,7 +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_DIR="$GIT_ROOT"/generation/packaged-kernel
KERNEL_DIR="$GIT_ROOT"/generation/packaged-kernel_"$KERNEL_VERSION"
KERNEL_IMAGE="$KERNEL_DIR"/boot/vmlinuz-"$KERNEL_VERSION"-amd64
DRIVERS_DIR="$KERNEL_DIR"/lib/modules/"$KERNEL_VERSION"-amd64
# used mainly in dracut.module/configure
......
#!/bin/bash
set -e
# get the root of the git repository (requires git to be installed)
GIT_ROOT=$(git rev-parse --show-toplevel)
cd "$GIT_ROOT"/generation
# define useful variables
source 00env.sh
rm -rf *.deb packaged-kernel_"$KERNEL_VERSION"
echo Downloading kernel package...
apt download linux-image-"$KERNEL_VERSION"-amd64
echo Extracting kernel package...
dpkg -X *.deb packaged-kernel_"$KERNEL_VERSION" > /dev/null
echo Generating module dependencies...
depmod -b ./packaged-kernel_"$KERNEL_VERSION"
echo Done.
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