File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2000,23 +2000,25 @@ cmd_build_kernel() {
2000
2000
create_dir " $kernel_dir_host "
2001
2001
2002
2002
# Extract the kernel version from the config file provided as parameter.
2003
- KERNEL_VERSION=$( cat " $KERNEL_CFG " | grep -Po " ^# Linux\/$cfg_pattern (([0-9]+.)[0-9]+)" | cut -d ' ' -f 3)
2003
+ KERNEL_VERSION=$( grep -Po " ^# Linux\/$cfg_pattern (([0-9]+.)[0-9]+)" " $KERNEL_CFG " | cut -d ' ' -f 3)
2004
2004
validate_kernel_version " $KERNEL_VERSION "
2005
2005
2006
2006
recipe_commit=" b551cccc405a73a6d316c0c09dfe0b3e7a73ba3f"
2007
2007
recipe_url=" https://raw.githubusercontent.com/rust-vmm/vmm-reference/$recipe_commit /resources/kernel/make_kernel.sh"
2008
2008
run_devctr \
2009
2009
--user " $( id -u) :$( id -g) " \
2010
2010
--workdir " $kernel_dir_ctr " \
2011
- -- /bin/bash -c " curl -LO " $recipe_url " && source make_kernel.sh && extract_kernel_srcs " $KERNEL_VERSION " "
2011
+ -- /bin/bash -c " curl -LO $recipe_url && source make_kernel.sh && extract_kernel_srcs $KERNEL_VERSION "
2012
+ ok_or_die " Could not extract kernel sources with recipe $recipe_url !"
2012
2013
2013
2014
cp " $KERNEL_CFG " " $kernel_dir_host /linux-$KERNEL_VERSION /.config"
2014
2015
2015
2016
KERNEL_BINARY_NAME=" vmlinux-$KERNEL_VERSION -$arch .bin"
2016
2017
run_devctr \
2017
2018
--user " $( id -u) :$( id -g) " \
2018
2019
--workdir " $kernel_dir_ctr " \
2019
- -- /bin/bash -c " source make_kernel.sh && make_kernel " $kernel_dir_ctr /linux-$KERNEL_VERSION " $format $target " $nprocs " " $KERNEL_BINARY_NAME " "
2020
+ -- /bin/bash -c " source make_kernel.sh && make_kernel " $kernel_dir_ctr /linux-" $KERNEL_VERSION " " $format $target $nprocs $KERNEL_BINARY_NAME "
2021
+ ok_or_die " Could not build kernel!"
2020
2022
2021
2023
say " Successfully built kernel!"
2022
2024
say " Kernel binary placed in: $kernel_dir_host /linux-$KERNEL_VERSION /$KERNEL_BINARY_NAME "
You can’t perform that action at this time.
0 commit comments