patches: Update openwrt IB patches
This commit is contained in:
parent
09de414e5d
commit
ae5756f475
@ -0,0 +1,42 @@
|
||||
From: Leonardo Mörlein <me@irrelefant.net>
|
||||
Date: Sun, 15 Aug 2021 16:56:46 +0200
|
||||
Subject: imagebuilder: add hostpkgs to imagebuilder
|
||||
|
||||
Before this commit, host packages were not installed into the
|
||||
imagebuilder. This made it impossible to use lua in opkg
|
||||
postinstall scripts in combination with the imagebuilder.
|
||||
|
||||
This commit changes this and ensures, that
|
||||
- staging_dir/hostpkg is installed to the imagebuilder.
|
||||
- staging_dir/hostpkg/lib/lua is installed into the imagebuilder.
|
||||
|
||||
After this commit, we are able to use lua in opkg postinstall
|
||||
scripts in combination with the imagebuilder.
|
||||
|
||||
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
|
||||
index 0580e41c5790d8989ec2daf38e89e046cd1c0862..79bfbbd86fd7ebc4fd888c6b408a2df712c85a81 100644
|
||||
--- a/target/imagebuilder/Makefile
|
||||
+++ b/target/imagebuilder/Makefile
|
||||
@@ -100,12 +100,22 @@ endif
|
||||
| $(XARGS) rm -rf
|
||||
$(INSTALL_DIR) $(IB_IDIR)
|
||||
-$(CP) $(STAGING_DIR_IMAGE)/* $(IB_IDIR)/
|
||||
+ # install staging_dir/host/bin
|
||||
$(INSTALL_DIR) $(PKG_BUILD_DIR)/staging_dir/host/bin
|
||||
$(CP) $(STAGING_DIR_HOST)/bin/* $(PKG_BUILD_DIR)/staging_dir/host/bin/
|
||||
(cd $(PKG_BUILD_DIR); find staging_dir/host/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \
|
||||
$(BUNDLER_COMMAND))
|
||||
$(CP) $(TOPDIR)/staging_dir/host/lib/libfakeroot* $(PKG_BUILD_DIR)/staging_dir/host/lib
|
||||
STRIP=$(STAGING_DIR_HOST)/bin/sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/host/bin/
|
||||
+ # install staging_dir/hostpkg/bin
|
||||
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)/staging_dir/hostpkg/bin
|
||||
+ $(CP) $(STAGING_DIR_HOST)/../hostpkg/bin/* $(PKG_BUILD_DIR)/staging_dir/hostpkg/bin/
|
||||
+ (cd $(PKG_BUILD_DIR); find staging_dir/hostpkg/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \
|
||||
+ $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/hostpkg)
|
||||
+ # install lua libs
|
||||
+ $(CP) $(STAGING_DIR_HOST)/../hostpkg/lib/lua $(PKG_BUILD_DIR)/staging_dir/hostpkg/lib/
|
||||
+ STRIP=sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/hostpkg/bin/
|
||||
+ # bundle
|
||||
(cd $(BUILD_DIR); \
|
||||
tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(IB_NAME) \
|
||||
--mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \
|
@ -0,0 +1,20 @@
|
||||
From: Leonardo Mörlein <me@irrelefant.net>
|
||||
Date: Sun, 15 Aug 2021 17:06:51 +0200
|
||||
Subject: imagebuilder: hacky way add scripts/imagebuilder into IB
|
||||
|
||||
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
|
||||
index 79bfbbd86fd7ebc4fd888c6b408a2df712c85a81..8b89af5c6b490d1ad756fd6c21a8e30a4722a3b6 100644
|
||||
--- a/target/imagebuilder/Makefile
|
||||
+++ b/target/imagebuilder/Makefile
|
||||
@@ -40,6 +40,11 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean
|
||||
$(TMP_DIR)/.packageinfo \
|
||||
$(PKG_BUILD_DIR)/
|
||||
|
||||
+ # add gluon specific build scripts to IB
|
||||
+ $(CP) -L \
|
||||
+ $(TOPDIR)/../scripts/imagebuilder/* \
|
||||
+ $(PKG_BUILD_DIR)/
|
||||
+
|
||||
ifeq ($(CONFIG_IB_STANDALONE),)
|
||||
echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf
|
||||
$(call FeedSourcesAppend,$(PKG_BUILD_DIR)/repositories.conf)
|
@ -1,46 +0,0 @@
|
||||
From: lemoer <git@irrelefant.net>
|
||||
Date: Wed, 6 Jan 2021 05:41:56 +0100
|
||||
Subject: imagebuilder: hacky way to use ib for gluon
|
||||
|
||||
- Include scripts/ into the imagebuilder.
|
||||
- Install openwrt/staging_dir/hostpkg into the imagebuilder.
|
||||
- Install openwrt/staging_dir/hostpkg/lib/lua into the imagebuilder.
|
||||
|
||||
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
|
||||
index 05c7cf3318deb18af1851524c533b1c47af52e1e..e478b5f266cf47a638c82798e8ee596d1820d2ee 100644
|
||||
--- a/target/imagebuilder/Makefile
|
||||
+++ b/target/imagebuilder/Makefile
|
||||
@@ -35,6 +35,11 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean
|
||||
$(TMP_DIR)/.packageinfo \
|
||||
$(PKG_BUILD_DIR)/
|
||||
|
||||
+ mkdir -p $(PKG_BUILD_DIR)/gluon
|
||||
+ $(CP) -L \
|
||||
+ $(TOPDIR)/../scripts \
|
||||
+ $(PKG_BUILD_DIR)/gluon/
|
||||
+
|
||||
ifeq ($(CONFIG_IB_STANDALONE),)
|
||||
echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf
|
||||
$(call FeedSourcesAppend,$(PKG_BUILD_DIR)/repositories.conf)
|
||||
@@ -81,11 +86,21 @@ endif
|
||||
| $(XARGS) rm -rf
|
||||
$(INSTALL_DIR) $(IB_IDIR)
|
||||
-$(CP) $(STAGING_DIR_IMAGE)/* $(IB_IDIR)/
|
||||
+ # install staging_dir/host/bin
|
||||
$(INSTALL_DIR) $(PKG_BUILD_DIR)/staging_dir/host/bin
|
||||
$(CP) $(STAGING_DIR_HOST)/bin/* $(PKG_BUILD_DIR)/staging_dir/host/bin/
|
||||
(cd $(PKG_BUILD_DIR); find staging_dir/host/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \
|
||||
$(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/host)
|
||||
STRIP=sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/host/bin/
|
||||
+ # install staging_dir/hostpkg/bin
|
||||
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)/staging_dir/hostpkg/bin
|
||||
+ $(CP) $(STAGING_DIR_HOST)/../hostpkg/bin/* $(PKG_BUILD_DIR)/staging_dir/hostpkg/bin/
|
||||
+ (cd $(PKG_BUILD_DIR); find staging_dir/hostpkg/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \
|
||||
+ $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/hostpkg)
|
||||
+ # install lua libs
|
||||
+ $(CP) $(STAGING_DIR_HOST)/../hostpkg/lib/lua $(PKG_BUILD_DIR)/staging_dir/hostpkg/lib/
|
||||
+ STRIP=sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/hostpkg/bin/
|
||||
+ # bundle
|
||||
$(TAR) -cf - -C $(BUILD_DIR) $(IB_NAME) | xz -zc -7e > $@
|
||||
|
||||
download:
|
@ -1,19 +0,0 @@
|
||||
From: lemoer <git@irrelefant.net>
|
||||
Date: Wed, 6 Jan 2021 17:23:27 +0100
|
||||
Subject: imagebuilder: hacky way add scripts/imagebuilder into dir
|
||||
|
||||
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
|
||||
index e478b5f266cf47a638c82798e8ee596d1820d2ee..4b538529e950f820aede91275b779ab53f88ff71 100644
|
||||
--- a/target/imagebuilder/Makefile
|
||||
+++ b/target/imagebuilder/Makefile
|
||||
@@ -39,6 +39,10 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean
|
||||
$(CP) -L \
|
||||
$(TOPDIR)/../scripts \
|
||||
$(PKG_BUILD_DIR)/gluon/
|
||||
+ $(CP) -L \
|
||||
+ $(TOPDIR)/../scripts/imagebuilder/* \
|
||||
+ $(PKG_BUILD_DIR)/
|
||||
+ echo "{}" > $(PKG_BUILD_DIR)/custom.json
|
||||
|
||||
ifeq ($(CONFIG_IB_STANDALONE),)
|
||||
echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf
|
Loading…
Reference in New Issue
Block a user