/display/ and $ret .= "\tselect DISPLAY_SUPPORT\n";
/gpio/ and $ret .= "\tselect GPIO_SUPPORT\n";
/pci/ and $ret .= "\tselect PCI_SUPPORT\n";
+ /pcie/ and $ret .= "\tselect PCIE_SUPPORT\n";
/usb/ and $ret .= "\tselect USB_SUPPORT\n";
/pcmcia/ and $ret .= "\tselect PCMCIA_SUPPORT\n";
/squashfs/ and $ret .= "\tselect USES_SQUASHFS\n";
/cpiogz/ and $ret .= "\tselect USES_CPIOGZ\n";
/fpu/ and $ret .= "\tselect HAS_FPU\n";
/ramdisk/ and $ret .= "\tselect USES_INITRAMFS\n";
+ /powerpc64/ and $ret .= "\tselect powerpc64\n";
+ /nommu/ and $ret .= "\tselect NOMMU\n";
}
return $ret;
}
my @depends = @$depends;
foreach my $depend (@depends) {
my $m = "depends";
- $depend =~ s/^([@\+]+)//;
- my $flags = $1;
+ my $flags = "";
+ $depend =~ s/^([@\+]+)// and $flags = $1;
my $vdep;
- my $condition;
+ my $condition = $parent_condition;
if ($depend =~ /^(.+):(.+)$/) {
if ($1 ne "PACKAGE_$pkgname") {
- if ($parent_condition) {
- $condition = "$parent_condition && $1";
+ if ($condition) {
+ $condition = "$condition && $1";
} else {
$condition = $1;
}
undef $category{$cat};
}
+sub print_package_features() {
+ keys %features > 0 or return;
+ print "menu \"Package features\"\n";
+ foreach my $n (keys %features) {
+ my @features = sort { $b->{priority} <=> $a->{priority} or $a->{title} cmp $b->{title} } @{$features{$n}};
+ print <<EOF;
+choice
+ prompt "$features[0]->{target_title}"
+ default FEATURE_$features[0]->{name}
+EOF
+
+ foreach my $feature (@features) {
+ print <<EOF;
+ config FEATURE_$feature->{name}
+ bool "$feature->{title}"
+ help
+$feature->{description}
+EOF
+ }
+ print "endchoice\n"
+ }
+ print "endmenu\n\n";
+}
+
sub gen_package_config() {
parse_package_metadata($ARGV[0]) or exit 1;
print "menuconfig UCI_PRECONFIG\n\tbool \"Image configuration\"\n" if %preconfig;
EOF
}
}
+ print_package_features();
print_package_config_category 'Base system';
foreach my $cat (keys %category) {
print_package_config_category $cat;
foreach my $dep (@deps) {
$pkg_dep = $package{$deps};
if (defined $pkg_dep->{src}) {
- ($pkg->{src} ne $pkg_dep->{src}) and $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
+ ($pkg->{src} ne $pkg_dep->{src}.$suffix) and $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
} elsif (defined($srcpackage{$dep})) {
$idx = $subdir{$dep}.$dep;
}
+ $idx .= $suffix;
undef $idx if $idx =~ /^(kernel)|(base-files)$/;
if ($idx) {
my $depline;
- next if $pkg->{src} eq $pkg_dep->{src};
+ next if $pkg->{src} eq $pkg_dep->{src}.$suffix;
next if $dep{$pkg->{src}."->".$idx};
next if $dep{$pkg->{src}."->($dep)".$idx} and $pkg_dep->{vdepends};
my $depstr;
if ($pkg_dep->{vdepends}) {
- $depstr = "\$(if \$(CONFIG_PACKAGE_$dep),\$(curdir)/$idx$suffix/compile)";
+ $depstr = "\$(if \$(CONFIG_PACKAGE_$dep),\$(curdir)/$idx/compile)";
$dep{$pkg->{src}."->($dep)".$idx} = 1;
} else {
- $depstr = "\$(curdir)/$idx$suffix/compile";
+ $depstr = "\$(curdir)/$idx/compile";
$dep{$pkg->{src}."->".$idx} = 1;
}
$depline = get_conditional_dep($condition, $depstr);