Skip to content

Commit 0333da8

Browse files
committed
include: group kmod ipk files into a "kernel" subdirectory
This is useful to just use the kmods from an official build while supplying base packages from a custom feed or the other way around; for just overriding the kmods with a local repo while using official repos for the rest. Signed-off-by: Jo-Philipp Wich <[email protected]> SVN-Revision: 48475
1 parent 96afb90 commit 0333da8

File tree

8 files changed

+16
-14
lines changed

8 files changed

+16
-14
lines changed

include/feeds.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# See /LICENSE for more information.
66
#
77

8-
-include $(TMP_DIR)/.packagefeeds
8+
-include $(TMP_DIR)/.packagesubdirs
99

1010
FEEDS_AVAILABLE:=$(shell $(SCRIPT_DIR)/feeds list -n)
1111
FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*))
@@ -21,15 +21,15 @@ PKG_CONFIG_DEPENDS += \
2121
# 1: package name
2222
define FeedPackageDir
2323
$(strip $(if $(CONFIG_PER_FEED_REPO), \
24-
$(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/feed),$(Package/$(1)/feed),base)), \
24+
$(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/subdir),$(Package/$(1)/subdir),base)), \
2525
$(PACKAGE_DIR)))
2626
endef
2727

2828
# 1: destination file
2929
define FeedSourcesAppend
3030
( \
3131
$(strip $(if $(CONFIG_PER_FEED_REPO), \
32-
$(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \
32+
$(foreach feed,base kernel $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \
3333
$(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
3434
$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \
3535
, \

include/kernel.mk

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ define KernelPackage
155155
DESCRIPTION:=$(DESCRIPTION)
156156
EXTRA_DEPENDS:=kernel (=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC))
157157
VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),+$(PKG_VERSION))-$(if $(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE))
158+
PACKAGE_SUBDIR:=kernel
158159
$(call KernelPackage/$(1))
159160
$(call KernelPackage/$(1)/$(BOARD))
160161
endef

include/package-defaults.mk

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ define Package/Default
1717
CONFIGFILE:=
1818
SECTION:=opt
1919
CATEGORY:=Extra packages
20+
PACKAGE_SUBDIR:=$(FEED)
2021
DEPENDS:=
2122
MDEPENDS:=
2223
CONFLICTS:=

include/package-dumpinfo.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ $(if $(PKG_LICENSE),License: $(PKG_LICENSE)
5151
$(if $(KCONFIG),Kernel-Config: $(KCONFIG)
5252
)$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
5353
)$(if $(HIDDEN),Hidden: $(HIDDEN)
54-
)$(if $(FEED),Feed: $(FEED)
54+
)$(if $(PACKAGE_SUBDIR),Package-Subdir: $(PACKAGE_SUBDIR)
5555
)Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
5656
$(if $(URL),$(URL)
5757
)$(MAINTAINER)

include/toplevel.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ prepare-tmpinfo: FORCE
8484
f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
8585
[ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $(_ignore) $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
8686
done
87-
[ tmp/.config-feeds.in -nt tmp/.packagefeeds ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
87+
[ tmp/.config-feeds.in -nt tmp/.packagesubdirs ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
8888
./scripts/metadata.pl package_mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
89-
./scripts/metadata.pl package_feeds tmp/.packageinfo > tmp/.packagefeeds || { rm -f tmp/.packagefeeds; false; }
89+
./scripts/metadata.pl package_subdirs tmp/.packageinfo > tmp/.packagesubdirs || { rm -f tmp/.packagesubdirs; false; }
9090
touch $(TOPDIR)/tmp/.build
9191

9292
.config: ./scripts/config/conf $(if $(CONFIG_HAVE_DOT_CONFIG),,prepare-tmpinfo)

package/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ endif
137137
PACKAGE_SUBDIRS=.
138138
ifneq ($(CONFIG_PER_FEED_REPO),)
139139
ifneq ($(CONFIG_PER_FEED_REPO_ADD_DISABLED),)
140-
PACKAGE_SUBDIRS=base $(FEEDS_AVAILABLE)
140+
PACKAGE_SUBDIRS=base kernel $(FEEDS_AVAILABLE)
141141
else
142-
PACKAGE_SUBDIRS=base $(FEEDS_ENABLED)
142+
PACKAGE_SUBDIRS=base kernel $(FEEDS_ENABLED)
143143
endif
144144
endif
145145

scripts/metadata.pl

+5-5
Original file line numberDiff line numberDiff line change
@@ -833,12 +833,12 @@ ()
833833
}
834834
}
835835

836-
sub gen_package_feeds() {
836+
sub gen_package_subdirs() {
837837
parse_package_metadata($ARGV[0]) or exit 1;
838838
foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
839839
my $pkg = $package{$name};
840-
if ($pkg->{name} && $pkg->{feed}) {
841-
print "Package/$name/feed = $pkg->{feed}\n";
840+
if ($pkg->{name} && $pkg->{package_subdir}) {
841+
print "Package/$name/subdir = $pkg->{package_subdir}\n";
842842
}
843843
}
844844
}
@@ -880,7 +880,7 @@ ()
880880
/^package_config$/ and return gen_package_config();
881881
/^kconfig/ and return gen_kconfig_overrides();
882882
/^package_source$/ and return gen_package_source();
883-
/^package_feeds$/ and return gen_package_feeds();
883+
/^package_subdirs$/ and return gen_package_subdirs();
884884
/^package_license$/ and return gen_package_license(0);
885885
/^package_licensefull$/ and return gen_package_license(1);
886886
/^version_filter$/ and return gen_version_filtered_list();
@@ -892,7 +892,7 @@ ()
892892
$0 package_config [file] Package metadata in Kconfig format
893893
$0 kconfig [file] [config] [patchver] Kernel config overrides
894894
$0 package_source [file] Package source file information
895-
$0 package_feeds [file] Package feed information in makefile format
895+
$0 package_subdirs [file] Package subdir information in makefile format
896896
$0 package_license [file] Package license information
897897
$0 package_licensefull [file] Package license information (full list)
898898
$0 version_filter [patchver] [list...] Filter list of version tagged strings

scripts/metadata.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ sub parse_package_metadata($) {
222222
/^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ split /\s+/, $1 ];
223223
/^Build-Depends\/(\w+): \s*(.+)\s*$/ and $pkg->{"builddepends/$1"} = [ split /\s+/, $2 ];
224224
/^Build-Types:\s*(.+)\s*$/ and $pkg->{buildtypes} = [ split /\s+/, $1 ];
225-
/^Feed:\s*(.+?)\s*$/ and $pkg->{feed} = $1;
225+
/^Package-Subdir:\s*(.+?)\s*$/ and $pkg->{package_subdir} = $1;
226226
/^Category: \s*(.+)\s*$/ and do {
227227
$pkg->{category} = $1;
228228
defined $category{$1} or $category{$1} = {};

0 commit comments

Comments
 (0)