X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=scripts%2Ftarget-metadata.pl;h=a7239166f7b1ffb5d411bafeedc0b79d33d1373d;hb=277f85c21ae0ede4e15e66cbd801b9fb502531df;hp=ca9940e9d910c8508dd068ccab59ff40997eff42;hpb=17ee6bb8f344dd1db027186de272badb6ba2020b;p=openwrt%2Fopenwrt.git diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index ca9940e9d9..a7239166f7 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -39,6 +39,7 @@ sub target_config_features(@) { /low_mem/ and $ret .= "\tselect LOW_MEMORY_FOOTPRINT\n"; /small_flash/ and $ret .= "\tselect SMALL_FLASH\n"; /nand/ and $ret .= "\tselect NAND_SUPPORT\n"; + /virtio/ and $ret .= "\tselect VIRTIO_SUPPORT\n"; } return $ret; } @@ -151,6 +152,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}; @@ -247,10 +266,12 @@ EOF config TARGET_DEVICE_$target->{conf}_$profile->{id} bool "$profile->{name}" depends on TARGET_$target->{conf} + default y if TARGET_ALL_PROFILES 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 +361,18 @@ config LINUX_$v EOF } foreach my $def (sort keys %defaults) { - print "\tconfig DEFAULT_".$def."\n"; - print "\t\tbool\n\n"; + print <