[source] scripts: only generate config from feature flag if fully match

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 14 09:43:39 PST 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/5f03ce1213782c9ddb9bb010dac127bb554092cc

commit 5f03ce1213782c9ddb9bb010dac127bb554092cc
Author: Hauke Mehrtens <hauke.mehrtens at intel.com>
AuthorDate: Tue Mar 14 18:55:02 2017 +0100

    scripts: only generate config from feature flag if fully match
    
    Without this change the code checked if the string was contained in the
    feature option and not if the string matches the complete word. This only
    removes the nand option from the omap24xx target, the other changes are
    only removing options which were added twice.
    
    Signed-off-by: Hauke Mehrtens <hauke.mehrtens at intel.com>
    (cherry picked from commit d5a770f2c139a335e7602bec60dbeabd4add1e8b)
---
 scripts/target-metadata.pl | 62 +++++++++++++++++++++++-----------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index 31de3c7..cbc3403 100755
--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -9,37 +9,37 @@ sub target_config_features(@) {
 	my $ret;
 
 	while ($_ = shift @_) {
-		/arm_v(\w+)/ and $ret .= "\tselect arm_v$1\n";
-		/broken/ and $ret .= "\tdepends on BROKEN\n";
-		/audio/ and $ret .= "\tselect AUDIO_SUPPORT\n";
-		/display/ and $ret .= "\tselect DISPLAY_SUPPORT\n";
-		/dt/ and $ret .= "\tselect USES_DEVICETREE\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";
-		/usbgadget/ and $ret .= "\tselect USB_GADGET_SUPPORT\n";
-		/pcmcia/ and $ret .= "\tselect PCMCIA_SUPPORT\n";
-		/rtc/ and $ret .= "\tselect RTC_SUPPORT\n";
-		/squashfs/ and $ret .= "\tselect USES_SQUASHFS\n";
-		/jffs2$/ and $ret .= "\tselect USES_JFFS2\n";
-		/jffs2_nand/ and $ret .= "\tselect USES_JFFS2_NAND\n";
-		/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";
-		/ramdisk/ and $ret .= "\tselect USES_INITRAMFS\n";
-		/powerpc64/ and $ret .= "\tselect powerpc64\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";
-		/small_flash/ and $ret .= "\tselect SMALL_FLASH\n";
-		/nand/ and $ret .= "\tselect NAND_SUPPORT\n";
-		/virtio/ and $ret .= "\tselect VIRTIO_SUPPORT\n";
+		/^arm_v(\w+)$/ and $ret .= "\tselect arm_v$1\n";
+		/^broken$/ and $ret .= "\tdepends on BROKEN\n";
+		/^audio$/ and $ret .= "\tselect AUDIO_SUPPORT\n";
+		/^display$/ and $ret .= "\tselect DISPLAY_SUPPORT\n";
+		/^dt$/ and $ret .= "\tselect USES_DEVICETREE\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";
+		/^usbgadget$/ and $ret .= "\tselect USB_GADGET_SUPPORT\n";
+		/^pcmcia$/ and $ret .= "\tselect PCMCIA_SUPPORT\n";
+		/^rtc$/ and $ret .= "\tselect RTC_SUPPORT\n";
+		/^squashfs$/ and $ret .= "\tselect USES_SQUASHFS\n";
+		/^jffs2$/ and $ret .= "\tselect USES_JFFS2\n";
+		/^jffs2_nand$/ and $ret .= "\tselect USES_JFFS2_NAND\n";
+		/^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";
+		/^ramdisk$/ and $ret .= "\tselect USES_INITRAMFS\n";
+		/^powerpc64$/ and $ret .= "\tselect powerpc64\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";
+		/^small_flash$/ and $ret .= "\tselect SMALL_FLASH\n";
+		/^nand$/ and $ret .= "\tselect NAND_SUPPORT\n";
+		/^virtio$/ and $ret .= "\tselect VIRTIO_SUPPORT\n";
 	}
 	return $ret;
 }



More information about the lede-commits mailing list