include/image.mk: make tar reproducible
[openwrt/staging/yousong.git] / scripts / metadata.pl
index bfb9ab50e2eddead8caa8dcc11d2b689e56afbfd..54341c458fd78747eae0219a863c1b5cd1f358a2 100755 (executable)
@@ -205,11 +205,11 @@ EOF
                grep { /broken/ } @{$target->{features}} and $confstr .= "\tdepends on BROKEN\n";
        } else {
                $confstr .= $features;
+               if ($target->{arch} =~ /\w/) {
+                       $confstr .= "\tselect $target->{arch}\n";
+               }
        }
 
-       if ($target->{arch} =~ /\w/) {
-               $confstr .= "\tselect $target->{arch}\n";
-       }
        foreach my $dep (@{$target->{depends}}) {
                my $mode = "depends on";
                my $flags;
@@ -545,7 +545,11 @@ sub print_package_config_category($) {
                        print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." $title\n";
                        print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n";
                        unless ($pkg->{hidden}) {
-                               $pkg->{default} ||= "m if ALL";
+                               if ($pkg->{name} =~ /^kmod-/) {
+                                       $pkg->{default} ||= "m if ALL_KMODS";
+                               } else {
+                                       $pkg->{default} ||= "m if ALL";
+                               }
                        }
                        if ($pkg->{default}) {
                                foreach my $default (split /\s*,\s*/, $pkg->{default}) {