2
2
SHELL = /bin/bash
3
3
.SHELLFLAGS += -e
4
4
5
- ifneq ($(kernel_procure_method ) , "build")
6
- # Downloading kernel
5
+ KVERSION_SHORT ?= 4.9.0-5
6
+ KVERSION ?= $(KVERSION_SHORT ) -amd64
7
+ KERNEL_VERSION ?= 4.9.65
8
+ KERNEL_SUBVERSION ?= 3+deb9u2
9
+ kernel_procure_method ?= build
10
+
11
+ LINUX_HEADER_COMMON = linux-headers-$(KVERSION_SHORT ) -common_$(KERNEL_VERSION ) -$(KERNEL_SUBVERSION ) _all.deb
12
+ LINUX_HEADER_AMD64 = linux-headers-$(KVERSION ) _$(KERNEL_VERSION ) -$(KERNEL_SUBVERSION ) _amd64.deb
13
+ LINUX_IMAGE = linux-image-$(KVERSION ) _$(KERNEL_VERSION ) -$(KERNEL_SUBVERSION ) _amd64.deb
14
+
15
+ MAIN_TARGET = $(LINUX_HEADER_COMMON )
16
+ DERIVED_TARGETS = $(LINUX_HEADER_AMD64 ) $(LINUX_IMAGE )
7
17
8
- LINUX_HEADER_COMMON = linux-headers-3.16.0-5-common_3.16.51-3+deb8u1_amd64.deb
9
- LINUX_HEADER_COMMON_URL = "https://sonicstorage.blob.core.windows.net/packages/ kernel-public/linux-headers-3.16.0-5-common_3.16.51-3+deb8u1_amd64.deb?sv=2015-04-05&sr=b&sig=t3zPXXWP%2BDOVBRAYeFfobX%2FWtxQRSS9QTWWJZVU3PQg%3D&se=2032-03-08T02%3A59%3A37Z&sp=r"
18
+ ifneq ( $( kernel_procure_method ) , build)
19
+ # Downloading kernel
10
20
11
- LINUX_HEADER_AMD64 = linux-headers-3.16.0-5-amd64_3.16.51-3+deb8u1_amd64.deb
12
- LINUX_HEADER_AMD64_URL = "https://sonicstorage.blob.core.windows.net/packages/kernel-public/linux-headers-3.16.0-5-amd64_3.16.51-3+deb8u1_amd64.deb?sv=2015-04-05&sr=b&sig=9%2FeG5iU%2BKhpFVjwQ379eLz7MdL%2FjuKKdbyWalFINO1A%3D&se=2032-03-10T15%3A35%3A57Z&sp=r"
21
+ LINUX_HEADER_COMMON_URL = "https://sonicstorage.blob.core.windows.net/packages/kernel-public/linux-headers-4.9.0-5-common_4.9.65-3+deb9u2_all.deb?sv=2015-04-05&sr=b&sig=LtMcms7eBqw6IaJq37FdHXXN8GBrlIXouSnPEmmoxMM%3D&se=2155-07-04T07%3A33%3A59Z&sp=r"
13
22
14
- LINUX_IMAGE = linux-image-3.16.0-5-amd64_3.16.51-3+deb8u1_amd64.deb
15
- LINUX_IMAGE_URL = "https://sonicstorage.blob.core.windows.net/packages/kernel-public/linux-image-3.16.0-5-amd64_3.16.51-3+deb8u1_amd64.deb?sv=2015-04-05&sr=b&sig=ySooXCR1xEr1nUeJqV2r9QiBA3RwcxyundWCVtpIYWk%3D&se=2032-03-08T03%3A01%3A22Z&sp=r"
23
+ LINUX_HEADER_AMD64_URL = "https://sonicstorage.blob.core.windows.net/packages/kernel-public/linux-headers-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb?sv=2015-04-05&sr=b&sig=PTCh3FhHxOlSvqlKZIARbAsjcGVQWjogewNzKN%2FtPDM%3D&se=2024-04-24T15%3A33%3A34Z&sp=r"
16
24
17
- MAIN_TARGET = linux-headers-3.16.0-5-common_3.16.51-3+deb8u1_amd64.deb
18
- DERIVED_TARGETS = linux-headers-3.16.0-5-amd64_3.16.51-3+deb8u1_amd64.deb \
19
- linux-image-3.16.0-5-amd64_3.16.51-3+deb8u1_amd64.deb
25
+ LINUX_IMAGE_URL = "https://sonicstorage.blob.core.windows.net/packages/kernel-public/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb?sv=2015-04-05&sr=b&sig=eWBMDs2pooGGYC9VF%2Bm2GW%2BG%2F4T4%2BXHk9K86vwbX2Og%3D&se=2155-07-04T07%3A34%3A51Z&sp=r"
20
26
21
27
$(addprefix $(DEST ) /, $(MAIN_TARGET ) ) : $(DEST ) /% :
22
28
# Obtaining the Debian kernel packages
@@ -34,24 +40,15 @@ $(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
34
40
else
35
41
# Building kernel
36
42
37
- KVERSION_SHORT ?= 3.16.0-5
38
- KVERSION ?= $(KVERSION_SHORT ) -amd64
39
- KERNEL_VERSION ?= 3.16.51
40
- KERNEL_SUBVERSION ?= 3+deb8u1
41
-
42
- MAIN_TARGET = linux-headers-$(KVERSION_SHORT ) -common_$(KERNEL_VERSION ) -$(KERNEL_SUBVERSION ) _amd64.deb
43
- DERIVED_TARGETS = linux-headers-$(KVERSION ) _$(KERNEL_VERSION ) -$(KERNEL_SUBVERSION ) _amd64.deb \
44
- linux-image-$(KVERSION ) _$(KERNEL_VERSION ) -$(KERNEL_SUBVERSION ) _amd64.deb
45
-
46
43
DSC_FILE = linux_$(KERNEL_VERSION ) -$(KERNEL_SUBVERSION ) .dsc
47
44
ORIG_FILE = linux_$(KERNEL_VERSION ) .orig.tar.xz
48
45
DEBIAN_FILE = linux_$(KERNEL_VERSION ) -$(KERNEL_SUBVERSION ) .debian.tar.xz
49
46
URL = http://security.debian.org/debian-security/pool/updates/main/l/linux
50
47
BUILD_DIR =linux-$(KERNEL_VERSION )
51
48
52
- DSC_FILE_URL = "https://sonicstorage.blob.core.windows.net/packages/ $(DSC_FILE ) ?sv=2015-04-05&sr=b&sig=FzpIoc5gzw9oj09C0ifOaCTMo6K%2BP0WadjFgprGe508%3D&se=2117-12-17T19%3A52%3A55Z&sp=r "
53
- DEBIAN_FILE_URL = "https://sonicstorage.blob.core.windows.net/packages/ $(DEBIAN_FILE ) ?sv=2015-04-05&sr=b&sig=E65G0WdVW4FrpDQxmKqjuKjur2QM%2BycXy5NbVtmBYlY%3D&se=2117-12-17T19%3A54%3A03Z&sp=r "
54
- ORIG_FILE_URL = "https://sonicstorage.blob.core.windows.net/packages/ $(ORIG_FILE ) ?sv=2015-04-05&sr=b&sig=f%2BXBexkqVW9nru%2FwjT%2FNUwToUP3uMRnokIpuZa9AbHk%3D&se=2117-12-17T19%3A54%3A25Z&sp=r "
49
+ DSC_FILE_URL = "$( URL ) / $(DSC_FILE ) "
50
+ DEBIAN_FILE_URL = "$( URL ) / $(DEBIAN_FILE ) "
51
+ ORIG_FILE_URL = "$( URL ) / $(ORIG_FILE ) "
55
52
56
53
$(addprefix $(DEST ) /, $(MAIN_TARGET ) ) : $(DEST ) /% :
57
54
# Obtaining the Debian kernel source
@@ -65,7 +62,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
65
62
pushd $(BUILD_DIR)
66
63
git init
67
64
git add -f *
68
- git commit -m "check in all loose files and diffs"
65
+ git commit -qm "check in all loose files and diffs"
69
66
70
67
# patching anything that could affect following configuration generation.
71
68
stg init
@@ -79,13 +76,15 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
79
76
80
77
# Applying patches and configuration changes
81
78
git add debian/build/build_amd64_none_amd64/.config -f
79
+ git add debian/config.defines.dump -f
82
80
git commit -m "unmodified debian source"
83
81
84
82
# Learning new git repo head (above commit) by calling stg repair.
85
83
stg repair
86
84
stg import -s ../patch/series
87
85
88
86
# Building a custom kernel from Debian kernel source
87
+ DO_DOCS=False fakeroot make -f debian/rules -j $(shell nproc) binary-indep
89
88
fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_amd64_none
90
89
popd
91
90
0 commit comments