]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - debian/rules.d/1-maintainer.mk
UBUNTU: [Packaging] Add support for ODM drivers
[mirror_ubuntu-jammy-kernel.git] / debian / rules.d / 1-maintainer.mk
CommitLineData
29f98055
LO
1# The following targets are for the maintainer only! do not run if you don't
2# know what they do.
3
4.PHONY: printenv updateconfigs printchanges insertchanges startnewrelease diffupstream help updateportsconfigs editportsconfigs autoreconstruct finalchecks
5
6help:
7 @echo "These are the targets in addition to the normal $(DEBIAN) ones:"
8 @echo
9 @echo " printenv : Print some variables used in the build"
10 @echo
11 @echo " updateconfigs : Update core arch configs"
12 @echo
13 @echo " editconfigs : Update core arch configs interractively"
14 @echo " genconfigs : Generate core arch configs in CONFIGS/*"
15 @echo
16 @echo " updateportsconfigs : Update ports arch configs"
17 @echo
18 @echo " editportsconfigs : Update ports arch configs interactivly"
19 @echo " genportconfigs : Generate ports arch configs in CONFIGS/*"
20 @echo
21 @echo " printchanges : Print the current changelog entries (from git)"
22 @echo
23 @echo " insertchanges : Insert current changelog entries (from git)"
24 @echo
25 @echo " startnewrelease : Start a new changelog set"
26 @echo
27 @echo " diffupstream : Diff stock kernel code against upstream (git)"
28 @echo
29 @echo " compileselftests : Only compile the selftests listed on ubuntu_selftests variable"
30 @echo
31 @echo " runselftests : Run the selftests listed on ubuntu_selftests variable"
32 @echo
33 @echo " help : If you are kernel hacking, you need the professional"
34 @echo " version of this"
35 @echo
36 @echo "Environment variables:"
37 @echo
38 @echo " NOKERNLOG : Do not add upstream kernel commits to changelog"
39 @echo " CONCURRENCY_LEVEL=X"
40 @echo " : Use -jX for kernel compile"
41 @echo " PRINTSHAS : Include SHAs for commits in changelog"
42
43printdebian:
44 @echo "$(DEBIAN)"
45
46updateconfigs defaultconfigs editconfigs genconfigs dumpconfigs:
47 dh_testdir;
2392988e 48 $(SHELL) $(DROOT)/scripts/misc/kernelconfig $@ "$(do_enforce_all)"
29f98055
LO
49 rm -rf build
50
51updateportsconfigs defaultportsconfigs editportsconfigs genportsconfigs askconfigs:
52 dh_testdir;
53 $(SHELL) $(DROOT)/scripts/misc/kernelconfig $@ ports
54 rm -rf build
55
56printenv:
57 dh_testdir
58 @echo "src package name = $(src_pkg_name)"
59 @echo "series = $(series)"
60 @echo "release = $(release)"
61 @echo "revisions = $(revisions)"
62 @echo "revision = $(revision)"
63 @echo "uploadnum = $(uploadnum)"
64 @echo "prev_revisions = $(prev_revisions)"
65 @echo "prev_revision = $(prev_revision)"
66 @echo "abinum = $(abinum)"
67 @echo "upstream_tag = $(upstream_tag)"
68 @echo "gitver = $(gitver)"
69 @echo "variants = $(variants)"
70 @echo "flavours = $(flavours)"
71 @echo "skipabi = $(skipabi)"
72 @echo "skipmodule = $(skipmodule)"
73 @echo "skipdbg = $(skipdbg)"
74 @echo "ubuntu_log_opts = $(ubuntu_log_opts)"
75 @echo "CONCURRENCY_LEVEL = $(CONCURRENCY_LEVEL)"
76 @echo "ubuntu_selftests = $(ubuntu_selftests)"
77 @echo "bin package name = $(bin_pkg_name)"
78 @echo "hdr package name = $(hdrs_pkg_name)"
79 @echo "doc package name = $(doc_pkg_name)"
80 @echo "do_doc_package = $(do_doc_package)"
81 @echo "do_doc_package_content = $(do_doc_package_content)"
82 @echo "do_source_package = $(do_source_package)"
83 @echo "do_source_package_content = $(do_source_package_content)"
84 @echo "do_libc_dev_package = $(do_libc_dev_package)"
85 @echo "do_flavour_image_package = $(do_flavour_image_package)"
86 @echo "do_flavour_header_package = $(do_flavour_header_package)"
87 @echo "do_common_headers_indep = $(do_common_headers_indep)"
88 @echo "do_full_source = $(do_full_source)"
e2655225 89 @echo "do_odm_drivers = $(do_odm_drivers)"
29f98055
LO
90 @echo "do_tools = $(do_tools)"
91 @echo "do_any_tools = $(do_any_tools)"
92 @echo "do_linux_tools = $(do_linux_tools)"
93 @echo " do_tools_cpupower = $(do_tools_cpupower)"
94 @echo " do_tools_perf = $(do_tools_perf)"
95 @echo " do_tools_bpftool = $(do_tools_bpftool)"
96 @echo " do_tools_x86 = $(do_tools_x86)"
97 @echo " do_tools_host = $(do_tools_host)"
98 @echo "do_cloud_tools = $(do_cloud_tools)"
99 @echo " do_tools_hyperv = $(do_tools_hyperv)"
100 @echo "any_signed = $(any_signed)"
101 @echo " uefi_signed = $(uefi_signed)"
102 @echo " opal_signed = $(opal_signed)"
103 @echo " sipl_signed = $(sipl_signed)"
104 @echo "full_build = $(full_build)"
105 @echo "libc_dev_version = $(libc_dev_version)"
106 @echo "DEB_HOST_GNU_TYPE = $(DEB_HOST_GNU_TYPE)"
107 @echo "DEB_BUILD_GNU_TYPE = $(DEB_BUILD_GNU_TYPE)"
108 @echo "DEB_HOST_ARCH = $(DEB_HOST_ARCH)"
109 @echo "DEB_BUILD_ARCH = $(DEB_BUILD_ARCH)"
110 @echo "arch = $(arch)"
111 @echo "kmake = $(kmake)"
2392988e 112 @echo "disable_d_i = $(disable_d_i)"
29f98055
LO
113
114printchanges:
115 @baseCommit=$$(git log --pretty=format:'%H %s' | \
116 gawk '/UBUNTU: '".*Ubuntu-.*`echo $(prev_fullver) | sed 's/+/\\\\+/'`"'(~.*)?$$/ { print $$1; exit }'); \
117 if [ -z "$$baseCommit" ]; then \
118 echo "WARNING: couldn't find a commit for the previous version. Using the lastest one." >&2; \
119 baseCommit=$$(git log --pretty=format:'%H %s' | \
120 gawk '/UBUNTU:\s*Ubuntu-.*$$/ { print $$1; exit }'); \
121 fi; \
122 git log "$$baseCommit"..HEAD | \
123 $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts)
124
125insertchanges: autoreconstruct finalchecks
126 @perl -w -f $(DROOT)/scripts/misc/insert-changes.pl $(DROOT) $(DEBIAN)
127
128autoreconstruct:
129 # No need for reconstruct for -rc kernels since we don't upload an
130 # orig tarball, so just remove it.
131 if grep -q "^EXTRAVERSION = -rc[0-9]\+$$" Makefile; then \
132 echo "exit 0" >$(DEBIAN)/reconstruct; \
133 else \
134 $(DROOT)/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct $(DROOT)/source/options; \
135 fi
136
137finalchecks: debian/control
138 $(DROOT)/scripts/misc/final-checks "$(DEBIAN)" "$(prev_fullver)"
139
140diffupstream:
141 @git diff-tree -p refs/remotes/linux-2.6/master..HEAD $(shell ls | grep -vE '^(ubuntu|$(DEBIAN)|\.git.*)')
142
143startnewrelease:
144 dh_testdir
145 @[ -f "$(DEBIAN)/etc/update.conf" ] && . "$(DEBIAN)/etc/update.conf"; \
146 if [ -n "$$BACKPORT_SUFFIX" ]; then \
147 ver="$$(dpkg-parsechangelog -l"$$DEBIAN_MASTER/changelog" -SVersion)$${BACKPORT_SUFFIX}.1"; \
148 prev_ver="$$(dpkg-parsechangelog -l"$(DEBIAN)/changelog" -SVersion)"; \
149 if [ "$${ver%.*}" = "$${prev_ver%.*}" ]; then \
150 ver="$${ver%.*}.$$(( $${prev_ver##*.} +1 ))"; \
151 fi; \
152 else \
153 ver="$(release)-$$(echo "$(revision)" | \
154 perl -ne 'if (/^(\d*)\.(\d*)(.*)?$$/) { printf("%d.%d%s\n", $$1 + 1, $$2 +1, $$3) }')"; \
155 fi; \
156 now="$(shell date -R)"; \
157 echo "Creating new changelog set for $$ver..."; \
158 echo -e "$(src_pkg_name) ($$ver) UNRELEASED; urgency=medium\n" > $(DEBIAN)/changelog.new; \
159 echo " CHANGELOG: Do not edit directly. Autogenerated at release." >> \
160 $(DEBIAN)/changelog.new; \
161 echo " CHANGELOG: Use the printchanges target to see the curent changes." \
162 >> $(DEBIAN)/changelog.new; \
163 echo " CHANGELOG: Use the insertchanges target to create the final log." \
164 >> $(DEBIAN)/changelog.new; \
165 echo -e "\n -- $$DEBFULLNAME <$$DEBEMAIL> $$now\n" >> \
166 $(DEBIAN)/changelog.new ; \
167 cat $(DEBIAN)/changelog >> $(DEBIAN)/changelog.new; \
168 mv $(DEBIAN)/changelog.new $(DEBIAN)/changelog
169
170compileselftests:
171 # a loop is needed here to fail on errors
172 for test in $(ubuntu_selftests); do \
173 $(kmake) -C tools/testing/selftests TARGETS="$$test"; \
174 done;
175
176runselftests:
177 $(kmake) -C tools/testing/selftests TARGETS="$(ubuntu_selftests)" run_tests