[openwrt/openwrt] build: align SOURCE path for build system and SDK
LEDE Commits
lede-commits at lists.infradead.org
Mon Feb 12 08:06:52 PST 2024
aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/131e41614dcfae1f995e55330ada6573ca244ba3
commit 131e41614dcfae1f995e55330ada6573ca244ba3
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Mon Feb 12 16:59:50 2024 +0100
build: align SOURCE path for build system and SDK
Building a package in the build system or the SDK results in different
values for the `SOURCE` property, it's either `packages/<package name>`
or `feeds/base/<package name>`. The reason is that the SDK handles
`openwrt.git` as an external feed called while the build system contains
the *base* packages directly.
Since packages created with either method are (ideally) the same (bit
for bit), align the content of SOURCE. To do so this commit creates a
symlink from `feeds/base` to `$(TOPDIR)/package` and adopts the SOURCE
when building from inside the build system.
Signed-off-by: Paul Spooren <mail at aparcar.org>
---
include/package-defaults.mk | 2 +-
target/imagebuilder/files/Makefile | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/package-defaults.mk b/include/package-defaults.mk
index 30b112c7d8..392aad0d5d 100644
--- a/include/package-defaults.mk
+++ b/include/package-defaults.mk
@@ -20,7 +20,7 @@ define Package/Default
PROVIDES:=
EXTRA_DEPENDS:=
MAINTAINER:=$(PKG_MAINTAINER)
- SOURCE:=$(patsubst $(TOPDIR)/%,%,$(CURDIR))
+ SOURCE:=$(patsubst $(TOPDIR)/%,%,$(patsubst $(TOPDIR)/package/%,feeds/base/%,$(CURDIR)))
ifneq ($(PKG_VERSION),)
ifneq ($(PKG_RELEASE),)
VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 78ec7e2e94..40fba83b5e 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -106,7 +106,8 @@ PROFILE_LIST = $(foreach p,$(PROFILE_NAMES), \
@$(SCRIPT_DIR)/target-metadata.pl profile_mk $< '$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET))' > $@
staging_dir/host/.prereq-build: include/prereq-build.mk
- mkdir -p tmp
+ mkdir -p tmp feeds
+ ln -sf $(TOPDIR)/package $(TOPDIR)/feeds/base
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq IB=1 2>/dev/null || { \
echo "Prerequisite check failed. Use FORCE=1 to override."; \
false; \
More information about the lede-commits
mailing list