]>
Commit | Line | Data |
---|---|---|
60dfdcbf TL |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | ||
920e0f55 | 3 | FW_DEB=pve-firmware_$(DEB_VERSION)_all.deb |
7bbca2e6 | 4 | |
2e671300 | 5 | GITVERSION:=$(shell git rev-parse HEAD) |
7bbca2e6 | 6 | |
cf48ed1e | 7 | export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp) |
61bce7be | 8 | |
920e0f55 TL |
9 | DEBS=$(FW_DEB) |
10 | BUILDDIR=fwdata | |
7bbca2e6 | 11 | |
d6dee2a6 | 12 | .PHONY: deb |
920e0f55 | 13 | deb: $(DEBS) |
d6dee2a6 | 14 | |
920e0f55 TL |
15 | $(FW_DEB): $(BUILDDIR) |
16 | cp -a debian $(BUILDDIR) | |
17 | echo "git clone git://git.proxmox.com/git/pve-firmware.git\\ngit checkout $(GITVERSION)" >$(BUILDDIR)/debian/SOURCE | |
18 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc | |
cf48ed1e | 19 | |
54156f4c TL |
20 | # NOTE: when collapsing FW lists keep major.minor still separated, so we can sunset the older ones |
21 | # without user impact safely. The last oldstable list needs to be kept avoid breakage on upgrade | |
782f51b7 | 22 | .PHONY: fw.list |
d88aaa91 | 23 | fw.list: fwlist-5.4.86-1-pve |
54156f4c | 24 | fw.list: fwlist-5.11.x-y-pve |
7ee41469 | 25 | fw.list: fwlist-5.13.x-y-pve |
7dff192c | 26 | fw.list: fwlist-5.15.5-1-pve |
a9f83c55 | 27 | fw.list: fwlist-5.15.19-1-pve |
7d7a1dd4 | 28 | fw.list: fwlist-5.15.27-1-pve |
0c3bcd17 | 29 | fw.list: fwlist-5.15.35-1-pve |
3c1331ce | 30 | fw.list: fwlist-5.15.53-1-pve |
807de5be | 31 | fw.list: fwlist-5.19.0-1-pve |
62c51579 | 32 | fw.list: fwlist-5.19-iwlwifi-extra |
c366a5cf | 33 | fw.list: fwlist-6.1.0-1-pve |
7205e1cc | 34 | fw.list: fwlist-6.1.10-1-pve |
01507c9b | 35 | fw.list: fwlist-6.2.2-1-pve |
be53606e TL |
36 | rm -f $@.tmp $@ |
37 | sort -u $^ > $@.tmp | |
38 | mv $@.tmp $@ | |
782f51b7 | 39 | |
920e0f55 TL |
40 | $(BUILDDIR): linux-firmware.git/WHENCE dvb-firmware.git/README fw.list |
41 | rm -rf $(BUILDDIR) $(BUILDDIR).tmp | |
42 | mkdir -p $(BUILDDIR).tmp/lib/firmware | |
43 | cd linux-firmware.git; ./copy-firmware.sh -v ../$(BUILDDIR).tmp/lib/firmware/ | |
44 | ./assemble-firmware.pl fw.list $(BUILDDIR).tmp/lib/firmware | |
45 | find $(BUILDDIR).tmp/lib/firmware -empty -type d -delete | |
46 | install -d $(BUILDDIR).tmp/usr/share/doc/pve-firmware | |
47 | cp linux-firmware.git/WHENCE $(BUILDDIR).tmp/usr/share/doc/pve-firmware/README | |
48 | install -d $(BUILDDIR).tmp/usr/share/doc/pve-firmware/licenses | |
49 | cp linux-firmware.git/LICEN[CS]E* $(BUILDDIR).tmp/usr/share/doc/pve-firmware/licenses | |
d3674cb7 TL |
50 | # we only compress big ones that almost definitively ain't required in the initrd |
51 | # or are so big and unbuyable (netronome...) | |
52 | cd $(BUILDDIR).tmp/lib/firmware; find . -type f \( -name 'i[wb][lt]*' -o -path '*/netronome/*' \) -print0 | xargs -0 -n1 -P0 -- xz -C crc32 | |
53 | cd $(BUILDDIR).tmp/lib/firmware; find . -xtype l -print0 | xargs -0 -n1 -P0 -- sh -c 'ln -sf "$$(readlink "$$0").xz" "$$0"; mv "$$0" "$$0.xz"' | |
920e0f55 | 54 | mv $(BUILDDIR).tmp $(BUILDDIR) |
349bb95e FG |
55 | |
56 | # upgrade to current master | |
57 | .PHONY: update_modules | |
01a072c6 | 58 | update_modules: submodule |
349bb95e FG |
59 | git submodule foreach 'git pull --ff-only origin master' |
60 | ||
61 | # make sure submodules were initialized | |
01a072c6 FG |
62 | .PHONY: submodule |
63 | submodule dvb-firmware.git/README linux-firmware.git/WHENCE: | |
349bb95e | 64 | test -f "linux-firmware.git/WHENCE" || git submodule update --init |
ff43d65f | 65 | |
46d7ecd0 | 66 | .PHONY: upload |
920e0f55 TL |
67 | upload: $(DEBS) |
68 | tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist bullseye | |
46d7ecd0 | 69 | |
ff43d65f FG |
70 | .PHONY: clean |
71 | clean: | |
920e0f55 | 72 | rm -rf $(BUILDDIR) $(BUILDDIR).tmp fw.list *.deb *.buildinfo *.dsc *.changes |