Skip to content
Snippets Groups Projects
Commit cb404a94 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

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.
parent e730b60c
No related branches found
No related tags found
No related merge requests found
...@@ -103,13 +103,6 @@ manifest: FORCE ...@@ -103,13 +103,6 @@ manifest: FORCE
mkdir -p $(GLUON_IMAGEDIR)/sysupgrade mkdir -p $(GLUON_IMAGEDIR)/sysupgrade
mv $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest 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 dirclean : FORCE
for dir in build_dir dl staging_dir tmp; do \ for dir in build_dir dl staging_dir tmp; do \
rm -rf $(GLUON_ORIGOPENWRTDIR)/$$dir; \ rm -rf $(GLUON_ORIGOPENWRTDIR)/$$dir; \
...@@ -447,15 +440,6 @@ manifest: FORCE ...@@ -447,15 +440,6 @@ manifest: FORCE
) : \ ) : \
) >> $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp ) >> $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp
update-vermagic: FORCE .PHONY: all images prepare clean gluon-tools manifest
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
endif endif
...@@ -76,21 +76,9 @@ A directory for the new target must be created under ``targets``, and it must be ...@@ -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: to ``targets/targets.mk``. In the new target directory, the following files must be created:
* profiles.mk * profiles.mk
* vermagic
* config (optional) * config (optional)
For ``profiles.mk``, see :ref:`hardware-adding-profiles`. 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 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. After this, is should be sufficient to call ``make GLUON_TARGET=<target>`` to build the images for the new target.
...@@ -12,7 +12,7 @@ override define Kernel/Configure ...@@ -12,7 +12,7 @@ override define Kernel/Configure
$(call Kernel/SetNoInitramfs) $(call Kernel/SetNoInitramfs)
rm -rf $(KERNEL_BUILD_DIR)/modules rm -rf $(KERNEL_BUILD_DIR)/modules
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) $(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install $(_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 endef
# The Makefile included here is $(TOPDIR)/target/linux/$(BOARD)/Makefile # The Makefile included here is $(TOPDIR)/target/linux/$(BOARD)/Makefile
......
7bed08fa9c06eb8089e82c200340ec66
a44d8090b8f752ec1d96871dbbb8988a
57d4b7d13c23edd1a689dd6d6adc65ad
0fec8065ae15bf9934ffbe2512e8e39f
521812ea85032e662b3d3469a3a10df8
c8b57a131072a3198e594822481af3e0
3c199b535784c56bd7a6b4d6ad82b91f
30da46d39f906146155850351fa0acd9
8549f8163c15d79b053f26aa0d52e96f
d0d2aab265f2535385cf8d756315d27c
bce85557e89d5a4f30d6d723503b1a61
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment