build: add a feature flag for low-memory systems
[openwrt/openwrt.git] / scripts / metadata.pl
index f075525e1dadea8256844edede19a3a0f12afc22..250a85ed84e2e343678bf9c44221bab7cec143e7 100755 (executable)
@@ -75,7 +75,10 @@ sub parse_target_metadata() {
        }
        close FILE;
        foreach my $target (@target) {
        }
        close FILE;
        foreach my $target (@target) {
-               next if @{$target->{subtargets}} > 0;
+               if (@{$target->{subtargets}} > 0) {
+                       $target->{profiles} = [];
+                       next;
+               }
                @{$target->{profiles}} > 0 or $target->{profiles} = [
                        {
                                id => 'Default',
                @{$target->{profiles}} > 0 or $target->{profiles} = [
                        {
                                id => 'Default',
@@ -180,6 +183,7 @@ sub target_config_features(@) {
                /nommu/ and $ret .= "\tselect NOMMU\n";
                /mips16/ and $ret .= "\tselect HAS_MIPS16\n";
                /rfkill/ and $ret .= "\tselect RFKILL_SUPPORT\n";
                /nommu/ and $ret .= "\tselect NOMMU\n";
                /mips16/ and $ret .= "\tselect HAS_MIPS16\n";
                /rfkill/ and $ret .= "\tselect RFKILL_SUPPORT\n";
+               /low_mem/ and $ret .= "\tselect LOW_MEMORY_FOOTPRINT\n";
        }
        return $ret;
 }
        }
        return $ret;
 }