Bump buildroot to 2019.02
This commit is contained in:
58
bsp/buildroot/support/kconfig/streamline_config.pl
Normal file → Executable file
58
bsp/buildroot/support/kconfig/streamline_config.pl
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/perl -w
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# Copyright 2005-2009 - Steven Rostedt
|
||||
# Licensed under the terms of the GNU GPL License version 2
|
||||
@@ -42,6 +42,7 @@
|
||||
# mv config_strip .config
|
||||
# make oldconfig
|
||||
#
|
||||
use warnings;
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
|
||||
@@ -137,7 +138,7 @@ my $ksource = ($ARGV[0] ? $ARGV[0] : '.');
|
||||
my $kconfig = $ARGV[1];
|
||||
my $lsmod_file = $ENV{'LSMOD'};
|
||||
|
||||
my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
|
||||
my @makefiles = `find $ksource -name Makefile -or -name Kbuild 2>/dev/null`;
|
||||
chomp @makefiles;
|
||||
|
||||
my %depends;
|
||||
@@ -188,7 +189,7 @@ sub read_kconfig {
|
||||
$cont = 0;
|
||||
|
||||
# collect any Kconfig sources
|
||||
if (/^source\s*"(.*)"/) {
|
||||
if (/^source\s+"?([^"]+)/) {
|
||||
my $kconfig = $1;
|
||||
# prevent reading twice.
|
||||
if (!defined($read_kconfigs{$kconfig})) {
|
||||
@@ -219,6 +220,13 @@ sub read_kconfig {
|
||||
$depends{$config} = $1;
|
||||
} elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) {
|
||||
$depends{$config} .= " " . $1;
|
||||
} elsif ($state eq "DEP" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) {
|
||||
my $dep = $3;
|
||||
if ($dep !~ /^\s*(y|m|n)\s*$/) {
|
||||
$dep =~ s/.*\sif\s+//;
|
||||
$depends{$config} .= " " . $dep;
|
||||
dprint "Added default depends $dep to $config\n";
|
||||
}
|
||||
|
||||
# Get the configs that select this config
|
||||
} elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) {
|
||||
@@ -230,7 +238,7 @@ sub read_kconfig {
|
||||
}
|
||||
|
||||
# configs without prompts must be selected
|
||||
} elsif ($state ne "NONE" && /^\s*tristate\s\S/) {
|
||||
} elsif ($state ne "NONE" && /^\s*(tristate\s+\S|prompt\b)/) {
|
||||
# note if the config has a prompt
|
||||
$prompts{$config} = 1;
|
||||
|
||||
@@ -249,8 +257,8 @@ sub read_kconfig {
|
||||
|
||||
$iflevel-- if ($iflevel);
|
||||
|
||||
# stop on "help"
|
||||
} elsif (/^\s*help\s*$/) {
|
||||
# stop on "help" and keywords that end a menu entry
|
||||
} elsif (/^\s*(---)?help(---)?\s*$/ || /^(comment|choice|menu)\b/) {
|
||||
$state = "NONE";
|
||||
}
|
||||
}
|
||||
@@ -447,7 +455,7 @@ sub parse_config_depends
|
||||
$p =~ s/^[^$valid]*[$valid]+//;
|
||||
|
||||
# We only need to process if the depend config is a module
|
||||
if (!defined($orig_configs{$conf}) || !$orig_configs{conf} eq "m") {
|
||||
if (!defined($orig_configs{$conf}) || $orig_configs{$conf} eq "y") {
|
||||
next;
|
||||
}
|
||||
|
||||
@@ -582,7 +590,7 @@ while ($repeat) {
|
||||
|
||||
# Now we need to see if we have to check selects;
|
||||
loop_select;
|
||||
}
|
||||
}
|
||||
|
||||
my %setconfigs;
|
||||
|
||||
@@ -603,6 +611,40 @@ foreach my $line (@config_file) {
|
||||
next;
|
||||
}
|
||||
|
||||
if (/CONFIG_MODULE_SIG_KEY="(.+)"/) {
|
||||
my $orig_cert = $1;
|
||||
my $default_cert = "certs/signing_key.pem";
|
||||
|
||||
# Check that the logic in this script still matches the one in Kconfig
|
||||
if (!defined($depends{"MODULE_SIG_KEY"}) ||
|
||||
$depends{"MODULE_SIG_KEY"} !~ /"\Q$default_cert\E"/) {
|
||||
print STDERR "WARNING: MODULE_SIG_KEY assertion failure, ",
|
||||
"update needed to ", __FILE__, " line ", __LINE__, "\n";
|
||||
print;
|
||||
} elsif ($orig_cert ne $default_cert && ! -f $orig_cert) {
|
||||
print STDERR "Module signature verification enabled but ",
|
||||
"module signing key \"$orig_cert\" not found. Resetting ",
|
||||
"signing key to default value.\n";
|
||||
print "CONFIG_MODULE_SIG_KEY=\"$default_cert\"\n";
|
||||
} else {
|
||||
print;
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
if (/CONFIG_SYSTEM_TRUSTED_KEYS="(.+)"/) {
|
||||
my $orig_keys = $1;
|
||||
|
||||
if (! -f $orig_keys) {
|
||||
print STDERR "System keyring enabled but keys \"$orig_keys\" ",
|
||||
"not found. Resetting keys to default value.\n";
|
||||
print "CONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n";
|
||||
} else {
|
||||
print;
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^(CONFIG.*)=(m|y)/) {
|
||||
if (defined($configs{$1})) {
|
||||
if ($localyesconfig) {
|
||||
|
||||
Reference in New Issue
Block a user