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.
This commit is contained in:
Matthias Schiffer 2015-10-13 00:57:10 +02:00
parent e730b60c93
commit cb404a944b
14 changed files with 2 additions and 41 deletions

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -1 +0,0 @@
7bed08fa9c06eb8089e82c200340ec66

View File

@ -1 +0,0 @@
a44d8090b8f752ec1d96871dbbb8988a

View File

@ -1 +0,0 @@
57d4b7d13c23edd1a689dd6d6adc65ad

View File

@ -1 +0,0 @@
0fec8065ae15bf9934ffbe2512e8e39f

View File

@ -1 +0,0 @@
521812ea85032e662b3d3469a3a10df8

View File

@ -1 +0,0 @@
c8b57a131072a3198e594822481af3e0

View File

@ -1 +0,0 @@
3c199b535784c56bd7a6b4d6ad82b91f

View File

@ -1 +0,0 @@
30da46d39f906146155850351fa0acd9

View File

@ -1 +0,0 @@
8549f8163c15d79b053f26aa0d52e96f

View File

@ -1 +0,0 @@
d0d2aab265f2535385cf8d756315d27c

View File

@ -1 +0,0 @@
bce85557e89d5a4f30d6d723503b1a61