add xenperf hypervisor to booky makefile

From PryMar56, 10 Months ago, written in Plain Text, viewed 202 times.
URL https://pb.dynavirt.com/view/eb6ac0f5 Embed
Download Paste or View Raw
  1. mockbuild@booky:~/pbdeps$ dpkg-deb -c xen-hypervisor-4.18-amd64_4.18.0-1+deb12u3.4_amd64.deb
  2. drwxr-xr-x root/root         0 2024-02-04 11:39 ./
  3. drwxr-xr-x root/root         0 2024-02-04 11:39 ./boot/
  4. drwxr-xr-x root/root         0 2024-02-04 11:39 ./boot/efi/
  5. drwxr-xr-x root/root         0 2024-02-04 11:39 ./boot/efi/EFI/
  6. drwxr-xr-x root/root         0 2024-02-04 11:39 ./boot/efi/EFI/debian/
  7. -rwxr-xr-x root/root   2921654 2024-02-04 11:39 ./boot/efi/EFI/debian/xen-4.18-amd64-perf.efi
  8. -rwxr-xr-x root/root   2695136 2024-02-04 11:39 ./boot/efi/EFI/debian/xen-4.18-amd64-xsm.efi
  9. -rwxr-xr-x root/root   2587744 2024-02-04 11:39 ./boot/efi/EFI/debian/xen-4.18-amd64.efi
  10. drwxr-xr-x root/root         0 2024-02-04 11:39 ./boot/flask/
  11. -rw-r--r-- root/root     10943 2024-02-04 11:39 ./boot/flask/xenpolicy-4.18
  12. drwxr-xr-x root/root         0 2024-02-04 11:39 ./boot/kcfg/
  13. -rw-r--r-- root/root      3013 2024-02-04 11:39 ./boot/kcfg/xen-4.18-perf.config
  14. -rw-r--r-- root/root      2854 2024-02-04 11:39 ./boot/kcfg/xen-4.18-xsm.config
  15. -rw-r--r-- root/root      2636 2024-02-04 11:39 ./boot/kcfg/xen-4.18.config
  16. -rw-r--r-- root/root   1239932 2024-02-04 11:39 ./boot/xen-4.18-amd64-perf.gz
  17. -rw-r--r-- root/root   1221919 2024-02-04 11:39 ./boot/xen-4.18-amd64-xsm.gz
  18. -rw-r--r-- root/root   1173225 2024-02-04 11:39 ./boot/xen-4.18-amd64.gz
  19. drwxr-xr-x root/root         0 2024-02-04 11:39 ./etc/
  20. drwxr-xr-x root/root         0 2024-02-04 11:39 ./etc/default/
  21. drwxr-xr-x root/root         0 2024-02-04 11:39 ./etc/default/grub.d/
  22. -rw-r--r-- root/root      1834 2024-02-04 11:39 ./etc/default/grub.d/xen-4.18.cfg
  23. drwxr-xr-x root/root         0 2024-02-04 11:39 ./usr/
  24. drwxr-xr-x root/root         0 2024-02-04 11:39 ./usr/share/
  25. drwxr-xr-x root/root         0 2024-02-04 11:39 ./usr/share/bug/
  26. drwxr-xr-x root/root         0 2024-02-04 11:39 ./usr/share/bug/xen-hypervisor-4.18-amd64/
  27. -rw-r--r-- root/root        19 2016-12-22 09:16 ./usr/share/bug/xen-hypervisor-4.18-amd64/control
  28. drwxr-xr-x root/root         0 2024-02-04 11:39 ./usr/share/doc/
  29. drwxr-xr-x root/root         0 2024-02-04 11:39 ./usr/share/doc/xen-hypervisor-4.18-amd64/
  30. -rw-r--r-- root/root     14734 2024-02-04 11:39 ./usr/share/doc/xen-hypervisor-4.18-amd64/changelog.Debian.gz
  31. -rw-r--r-- root/root      5051 2024-02-04 11:39 ./usr/share/doc/xen-hypervisor-4.18-amd64/changelog.gz
  32. -rw-r--r-- root/root     14537 2016-12-22 09:01 ./usr/share/doc/xen-hypervisor-4.18-amd64/copyright
  33.  
  34.  
  35. mockbuild@booky:~/pbdeps$ cat xen_perf_fix
  36. #!/bin/bash
  37.  
  38. # if XSM is not set, insert the settings, then delete the reminder
  39.  
  40. sed -i -e '/^# CONFIG_DEBUG_INFO/ i CONFIG_DEBUG=y\
  41. # CONFIG_CRASH_DEBUG is not set\
  42. # CONFIG_GDBSX is not set\
  43. CONFIG_FRAME_POINTER=y\
  44. # CONFIG_DEBUG_LOCK_PROFILE is not set\
  45. CONFIG_DEBUG_LOCKS=y\
  46. CONFIG_PERF_COUNTERS=y\
  47. CONFIG_PERF_ARRAYS=y\
  48. CONFIG_VERBOSE_DEBUG=y\
  49. CONFIG_SCRUB_DEBUG=y\
  50. # CONFIG_UBSAN is not set\
  51. # CONFIG_DEBUG_TRACE is not set\
  52. CONFIG_XMEM_POOL_POISON=y\
  53. CONFIG_DEBUG_INFO=y
  54.  
  55. /^# CONFIG_DEBUG /d' $1/.config
  56.  
  57. sed -i -e '/CONFIG_SCHED_CREDIT2=y/ a CONFIG_SCHED_RTDS=y\
  58. CONFIG_SCHED_ARINC653=y\
  59. CONFIG_SCHED_NULL=y' $1/.config
  60.  
  61. sed -i -e '/^# CONFIG_DEBUG_INFO/d' $1/.config
  62.  
  63. sed -i -e '/^CONFIG_XEN_ALIGN_DEFAULT=y/ i CONFIG_HVM_FEP=y' $1/.config
  64.  
  65. mockbuild@booky:~/pbdeps$ cat add-perf-rules.diff
  66. --- ../zzrules.real.noperf      2024-02-03 11:24:29.000000000 -0800
  67. +++ debian/rules.real   2024-02-04 11:38:14.148250972 -0800
  68. @@ -17,6 +17,7 @@
  69.  export CONFIG_TESTS=n
  70.  export XEN_SYSTEMD_DIR
  71.  export FLASK_POLICY=y
  72. +export DEBUG_XENPERF=y
  73.  export PANDOC=
  74.  export FIG2DEV=
  75.  export EFI_VENDOR=debian
  76. @@ -63,6 +64,9 @@
  77.  ifeq ($(FLASK_POLICY),y)
  78.  build-arch-flavour: $(STAMPS_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)_XSM
  79.  endif
  80. +ifeq ($(DEBUG_XENPERF),y)
  81. +build-arch-flavour: $(STAMPS_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)_PERF
  82. +endif
  83.  build-indep: $(STAMPS_DIR)/build-docs
  84.  
  85.  setup-arch: $(STAMPS_DIR)/setup-utils_$(ARCH)
  86. @@ -110,6 +114,21 @@
  87.  #      echo "XEN_VENDORVERSION := $(EXTRAVERSION)" > $(DIR)/xen/xen-version
  88.         @$(stamp)
  89.  
  90. +$(STAMPS_DIR)/su-hyp_$(ARCH)_$(FLAVOUR)_PERF: SOURCE_FILES = $(filter-out debian, $(wildcard *))
  91. +$(STAMPS_DIR)/su-hyp_$(ARCH)_$(FLAVOUR)_PERF: DIR=$(BUILD_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)_PERF
  92. +$(STAMPS_DIR)/su-hyp_$(ARCH)_$(FLAVOUR)_PERF:
  93. +       @rm -rf $(DIR)
  94. +       mkdir -p $(DIR)
  95. +       sed -i -e '/EXTRAVER/ s/1-pre/0/' xen/Makefile ;
  96. +       sed -i -e '/CONFIG_TESTS/ s/y$$/n/' Config.mk ;
  97. +       cp -al $(SOURCE_FILES) $(DIR)
  98. +       sed -i -e '/^CFLAGS/ s/-Werror/-fcf-protection=none -Wno-error/' $(DIR)/xen/Rules.mk ;
  99. +       cp debian/xen_$(VERSION)_$(ARCH).config $(DIR)/xen/.config ;
  100. +       ./debian/xen_perf_fix $(DIR)/xen
  101. +       echo  "b1fdd7d0e47e0831ac-x86/ucode: Fix stability of the raw CPU Policy rescan-Thu 1 Feb 2024 09:02" > $(DIR)/.scmversion
  102. +#      echo "XEN_VENDORVERSION := $(EXTRAVERSION)" > $(DIR)/xen/xen-version
  103. +       @$(stamp)
  104. +
  105.  
  106.  $(STAMPS_DIR)/setup-utils_$(ARCH): SOURCE_FILES = $(filter-out debian, $(wildcard *))
  107.  $(STAMPS_DIR)/setup-utils_$(ARCH): DIR=$(BUILD_DIR)/build-utils_$(ARCH)
  108. @@ -203,6 +222,16 @@
  109.                 LANG=C.UTF-8
  110.         touch $@
  111.  
  112. +$(STAMPS_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)_PERF: DIR=$(BUILD_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)_PERF
  113. +$(STAMPS_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)_PERF: XEN_EXTRAVERSION=.0-perf
  114. +       set;
  115. +       for i in $(shell dpkg-buildflags --list);do dpkg-buildflags --get $$i  ;done
  116. +       env -u LDFLAGS -u CFLAGS $(MAKE_CLEAN) -C $(DIR)/xen \
  117. +               XEN_COMPILE_ARCH=$(XEN_ARCH) XEN_DOMAIN=prymar56.org XEN_EXTRAVERSION=.0-perf \
  118. +               XEN_TARGET_ARCH=$(XEN_ARCH) \
  119. +               LANG=C.UTF-8
  120. +       touch $@
  121. +
  122.  
  123.  $(STAMPS_DIR)/build-utils_$(ARCH) \
  124.  $(STAMPS_DIR)/install-utils_$(ARCH): CONFIG = \
  125. @@ -294,6 +323,10 @@
  126.  ins-hyp_$(ARCH)_$(FLAVOUR): DIR_XSM = $(BUILD_DIR)/build-utils_$(ARCH)
  127.  ins-hyp_$(ARCH)_$(FLAVOUR): $(STAMPS_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)_XSM
  128.  endif
  129. +ifeq ($(DEBUG_XENPERF),y)
  130. +ins-hyp_$(ARCH)_$(FLAVOUR): DIR_PERF = $(BUILD_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)_PERF
  131. +ins-hyp_$(ARCH)_$(FLAVOUR): $(STAMPS_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)_PERF
  132. +endif
  133.  ins-hyp_$(ARCH)_$(FLAVOUR): $(STAMPS_DIR)/bld-hyp_$(ARCH)_$(FLAVOUR)
  134.         dh_testdir
  135.         dh_testroot
  136. @@ -320,6 +353,14 @@
  137.         strip -s debian/$(PACKAGE_NAME)/boot/efi/EFI/$(EFI_VENDOR)/xen-$(VERSION)-$(FLAVOUR)-xsm.efi
  138.  endif
  139.  endif
  140. +ifeq ($(DEBUG_XENPERF),y)
  141. +       cp -p $(DIR_PERF)/xen/.config  debian/$(PACKAGE_NAME)/boot/kcfg/xen-$(VERSION)-perf.config
  142. +       cp $(DIR_PERF)/xen/xen$(IMAGE_SUFFIX) debian/$(PACKAGE_NAME)/boot/xen-$(VERSION)-$(FLAVOUR)-perf$(IMAGE_SUFFIX)
  143. +ifeq ($(ARCH),amd64)
  144. +       cp $(DIR_PERF)/xen/xen.efi debian/$(PACKAGE_NAME)/boot/efi/EFI/$(EFI_VENDOR)/xen-$(VERSION)-$(FLAVOUR)-perf.efi
  145. +       strip -s debian/$(PACKAGE_NAME)/boot/efi/EFI/$(EFI_VENDOR)/xen-$(VERSION)-$(FLAVOUR)-perf.efi
  146. +endif
  147. +endif
  148.         cp -p $(DIR)/xen/.config  debian/$(PACKAGE_NAME)/boot/kcfg/xen-$(VERSION).config
  149.         cp $(DIR)/xen/xen$(IMAGE_SUFFIX) debian/$(PACKAGE_NAME)/boot/xen-$(VERSION)-$(FLAVOUR)$(IMAGE_SUFFIX)
  150.         if [  -d debian/$(PACKAGE_NAME)/usr/lib64/efi ]; then \
  151.  
  152.  

Reply to "add xenperf hypervisor to booky makefile"

Here you can reply to the paste above

captcha