Skip to content

Commit

Permalink
Update build.sh
Browse files Browse the repository at this point in the history
Remove one copy of the kernel config to output, add cleanup of lib/modules if rebuilding kernel
  • Loading branch information
Heisath authored May 29, 2021
1 parent 9e6be7e commit 550235e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ build_kernel()
mkdir -p "${output_dir}"
mkdir -p "${boot_dir}"


if [ ! -d ${kernel_dir} ]; then
echo "### Kernel dir does not exist, cloning kernel"

Expand Down Expand Up @@ -262,7 +261,10 @@ build_kernel()
cp dts/*.dts "${kernel_dir}"/arch/arm/boot/dts/

kernel_version=$(grab_version "${kernel_dir}");


# cleanup old modules for this kernel
rm -r "${output_dir}"/lib/modules/"$kernel_version"

# cd into linux source
cd "${kernel_dir}"

Expand All @@ -283,7 +285,6 @@ build_kernel()
cd "${current_dir}"

echo "### Copying new kernel config to output"
cp "${kernel_dir}"/.config "${output_dir}"/linux-${kernel_version}.config
cp "${kernel_dir}"/.config "${boot_dir}"/linux-${kernel_version}.config

echo "### Adding default ramdisk to output"
Expand Down

0 comments on commit 550235e

Please sign in to comment.