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 <jow@openwrt.org>

SVN-Revision: 48475
master
Jo-Philipp Wich 9 years ago
parent 96afb90f3f
commit 0333da8943
  1. 6
      include/feeds.mk
  2. 1
      include/kernel.mk
  3. 1
      include/package-defaults.mk
  4. 2
      include/package-dumpinfo.mk
  5. 4
      include/toplevel.mk
  6. 4
      package/Makefile
  7. 10
      scripts/metadata.pl
  8. 2
      scripts/metadata.pm

@ -5,7 +5,7 @@
# See /LICENSE for more information. # See /LICENSE for more information.
# #
-include $(TMP_DIR)/.packagefeeds -include $(TMP_DIR)/.packagesubdirs
FEEDS_AVAILABLE:=$(shell $(SCRIPT_DIR)/feeds list -n) FEEDS_AVAILABLE:=$(shell $(SCRIPT_DIR)/feeds list -n)
FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*)) FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*))
@ -21,7 +21,7 @@ PKG_CONFIG_DEPENDS += \
# 1: package name # 1: package name
define FeedPackageDir define FeedPackageDir
$(strip $(if $(CONFIG_PER_FEED_REPO), \ $(strip $(if $(CONFIG_PER_FEED_REPO), \
$(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/feed),$(Package/$(1)/feed),base)), \ $(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/subdir),$(Package/$(1)/subdir),base)), \
$(PACKAGE_DIR))) $(PACKAGE_DIR)))
endef endef
@ -29,7 +29,7 @@ endef
define FeedSourcesAppend define FeedSourcesAppend
( \ ( \
$(strip $(if $(CONFIG_PER_FEED_REPO), \ $(strip $(if $(CONFIG_PER_FEED_REPO), \
$(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \ $(foreach feed,base kernel $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \
$(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \ $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \ $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \
, \ , \

@ -155,6 +155,7 @@ define KernelPackage
DESCRIPTION:=$(DESCRIPTION) DESCRIPTION:=$(DESCRIPTION)
EXTRA_DEPENDS:=kernel (=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)) EXTRA_DEPENDS:=kernel (=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC))
VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),+$(PKG_VERSION))-$(if $(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE)) VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),+$(PKG_VERSION))-$(if $(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE))
PACKAGE_SUBDIR:=kernel
$(call KernelPackage/$(1)) $(call KernelPackage/$(1))
$(call KernelPackage/$(1)/$(BOARD)) $(call KernelPackage/$(1)/$(BOARD))
endef endef

@ -17,6 +17,7 @@ define Package/Default
CONFIGFILE:= CONFIGFILE:=
SECTION:=opt SECTION:=opt
CATEGORY:=Extra packages CATEGORY:=Extra packages
PACKAGE_SUBDIR:=$(FEED)
DEPENDS:= DEPENDS:=
MDEPENDS:= MDEPENDS:=
CONFLICTS:= CONFLICTS:=

@ -51,7 +51,7 @@ $(if $(PKG_LICENSE),License: $(PKG_LICENSE)
$(if $(KCONFIG),Kernel-Config: $(KCONFIG) $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
)$(if $(BUILDONLY),Build-Only: $(BUILDONLY) )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
)$(if $(HIDDEN),Hidden: $(HIDDEN) )$(if $(HIDDEN),Hidden: $(HIDDEN)
)$(if $(FEED),Feed: $(FEED) )$(if $(PACKAGE_SUBDIR),Package-Subdir: $(PACKAGE_SUBDIR)
)Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE)) )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
$(if $(URL),$(URL) $(if $(URL),$(URL)
)$(MAINTAINER) )$(MAINTAINER)

@ -84,9 +84,9 @@ prepare-tmpinfo: FORCE
f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \ f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
[ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $(_ignore) $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \ [ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $(_ignore) $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
done done
[ tmp/.config-feeds.in -nt tmp/.packagefeeds ] || ./scripts/feeds feed_config > tmp/.config-feeds.in [ tmp/.config-feeds.in -nt tmp/.packagesubdirs ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
./scripts/metadata.pl package_mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; } ./scripts/metadata.pl package_mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
./scripts/metadata.pl package_feeds tmp/.packageinfo > tmp/.packagefeeds || { rm -f tmp/.packagefeeds; false; } ./scripts/metadata.pl package_subdirs tmp/.packageinfo > tmp/.packagesubdirs || { rm -f tmp/.packagesubdirs; false; }
touch $(TOPDIR)/tmp/.build touch $(TOPDIR)/tmp/.build
.config: ./scripts/config/conf $(if $(CONFIG_HAVE_DOT_CONFIG),,prepare-tmpinfo) .config: ./scripts/config/conf $(if $(CONFIG_HAVE_DOT_CONFIG),,prepare-tmpinfo)

@ -137,9 +137,9 @@ endif
PACKAGE_SUBDIRS=. PACKAGE_SUBDIRS=.
ifneq ($(CONFIG_PER_FEED_REPO),) ifneq ($(CONFIG_PER_FEED_REPO),)
ifneq ($(CONFIG_PER_FEED_REPO_ADD_DISABLED),) ifneq ($(CONFIG_PER_FEED_REPO_ADD_DISABLED),)
PACKAGE_SUBDIRS=base $(FEEDS_AVAILABLE) PACKAGE_SUBDIRS=base kernel $(FEEDS_AVAILABLE)
else else
PACKAGE_SUBDIRS=base $(FEEDS_ENABLED) PACKAGE_SUBDIRS=base kernel $(FEEDS_ENABLED)
endif endif
endif endif

@ -833,12 +833,12 @@ sub gen_package_source() {
} }
} }
sub gen_package_feeds() { sub gen_package_subdirs() {
parse_package_metadata($ARGV[0]) or exit 1; parse_package_metadata($ARGV[0]) or exit 1;
foreach my $name (sort {uc($a) cmp uc($b)} keys %package) { foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
my $pkg = $package{$name}; my $pkg = $package{$name};
if ($pkg->{name} && $pkg->{feed}) { if ($pkg->{name} && $pkg->{package_subdir}) {
print "Package/$name/feed = $pkg->{feed}\n"; print "Package/$name/subdir = $pkg->{package_subdir}\n";
} }
} }
} }
@ -880,7 +880,7 @@ sub parse_command() {
/^package_config$/ and return gen_package_config(); /^package_config$/ and return gen_package_config();
/^kconfig/ and return gen_kconfig_overrides(); /^kconfig/ and return gen_kconfig_overrides();
/^package_source$/ and return gen_package_source(); /^package_source$/ and return gen_package_source();
/^package_feeds$/ and return gen_package_feeds(); /^package_subdirs$/ and return gen_package_subdirs();
/^package_license$/ and return gen_package_license(0); /^package_license$/ and return gen_package_license(0);
/^package_licensefull$/ and return gen_package_license(1); /^package_licensefull$/ and return gen_package_license(1);
/^version_filter$/ and return gen_version_filtered_list(); /^version_filter$/ and return gen_version_filtered_list();
@ -892,7 +892,7 @@ Available Commands:
$0 package_config [file] Package metadata in Kconfig format $0 package_config [file] Package metadata in Kconfig format
$0 kconfig [file] [config] [patchver] Kernel config overrides $0 kconfig [file] [config] [patchver] Kernel config overrides
$0 package_source [file] Package source file information $0 package_source [file] Package source file information
$0 package_feeds [file] Package feed information in makefile format $0 package_subdirs [file] Package subdir information in makefile format
$0 package_license [file] Package license information $0 package_license [file] Package license information
$0 package_licensefull [file] Package license information (full list) $0 package_licensefull [file] Package license information (full list)
$0 version_filter [patchver] [list...] Filter list of version tagged strings $0 version_filter [patchver] [list...] Filter list of version tagged strings

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

Loading…
Cancel
Save