[sibyte]: upgrade to 2.6.32.8
[openwrt/svn-archive/archive.git] / scripts / metadata.pl
index 26d878cc9ed0d64685b2285f109c81e9e0f02ee5..c963964ba3ad8e7d781b3f17cb995a6fd518c5ff 100755 (executable)
@@ -152,6 +152,7 @@ sub target_config_features(@) {
 
        while ($_ = shift @_) {
                /broken/ and $ret .= "\tdepends BROKEN\n";
+               /audio/ and $ret .= "\tselect AUDIO_SUPPORT\n";
                /display/ and $ret .= "\tselect DISPLAY_SUPPORT\n";
                /gpio/ and $ret .= "\tselect GPIO_SUPPORT\n";
                /pci/ and $ret .= "\tselect PCI_SUPPORT\n";
@@ -163,6 +164,7 @@ sub target_config_features(@) {
                /ext2/ and $ret .= "\tselect USES_EXT2\n";
                /tgz/ and $ret .= "\tselect USES_TGZ\n";
                /cpiogz/ and $ret .= "\tselect USES_CPIOGZ\n";
+               /ubifs/ and $ret .= "\tselect USES_UBIFS\n";
                /fpu/ and $ret .= "\tselect HAS_FPU\n";
                /ramdisk/ and $ret .= "\tselect USES_INITRAMFS\n";
                /powerpc64/ and $ret .= "\tselect powerpc64\n";
@@ -549,9 +551,10 @@ EOF
                        print <<EOF;
        config FEATURE_$feature->{name}
                bool "$feature->{title}"
-               help
-$feature->{description}
 EOF
+                       $feature->{description} =~ /\w/ and do {
+                               print "\t\thelp\n".$feature->{description}."\n";
+                       };
                }
                print "endchoice\n"
        }
@@ -560,20 +563,24 @@ EOF
 
 sub gen_package_config() {
        parse_package_metadata($ARGV[0]) or exit 1;
-       print "menuconfig UCI_PRECONFIG\n\tbool \"Image configuration\"\n" if %preconfig;
+       print "menuconfig IMAGEOPT\n\tbool \"Image configuration\"\n\tdefault n\n";
        foreach my $preconfig (keys %preconfig) {
                foreach my $cfg (keys %{$preconfig{$preconfig}}) {
                        my $conf = $preconfig{$preconfig}->{$cfg}->{id};
                        $conf =~ tr/\.-/__/;
                        print <<EOF
        config UCI_PRECONFIG_$conf
-               string "$preconfig{$preconfig}->{$cfg}->{label}" if UCI_PRECONFIG
+               string "$preconfig{$preconfig}->{$cfg}->{label}" if IMAGEOPT
                depends PACKAGE_$preconfig
                default "$preconfig{$preconfig}->{$cfg}->{default}"
 
 EOF
                }
        }
+       print "source \"package/*/image-config.in\"\n";
+       if (scalar glob "package/feeds/*/*/image-config.in") {
+           print "source \"package/feeds/*/*/image-config.in\"\n";
+       }
        print_package_features();
        print_package_config_category 'Base system';
        foreach my $cat (keys %category) {
@@ -759,7 +766,7 @@ sub gen_package_mk() {
 $cmds \\
        ) > \$@
        
-ifneq (\$(UCI_PRECONFIG)\$(CONFIG_UCI_PRECONFIG),)
+ifneq (\$(IMAGEOPT)\$(CONFIG_IMAGEOPT),)
   package/preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig
 endif
 EOF