From 76341cfc5f71fb3658535bc21b001399a84f8816 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 22 Jul 2016 14:27:52 +0200 Subject: build: add support for per-device rootfs based on device profile packges Signed-off-by: Felix Fietkau --- scripts/target-metadata.pl | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index ca9940e9d9..7dd782a6c2 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -151,6 +151,18 @@ sub gen_target_config() { target_name($a) cmp target_name($b); } @target; + foreach my $target (@target_sort) { + next if @{$target->{subtargets}} > 0; + print <{conf} + bool + depends on TARGET_PER_DEVICE_ROOTFS + default y if TARGET_$target->{conf} +EOF + foreach my $pkg (@{$target->{packages}}) { + print "\tselect DEFAULT_$pkg if TARGET_PER_DEVICE_ROOTFS\n"; + } + } print <{profiles}; @@ -250,7 +265,8 @@ config TARGET_DEVICE_$target->{conf}_$profile->{id} EOF my @pkglist = merge_package_lists($target->{packages}, $profile->{packages}); foreach my $pkg (@pkglist) { - print "\tselect DEFAULT_$pkg\n"; + print "\tselect DEFAULT_$pkg if !TARGET_PER_DEVICE_ROOTFS\n"; + print "\tselect MODULE_DEFAULT_$pkg if TARGET_PER_DEVICE_ROOTFS\n"; $defaults{$pkg} = 1; } } @@ -340,8 +356,18 @@ config LINUX_$v EOF } foreach my $def (sort keys %defaults) { - print "\tconfig DEFAULT_".$def."\n"; - print "\t\tbool\n\n"; + print <