kernel: bump 5.4 to 5.4.119
[openwrt/openwrt.git] / scripts / target-metadata.pl
index ee0ab5a71811a900a1b79152a3acd924724bf4cf..78f77b16d5f8d7076de75e177cb705cccb592cf7 100755 (executable)
@@ -20,6 +20,7 @@ sub target_config_features(@) {
                /^usb$/ and $ret .= "\tselect USB_SUPPORT\n";
                /^usbgadget$/ and $ret .= "\tselect USB_GADGET_SUPPORT\n";
                /^pcmcia$/ and $ret .= "\tselect PCMCIA_SUPPORT\n";
+               /^pwm$/ and $ret .= "\select PWM_SUPPORT\n";
                /^rtc$/ and $ret .= "\tselect RTC_SUPPORT\n";
                /^squashfs$/ and $ret .= "\tselect USES_SQUASHFS\n";
                /^jffs2$/ and $ret .= "\tselect USES_JFFS2\n";
@@ -239,6 +240,7 @@ config TARGET_$target->{conf}_$profile->{id}
        bool "$profile->{name}"
        depends on TARGET_$target->{conf}
 EOF
+                       $profile->{broken} and print "\tdepends on BROKEN\n";
                        my @pkglist = merge_package_lists($target->{packages}, $profile->{packages});
                        foreach my $pkg (@pkglist) {
                                print "\tselect DEFAULT_$pkg\n";
@@ -298,6 +300,7 @@ menuconfig TARGET_DEVICE_$target->{conf}_$profile->{id}
        depends on TARGET_$target->{conf}
        default $profile->{default}
 EOF
+                       $profile->{broken} and print "\tdepends on BROKEN\n";
                        my @pkglist = merge_package_lists($target->{packages}, $profile->{packages});
                        foreach my $pkg (@pkglist) {
                                print "\tselect DEFAULT_$pkg if !TARGET_PER_DEVICE_ROOTFS\n";
@@ -426,7 +429,8 @@ sub gen_profile_mk() {
        my @targets = parse_target_metadata($file);
        foreach my $cur (@targets) {
                next unless $cur->{id} eq $target;
-               print "PROFILE_NAMES = ".join(" ", map { $_->{id} } @{$cur->{profiles}})."\n";
+               my @profile_ids_unique =  do { my %seen; grep { !$seen{$_}++} map { $_->{id} } @{$cur->{profiles}}};
+               print "PROFILE_NAMES = ".join(" ", @profile_ids_unique)."\n";
                foreach my $profile (@{$cur->{profiles}}) {
                        print $profile->{id}.'_NAME:='.$profile->{name}."\n";
                        print $profile->{id}.'_HAS_IMAGE_METADATA:='.$profile->{has_image_metadata}."\n";