Skip to content

Commit

Permalink
run_qemu.sh: add some missing quotes
Browse files Browse the repository at this point in the history
This gets the total number of shellcheck warnings down from 22 to just 10.

Also: add a minor depmod comment. Use : instead of # so it shows when
using --debug / set -x.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb authored and stellarhopper committed Dec 18, 2024
1 parent aa533ed commit 8572fda
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions run_qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,10 @@ make_install_kernel()
{
local inst_path="$1"

cat arch/x86_64/boot/bzImage > $inst_path/vmlinuz-$kver
cp System.map $inst_path/System.map-$kver
ln -fs $inst_path/vmlinuz-$kver $inst_path/vmlinuz
ln -fs $inst_path/System.map-$kver $inst_path/System.map
cat arch/x86_64/boot/bzImage > "$inst_path"/vmlinuz-"$kver"
cp System.map "$inst_path"/System.map-"$kver"
ln -fs "$inst_path"/vmlinuz-"$kver" "$inst_path"/vmlinuz
ln -fs "$inst_path"/System.map-"$kver" "$inst_path"/System.map
}

install_build_initrd()
Expand Down Expand Up @@ -520,7 +520,7 @@ __build_kernel()

if [[ $_arg_kern_selftests == "on" ]]; then
selftests_dir=$(readlink -f "$inst_prefix")/$selftests_home
make $quiet -j"$num_build_cpus" -C tools/testing/selftests install INSTALL_PATH=$selftests_dir
make $quiet -j"$num_build_cpus" -C tools/testing/selftests install INSTALL_PATH="$selftests_dir"
fi

if [[ $_arg_gdb == "on" ]]; then
Expand Down Expand Up @@ -854,6 +854,8 @@ setup_depmod()
echo "not found: $system_map. Try rebuilding with '-r img'"
return 1
fi
: Warning: symlinks created by this depmod do not survive the move
: to the virtual machine
sudo depmod -b "$prefix" -F "$system_map" -C "$depmod_dir" "$kver"
}

Expand Down Expand Up @@ -903,7 +905,7 @@ __update_existing_rootfs()

selftests_dir=$(readlink -f "$inst_prefix")/$selftests_home
if [[ $_arg_kern_selftests == "on" ]]; then
sudo make -j"$num_build_cpus" -C tools/testing/selftests install INSTALL_PATH=$selftests_dir
sudo make -j"$num_build_cpus" -C tools/testing/selftests install INSTALL_PATH="$selftests_dir"
else
sudo rm -rf "$selftests_dir"
fi
Expand Down

0 comments on commit 8572fda

Please sign in to comment.