X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2Ftarget-metadata.pl;h=07160dc4ea2c890886a2401a0ba1b597b0337afb;hb=e9165793409ceccaeef6674c691b875a83fcb97f;hp=ea6462c94fea62d1b64e8ebe0f4954c163260234;hpb=30acacb0afc6255ae68bc4f3ae4365a8ec46f353;p=librecmc%2Flibrecmc.git diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index ea6462c94f..07160dc4ea 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -27,6 +27,7 @@ sub target_config_features(@) { /ext4/ and $ret .= "\tselect USES_EXT4\n"; /targz/ and $ret .= "\tselect USES_TARGZ\n"; /cpiogz/ and $ret .= "\tselect USES_CPIOGZ\n"; + /minor/ and $ret .= "\tselect USES_MINOR\n"; /ubifs/ and $ret .= "\tselect USES_UBIFS\n"; /fpu/ and $ret .= "\tselect HAS_FPU\n"; /spe_fpu/ and $ret .= "\tselect HAS_SPE_FPU\n"; @@ -38,6 +39,7 @@ sub target_config_features(@) { /low_mem/ and $ret .= "\tselect LOW_MEMORY_FOOTPRINT\n"; /small_flash/ and $ret .= "\tselect SMALL_FLASH\n"; /nand/ and $ret .= "\tselect NAND_SUPPORT\n"; + /virtio/ and $ret .= "\tselect VIRTIO_SUPPORT\n"; } return $ret; } @@ -150,6 +152,18 @@ sub gen_target_config() { target_name($a) cmp target_name($b); } @target; + foreach my $target (@target_sort) { + next if @{$target->{subtargets}} > 0; + print <{conf} + bool + depends on TARGET_PER_DEVICE_ROOTFS + default y if TARGET_$target->{conf} +EOF + foreach my $pkg (@{$target->{packages}}) { + print "\tselect DEFAULT_$pkg if TARGET_PER_DEVICE_ROOTFS\n"; + } + } print <{profiles}; foreach my $profile (@{$target->{profiles}}) { next unless $profile->{id} =~ /^DEVICE_/; print <{conf}_$profile->{id} +menuconfig TARGET_DEVICE_$target->{conf}_$profile->{id} bool "$profile->{name}" depends on TARGET_$target->{conf} + default y if TARGET_ALL_PROFILES EOF my @pkglist = merge_package_lists($target->{packages}, $profile->{packages}); foreach my $pkg (@pkglist) { - print "\tselect DEFAULT_$pkg\n"; + print "\tselect DEFAULT_$pkg if !TARGET_PER_DEVICE_ROOTFS\n"; + print "\tselect MODULE_DEFAULT_$pkg if TARGET_PER_DEVICE_ROOTFS\n"; $defaults{$pkg} = 1; } + + print <{conf}_$profile->{id} + string "$profile->{name} additional packages" + default "" + depends on TARGET_PER_DEVICE_ROOTFS + depends on TARGET_DEVICE_$target->{conf}_$profile->{id} + +EOF } } @@ -339,8 +372,18 @@ config LINUX_$v EOF } foreach my $def (sort keys %defaults) { - print "\tconfig DEFAULT_".$def."\n"; - print "\t\tbool\n\n"; + print <