I'm trying to build Kernel Source of xen gvt linux following this guide (it should be done on ubuntu 18) :


The commands that I should issue are the following :

git clone https://github.com/intel/gvt-linux.git

cd gvt-linux

git checkout gvt-stable-4.17

echo ""|make oldconfig

make -j8 && make modules_install && make install

When I try to generate the kernel Debian package directly and install it with below commands, I get an error that I'm not able to fix. Can some one help me ?

root@zio-Z390-AORUS-PRO:/etc/xen/gvt-linux# cat .config | grep CONFIG_DRM_I915_GVT


root@zio-Z390-AORUS-PRO:/etc/xen/gvt-linux# cat .config | grep CONFIG_DRM_I915_GVT_KVMGT


root@zio-Z390-AORUS-PRO:/etc/xen/gvt-linux# cat .config | grep CONFIG_DRM_I915_GVT_XENGT


root@zio-Z390-AORUS-PRO:/etc/xen/gvt-linux# make -j8 deb-pkg
  CHK     include/config/kernel.release
make clean
  CLEAN   .
  CLEAN   arch/x86/lib
  CLEAN   certs
  CLEAN   arch/x86/entry/vdso
  CLEAN   arch/x86/kernel/cpu
  CLEAN   arch/x86/purgatory
  CLEAN   arch/x86/kernel
  CLEAN   arch/x86/realmode/rm
  CLEAN   kernel/debug/kdb
  CLEAN   lib/raid6
  CLEAN   security/apparmor
  CLEAN   lib
  CLEAN   security/selinux
  CLEAN   usr
  CLEAN   security/tomoyo
  CLEAN   samples/hidraw
  CLEAN   arch/x86/boot/compressed
  CLEAN   arch/x86/boot
  CLEAN   arch/x86/tools
  CLEAN   drivers/firmware/efi/libstub
  CLEAN   net/wireless
  CLEAN   drivers/gpu/drm/radeon
  CLEAN   drivers/net/wan
  CLEAN   drivers/scsi/aic7xxx
  CLEAN   drivers/tty/vt
  CLEAN   drivers/scsi
  CLEAN   .tmp_versions
/bin/bash ./scripts/package/mkdebian
  TAR     linux-4.17.0+.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
    mv linux-4.17.0+.tar.gz ../linux-4.17.0+_${origversion}.orig.tar.gz
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -i.git -us -uc
dpkg-buildpackage: Avviso: Usare un gain-root-command con privilegi di amministrazione
dpkg-buildpackage: Informazioni: Pacchetto sorgente linux-4.17.0+
dpkg-buildpackage: Informazioni: Versione sorgente 4.17.0+-3
dpkg-buildpackage: Informazioni: Distribuzione sorgente bionic
dpkg-buildpackage: Informazioni: Sorgente modificata da Anonymous 


dpkg-buildpackage: Informazioni: Architettura host amd64
 dpkg-source -i.git --before-build gvt-linux
 fakeroot -u debian/rules clean
rm -rf debian/*tmp debian/files
make clean
 dpkg-source -i.git -b gvt-linux
dpkg-source: Avviso: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-source: Informazioni: using source format '1.0'
dpkg-source: Avviso: source directory 'gvt-linux' is not <sourcepackage>-<upstreamversion> 'linux-4.17.0+-4.17.0+'
dpkg-source: Avviso: .orig directory name gvt-linux.orig is not <package>-<upstreamversion> (wanted linux-4.17.0+-4.17.0+.orig)
dpkg-source: Informazioni: building linux-4.17.0+ using existing linux-4.17.0+_4.17.0+.orig.tar.gz
dpkg-source: Informazioni: building linux-4.17.0+ in linux-4.17.0+_4.17.0+-3.diff.gz
dpkg-source: Errore: cannot represent change to vmlinux-gdb.py:
dpkg-source: Errore:   new version is symlink to /etc/xen/gvt-linux/scripts/gdb/vmlinux-gdb.py
dpkg-source: Errore:   old version is nonexistent
dpkg-source: Avviso: ignoring deletion of file .scmversion, use --include-removal to override
dpkg-source: Avviso: the diff modifies the following upstream files: 
dpkg-source: Informazioni: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: Errore: unrepresentable changes to source
dpkg-buildpackage: Errore: dpkg-source -i.git -b gvt-linux subprocess returned exit status 1
scripts/package/Makefile:71: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 1
Makefile:1408: recipe for target 'deb-pkg' failed

NB :

**I'm reading how to do that from here :


it seems that this is the right command to give :

fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

so,in my case I know,from the guide,that the kernel_image should be called : linux-image-4.17.0+_4.17.0+-2_amd64.deb,but I don't know the name of the headers

a command like this :

fakeroot make-kpkg --initrd --append-to-version=-custom linux-image-4.17.0+_4.17.0+-2_amd64.deb linux-headers-4.17.0+_4.17.0+-2_amd64.deb

gives the error : use --targets to display help on valid targets.


You can find the answer to your questions just on documentation, i.e. here : https://manpages.debian.org/stretch/dpkg-dev/dpkg-source.1.en.html

Have a nice day!

  • Could you improve your answer adding the parts of the documentation that refer directly to the OP question? It's good to add the essential details inside the answer, so that everyone can read/implement the solution without going out the AskUbuntu site. Thanks :-) Aug 31 '20 at 11:58
  • I have added more details on the question. refresh page. Aug 31 '20 at 13:05
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – Mitch
    Sep 4 '20 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.