Browse Source

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.
Matthias Schiffer 8 years ago
parent
commit
cb404a944b

+ 1 - 17
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

+ 0 - 12
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=<target>`` to build the images for the new target.

+ 1 - 1
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

+ 0 - 1
targets/ar71xx-generic/vermagic

@@ -1 +0,0 @@
-7bed08fa9c06eb8089e82c200340ec66

+ 0 - 1
targets/ar71xx-nand/vermagic

@@ -1 +0,0 @@
-a44d8090b8f752ec1d96871dbbb8988a

+ 0 - 1
targets/brcm2708-bcm2708/vermagic

@@ -1 +0,0 @@
-57d4b7d13c23edd1a689dd6d6adc65ad

+ 0 - 1
targets/brcm2708-bcm2709/vermagic

@@ -1 +0,0 @@
-0fec8065ae15bf9934ffbe2512e8e39f

+ 0 - 1
targets/mpc85xx-generic/vermagic

@@ -1 +0,0 @@
-521812ea85032e662b3d3469a3a10df8

+ 0 - 1
targets/ramips-rt305x/vermagic

@@ -1 +0,0 @@
-c8b57a131072a3198e594822481af3e0

+ 0 - 1
targets/sunxi/vermagic

@@ -1 +0,0 @@
-3c199b535784c56bd7a6b4d6ad82b91f

+ 0 - 1
targets/x86-64/vermagic

@@ -1 +0,0 @@
-30da46d39f906146155850351fa0acd9

+ 0 - 1
targets/x86-generic/vermagic

@@ -1 +0,0 @@
-8549f8163c15d79b053f26aa0d52e96f

+ 0 - 1
targets/x86-kvm_guest/vermagic

@@ -1 +0,0 @@
-d0d2aab265f2535385cf8d756315d27c

+ 0 - 1
targets/x86-xen_domu/vermagic

@@ -1 +0,0 @@
-bce85557e89d5a4f30d6d723503b1a61