From cb404a944b419d61de18e1df4f0b68da048c2073 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 13 Oct 2015 00:57:10 +0200 Subject: [PATCH] build: remove vermagic hack As the Gluon kernel won't be compatible with the OpenWrt upstream anymore, we don't need the vermagic hack anymore. --- Makefile | 18 +----------------- docs/dev/hardware.rst | 12 ------------ include/Makefile.target | 2 +- targets/ar71xx-generic/vermagic | 1 - targets/ar71xx-nand/vermagic | 1 - targets/brcm2708-bcm2708/vermagic | 1 - targets/brcm2708-bcm2709/vermagic | 1 - targets/mpc85xx-generic/vermagic | 1 - targets/ramips-rt305x/vermagic | 1 - targets/sunxi/vermagic | 1 - targets/x86-64/vermagic | 1 - targets/x86-generic/vermagic | 1 - targets/x86-kvm_guest/vermagic | 1 - targets/x86-xen_domu/vermagic | 1 - 14 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 targets/ar71xx-generic/vermagic delete mode 100644 targets/ar71xx-nand/vermagic delete mode 100644 targets/brcm2708-bcm2708/vermagic delete mode 100644 targets/brcm2708-bcm2709/vermagic delete mode 100644 targets/mpc85xx-generic/vermagic delete mode 100644 targets/ramips-rt305x/vermagic delete mode 100644 targets/sunxi/vermagic delete mode 100644 targets/x86-64/vermagic delete mode 100644 targets/x86-generic/vermagic delete mode 100644 targets/x86-kvm_guest/vermagic delete mode 100644 targets/x86-xen_domu/vermagic diff --git a/Makefile b/Makefile index 08c4babb..d3e36862 100644 --- a/Makefile +++ b/Makefile @@ -103,13 +103,6 @@ manifest: FORCE mkdir -p $(GLUON_IMAGEDIR)/sysupgrade mv $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest -update-vermagic: FORCE - @$(CheckExternal) - +($(foreach GLUON_TARGET,$(GLUON_TARGETS), \ - $(GLUONMAKE_EARLY) maybe-prepare-target GLUON_TARGET='$(GLUON_TARGET)' V=s$(OPENWRT_VERBOSE) && \ - $(GLUONMAKE) update-vermagic GLUON_TARGET='$(GLUON_TARGET)' V=s$(OPENWRT_VERBOSE) && \ - ) :) - dirclean : FORCE for dir in build_dir dl staging_dir tmp; do \ rm -rf $(GLUON_ORIGOPENWRTDIR)/$$dir; \ @@ -447,15 +440,6 @@ manifest: FORCE ) : \ ) >> $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp -update-vermagic: FORCE - mkdir -p '$(BOARD_BUILDDIR)' - echo '$(DEFAULT_OPKG_REPO)' > '$(BOARD_BUILDDIR)/default_opkg_repo' - $(VERSION_SED) '$(BOARD_BUILDDIR)/default_opkg_repo' - wget -q -O- "$$(cat '$(BOARD_BUILDDIR)/default_opkg_repo')/base/Packages.gz" \ - | gzip -d \ - | awk '/Depends: kernel / { match($$3,/[[:xdigit:]]{32}/,m); print m[0]; exit }' \ - > $(GLUONDIR)/targets/$(GLUON_TARGET)/vermagic - -.PHONY: all images prepare clean gluon-tools manifest update-vermagic +.PHONY: all images prepare clean gluon-tools manifest endif diff --git a/docs/dev/hardware.rst b/docs/dev/hardware.rst index 2e8e2491..3bd62a3d 100644 --- a/docs/dev/hardware.rst +++ b/docs/dev/hardware.rst @@ -76,21 +76,9 @@ A directory for the new target must be created under ``targets``, and it must be to ``targets/targets.mk``. In the new target directory, the following files must be created: * profiles.mk -* vermagic * config (optional) For ``profiles.mk``, see :ref:`hardware-adding-profiles`. The file ``config`` can be used to add additional, target-specific options to the OpenWrt config. -The files ``vermagic`` must have the correct content so kernel modules from the upstream repositories -can be installed without dependency issues. The OpenWrt version a Gluon release is based on is defined by the upstream package repo URL in ``include/gluon.mk`` -(in the variable ``DEFAULT_OPKG_REPO``); at the time this documentation was written, this was ``barrier_breaker/14.07``; whenever -the package repo is updated, all ``vermagic`` files must be updated as well. The command ``make update-vermagic`` can be used to get the correct -vermagic, or update the values when ``DEFAULT_OPKG_REPO`` has changed. - -The content is a hash which is part of the version number of the kernel package. So in the case of ``ar71xx-generic`` on -``barrier_breaker``, we look for the kernel package in the directory ``https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/``. -As the kernel package is called ``kernel_3.10.49-1-0114c71ed85677c9c1e4911437af4743_ar71xx.ipk``, the correct ``vermagic`` string -is ``0114c71ed85677c9c1e4911437af4743``. - After this, is should be sufficient to call ``make GLUON_TARGET=`` to build the images for the new target. diff --git a/include/Makefile.target b/include/Makefile.target index a78a4044..9a913f0c 100644 --- a/include/Makefile.target +++ b/include/Makefile.target @@ -12,7 +12,7 @@ override define Kernel/Configure $(call Kernel/SetNoInitramfs) rm -rf $(KERNEL_BUILD_DIR)/modules $(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) $(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install - cp $(GLUONDIR)/targets/$(GLUON_TARGET)/vermagic $(LINUX_DIR)/.vermagic + $(SH_FUNC) grep '=[ym]' $(LINUX_DIR)/.config | LC_ALL=C sort | md5s > $(LINUX_DIR)/.vermagic endef # The Makefile included here is $(TOPDIR)/target/linux/$(BOARD)/Makefile diff --git a/targets/ar71xx-generic/vermagic b/targets/ar71xx-generic/vermagic deleted file mode 100644 index ff475475..00000000 --- a/targets/ar71xx-generic/vermagic +++ /dev/null @@ -1 +0,0 @@ -7bed08fa9c06eb8089e82c200340ec66 diff --git a/targets/ar71xx-nand/vermagic b/targets/ar71xx-nand/vermagic deleted file mode 100644 index bde150ed..00000000 --- a/targets/ar71xx-nand/vermagic +++ /dev/null @@ -1 +0,0 @@ -a44d8090b8f752ec1d96871dbbb8988a diff --git a/targets/brcm2708-bcm2708/vermagic b/targets/brcm2708-bcm2708/vermagic deleted file mode 100644 index f6367189..00000000 --- a/targets/brcm2708-bcm2708/vermagic +++ /dev/null @@ -1 +0,0 @@ -57d4b7d13c23edd1a689dd6d6adc65ad diff --git a/targets/brcm2708-bcm2709/vermagic b/targets/brcm2708-bcm2709/vermagic deleted file mode 100644 index 5264819c..00000000 --- a/targets/brcm2708-bcm2709/vermagic +++ /dev/null @@ -1 +0,0 @@ -0fec8065ae15bf9934ffbe2512e8e39f diff --git a/targets/mpc85xx-generic/vermagic b/targets/mpc85xx-generic/vermagic deleted file mode 100644 index 5ca6009d..00000000 --- a/targets/mpc85xx-generic/vermagic +++ /dev/null @@ -1 +0,0 @@ -521812ea85032e662b3d3469a3a10df8 diff --git a/targets/ramips-rt305x/vermagic b/targets/ramips-rt305x/vermagic deleted file mode 100644 index 3bc73d5e..00000000 --- a/targets/ramips-rt305x/vermagic +++ /dev/null @@ -1 +0,0 @@ -c8b57a131072a3198e594822481af3e0 diff --git a/targets/sunxi/vermagic b/targets/sunxi/vermagic deleted file mode 100644 index ef11e4c3..00000000 --- a/targets/sunxi/vermagic +++ /dev/null @@ -1 +0,0 @@ -3c199b535784c56bd7a6b4d6ad82b91f diff --git a/targets/x86-64/vermagic b/targets/x86-64/vermagic deleted file mode 100644 index cc552ff2..00000000 --- a/targets/x86-64/vermagic +++ /dev/null @@ -1 +0,0 @@ -30da46d39f906146155850351fa0acd9 diff --git a/targets/x86-generic/vermagic b/targets/x86-generic/vermagic deleted file mode 100644 index 3c2f8d1b..00000000 --- a/targets/x86-generic/vermagic +++ /dev/null @@ -1 +0,0 @@ -8549f8163c15d79b053f26aa0d52e96f diff --git a/targets/x86-kvm_guest/vermagic b/targets/x86-kvm_guest/vermagic deleted file mode 100644 index b0031811..00000000 --- a/targets/x86-kvm_guest/vermagic +++ /dev/null @@ -1 +0,0 @@ -d0d2aab265f2535385cf8d756315d27c diff --git a/targets/x86-xen_domu/vermagic b/targets/x86-xen_domu/vermagic deleted file mode 100644 index 1e646eda..00000000 --- a/targets/x86-xen_domu/vermagic +++ /dev/null @@ -1 +0,0 @@ -bce85557e89d5a4f30d6d723503b1a61