X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2Ftarget-metadata.pl;h=ee0ab5a71811a900a1b79152a3acd924724bf4cf;hb=2fe5319d587c9c66ecbd7acbd5efbc1ff6fac8a8;hp=7f7dc6d4ee77efdb814bd54a0836e6d927f0efee;hpb=c511795f47ddbe7413e07a499f7ff59715ed088a;p=oweals%2Fopenwrt.git diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index 7f7dc6d4ee..ee0ab5a718 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -9,37 +9,40 @@ 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"; + /^rootfs-part$/ and $ret .= "\tselect USES_ROOTFS_PART\n"; + /^boot-part$/ and $ret .= "\tselect USES_BOOT_PART\n"; + /^testing-kernel$/ and $ret .= "\tselect HAS_TESTING_KERNEL\n"; } return $ret; } @@ -81,11 +84,14 @@ sub print_target($) { } my $v = kver($target->{version}); + my $tv = kver($target->{testing_version}); + $tv or $tv = $v; if (@{$target->{subtargets}} == 0) { $confstr = <{conf} bool "$target->{name}" - select LINUX_$v + select LINUX_$v if !TESTING_KERNEL + select LINUX_$tv if TESTING_KERNEL EOF } else { @@ -168,7 +174,7 @@ EOF print <{profiles}->[0]; $profile or next; print <{conf}_$profile->{id} if TARGET_$target->{conf} + default TARGET_$target->{conf}_$profile->{id} if TARGET_$target->{conf} && !BUILDBOT EOF } @@ -256,9 +263,11 @@ menu "Target Devices" config TARGET_ALL_PROFILES bool "Enable all profiles by default" + default BUILDBOT config TARGET_PER_DEVICE_ROOTFS bool "Use a per-device root filesystem that adds profile packages" + default BUILDBOT help When disabled, all device packages from all selected devices will be included in all images by default. (Marked as <*>) You will @@ -287,7 +296,7 @@ EOF menuconfig TARGET_DEVICE_$target->{conf}_$profile->{id} bool "$profile->{name}" depends on TARGET_$target->{conf} - default y if TARGET_ALL_PROFILES + default $profile->{default} EOF my @pkglist = merge_package_lists($target->{packages}, $profile->{packages}); foreach my $pkg (@pkglist) { @@ -382,15 +391,18 @@ EOF my %kver; foreach my $target (@target) { - my $v = kver($target->{version}); - next if $kver{$v}; - $kver{$v} = 1; - print <{version}, $target->{testing_version}) { + next unless $tv; + my $v = kver($tv); + next if $kver{$v}; + $kver{$v} = 1; + print <{id} } @{$cur->{profiles}})."\n"; foreach my $profile (@{$cur->{profiles}}) { print $profile->{id}.'_NAME:='.$profile->{name}."\n"; + print $profile->{id}.'_HAS_IMAGE_METADATA:='.$profile->{has_image_metadata}."\n"; + if (defined($profile->{supported_devices}) and @{$profile->{supported_devices}} > 0) { + print $profile->{id}.'_SUPPORTED_DEVICES:='.join(' ', @{$profile->{supported_devices}})."\n"; + } print $profile->{id}.'_PACKAGES:='.join(' ', @{$profile->{packages}})."\n"; } }