move cleanup of unused ROMs from d/rules to build-dir generation
this way we save a bit of space and should make build also slightly faster, otherwise nothing should change. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
2e416ad9d5
commit
cb2b3190a4
18
Makefile
18
Makefile
@ -19,6 +19,22 @@ all: $(DEBS)
|
|||||||
submodule:
|
submodule:
|
||||||
test -f "${SRCDIR}/configure" || git submodule update --init --recursive
|
test -f "${SRCDIR}/configure" || git submodule update --init --recursive
|
||||||
|
|
||||||
|
PC_BIOS_FW_PURGE_LIST_IN = \
|
||||||
|
openbios-ppc \
|
||||||
|
openbios-sparc32 \
|
||||||
|
openbios-sparc64 \
|
||||||
|
palcode-clipper \
|
||||||
|
s390-ccw.img \
|
||||||
|
s390-netboot.img \
|
||||||
|
u-boot.e500 \
|
||||||
|
.*\.dtb \
|
||||||
|
qemu_vga.ndrv \
|
||||||
|
slof.bin \
|
||||||
|
opensbi-riscv.*-generic-fw_dynamic.bin \
|
||||||
|
|
||||||
|
BLOB_PURGE_SED_CMDS = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "/$(FILE)/d")
|
||||||
|
BLOB_PURGE_FILTER = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "$(FILE)")
|
||||||
|
|
||||||
$(BUILDDIR): keycodemapdb | submodule
|
$(BUILDDIR): keycodemapdb | submodule
|
||||||
# check if qemu/ was used for a build
|
# check if qemu/ was used for a build
|
||||||
# if so, please run 'make distclean' in the submodule and try again
|
# if so, please run 'make distclean' in the submodule and try again
|
||||||
@ -28,6 +44,8 @@ $(BUILDDIR): keycodemapdb | submodule
|
|||||||
cp -a debian $@.tmp/debian
|
cp -a debian $@.tmp/debian
|
||||||
rm -rf $@.tmp/ui/keycodemapdb
|
rm -rf $@.tmp/ui/keycodemapdb
|
||||||
cp -a keycodemapdb $@.tmp/ui/
|
cp -a keycodemapdb $@.tmp/ui/
|
||||||
|
find $@.tmp/pc-bios -type f | grep $(BLOB_PURGE_FILTER) | xargs rm -f
|
||||||
|
sed -i $(BLOB_PURGE_SED_CMDS) $@.tmp/pc-bios/meson.build
|
||||||
echo "git clone git://git.proxmox.com/git/pve-qemu.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
|
echo "git clone git://git.proxmox.com/git/pve-qemu.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
|
15
debian/rules
vendored
15
debian/rules
vendored
@ -122,21 +122,6 @@ install: build
|
|||||||
# Add here commands to install the package into debian/pve-kvm.
|
# Add here commands to install the package into debian/pve-kvm.
|
||||||
$(MAKE) DESTDIR=$(destdir) install
|
$(MAKE) DESTDIR=$(destdir) install
|
||||||
|
|
||||||
# we do not need openbios files (sparc/ppc)
|
|
||||||
rm -rf $(destdir)/usr/share/kvm/openbios-*
|
|
||||||
# remove ppc files
|
|
||||||
rm $(destdir)/usr/share/kvm/*.dtb
|
|
||||||
rm $(destdir)/usr/share/kvm/s390-ccw.img
|
|
||||||
rm $(destdir)/usr/share/kvm/s390-netboot.img
|
|
||||||
rm $(destdir)/usr/share/kvm/qemu_vga.ndrv
|
|
||||||
rm $(destdir)/usr/share/kvm/slof.bin
|
|
||||||
rm $(destdir)/usr/share/kvm/u-boot.e500
|
|
||||||
# remove Alpha files
|
|
||||||
rm $(destdir)/usr/share/kvm/palcode-clipper
|
|
||||||
# remove RISC-V files
|
|
||||||
rm $(destdir)/usr/share/kvm/opensbi-riscv32-generic-fw_dynamic.bin
|
|
||||||
rm $(destdir)/usr/share/kvm/opensbi-riscv64-generic-fw_dynamic.bin
|
|
||||||
|
|
||||||
# Remove things we don't package at all, would be a "kvm-dev" package
|
# Remove things we don't package at all, would be a "kvm-dev" package
|
||||||
rm -Rf $(destdir)/usr/include/linux/
|
rm -Rf $(destdir)/usr/include/linux/
|
||||||
rm -Rf $(destdir)/usr/include
|
rm -Rf $(destdir)/usr/include
|
||||||
|
Loading…
Reference in New Issue
Block a user