1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 21:48:23 +02:00

build,IB: include kmods only in local builds

The buildbots generate a kmod archive which should be used instead of a
local copy. This is possible due to the introduction of a kernelversion
specific feed.

This commit adds the ability of using only signed package feeds.

Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
Paul Spooren 2020-09-15 12:44:36 -10:00 committed by Daniel Golle
parent 071514c641
commit 2999f810ff
2 changed files with 16 additions and 12 deletions

@ -38,23 +38,27 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean
ifeq ($(CONFIG_IB_STANDALONE),) ifeq ($(CONFIG_IB_STANDALONE),)
echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf
$(call FeedSourcesAppend,$(PKG_BUILD_DIR)/repositories.conf) $(call FeedSourcesAppend,$(PKG_BUILD_DIR)/repositories.conf)
$(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf
endif endif
ifeq ($(CONFIG_BUILDBOT),)
$(INSTALL_DIR) $(PKG_BUILD_DIR)/packages
echo '' >> $(PKG_BUILD_DIR)/repositories.conf echo '' >> $(PKG_BUILD_DIR)/repositories.conf
echo '## This is the local package repository, do not remove!' >> $(PKG_BUILD_DIR)/repositories.conf echo '## This is the local package repository, do not remove!' >> $(PKG_BUILD_DIR)/repositories.conf
echo 'src imagebuilder file:packages' >> $(PKG_BUILD_DIR)/repositories.conf echo 'src imagebuilder file:packages' >> $(PKG_BUILD_DIR)/repositories.conf
$(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf ifeq ($(CONFIG_IB_STANDALONE),)
$(FIND) $(call FeedPackageDir,libc) -type f \
ifeq ($(CONFIG_IB_STANDALONE),) \( -name 'libc_*.ipk' -or -name 'kernel_*.ipk' -or -name 'kmod-*.ipk' \) \
(cd $(call FeedPackageDir,libc); $(FIND) -type f -name 'libc_*.ipk' -or -name 'kernel_*.ipk' -or -name 'kmod-*.ipk') | \ -exec $(CP) -t $(PKG_BUILD_DIR)/packages {} +
while read path; do \ else
mkdir -p "$(PKG_BUILD_DIR)/packages/$${path%/*}"; \ $(FIND) $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.ipk' \
cp "$(call FeedPackageDir,libc)/$$path" "$(PKG_BUILD_DIR)/packages/$$path"; \ -exec $(CP) -t $(PKG_BUILD_DIR)/packages/ {} +
done endif
else else
$(INSTALL_DIR) $(PKG_BUILD_DIR)/packages $(FIND) $(call FeedPackageDir,libc) -type f \
find $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.ipk' -exec $(CP) {} $(PKG_BUILD_DIR)/packages/ \; \( -name 'libc_*.ipk' -or -name 'kernel_*.ipk' \) \
-exec $(CP) -t $(IB_LDIR)/ {} +
endif endif
$(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/ $(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/

@ -153,8 +153,8 @@ package_list: FORCE
package_install: FORCE package_install: FORCE
@echo @echo
@echo Installing packages... @echo Installing packages...
$(OPKG) install $(firstword $(wildcard $(PACKAGE_DIR)/libc_*.ipk $(PACKAGE_DIR)/base/libc_*.ipk)) $(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/libc_*.ipk $(PACKAGE_DIR)/libc_*.ipk))
$(OPKG) install $(firstword $(wildcard $(PACKAGE_DIR)/kernel_*.ipk $(PACKAGE_DIR)/base/kernel_*.ipk)) $(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/kernel_*.ipk $(PACKAGE_DIR)/kernel_*.ipk))
$(OPKG) install $(BUILD_PACKAGES) $(OPKG) install $(BUILD_PACKAGES)
prepare_rootfs: FORCE prepare_rootfs: FORCE