cp -r $build_dir $tmp_build_dir
# Build qemu rpm packages
-cd $tmp_build_dir/qemu
+cd $tmp_build_dir
+#Initialize the submodule
+git submodule init
+#Update the submodules recursively to the latest commit
+git submodule update --recursive
+cd qemu
+echo "Building Qemu latest release on the master branch"
+git reset --hard v2.9.0
+git submodule init
+git submodule update --recursive
make clean
./configure
# Move Kernel and Qemu Debian builds from tmp_output_dir to output_dir
mv $tmp_output_dir/qemu-* $output_dir
mv $tmp_output_dir/linux-* $output_dir
-fi
+fi
\ No newline at end of file