Yocto 2.5

Move OpenBMC to Yocto 2.5(sumo)

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I5c5ad6904a16e14c1c397f0baf10c9d465594a78
diff --git a/import-layers/yocto-poky/scripts/buildhistory-diff b/import-layers/yocto-poky/scripts/buildhistory-diff
index e79cb7a..70805b0 100755
--- a/import-layers/yocto-poky/scripts/buildhistory-diff
+++ b/import-layers/yocto-poky/scripts/buildhistory-diff
@@ -38,7 +38,7 @@
     parser.add_argument('-a', '--report-all',
                         action='store_true',
                         dest='report_all',
-                        default='False',
+                        default=False,
                         help="Report all changes, not just the default significant ones")
     parser.add_argument('-s', '---signatures',
                         action='store_true',
@@ -53,6 +53,10 @@
     parser.add_argument('-e', '--exclude-path',
                         action='append',
                         help="Exclude path from the output")
+    parser.add_argument('-c', '--colour',
+                        choices=('yes', 'no', 'auto'),
+                        default="auto",
+                        help="Whether to colourise (defaults to auto)")
     parser.add_argument('revisions',
                         default = ['build-minus-1', 'HEAD'],
                         nargs='*',
@@ -107,10 +111,11 @@
     elif len(args.revisions) == 2:
         fromrev, torev = args.revisions
 
-    from oe.buildhistory_analysis import process_changes
-
+    from oe.buildhistory_analysis import init_colours, process_changes
     import gitdb
 
+    init_colours({"yes": True, "no": False, "auto": sys.stdout.isatty()}[args.colour])
+
     try:
         changes = process_changes(args.buildhistory_dir, fromrev, torev,
                                   args.report_all, args.report_ver, args.sigs,
diff --git a/import-layers/yocto-poky/scripts/contrib/bbvars.py b/import-layers/yocto-poky/scripts/contrib/bbvars.py
index d8d0594..286b5a9 100755
--- a/import-layers/yocto-poky/scripts/contrib/bbvars.py
+++ b/import-layers/yocto-poky/scripts/contrib/bbvars.py
@@ -23,62 +23,38 @@
 import os.path
 import re
 
+# Set up sys.path to let us import tinfoil
+scripts_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+lib_path = scripts_path + '/lib'
+sys.path.insert(0, lib_path)
+import scriptpath
+scriptpath.add_bitbake_lib_path()
+import bb.tinfoil
+
 def usage():
-    print('Usage: %s -d FILENAME [-d FILENAME]* -m METADIR [-m MATADIR]*' % os.path.basename(sys.argv[0]))
+    print('Usage: %s -d FILENAME [-d FILENAME]*' % os.path.basename(sys.argv[0]))
     print('  -d FILENAME         documentation file to search')
     print('  -h, --help          display this help and exit')
-    print('  -m METADIR          meta directory to search for recipes')
     print('  -t FILENAME         documentation config file (for doc tags)')
     print('  -T                  Only display variables with doc tags (requires -t)')
 
-def recipe_bbvars(recipe):
-    ''' Return a unique set of every bbvar encountered in the recipe '''
-    prog = re.compile("[A-Z_]+")
-    vset = set()
-    try:
-        r = open(recipe)
-    except IOError as err:
-        print('WARNING: Failed to open recipe ', recipe)
-        print(err.args[1])
+def bbvar_is_documented(var, documented_vars):
+    ''' Check if variable (var) is in the list of documented variables(documented_vars) '''
+    if var in documented_vars:
+        return True
+    else:
+        return False
 
-    for line in r:
-        # Strip any comments from the line
-        line = line.rsplit('#')[0]
-        vset = vset.union(set(prog.findall(line)))
-    r.close()
+def collect_documented_vars(docfiles):
+    ''' Walk the docfiles and collect the documented variables '''
+    documented_vars = []
+    prog = re.compile(".*($|[^A-Z_])<glossentry id=\'var-")
+    var_prog = re.compile('<glossentry id=\'var-(.*)\'>')
+    for d in docfiles:
+        with open(d) as f:
+            documented_vars += var_prog.findall(f.read())
 
-    bbvars = {}
-    for v in vset:
-        bbvars[v] = 1
-
-    return bbvars
-
-def collect_bbvars(metadir):
-    ''' Walk the metadir and collect the bbvars from each recipe found '''
-    bbvars = {}
-    for root,dirs,files in os.walk(metadir):
-        for name in files:
-            if name.find(".bb") >= 0:
-                for key in recipe_bbvars(os.path.join(root,name)).keys():
-                    if key in bbvars:
-                        bbvars[key] = bbvars[key] + 1
-                    else:
-                        bbvars[key] = 1
-    return bbvars
-
-def bbvar_is_documented(var, docfiles):
-    prog = re.compile(".*($|[^A-Z_])%s([^A-Z_]|$)" % (var))
-    for doc in docfiles:
-        try:
-            f = open(doc)
-        except IOError as err:
-            print('WARNING: Failed to open doc ', doc)
-            print(err.args[1])
-        for line in f:
-            if prog.match(line):
-                return True
-        f.close()
-    return False
+    return documented_vars
 
 def bbvar_doctag(var, docconf):
     prog = re.compile('^%s\[doc\] *= *"(.*)"' % (var))
@@ -100,8 +76,7 @@
 
 def main():
     docfiles = []
-    metadirs = []
-    bbvars = {}
+    bbvars = set()
     undocumented = []
     docconf = ""
     onlydoctags = False
@@ -124,12 +99,6 @@
             else:
                 print('ERROR: documentation file %s is not a regular file' % a)
                 sys.exit(3)
-        elif o == '-m':
-            if os.path.isdir(a):
-                metadirs.append(a)
-            else:
-                print('ERROR: meta directory %s is not a directory' % a)
-                sys.exit(4)
         elif o == "-t":
             if os.path.isfile(a):
                 docconf = a
@@ -143,43 +112,68 @@
         usage()
         sys.exit(5)
 
-    if len(metadirs) == 0:
-        print('ERROR: no metadir specified')
-        usage()
-        sys.exit(6)
-
     if onlydoctags and docconf == "":
         print('ERROR: no docconf specified')
         usage()
         sys.exit(7)
 
-    # Collect all the variable names from the recipes in the metadirs
-    for m in metadirs:
-        for key,cnt in collect_bbvars(m).items():
-            if key in bbvars:
-                bbvars[key] = bbvars[key] + cnt
+    prog = re.compile("^[^a-z]*$")
+    with bb.tinfoil.Tinfoil() as tinfoil:
+        tinfoil.prepare(config_only=False)
+        parser = bb.codeparser.PythonParser('parser', None)
+        datastore = tinfoil.config_data
+
+        def bbvars_update(data):
+            if prog.match(data):
+                bbvars.add(data)
+            if tinfoil.config_data.getVarFlag(data, 'python'):
+                try:
+                    parser.parse_python(tinfoil.config_data.getVar(data))
+                except bb.data_smart.ExpansionError:
+                    pass
+                for var in parser.references:
+                    if prog.match(var):
+                        bbvars.add(var)
             else:
-                bbvars[key] = cnt
+                try:
+                    expandedVar = datastore.expandWithRefs(datastore.getVar(data, False), data)
+                    for var in expandedVar.references:
+                        if prog.match(var):
+                            bbvars.add(var)
+                except bb.data_smart.ExpansionError:
+                    pass
+
+        # Use tinfoil to collect all the variable names globally
+        for data in datastore:
+            bbvars_update(data)
+
+        # Collect variables from all recipes
+        for recipe in tinfoil.all_recipe_files(variants=False):
+            print("Checking %s" % recipe)
+            for data in tinfoil.parse_recipe_file(recipe):
+                bbvars_update(data)
+
+    documented_vars = collect_documented_vars(docfiles)
 
     # Check each var for documentation
     varlen = 0
-    for v in bbvars.keys():
+    for v in bbvars:
         if len(v) > varlen:
             varlen = len(v)
-        if not bbvar_is_documented(v, docfiles):
+        if not bbvar_is_documented(v, documented_vars):
             undocumented.append(v)
     undocumented.sort()
     varlen = varlen + 1
 
     # Report all undocumented variables
     print('Found %d undocumented bb variables (out of %d):' % (len(undocumented), len(bbvars)))
-    header = '%s%s%s' % (str("VARIABLE").ljust(varlen), str("COUNT").ljust(6), str("DOCTAG").ljust(7))
+    header = '%s%s' % (str("VARIABLE").ljust(varlen), str("DOCTAG").ljust(7))
     print(header)
     print(str("").ljust(len(header), '='))
     for v in undocumented:
         doctag = bbvar_doctag(v, docconf)
         if not onlydoctags or not doctag == "":
-            print('%s%s%s' % (v.ljust(varlen), str(bbvars[v]).ljust(6), doctag))
+            print('%s%s' % (v.ljust(varlen), doctag))
 
 
 if __name__ == "__main__":
diff --git a/import-layers/yocto-poky/scripts/contrib/build-perf-test.sh b/import-layers/yocto-poky/scripts/contrib/build-perf-test.sh
index 7d99228..9a091ed 100755
--- a/import-layers/yocto-poky/scripts/contrib/build-perf-test.sh
+++ b/import-layers/yocto-poky/scripts/contrib/build-perf-test.sh
@@ -283,7 +283,7 @@
 
 test1_p1 () {
     log "Running Test 1, part 1/3: Measure wall clock of bitbake $IMAGE and size of tmp/ dir"
-    bbnotime $IMAGE -c fetchall
+    bbnotime $IMAGE --runall=fetch
     do_rmtmp
     do_rmsstate
     do_sync
diff --git a/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py b/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py
deleted file mode 100755
index 586b329..0000000
--- a/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py
+++ /dev/null
@@ -1,421 +0,0 @@
-#!/usr/bin/env python
-
-# generate Python Manifest for the OpenEmbedded build system
-# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# (C) 2007 Jeremy Laine
-# licensed under MIT, see COPYING.MIT
-#
-# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
-#  * Updated to no longer generate special -dbg package, instead use the
-#    single system -dbg
-#  * Update version with ".1" to indicate this change
-#
-# February 26, 2017 -- Ming Liu <peter.x.liu@external.atlascopco.com>
-#  * Updated to support generating manifest for native python
-
-import os
-import sys
-import time
-import argparse
-
-VERSION = "2.7.2"
-
-__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
-__version__ = "20110222.2"
-
-class MakefileMaker:
-
-    def __init__( self, outfile, isNative ):
-        """initialize"""
-        self.packages = {}
-        self.excluded_pkgs = []
-        self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
-        self.isNative = isNative
-        self.output = outfile
-        self.out( """
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '%s%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-""" % ( sys.argv[0], ' --native' if isNative else '', __version__ ) )
-
-    #
-    # helper functions
-    #
-
-    def out( self, data ):
-        """print a line to the output file"""
-        self.output.write( "%s\n" % data )
-
-    def setPrefix( self, targetPrefix ):
-        """set a file prefix for addPackage files"""
-        self.targetPrefix = targetPrefix
-
-    def doProlog( self ):
-        self.out( """ """ )
-        self.out( "" )
-
-    def addPackage( self, name, description, dependencies, filenames, mod_exclude = False ):
-        """add a package to the Makefile"""
-        if type( filenames ) == type( "" ):
-            filenames = filenames.split()
-        fullFilenames = []
-        for filename in filenames:
-            if filename[0] != "$":
-                fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
-            else:
-                fullFilenames.append( filename )
-        if mod_exclude:
-            self.excluded_pkgs.append( name )
-        self.packages[name] = description, dependencies, fullFilenames
-
-    def doBody( self ):
-        """generate body of Makefile"""
-
-        global VERSION
-
-        #
-        # generate rprovides line for native
-        #
-
-        if self.isNative:
-            pkglist = []
-            for name in ['${PN}-modules'] + sorted(self.packages):
-                pkglist.append('%s-native' % name.replace('${PN}', 'python'))
-
-            self.out('RPROVIDES += "%s"' % " ".join(pkglist))
-            return
-
-        #
-        # generate provides line
-        #
-
-        provideLine = 'PROVIDES+="'
-        for name in sorted(self.packages):
-            provideLine += "%s " % name
-        provideLine += '"'
-
-        self.out( provideLine )
-        self.out( "" )
-
-        #
-        # generate package line
-        #
-
-        packageLine = 'PACKAGES="${PN}-dbg '
-        for name in sorted(self.packages):
-            if name.startswith("${PN}-distutils"):
-                if name == "${PN}-distutils":
-                    packageLine += "%s-staticdev %s " % (name, name)
-            elif name != '${PN}-dbg':
-                packageLine += "%s " % name
-        packageLine += '${PN}-modules"'
-
-        self.out( packageLine )
-        self.out( "" )
-
-        #
-        # generate package variables
-        #
-
-        for name, data in sorted(self.packages.items()):
-            desc, deps, files = data
-
-            #
-            # write out the description, revision and dependencies
-            #
-            self.out( 'SUMMARY_%s="%s"' % ( name, desc ) )
-            self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
-
-            line = 'FILES_%s="' % name
-
-            #
-            # check which directories to make in the temporary directory
-            #
-
-            dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
-            for target in files:
-                dirset[os.path.dirname( target )] = True
-
-            #
-            # generate which files to copy for the target (-dfR because whole directories are also allowed)
-            #
-
-            for target in files:
-                line += "%s " % target
-
-            line += '"'
-            self.out( line )
-            self.out( "" )
-
-        self.out( 'SUMMARY_${PN}-modules="All Python modules"' )
-        line = 'RDEPENDS_${PN}-modules="'
-
-        for name, data in sorted(self.packages.items()):
-            if name not in ['${PN}-dev', '${PN}-distutils-staticdev'] and name not in self.excluded_pkgs:
-                line += "%s " % name
-
-        self.out( "%s \"" % line )
-        self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
-
-    def doEpilog( self ):
-        self.out( """""" )
-        self.out( "" )
-
-    def make( self ):
-        self.doProlog()
-        self.doBody()
-        self.doEpilog()
-
-if __name__ == "__main__":
-    parser = argparse.ArgumentParser( description='generate python manifest' )
-    parser.add_argument( '-n', '--native', help='generate manifest for native python', action='store_true' )
-    parser.add_argument( 'outfile', metavar='OUTPUT_FILE', nargs='?', default='', help='Output file (defaults to stdout)' )
-    args = parser.parse_args()
-
-    if args.outfile:
-        try:
-            os.unlink( args.outfile )
-        except Exception:
-            sys.exc_clear()
-        outfile = open( args.outfile, "w" )
-    else:
-        outfile = sys.stdout
-
-    m = MakefileMaker( outfile, args.native )
-
-    # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
-    # Parameters: revision, name, description, dependencies, filenames
-    #
-
-    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re",
-    "__future__.* _abcoll.* abc.* ast.* copy.* copy_reg.* ConfigParser.* " +
-    "genericpath.* getopt.* linecache.* new.* " +
-    "os.* posixpath.* struct.* " +
-    "warnings.* site.* stat.* " +
-    "UserDict.* UserList.* UserString.* " +
-    "lib-dynload/binascii.so lib-dynload/_struct.so lib-dynload/time.so " +
-    "lib-dynload/xreadlines.so types.* platform.* ${bindir}/python* "  +
-    "_weakrefset.* sysconfig.* _sysconfigdata.* " +
-    "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " +
-    "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
-
-    m.addPackage( "${PN}-dev", "Python development package", "${PN}-core",
-    "${includedir} " +
-    "${libdir}/lib*${SOLIBSDEV} " +
-    "${libdir}/*.la " +
-    "${libdir}/*.a " +
-    "${libdir}/*.o " +
-    "${libdir}/pkgconfig " +
-    "${base_libdir}/*.a " +
-    "${base_libdir}/*.o " +
-    "${datadir}/aclocal " +
-    "${datadir}/pkgconfig " +
-    "config/Makefile ")
-
-    m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core",
-    "${bindir}/2to3 lib2to3" ) # package
-
-    m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
-    "${bindir}/idle idlelib" ) # package
-
-    m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
-    "${bindir}/pydoc pydoc.* pydoc_data" )
-
-    m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
-    "${bindir}/smtpd.* smtpd.*" )
-
-    m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
-    "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.so lib-dynload/audioop.so audiodev.* sunaudio.* sunau.* toaiff.*" )
-
-    m.addPackage( "${PN}-bsddb", "Python bindings for the Berkeley Database", "${PN}-core",
-    "bsddb lib-dynload/_bsddb.so" ) # package
-
-    m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang",
-    "codecs.* encodings gettext.* locale.* lib-dynload/_locale.so lib-dynload/_codecs* lib-dynload/_multibytecodec.so lib-dynload/unicodedata.so stringprep.* xdrlib.*" )
-
-    m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core",
-    "py_compile.* compileall.*" )
-
-    m.addPackage( "${PN}-compiler", "Python compiler support", "${PN}-core",
-    "compiler" ) # package
-
-    m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-zlib",
-    "gzip.* zipfile.* tarfile.* lib-dynload/bz2.so" )
-
-    m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core",
-    "hashlib.* md5.* sha.* lib-dynload/crypt.so lib-dynload/_hashlib.so lib-dynload/_sha256.so lib-dynload/_sha512.so" )
-
-    m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
-    "lib-dynload/_csv.so csv.* optparse.* textwrap.*" )
-
-    m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core",
-    "curses lib-dynload/_curses.so lib-dynload/_curses_panel.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core",
-    "ctypes lib-dynload/_ctypes.so lib-dynload/_ctypes_test.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs",
-    "_strptime.* calendar.* lib-dynload/datetime.so" )
-
-    m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core",
-    "anydbm.* dumbdbm.* whichdb.* " )
-
-    m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint",
-    "bdb.* pdb.*" )
-
-    m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re",
-    "difflib.*" )
-
-    m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
-    "config/lib*.a" ) # package
-
-    m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email",
-    "config distutils" ) # package
-
-    m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
-    "doctest.*" )
-
-    m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
-    "imaplib.* email" ) # package
-
-    m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core",
-    "lib-dynload/fcntl.so" )
-
-    m.addPackage( "${PN}-hotshot", "Python hotshot performance profiler", "${PN}-core",
-    "hotshot lib-dynload/_hotshot.so" )
-
-    m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
-    "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
-
-    m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core",
-    "importlib" )
-
-    m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
-    "lib-dynload/gdbm.so" )
-
-    m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
-    "colorsys.* imghdr.* lib-dynload/imageop.so lib-dynload/rgbimg.so" )
-
-    m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib",
-    "lib-dynload/_socket.so lib-dynload/_io.so lib-dynload/_ssl.so lib-dynload/select.so lib-dynload/termios.so lib-dynload/cStringIO.so " +
-    "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
-
-    m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re ${PN}-codecs",
-    "json lib-dynload/_json.so" ) # package
-
-    m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core",
-    "lib-dynload/_bisect.so lib-dynload/_collections.so lib-dynload/_heapq.so lib-dynload/_weakref.so lib-dynload/_functools.so " +
-    "lib-dynload/array.so lib-dynload/itertools.so lib-dynload/operator.so lib-dynload/parser.so " +
-    "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* repr.* token.* " +
-    "tokenize.* traceback.* weakref.*" )
-
-    m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
-    "logging" ) # package
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.addPackage( "${PN}-math", "Python math support", "${PN}-core ${PN}-crypt",
-    "lib-dynload/cmath.so lib-dynload/math.so lib-dynload/_random.so random.* sets.*" )
-
-    m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io",
-    "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
-
-    m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io",
-    "lib-dynload/mmap.so " )
-
-    m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap",
-    "lib-dynload/_multiprocessing.so multiprocessing" ) # package
-
-    m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime",
-    "*Cookie*.* " +
-    "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib.* urllib2.* urlparse.* uuid.* rfc822.* mimetools.*" )
-
-    m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
-    "cgi.* *HTTPServer.* SocketServer.*" )
-
-    m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re",
-    "decimal.* fractions.* numbers.*" )
-
-    m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
-    "pickle.* shelve.* lib-dynload/cPickle.so pickletools.*" )
-
-    m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
-    "pkgutil.*")
-
-    m.addPackage( "${PN}-plistlib", "Generate and parse Mac OS X .plist files", "${PN}-core ${PN}-datetime ${PN}-io",
-    "plistlib.*")
-
-    m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
-    "pprint.*" )
-
-    m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils",
-    "profile.* pstats.* cProfile.* lib-dynload/_lsprof.so" )
-
-    m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
-    "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
-
-    m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
-    "lib-dynload/readline.so rlcompleter.*" )
-
-    m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
-    "lib-dynload/resource.so" )
-
-    m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re",
-    "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
-
-    m.addPackage( "${PN}-robotparser", "Python robots.txt parser", "${PN}-core ${PN}-netclient",
-    "robotparser.*")
-
-    m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle",
-    "subprocess.*" )
-
-    m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib",
-    "lib-dynload/_sqlite3.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
-
-    m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3",
-    "sqlite3/test" )
-
-    m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re",
-    "lib-dynload/strop.so string.* stringold.*" )
-
-    m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core",
-    "lib-dynload/syslog.so" )
-
-    m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io",
-    "pty.* tty.*" )
-
-    m.addPackage( "${PN}-tests", "Python tests", "${PN}-core ${PN}-modules",
-    "test", True ) # package
-
-    m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
-    "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" )
-
-    m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core",
-    "lib-dynload/_tkinter.so lib-tk" ) # package
-
-    m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell",
-    "unittest/" )
-
-    m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
-    "lib-dynload/nis.so lib-dynload/grp.so lib-dynload/pwd.so getpass.*" )
-
-    m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re",
-    "lib-dynload/_elementtree.so lib-dynload/pyexpat.so xml xmllib.*" ) # package
-
-    m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang",
-    "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.*" )
-
-    m.addPackage( "${PN}-zlib", "Python zlib compression support", "${PN}-core",
-    "lib-dynload/zlib.so" )
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.addPackage( "${PN}-argparse", "Python command line argument parser", "${PN}-core ${PN}-codecs ${PN}-textutils",
-    "argparse.*" )
-
-    m.addPackage( "${PN}-contextlib", "Python utilities for with-statement" +
-    "contexts.", "${PN}-core",
-    "${libdir}/python${PYTHON_MAJMIN}/contextlib.*" )
-
-    m.make()
diff --git a/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-3.5.py b/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-3.5.py
deleted file mode 100755
index 6352f8f..0000000
--- a/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-3.5.py
+++ /dev/null
@@ -1,433 +0,0 @@
-#!/usr/bin/env python
-
-# generate Python Manifest for the OpenEmbedded build system
-# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# (C) 2007 Jeremy Laine
-# licensed under MIT, see COPYING.MIT
-#
-# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
-#  * Updated to no longer generate special -dbg package, instead use the
-#    single system -dbg
-#  * Update version with ".1" to indicate this change
-#
-# 2014 Khem Raj <raj.khem@gmail.com>
-# Added python3 support
-#
-# February 26, 2017 -- Ming Liu <peter.x.liu@external.atlascopco.com>
-# * Updated to support generating manifest for native python3
-
-import os
-import sys
-import time
-import argparse
-
-VERSION = "3.5.0"
-
-__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
-__version__ = "20140131"
-
-class MakefileMaker:
-
-    def __init__( self, outfile, isNative ):
-        """initialize"""
-        self.packages = {}
-        self.excluded_pkgs = []
-        self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
-        self.isNative = isNative
-        self.output = outfile
-        self.out( """
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '%s%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-""" % ( sys.argv[0], ' --native' if isNative else '', __version__ ) )
-
-    #
-    # helper functions
-    #
-
-    def out( self, data ):
-        """print a line to the output file"""
-        self.output.write( "%s\n" % data )
-
-    def setPrefix( self, targetPrefix ):
-        """set a file prefix for addPackage files"""
-        self.targetPrefix = targetPrefix
-
-    def doProlog( self ):
-        self.out( """ """ )
-        self.out( "" )
-
-    def addPackage( self, name, description, dependencies, filenames, mod_exclude = False ):
-        """add a package to the Makefile"""
-        if type( filenames ) == type( "" ):
-            filenames = filenames.split()
-        fullFilenames = []
-        for filename in filenames:
-            if filename[0] != "$":
-                fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
-                fullFilenames.append( "%s%s" % ( self.targetPrefix,
-                                                 self.pycachePath( filename ) ) )
-            else:
-                fullFilenames.append( filename )
-        if mod_exclude:
-            self.excluded_pkgs.append( name )
-        self.packages[name] = description, dependencies, fullFilenames
-
-    def pycachePath( self, filename ):
-        dirname = os.path.dirname( filename )
-        basename = os.path.basename( filename )
-        if '.' in basename:
-            return os.path.join( dirname, '__pycache__', basename )
-        else:
-            return os.path.join( dirname, basename, '__pycache__' )
-
-    def doBody( self ):
-        """generate body of Makefile"""
-
-        global VERSION
-
-        #
-        # generate rprovides line for native
-        #
-
-        if self.isNative:
-            pkglist = []
-            for name in ['${PN}-modules'] + sorted(self.packages):
-                pkglist.append('%s-native' % name.replace('${PN}', 'python3'))
-
-            self.out('RPROVIDES += "%s"' % " ".join(pkglist))
-            return
-
-        #
-        # generate provides line
-        #
-
-        provideLine = 'PROVIDES+="'
-        for name in sorted(self.packages):
-            provideLine += "%s " % name
-        provideLine += '"'
-
-        self.out( provideLine )
-        self.out( "" )
-
-        #
-        # generate package line
-        #
-
-        packageLine = 'PACKAGES="${PN}-dbg '
-        for name in sorted(self.packages):
-            if name.startswith("${PN}-distutils"):
-                if name == "${PN}-distutils":
-                    packageLine += "%s-staticdev %s " % (name, name)
-            elif name != '${PN}-dbg':
-                packageLine += "%s " % name
-        packageLine += '${PN}-modules"'
-
-        self.out( packageLine )
-        self.out( "" )
-
-        #
-        # generate package variables
-        #
-
-        for name, data in sorted(self.packages.items()):
-            desc, deps, files = data
-
-            #
-            # write out the description, revision and dependencies
-            #
-            self.out( 'SUMMARY_%s="%s"' % ( name, desc ) )
-            self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
-
-            line = 'FILES_%s="' % name
-
-            #
-            # check which directories to make in the temporary directory
-            #
-
-            dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
-            for target in files:
-                dirset[os.path.dirname( target )] = True
-
-            #
-            # generate which files to copy for the target (-dfR because whole directories are also allowed)
-            #
-
-            for target in files:
-                line += "%s " % target
-
-            line += '"'
-            self.out( line )
-            self.out( "" )
-
-        self.out( 'SUMMARY_${PN}-modules="All Python modules"' )
-        line = 'RDEPENDS_${PN}-modules="'
-
-        for name, data in sorted(self.packages.items()):
-            if name not in ['${PN}-dev', '${PN}-distutils-staticdev'] and name not in self.excluded_pkgs:
-                line += "%s " % name
-
-        self.out( "%s \"" % line )
-        self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
-
-    def doEpilog( self ):
-        self.out( """""" )
-        self.out( "" )
-
-    def make( self ):
-        self.doProlog()
-        self.doBody()
-        self.doEpilog()
-
-if __name__ == "__main__":
-    parser = argparse.ArgumentParser( description='generate python3 manifest' )
-    parser.add_argument( '-n', '--native', help='generate manifest for native python3', action='store_true' )
-    parser.add_argument( 'outfile', metavar='OUTPUT_FILE', nargs='?', default='', help='Output file (defaults to stdout)' )
-    args = parser.parse_args()
-
-    if args.outfile:
-        try:
-            os.unlink( args.outfile )
-        except Exception:
-            sys.exc_clear()
-        outfile = open( args.outfile, "w" )
-    else:
-        outfile = sys.stdout
-
-    m = MakefileMaker( outfile, args.native )
-
-    # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
-    # Parameters: revision, name, description, dependencies, filenames
-    #
-
-    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math",
-    "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* configparser.* " +
-    "genericpath.* getopt.* linecache.* new.* " +
-    "os.* posixpath.* struct.* " +
-    "warnings.* site.* stat.* " +
-    "UserDict.* UserList.* UserString.* " +
-    "lib-dynload/binascii.*.so lib-dynload/_struct.*.so lib-dynload/time.*.so " +
-    "lib-dynload/xreadlines.*.so types.* platform.* ${bindir}/python* "  + 
-    "_weakrefset.* sysconfig.* _sysconfigdata.* " +
-    "${includedir}/python${PYTHON_BINABI}/pyconfig*.h " +
-    "${libdir}/python${PYTHON_MAJMIN}/collections " +
-    "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* " +
-    "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* " +
-    "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
-
-    m.addPackage( "${PN}-dev", "Python development package", "${PN}-core",
-    "${includedir} " +
-    "${libdir}/lib*${SOLIBSDEV} " +
-    "${libdir}/*.la " +
-    "${libdir}/*.a " +
-    "${libdir}/*.o " +
-    "${libdir}/pkgconfig " +
-    "${base_libdir}/*.a " +
-    "${base_libdir}/*.o " +
-    "${datadir}/aclocal " +
-    "${datadir}/pkgconfig " +
-    "config*/Makefile ")
-
-    m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core",
-    "lib2to3" ) # package
-
-    m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
-    "${bindir}/idle idlelib" ) # package
-
-    m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
-    "${bindir}/pydoc pydoc.* pydoc_data" )
-
-    m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
-    "${bindir}/smtpd.* smtpd.*" )
-
-    m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
-    "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.*.so lib-dynload/audioop.*.so audiodev.* sunaudio.* sunau.* toaiff.*" )
-
-    m.addPackage( "${PN}-argparse", "Python command line argument parser", "${PN}-core ${PN}-codecs ${PN}-textutils",
-    "argparse.*" )
-
-    m.addPackage( "${PN}-asyncio", "Python Asynchronous I/O, event loop, coroutines and tasks", "${PN}-core",
-    "asyncio" )
-
-    m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang",
-    "codecs.* encodings gettext.* locale.* lib-dynload/_locale.*.so lib-dynload/_codecs* lib-dynload/_multibytecodec.*.so lib-dynload/unicodedata.*.so stringprep.* xdrlib.*" )
-
-    m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core",
-    "py_compile.* compileall.*" )
-
-    m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell",
-    "gzip.* zipfile.* tarfile.* lib-dynload/bz2.*.so lib-dynload/zlib.*.so bz2.py lzma.py _compression.py" )
-
-    m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core",
-    "hashlib.* md5.* sha.* lib-dynload/crypt.*.so lib-dynload/_hashlib.*.so lib-dynload/_sha256.*.so lib-dynload/_sha512.*.so" )
-
-    m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
-    "lib-dynload/_csv.*.so csv.* optparse.* textwrap.*" )
-
-    m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core",
-    "curses lib-dynload/_curses.*.so lib-dynload/_curses_panel.*.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core ${PN}-subprocess",
-    "ctypes lib-dynload/_ctypes.*.so lib-dynload/_ctypes_test.*.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs",
-    "_strptime.* calendar.* datetime.* lib-dynload/_datetime.*.so" )
-
-    m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core",
-    "anydbm.* dumbdbm.* whichdb.* dbm lib-dynload/_dbm.*.so" )
-
-    m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil",
-    "bdb.* pdb.*" )
-
-    m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re",
-    "difflib.*" )
-
-    m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
-    "config/lib*.a" ) # package
-
-    m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email",
-    "config distutils" ) # package
-
-    m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
-    "doctest.*" )
-
-    m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
-    "imaplib.* email" ) # package
-
-    m.addPackage( "${PN}-enum", "Python support for enumerations", "${PN}-core",
-    "enum.*" )
-
-    m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core",
-    "lib-dynload/fcntl.*.so" )
-
-    m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
-    "formatter.* htmlentitydefs.* html htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
-
-    m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core ${PN}-lang",
-    "importlib imp.*" )
-
-    m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
-    "lib-dynload/_gdbm.*.so" )
-
-    m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
-    "colorsys.* imghdr.* lib-dynload/imageop.*.so lib-dynload/rgbimg.*.so" )
-
-    m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math",
-    "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " +
-    "ipaddress.* pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
-
-    m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re",
-    "json lib-dynload/_json.*.so" ) # package
-
-    m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core ${PN}-importlib",
-    "lib-dynload/_bisect.*.so lib-dynload/_collections.*.so lib-dynload/_heapq.*.so lib-dynload/_weakref.*.so lib-dynload/_functools.*.so " +
-    "lib-dynload/array.*.so lib-dynload/itertools.*.so lib-dynload/operator.*.so lib-dynload/parser.*.so " +
-    "atexit.* bisect.* code.* codeop.* collections.* _collections_abc.* contextlib.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* operator.* symbol.* repr.* token.* " +
-    "tokenize.* traceback.* weakref.*" )
-
-    m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
-    "logging" ) # package
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.addPackage( "${PN}-math", "Python math support", "${PN}-core ${PN}-crypt",
-    "lib-dynload/cmath.*.so lib-dynload/math.*.so lib-dynload/_random.*.so random.* sets.*" )
-
-    m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io",
-    "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
-
-    m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io",
-    "lib-dynload/mmap.*.so " )
-
-    m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap",
-    "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package
-
-    m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime ${PN}-html",
-    "*Cookie*.* " +
-    "base64.* cookielib.* ftplib.* gopherlib.* hmac.* http* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib  uuid.* rfc822.* mimetools.*" )
-
-    m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
-    "cgi.* socketserver.* *HTTPServer.* SocketServer.*" )
-
-    m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re",
-    "decimal.* fractions.* numbers.*" )
-
-    m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
-    "_compat_pickle.* pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" )
-
-    m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
-    "pkgutil.*")
-
-    m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
-    "pprint.*" )
-
-    m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils",
-    "profile.* pstats.* cProfile.* lib-dynload/_lsprof.*.so" )
-
-    m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
-    "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
-
-    m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
-    "lib-dynload/readline.*.so rlcompleter.*" )
-
-    m.addPackage( "${PN}-reprlib", "Python alternate repr() implementation", "${PN}-core",
-    "reprlib.py" )
-
-    m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
-    "lib-dynload/resource.*.so" )
-
-    m.addPackage( "${PN}-selectors", "Python High-level I/O multiplexing", "${PN}-core",
-    "selectors.*" )
-
-    m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re ${PN}-compression",
-    "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
-
-    m.addPackage( "${PN}-signal", "Python set handlers for asynchronous events support", "${PN}-core ${PN}-enum",
-    "signal.*" )
-
-    m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors",
-    "subprocess.* lib-dynload/_posixsubprocess.*.so" )
-
-    m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading",
-    "lib-dynload/_sqlite3.*.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
-
-    m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3",
-    "sqlite3/test" )
-
-    m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re",
-    "lib-dynload/strop.*.so string.* stringold.*" )
-
-    m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core",
-    "lib-dynload/syslog.*.so" )
-
-    m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io",
-    "pty.* tty.*" )
-
-    m.addPackage( "${PN}-tests", "Python tests", "${PN}-core ${PN}-compression",
-    "test", True ) # package
-
-    m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
-    "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* queue.*" )
-
-    m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core",
-    "lib-dynload/_tkinter.*.so lib-tk tkinter" ) # package
-
-    m.addPackage( "${PN}-typing", "Python typing support", "${PN}-core",
-    "typing.*" )
-
-    m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell",
-    "unittest/" )
-
-    m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
-    "lib-dynload/nis.*.so lib-dynload/grp.*.so lib-dynload/pwd.*.so getpass.*" )
-
-    m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re",
-    "lib-dynload/_elementtree.*.so lib-dynload/pyexpat.*.so xml xmllib.*" ) # package
-
-    m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang ${PN}-pydoc",
-    "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.* xmlrpc" )
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.make()
diff --git a/import-layers/yocto-poky/scripts/contrib/yocto-bsp-kernel-update.sh b/import-layers/yocto-poky/scripts/contrib/yocto-bsp-kernel-update.sh
deleted file mode 100755
index b3aa705..0000000
--- a/import-layers/yocto-poky/scripts/contrib/yocto-bsp-kernel-update.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2017, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software;  you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY;  without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
-# the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program;  if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Description: creates a new set of kernel templates based on version
-#
-
-set -o nounset
-set -o errexit
-
-if [ $# -ne 4 ]; then
-    cat << EOF
-usage: $0 from_mayor from_minor to_mayor to_minor
-EOF
-    exit 1
-else
-    fma=$1 # from mayor
-    fmi=$2 # from minor
-    tma=$3 # to mayor
-    tmi=$4 # to minor
-fi
-
-poky=$(readlink -e $(dirname $(dirname $(dirname $0))))
-arch=$poky/scripts/lib/bsp/substrate/target/arch
-
-
-# copy/rename templates
-for from in $(ls -1 $arch/*/recipes-kernel/linux/linux-yocto*_$fma\.$fmi.bbappend)
-do
-    to=$(echo $from | sed s/$fma\.$fmi/$tma\.$tmi/)
-    cp $from $to
-done
-
-# replace versions string inside new templates
-for bbappend in $(ls -1 $arch/*/recipes-kernel/linux/linux-yocto*_$tma\.$tmi.bbappend)
-do
-    sed -i 1s/$fma\.$fmi/$tma\.$tmi/ $bbappend
-    sed -i \$s/$fma\.$fmi/$tma\.$tmi/ $bbappend
-done
-
-# update the noinstall files
-for noinstall in $(ls -1 $arch/*/recipes-kernel/linux/kernel-list.noinstall)
-do
-    sed -i s/$fma\.$fmi/$tma\.$tmi/g $noinstall;
-done
diff --git a/import-layers/yocto-poky/scripts/crosstap b/import-layers/yocto-poky/scripts/crosstap
index 39739bb..e33fa4a 100755
--- a/import-layers/yocto-poky/scripts/crosstap
+++ b/import-layers/yocto-poky/scripts/crosstap
@@ -1,15 +1,22 @@
-#!/bin/bash
+#!/usr/bin/env python3
 #
-# Run a systemtap script on remote target
+# Build a systemtap script for a given image, kernel
 #
-# Examples (run on build host, target is 192.168.1.xxx):
-#   $ source oe-init-build-env"
-#   $ cd ~/my/systemtap/scripts"
+# Effectively script extracts needed information from set of
+# 'bitbake -e' commands and contructs proper invocation of stap on
+# host to build systemtap script for a given target.
 #
-#   $ crosstap root@192.168.1.xxx myscript.stp"
-#   $ crosstap root@192.168.1.xxx myscript-with-args.stp 99 ninetynine"
+# By default script will compile scriptname.ko that could be copied
+# to taget and activated with 'staprun scriptname.ko' command. Or if
+# --remote user@hostname option is specified script will build, load
+# execute script on target.
 #
-# Copyright (c) 2012, Intel Corporation.
+# This script is very similar and inspired by crosstap shell script.
+# The major difference that this script supports user-land related
+# systemtap script, whereas crosstap could deal only with scripts
+# related to kernel.
+#
+# Copyright (c) 2018, Cisco Systems.
 # All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -25,131 +32,438 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
-function usage() {
-    echo "Usage: $0 <user@hostname> <sytemtap-script> [additional systemtap-script args]"
-}
+import sys
+import re
+import subprocess
+import os
+import optparse
 
-function setup_usage() {
-    echo ""
-    echo "'crosstap' requires a local sdk build of the target system"
-    echo "(or a build that includes 'tools-profile') in order to build"
-    echo "kernel modules that can probe the target system."
-    echo ""
-    echo "Practically speaking, that means you need to do the following:"
-    echo "  - If you're running a pre-built image, download the release"
-    echo "    and/or BSP tarballs used to build the image."
-    echo "  - If you're working from git sources, just clone the metadata"
-    echo "    and BSP layers needed to build the image you'll be booting."
-    echo "  - Make sure you're properly set up to build a new image (see"
-    echo "    the BSP README and/or the widely available basic documentation"
-    echo "    that discusses how to build images)."
-    echo "  - Build an -sdk version of the image e.g.:"
-    echo "      $ bitbake core-image-sato-sdk"
-    echo "  OR"
-    echo "  - Build a non-sdk image but include the profiling tools:"
-    echo "      [ edit local.conf and add 'tools-profile' to the end of"
-    echo "        the EXTRA_IMAGE_FEATURES variable ]"
-    echo "      $ bitbake core-image-sato"
-    echo ""
-    echo "  [ NOTE that 'crosstap' needs to be able to ssh into the target"
-    echo "    system, which isn't enabled by default in -minimal images. ]"
-    echo ""
-    echo "Once you've build the image on the host system, you're ready to"
-    echo "boot it (or the equivalent pre-built image) and use 'crosstap'"
-    echo "to probe it (you need to source the environment as usual first):"
-    echo ""
-    echo "    $ source oe-init-build-env"
-    echo "    $ cd ~/my/systemtap/scripts"
-    echo "    $ crosstap root@192.168.1.xxx myscript.stp"
-    echo ""
-}
+class Stap(object):
+    def __init__(self, script, module, remote):
+        self.script = script
+        self.module = module
+        self.remote = remote
+        self.stap = None
+        self.sysroot = None
+        self.runtime = None
+        self.tapset = None
+        self.arch = None
+        self.cross_compile = None
+        self.kernel_release = None
+        self.target_path = None
+        self.target_ld_library_path = None
 
-function systemtap_target_arch() {
-    SYSTEMTAP_TARGET_ARCH=$1
-    case $SYSTEMTAP_TARGET_ARCH in
-        i?86)
-            SYSTEMTAP_TARGET_ARCH="i386"
-            ;;
-        x86?64*)
-            SYSTEMTAP_TARGET_ARCH="x86_64"
-            ;;
-        arm*)
-            SYSTEMTAP_TARGET_ARCH="arm"
-            ;;
-        powerpc*)
-            SYSTEMTAP_TARGET_ARCH="powerpc"
-            ;;
-        *)
-            ;;
-    esac
-}
+        if not self.remote:
+            if not self.module:
+                # derive module name from script
+                self.module = os.path.basename(self.script)
+                if self.module[-4:] == ".stp":
+                    self.module = self.module[:-4]
+                    # replace - if any with _
+                    self.module = self.module.replace("-", "_")
 
-if [ $# -lt 2 ]; then
-	usage
-	exit 1
-fi
+    def command(self, args):
+        ret = []
+        ret.append(self.stap)
 
-if [ -z "$BUILDDIR" ]; then
-    echo "Error: Unable to find the BUILDDIR environment variable."
-    echo "Did you forget to source your build system environment setup script?"
-    exit 1
-fi
+        if self.remote:
+            ret.append("--remote")
+            ret.append(self.remote)
+        else:
+            ret.append("-p4")
+            ret.append("-m")
+            ret.append(self.module)
 
-pushd $PWD
-cd $BUILDDIR
-BITBAKE_VARS=`bitbake -e virtual/kernel`
-popd
+        ret.append("-a")
+        ret.append(self.arch)
 
-STAGING_BINDIR_TOOLCHAIN=$(echo "$BITBAKE_VARS" | grep ^STAGING_BINDIR_TOOLCHAIN \
-  | cut -d '=' -f2 | cut -d '"' -f2)
-STAGING_BINDIR_TOOLPREFIX=$(echo "$BITBAKE_VARS" | grep ^TARGET_PREFIX \
-  | cut -d '=' -f2 | cut -d '"' -f2)
-TARGET_ARCH=$(echo "$BITBAKE_VARS" | grep ^TRANSLATED_TARGET_ARCH \
-  | cut -d '=' -f2 | cut -d '"' -f2)
-TARGET_KERNEL_BUILDDIR=$(echo "$BITBAKE_VARS" | grep ^B= \
-  | cut -d '=' -f2 | cut -d '"' -f2)
+        ret.append("-B")
+        ret.append("CROSS_COMPILE=" + self.cross_compile)
 
-# Build and populate the recipe-sysroot-native with systemtap-native
-pushd $PWD
-cd $BUILDDIR
-BITBAKE_VARS=`bitbake -e systemtap-native`
-popd
-SYSTEMTAP_HOST_INSTALLDIR=$(echo "$BITBAKE_VARS" | grep ^STAGING_DIR_NATIVE \
-  | cut -d '=' -f2 | cut -d '"' -f2)
+        ret.append("-r")
+        ret.append(self.kernel_release)
 
-systemtap_target_arch "$TARGET_ARCH"
+        ret.append("-I")
+        ret.append(self.tapset)
 
-if [ ! -d $TARGET_KERNEL_BUILDDIR ] ||
-   [ ! -f $TARGET_KERNEL_BUILDDIR/vmlinux ]; then
-    echo -e "\nError: No target kernel build found."
-    echo -e "Did you forget to create a local build of your image?"
-    setup_usage
-    exit 1
-fi
+        ret.append("-R")
+        ret.append(self.runtime)
 
-if [ ! -f $SYSTEMTAP_HOST_INSTALLDIR/usr/bin/stap ]; then
-    echo -e "\nError: Native (host) systemtap not found."
-    echo -e "Did you accidentally build a local non-sdk image? (or forget to"
-    echo -e "add 'tools-profile' to EXTRA_IMAGE_FEATURES in your local.conf)?"
-    echo -e "You can also: bitbake -c addto_recipe_sysroot systemtap-native"
-    setup_usage
-    exit 1
-fi
+        if self.sysroot:
+            ret.append("--sysroot")
+            ret.append(self.sysroot)
 
-target_user_hostname="$1"
-full_script_name="$2"
-script_name=$(basename "$2")
-script_base=${script_name%.*}
-shift 2
+            ret.append("--sysenv=PATH=" + self.target_path)
+            ret.append("--sysenv=LD_LIBRARY_PATH=" + self.target_ld_library_path)
 
-${SYSTEMTAP_HOST_INSTALLDIR}/usr/bin/stap \
-  -a ${SYSTEMTAP_TARGET_ARCH} \
-  -B CROSS_COMPILE="${STAGING_BINDIR_TOOLCHAIN}/${STAGING_BINDIR_TOOLPREFIX}" \
-  -r ${TARGET_KERNEL_BUILDDIR} \
-  -I ${SYSTEMTAP_HOST_INSTALLDIR}/usr/share/systemtap/tapset \
-  -R ${SYSTEMTAP_HOST_INSTALLDIR}/usr/share/systemtap/runtime \
-  --remote=$target_user_hostname \
-  -m $script_base \
-   $full_script_name "$@"
+        ret = ret + args
 
-exit 0
+        ret.append(self.script)
+        return ret
+
+    def additional_environment(self):
+        ret = {}
+        ret["SYSTEMTAP_DEBUGINFO_PATH"] = "+:.debug:build"
+        return ret
+
+    def environment(self):
+        ret = os.environ.copy()
+        additional = self.additional_environment()
+        for e in additional:
+            ret[e] = additional[e]
+        return ret
+
+    def display_command(self, args):
+        additional_env = self.additional_environment()
+        command = self.command(args)
+
+        print("#!/bin/sh")
+        for e in additional_env:
+            print("export %s=\"%s\"" % (e, additional_env[e]))
+        print(" ".join(command))
+
+class BitbakeEnvInvocationException(Exception):
+    def __init__(self, message):
+        self.message = message
+
+class BitbakeEnv(object):
+    BITBAKE="bitbake"
+
+    def __init__(self, package):
+        self.package = package
+        self.cmd = BitbakeEnv.BITBAKE + " -e " + self.package
+        self.popen = subprocess.Popen(self.cmd, shell=True,
+                                      stdout=subprocess.PIPE,
+                                      stderr=subprocess.STDOUT)
+        self.__lines = self.popen.stdout.readlines()
+        self.popen.wait()
+
+        self.lines = []
+        for line in self.__lines:
+                self.lines.append(line.decode('utf-8'))
+
+    def get_vars(self, vars):
+        if self.popen.returncode:
+            raise BitbakeEnvInvocationException(
+                "\nFailed to execute '" + self.cmd +
+                "' with the following message:\n" +
+                ''.join(self.lines))
+
+        search_patterns = []
+        retdict = {}
+        for var in vars:
+            # regular not exported variable
+            rexpr = "^" + var + "=\"(.*)\""
+            re_compiled = re.compile(rexpr)
+            search_patterns.append((var, re_compiled))
+
+            # exported variable
+            rexpr = "^export " + var + "=\"(.*)\""
+            re_compiled = re.compile(rexpr)
+            search_patterns.append((var, re_compiled))
+
+            for line in self.lines:
+                for var, rexpr in search_patterns:
+                    m = rexpr.match(line)
+                    if m:
+                        value = m.group(1)
+                        retdict[var] = value
+
+        # fill variables values in order how they were requested
+        ret = []
+        for var in vars:
+            ret.append(retdict.get(var))
+
+        # if it is single value list return it as scalar, not the list
+        if len(ret) == 1:
+            ret = ret[0]
+
+        return ret
+
+class ParamDiscovery(object):
+    SYMBOLS_CHECK_MESSAGE = """
+WARNING: image '%s' does not have dbg-pkgs IMAGE_FEATURES enabled and no
+"image-combined-dbg" in inherited classes is specified. As result the image
+does not have symbols for user-land processes DWARF based probes. Consider
+adding 'dbg-pkgs' to EXTRA_IMAGE_FEATURES or adding "image-combined-dbg" to
+USER_CLASSES. I.e add this line 'USER_CLASSES += "image-combined-dbg"' to
+local.conf file.
+
+Or you may use IMAGE_GEN_DEBUGFS="1" option, and then after build you need
+recombine/unpack image and image-dbg tarballs and pass resulting dir location
+with --sysroot option.
+"""
+
+    def __init__(self, image):
+        self.image = image
+
+        self.image_rootfs = None
+        self.image_features = None
+        self.image_gen_debugfs = None
+        self.inherit = None
+        self.base_bindir = None
+        self.base_sbindir = None
+        self.base_libdir = None
+        self.bindir = None
+        self.sbindir = None
+        self.libdir = None
+
+        self.staging_bindir_toolchain = None
+        self.target_prefix = None
+        self.target_arch = None
+        self.target_kernel_builddir = None
+
+        self.staging_dir_native = None
+
+        self.image_combined_dbg = False
+
+    def discover(self):
+        if self.image:
+            benv_image = BitbakeEnv(self.image)
+            (self.image_rootfs,
+             self.image_features,
+             self.image_gen_debugfs,
+             self.inherit,
+             self.base_bindir,
+             self.base_sbindir,
+             self.base_libdir,
+             self.bindir,
+             self.sbindir,
+             self.libdir
+            ) = benv_image.get_vars(
+                 ("IMAGE_ROOTFS",
+                  "IMAGE_FEATURES",
+                  "IMAGE_GEN_DEBUGFS",
+                  "INHERIT",
+                  "base_bindir",
+                  "base_sbindir",
+                  "base_libdir",
+                  "bindir",
+                  "sbindir",
+                  "libdir"
+                  ))
+
+        benv_kernel = BitbakeEnv("virtual/kernel")
+        (self.staging_bindir_toolchain,
+         self.target_prefix,
+         self.target_arch,
+         self.target_kernel_builddir
+        ) = benv_kernel.get_vars(
+             ("STAGING_BINDIR_TOOLCHAIN",
+              "TARGET_PREFIX",
+              "TRANSLATED_TARGET_ARCH",
+              "B"
+            ))
+
+        benv_systemtap = BitbakeEnv("systemtap-native")
+        (self.staging_dir_native
+        ) = benv_systemtap.get_vars(["STAGING_DIR_NATIVE"])
+
+        if self.inherit:
+            if "image-combined-dbg" in self.inherit.split():
+                self.image_combined_dbg = True
+
+    def check(self, sysroot_option):
+        ret = True
+        if self.image_rootfs:
+            sysroot = self.image_rootfs
+            if not os.path.isdir(self.image_rootfs):
+                print("ERROR: Cannot find '" + sysroot +
+                      "' directory. Was '" + self.image + "' image built?")
+                ret = False
+
+        stap = self.staging_dir_native + "/usr/bin/stap"
+        if not os.path.isfile(stap):
+            print("ERROR: Cannot find '" + stap +
+                  "'. Was 'systemtap-native' built?")
+            ret = False
+
+        if not os.path.isdir(self.target_kernel_builddir):
+            print("ERROR: Cannot find '" + self.target_kernel_builddir +
+                  "' directory. Was 'kernel/virtual' built?")
+            ret = False
+
+        if not sysroot_option and self.image_rootfs:
+            dbg_pkgs_found = False
+
+            if self.image_features:
+                image_features = self.image_features.split()
+                if "dbg-pkgs" in image_features:
+                    dbg_pkgs_found = True
+
+            if not dbg_pkgs_found \
+               and not self.image_combined_dbg:
+                print(ParamDiscovery.SYMBOLS_CHECK_MESSAGE % (self.image))
+
+        if not ret:
+            print("")
+
+        return ret
+
+    def __map_systemtap_arch(self):
+        a = self.target_arch
+        ret = a
+        if   re.match('(athlon|x86.64)$', a):
+            ret = 'x86_64'
+        elif re.match('i.86$', a):
+            ret = 'i386'
+        elif re.match('arm$', a):
+            ret = 'arm'
+        elif re.match('aarch64$', a):
+            ret = 'arm64'
+        elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a):
+            ret = 'mips'
+        elif re.match('p(pc|owerpc)(|64)', a):
+            ret = 'powerpc'
+        return ret
+
+    def fill_stap(self, stap):
+        stap.stap = self.staging_dir_native + "/usr/bin/stap"
+        if not stap.sysroot:
+            if self.image_rootfs:
+                if self.image_combined_dbg:
+                    stap.sysroot = self.image_rootfs + "-dbg"
+                else:
+                    stap.sysroot = self.image_rootfs
+        stap.runtime = self.staging_dir_native + "/usr/share/systemtap/runtime"
+        stap.tapset = self.staging_dir_native + "/usr/share/systemtap/tapset"
+        stap.arch = self.__map_systemtap_arch()
+        stap.cross_compile = self.staging_bindir_toolchain + "/" + \
+                             self.target_prefix
+        stap.kernel_release = self.target_kernel_builddir
+
+        # do we have standard that tells in which order these need to appear
+        target_path = []
+        if self.sbindir:
+            target_path.append(self.sbindir)
+        if self.bindir:
+            target_path.append(self.bindir)
+        if self.base_sbindir:
+            target_path.append(self.base_sbindir)
+        if self.base_bindir:
+            target_path.append(self.base_bindir)
+        stap.target_path = ":".join(target_path)
+
+        target_ld_library_path = []
+        if self.libdir:
+            target_ld_library_path.append(self.libdir)
+        if self.base_libdir:
+            target_ld_library_path.append(self.base_libdir)
+        stap.target_ld_library_path = ":".join(target_ld_library_path)
+
+
+def main():
+    usage = """usage: %prog -s <systemtap-script> [options] [-- [systemtap options]]
+
+%prog cross compile given SystemTap script against given image, kernel
+
+It needs to run in environtment set for bitbake - it uses bitbake -e
+invocations to retrieve information to construct proper stap cross build
+invocation arguments. It assumes that systemtap-native is built in given
+bitbake workspace.
+
+Anything after -- option is passed directly to stap.
+
+Legacy script invocation style supported but depreciated:
+  %prog <user@hostname> <sytemtap-script> [systemtap options]
+
+To enable most out of systemtap the following site.conf or local.conf
+configuration is recommended:
+
+# enables symbol + target binaries rootfs-dbg in workspace
+IMAGE_GEN_DEBUGFS = "1"
+IMAGE_FSTYPES_DEBUGFS = "tar.bz2"
+USER_CLASSES += "image-combined-dbg"
+
+# enables kernel debug symbols
+KERNEL_EXTRA_FEATURES_append = " features/debug/debug-kernel.scc"
+
+# minimal, just run-time systemtap configuration in target image
+PACKAGECONFIG_pn-systemtap = "monitor"
+
+# add systemtap run-time into target image if it is not there yet
+IMAGE_INSTALL_append = " systemtap"
+"""
+    option_parser = optparse.OptionParser(usage=usage)
+
+    option_parser.add_option("-s", "--script", dest="script",
+                             help="specify input script FILE name",
+                             metavar="FILE")
+
+    option_parser.add_option("-i", "--image", dest="image",
+                             help="specify image name for which script should be compiled")
+
+    option_parser.add_option("-r", "--remote", dest="remote",
+                             help="specify username@hostname of remote target to run script "
+                             "optional, it assumes that remote target can be accessed through ssh")
+
+    option_parser.add_option("-m", "--module", dest="module",
+                             help="specify module name, optional, has effect only if --remote is not used, "
+                             "if not specified module name will be derived from passed script name")
+
+    option_parser.add_option("-y", "--sysroot", dest="sysroot",
+                             help="explicitely specify image sysroot location. May need to use it in case "
+                             "when IMAGE_GEN_DEBUGFS=\"1\" option is used and recombined with symbols "
+                             "in different location",
+                             metavar="DIR")
+
+    option_parser.add_option("-o", "--out", dest="out",
+                             action="store_true",
+                             help="output shell script that equvivalent invocation of this script with "
+                             "given set of arguments, in given bitbake environment. It could be stored in "
+                             "separate shell script and could be repeated without incuring bitbake -e "
+                             "invocation overhead",
+                             default=False)
+
+    option_parser.add_option("-d", "--debug", dest="debug",
+                             action="store_true",
+                             help="enable debug output. Use this option to see resulting stap invocation",
+                             default=False)
+
+    # is invocation follow syntax from orignal crosstap shell script
+    legacy_args = False
+
+    # check if we called the legacy way
+    if len(sys.argv) >= 3:
+        if sys.argv[1].find("@") != -1 and os.path.exists(sys.argv[2]):
+            legacy_args = True
+
+            # fill options values for legacy invocation case
+            options = optparse.Values
+            options.script = sys.argv[2]
+            options.remote = sys.argv[1]
+            options.image = None
+            options.module = None
+            options.sysroot = None
+            options.out = None
+            options.debug = None
+            remaining_args = sys.argv[3:]
+
+    if not legacy_args:
+        (options, remaining_args) = option_parser.parse_args()
+
+    if not options.script or not os.path.exists(options.script):
+        print("'-s FILE' option is missing\n")
+        option_parser.print_help()
+    else:
+        stap = Stap(options.script, options.module, options.remote)
+        discovery = ParamDiscovery(options.image)
+        discovery.discover()
+        if not discovery.check(options.sysroot):
+            option_parser.print_help()
+        else:
+            stap.sysroot = options.sysroot
+            discovery.fill_stap(stap)
+
+            if options.out:
+                stap.display_command(remaining_args)
+            else:
+                cmd = stap.command(remaining_args)
+                env = stap.environment()
+
+                if options.debug:
+                    print(" ".join(cmd))
+
+                os.execve(cmd[0], cmd, env)
+
+main()
diff --git a/import-layers/yocto-poky/scripts/devtool b/import-layers/yocto-poky/scripts/devtool
index 5292f18..d681a19 100755
--- a/import-layers/yocto-poky/scripts/devtool
+++ b/import-layers/yocto-poky/scripts/devtool
@@ -113,22 +113,30 @@
     externalsrc_re = re.compile(r'^EXTERNALSRC(_pn-([^ =]+))? *= *"([^"]*)"$')
     for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')):
         with open(fn, 'r') as f:
+            pnvalues = {}
             for line in f:
                 res = externalsrc_re.match(line.rstrip())
                 if res:
-                    pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0]
+                    recipepn = os.path.splitext(os.path.basename(fn))[0].split('_')[0]
+                    pn = res.group(2) or recipepn
                     # Find the recipe file within the workspace, if any
                     bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*')
                     recipefile = glob.glob(os.path.join(config.workspace_path,
                                                         'recipes',
-                                                        pn,
+                                                        recipepn,
                                                         bbfile))
                     if recipefile:
                         recipefile = recipefile[0]
-                    workspace[pn] = {'srctree': res.group(3),
-                                     'bbappend': fn,
-                                     'recipefile': recipefile}
-                    logger.debug('Found recipe %s' % workspace[pn])
+                    pnvalues['srctree'] = res.group(3)
+                    pnvalues['bbappend'] = fn
+                    pnvalues['recipefile'] = recipefile
+                elif line.startswith('# srctreebase: '):
+                    pnvalues['srctreebase'] = line.split(':', 1)[1].strip()
+            if pnvalues:
+                if not pnvalues.get('srctreebase', None):
+                    pnvalues['srctreebase'] = pnvalues['srctree']
+                logger.debug('Found recipe %s' % pnvalues)
+                workspace[pn] = pnvalues
 
 def create_workspace(args, config, basepath, workspace):
     if args.layerpath:
@@ -157,6 +165,7 @@
             f.write('BBFILE_PATTERN_workspacelayer = "^$' + '{LAYERDIR}/"\n')
             f.write('BBFILE_PATTERN_IGNORE_EMPTY_workspacelayer = "1"\n')
             f.write('BBFILE_PRIORITY_workspacelayer = "99"\n')
+            f.write('LAYERSERIES_COMPAT_workspacelayer = "${LAYERSERIES_COMPAT_core}"\n')
         # Add a README file
         with open(os.path.join(workspacedir, 'README'), 'w') as f:
             f.write('This layer was created by the OpenEmbedded devtool utility in order to\n')
@@ -182,7 +191,11 @@
     if not os.path.exists(bblayers_conf):
         logger.error('Unable to find bblayers.conf')
         return
-    _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, config.workspace_path)
+    if os.path.abspath(workspacedir) != os.path.abspath(config.workspace_path):
+        removedir = config.workspace_path
+    else:
+        removedir = None
+    _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, removedir)
     if added:
         logger.info('Enabling workspace layer in bblayers.conf')
     if config.workspace_path != workspacedir:
diff --git a/import-layers/yocto-poky/scripts/distro/build-recipe-list.py b/import-layers/yocto-poky/scripts/distro/build-recipe-list.py
new file mode 100755
index 0000000..2162764
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/distro/build-recipe-list.py
@@ -0,0 +1,129 @@
+#!/usr/bin/env python3
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+
+import os
+import shutil
+import csv
+import sys
+import argparse
+
+__version__ = "0.1.0"
+
+# set of BPNs
+recipenames = set()
+# map of recipe -> data
+allrecipes = {}
+
+def make_bpn(recipe):
+    prefixes = ("nativesdk-",)
+    suffixes = ("-native", "-cross", "-initial", "-intermediate", "-crosssdk", "-cross-canadian")
+    for ix in prefixes + suffixes:
+        if ix in recipe:
+            recipe = recipe.replace(ix, "")
+    return recipe
+
+def gather_recipes(rows):
+    for row in rows:
+        recipe = row[0]
+        bpn = make_bpn(recipe)
+        if bpn not in recipenames:
+            recipenames.add(bpn)
+        if recipe not in allrecipes:
+            allrecipes[recipe] = row
+
+def generate_recipe_list():
+    # machine list
+    machine_list = ( "qemuarm64", "qemuarm", "qemumips64", "qemumips", "qemuppc", "qemux86-64", "qemux86" )
+    # set filename format
+    fnformat = 'distrodata.%s.csv'
+
+    # store all data files in distrodata
+    datadir = 'distrodata'
+
+    # create the directory if it does not exists
+    if not os.path.exists(datadir):
+        os.mkdir(datadir)
+
+    # doing bitbake distrodata
+    for machine in machine_list:
+        os.system('MACHINE='+ machine + ' bitbake -k universe -c distrodata')
+        shutil.copy('tmp/log/distrodata.csv', 'distrodata/' + fnformat % machine)
+
+    for machine in machine_list:
+        with open('distrodata/' + fnformat % machine) as f:
+            reader = csv.reader(f)
+            rows = reader.__iter__()
+            gather_recipes(rows)
+
+    with open('recipe-list.txt', 'w') as f:
+        for recipe in sorted(recipenames):
+            f.write("%s\n" % recipe)
+    print("file : recipe-list.txt is created with %d entries." % len(recipenames))
+
+    with open('all-recipe-list.txt', 'w') as f:
+        for recipe, row in sorted(allrecipes.items()):
+            f.write("%s\n" % ','.join(row))
+
+
+def diff_for_new_recipes(recipe1, recipe2):
+    prev_recipe_path = recipe1 + '/'
+    curr_recipe_path = recipe2 + '/'
+    if not os.path.isfile(prev_recipe_path + 'recipe-list.txt') or not os.path.isfile(curr_recipe_path + 'recipe-list.txt'):
+        print("recipe files do not exists. please verify that the file exists.")
+        exit(1)
+
+    import csv
+
+    prev = []
+    new = []
+
+    with open(prev_recipe_path + 'recipe-list.txt') as f:
+        prev = f.readlines()
+
+    with open(curr_recipe_path + 'recipe-list.txt') as f:
+        new = f.readlines()
+
+    updates = []
+    for pn in new:
+        if not pn in prev:
+            updates.append(pn.rstrip())
+
+    allrecipe = []
+    with open(recipe1 + '_' + recipe2 + '_new_recipe_list.txt','w') as dr:
+        with open(curr_recipe_path + 'all-recipe-list.txt') as f:
+            reader = csv.reader(f, delimiter=',')
+            for row in reader:
+                if row[0] in updates:
+                    dr.write("%s,%s,%s" % (row[0], row[3], row[5]))
+                    if len(row[9:]) > 0:
+                        dr.write(",%s" % ','.join(row[9:]))
+                    dr.write("\n")
+
+def main(argv):
+    if argv[0] == "generate_recipe_list":
+        generate_recipe_list()
+    elif argv[0] == "compare_recipe":
+        diff_for_new_recipes(argv[1], argv[2])
+    else:
+        print("no such option. choose either 'generate_recipe_list' or 'compare_recipe'")
+
+    exit(0)
+
+if __name__ == "__main__":
+    try:
+        sys.exit(main(sys.argv[1:]))
+    except Exception as e:
+        print("Exception :", e)
+        sys.exit(1)
+
diff --git a/import-layers/yocto-poky/scripts/distro/distrocompare.sh b/import-layers/yocto-poky/scripts/distro/distrocompare.sh
new file mode 100755
index 0000000..908760c
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/distro/distrocompare.sh
@@ -0,0 +1,123 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2017, Intel Corporation.
+# All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# distrocompare.sh : provides capability to get a list of new packages
+#                    based on two distinct branches. This script takes
+#                    2 parameters; either a commit-ish or a branch name
+#
+#                    To run : distrocompare.sh <older hash> <newer hash>
+#                    E.g. distrocompare.sh morty 92aa0e7
+#                    E.g. distrocompare.sh morty pyro
+#
+
+# get input as version
+previous_version=$1
+current_version=$2
+
+# set previous and current version
+if [ -z "$2" ]; then
+    previous_version=$1
+    current_version="current"
+fi
+
+# get script location. That's where the source supposedly located as well.
+scriptdir="$( realpath $(dirname "${BASH_SOURCE[0]}" ))"
+sourcedir="$( realpath $scriptdir/../.. )"
+
+# create working directory
+workdir=$(mktemp -d)
+
+# prepare to rollback to the branch if not similar
+branch=`cd $sourcedir; git branch | grep \* | cut -d ' ' -f2`
+
+# set current workdir to store final result
+currentworkdir=`pwd`
+
+# persists the file after local repo change
+cp $scriptdir/build-recipe-list.py $workdir
+
+#==================================================================
+
+function bake_distrodata {
+    # get to source directory of the git
+    cd $sourcedir
+
+    # change the branch / commit. Do not change if input is current
+    if [ "$1" != "current" ]; then
+        output=$(git checkout $1 2>&1)
+
+        # exit if git fails
+        if [[ $output == *"error"* ]]; then
+            echo "git error : $output"
+            echo "exiting ... "
+            rm -rf $workdir
+            exit
+        fi
+    fi
+
+    # make tmp as workdir
+    cd $workdir
+
+    # source oe-init to generate a new build folder
+    source $sourcedir/oe-init-build-env $1
+
+    # if file already exists with distrodata, do not append
+    if ! grep -q "distrodata" "conf/local.conf"; then
+        # add inherit distrodata to local.conf to enable distrodata feature
+        echo 'INHERIT += "distrodata"' >> conf/local.conf
+    fi
+
+    # use from tmp
+    $workdir/build-recipe-list.py generate_recipe_list
+}
+
+bake_distrodata $previous_version
+bake_distrodata $current_version
+
+#==================================================================
+
+cd $workdir
+
+# compare the 2 generated recipe-list.txt
+$workdir/build-recipe-list.py compare_recipe $previous_version $current_version
+
+# copy final result to current working directory
+cp $workdir/*_new_recipe_list.txt $currentworkdir
+
+if [ $? -ne 0 ]; then
+    rm -rf $workdir/$previous_version
+    rm -rf $workdir/$current_version
+    rm $workdir/build-recipe-list.py
+    # preserve the result in /tmp/distrodata if fail to copy the result over
+    exit
+fi
+
+# cleanup
+rm -rf $workdir
+
+# perform rollback branch
+cd $sourcedir
+currentbranch=`git branch | grep \* | cut -d ' ' -f2`
+if [ "$currentbranch" != "$branch" ]; then
+    git checkout $branch
+fi
+
+cd $currentworkdir
+
+#==================================================================
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/__init__.py b/import-layers/yocto-poky/scripts/lib/bsp/__init__.py
deleted file mode 100644
index 8bbb6e1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Yocto BSP tools library
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/engine.py b/import-layers/yocto-poky/scripts/lib/bsp/engine.py
deleted file mode 100644
index 07a15bb..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/engine.py
+++ /dev/null
@@ -1,1931 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# This module implements the templating engine used by 'yocto-bsp' to
-# create BSPs.  The BSP templates are simply the set of files expected
-# to appear in a generated BSP, marked up with a small set of tags
-# used to customize the output.  The engine parses through the
-# templates and generates a Python program containing all the logic
-# and input elements needed to display and retrieve BSP-specific
-# information from the user.  The resulting program uses those results
-# to generate the final BSP files.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-import os
-import sys
-from abc import ABCMeta, abstractmethod
-from .tags import *
-import shlex
-import json
-import subprocess
-import shutil
-
-class Line(metaclass=ABCMeta):
-    """
-    Generic (abstract) container representing a line that will appear
-    in the BSP-generating program.
-    """
-
-    def __init__(self, line):
-        self.line = line
-        self.generated_line = ""
-        self.prio = sys.maxsize
-        self.discard = False
-
-    @abstractmethod
-    def gen(self, context = None):
-        """
-        Generate the final executable line that will appear in the
-        BSP-generation program.
-        """
-        pass
-
-    def escape(self, line):
-        """
-        Escape single and double quotes and backslashes until I find
-        something better (re.escape() escapes way too much).
-        """
-        return line.replace("\\", "\\\\").replace("\"", "\\\"").replace("'", "\\'")
-
-    def parse_error(self, msg, lineno, line):
-         raise SyntaxError("%s: %s" % (msg, line))
-
-
-class NormalLine(Line):
-    """
-    Container for normal (non-tag) lines.
-    """
-    def __init__(self, line):
-        Line.__init__(self, line)
-        self.is_filename = False
-        self.is_dirname = False
-        self.out_filebase = None
-
-    def gen(self, context = None):
-        if self.is_filename:
-            line = "current_file = \"" + os.path.join(self.out_filebase, self.escape(self.line)) + "\"; of = open(current_file, \"w\")"
-        elif self.is_dirname:
-            dirname = os.path.join(self.out_filebase, self.escape(self.line))
-            line = "if not os.path.exists(\"" + dirname + "\"): os.mkdir(\"" + dirname + "\")"
-        else:
-            line = "of.write(\"" + self.escape(self.line) + "\\n\")"
-        return line
-
-
-class CodeLine(Line):
-    """
-    Container for Python code tag lines.
-    """
-    def __init__(self, line):
-        Line.__init__(self, line)
-
-    def gen(self, context = None):
-        return self.line
-
-
-class Assignment:
-    """
-    Representation of everything we know about {{=name }} tags.
-    Instances of these are used by Assignment lines.
-    """
-    def __init__(self, start, end, name):
-        self.start = start
-        self.end = end
-        self.name = name
-
-
-class AssignmentLine(NormalLine):
-    """
-    Container for normal lines containing assignment tags.  Assignment
-    tags must be in ascending order of 'start' value.
-    """
-    def __init__(self, line):
-        NormalLine.__init__(self, line)
-        self.assignments = []
-
-    def add_assignment(self, start, end, name):
-        self.assignments.append(Assignment(start, end, name))
-
-    def gen(self, context = None):
-        line = self.escape(self.line)
-
-        for assignment in self.assignments:
-            replacement = "\" + " + assignment.name + " + \""
-            idx = line.find(ASSIGN_TAG)
-            line = line[:idx] + replacement + line[idx + assignment.end - assignment.start:]
-        if self.is_filename:
-            return "current_file = \"" + os.path.join(self.out_filebase, line) + "\"; of = open(current_file, \"w\")"
-        elif self.is_dirname:
-            dirname = os.path.join(self.out_filebase, line)
-            return "if not os.path.exists(\"" + dirname + "\"): os.mkdir(\"" + dirname + "\")"
-        else:
-            return "of.write(\"" + line + "\\n\")"
-
-
-class InputLine(Line):
-    """
-    Base class for Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        Line.__init__(self, tag)
-        self.props = props
-        self.lineno = lineno
-
-        try:
-            self.prio = int(props["prio"])
-        except KeyError:
-            self.prio = sys.maxsize
-
-    def gen(self, context = None):
-        try:
-            depends_on = self.props["depends-on"]
-            try:
-                depends_on_val = self.props["depends-on-val"]
-            except KeyError:
-                self.parse_error("No 'depends-on-val' for 'depends-on' property",
-                                 self.lineno, self.line)
-        except KeyError:
-            pass
-
-
-class EditBoxInputLine(InputLine):
-    """
-    Base class for 'editbox' Input lines.
-
-    props:
-        name: example - "Load address"
-        msg: example - "Please enter the load address"
-    result:
-        Sets the value of the variable specified by 'name' to
-        whatever the user typed.
-    """
-    def __init__(self, props, tag, lineno):
-        InputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        InputLine.gen(self, context)
-        name = self.props["name"]
-        if not name:
-            self.parse_error("No input 'name' property found",
-                             self.lineno, self.line)
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        line = name + " = default(input(\"" + msg + " \"), " + name + ")"
-
-        return line
-
-
-class GitRepoEditBoxInputLine(EditBoxInputLine):
-    """
-    Base class for 'editbox' Input lines for user input of remote git
-    repos.  This class verifies the existence and connectivity of the
-    specified git repo.
-
-    props:
-        name: example - "Load address"
-        msg: example - "Please enter the load address"
-    result:
-        Sets the value of the variable specified by 'name' to
-        whatever the user typed.
-    """
-    def __init__(self, props, tag, lineno):
-        EditBoxInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        EditBoxInputLine.gen(self, context)
-        name = self.props["name"]
-        if not name:
-            self.parse_error("No input 'name' property found",
-                             self.lineno, self.line)
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        line = name + " = get_verified_git_repo(\"" + msg + "\"," + name + ")"
-
-        return line
-
-
-class FileEditBoxInputLine(EditBoxInputLine):
-    """
-    Base class for 'editbox' Input lines for user input of existing
-    files.  This class verifies the existence of the specified file.
-
-    props:
-        name: example - "Load address"
-        msg: example - "Please enter the load address"
-    result:
-        Sets the value of the variable specified by 'name' to
-        whatever the user typed.
-    """
-    def __init__(self, props, tag, lineno):
-        EditBoxInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        EditBoxInputLine.gen(self, context)
-        name = self.props["name"]
-        if not name:
-            self.parse_error("No input 'name' property found",
-                             self.lineno, self.line)
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        line = name + " = get_verified_file(\"" + msg + "\"," + name + ", True)"
-
-        return line
-
-
-class BooleanInputLine(InputLine):
-    """
-    Base class for boolean Input lines.
-    props:
-        name: example - "keyboard"
-        msg:  example - "Got keyboard?"
-    result:
-        Sets the value of the variable specified by 'name' to "yes" or "no"
-        example - keyboard = "yes"
-    """
-    def __init__(self, props, tag, lineno):
-        InputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        InputLine.gen(self, context)
-        name = self.props["name"]
-        if not name:
-            self.parse_error("No input 'name' property found",
-                             self.lineno, self.line)
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        line = name + " = boolean(input(\"" + msg + " \"), " + name + ")"
-
-        return line
-
-
-class ListInputLine(InputLine, metaclass=ABCMeta):
-    """
-    Base class for List-based Input lines. e.g. Choicelist, Checklist.
-    """
-
-    def __init__(self, props, tag, lineno):
-        InputLine.__init__(self, props, tag, lineno)
-        self.choices = []
-
-    def gen_choicepair_list(self):
-        """Generate a list of 2-item val:desc lists from self.choices."""
-        if not self.choices:
-            return None
-
-        choicepair_list = list()
-
-        for choice in self.choices:
-            choicepair = []
-            choicepair.append(choice.val)
-            choicepair.append(choice.desc)
-            choicepair_list.append(choicepair)
-
-        return choicepair_list
-
-    def gen_degenerate_choicepair_list(self, choices):
-        """Generate a list of 2-item val:desc with val=desc from passed-in choices."""
-        choicepair_list = list()
-
-        for choice in choices:
-            choicepair = []
-            choicepair.append(choice)
-            choicepair.append(choice)
-            choicepair_list.append(choicepair)
-
-        return choicepair_list
-
-    def exec_listgen_fn(self, context = None):
-        """
-        Execute the list-generating function contained as a string in
-        the "gen" property.
-        """
-        retval = None
-        try:
-            fname = self.props["gen"]
-            modsplit = fname.split('.')
-            mod_fn = modsplit.pop()
-            mod = '.'.join(modsplit)
-
-            __import__(mod)
-            # python 2.7 has a better way to do this using importlib.import_module
-            m = sys.modules[mod]
-
-            fn = getattr(m, mod_fn)
-            if not fn:
-                self.parse_error("couldn't load function specified for 'gen' property ",
-                                 self.lineno, self.line)
-            retval = fn(context)
-            if not retval:
-                self.parse_error("function specified for 'gen' property returned nothing ",
-                                 self.lineno, self.line)
-        except KeyError:
-            pass
-
-        return retval
-
-    def gen_choices_str(self, choicepairs):
-        """
-        Generate a numbered list of choices from a list of choicepairs
-        for display to the user.
-        """
-        choices_str = ""
-
-        for i, choicepair in enumerate(choicepairs):
-            choices_str += "\t" + str(i + 1) + ") " + choicepair[1] + "\n"
-
-        return choices_str
-
-    def gen_choices_val_str(self, choicepairs):
-        """
-        Generate an array of choice values corresponding to the
-        numbered list generated by gen_choices_str().
-        """
-        choices_val_list = "["
-
-        for i, choicepair in enumerate(choicepairs):
-            choices_val_list += "\"" + choicepair[0] + "\","
-        choices_val_list += "]"
-
-        return choices_val_list
-
-    def gen_choices_val_list(self, choicepairs):
-        """
-        Generate an array of choice values corresponding to the
-        numbered list generated by gen_choices_str().
-        """
-        choices_val_list = []
-
-        for i, choicepair in enumerate(choicepairs):
-            choices_val_list.append(choicepair[0])
-
-        return choices_val_list
-
-    def gen_choices_list(self, context = None, checklist = False):
-        """
-        Generate an array of choice values corresponding to the
-        numbered list generated by gen_choices_str().
-        """
-        choices = self.exec_listgen_fn(context)
-        if choices:
-            if len(choices) == 0:
-                self.parse_error("No entries available for input list",
-                                 self.lineno, self.line)
-            choicepairs = self.gen_degenerate_choicepair_list(choices)
-        else:
-            if len(self.choices) == 0:
-                self.parse_error("No entries available for input list",
-                                 self.lineno, self.line)
-            choicepairs = self.gen_choicepair_list()
-
-        return choicepairs
-
-    def gen_choices(self, context = None, checklist = False):
-        """
-        Generate an array of choice values corresponding to the
-        numbered list generated by gen_choices_str(), display it to
-        the user, and process the result.
-        """
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        choicepairs = self.gen_choices_list(context, checklist)
-
-        choices_str = self.gen_choices_str(choicepairs)
-        choices_val_list = self.gen_choices_val_list(choicepairs)
-        if checklist:
-            choiceval = default(find_choicevals(input(msg + "\n" + choices_str), choices_val_list), default_choice)
-        else:
-            choiceval = default(find_choiceval(input(msg + "\n" + choices_str), choices_val_list), default_choice)
-
-        return choiceval
-
-
-def find_choiceval(choice_str, choice_list):
-    """
-    Take number as string and return val string from choice_list,
-    empty string if oob.  choice_list is a simple python list.
-    """
-    choice_val = ""
-
-    try:
-        choice_idx = int(choice_str)
-        if choice_idx <= len(choice_list):
-            choice_idx -= 1
-            choice_val = choice_list[choice_idx]
-    except ValueError:
-        pass
-
-    return choice_val
-
-
-def find_choicevals(choice_str, choice_list):
-    """
-    Take numbers as space-separated string and return vals list from
-    choice_list, empty list if oob.  choice_list is a simple python
-    list.
-    """
-    choice_vals = []
-
-    choices = choice_str.split()
-    for choice in choices:
-        choice_vals.append(find_choiceval(choice, choice_list))
-
-    return choice_vals
-
-
-def default(input_str, name):
-    """
-    Return default if no input_str, otherwise stripped input_str.
-    """
-    if not input_str:
-        return name
-
-    return input_str.strip()
-
-
-def verify_git_repo(giturl):
-    """
-    Verify that the giturl passed in can be connected to.  This can be
-    used as a check for the existence of the given repo and/or basic
-    git remote connectivity.
-
-    Returns True if the connection was successful, fals otherwise
-    """
-    if not giturl:
-        return False
-
-    gitcmd = "git ls-remote %s > /dev/null 2>&1" % (giturl)
-    rc = subprocess.call(gitcmd, shell=True)
-    if rc == 0:
-        return True
-
-    return False
-
-
-def get_verified_git_repo(input_str, name):
-    """
-    Return git repo if verified, otherwise loop forever asking user
-    for filename.
-    """
-    msg = input_str.strip() + " "
-
-    giturl = default(input(msg), name)
-
-    while True:
-        if verify_git_repo(giturl):
-            return giturl
-        giturl = default(input(msg), name)
-
-
-def get_verified_file(input_str, name, filename_can_be_null):
-    """
-    Return filename if the file exists, otherwise loop forever asking
-    user for filename.
-    """
-    msg = input_str.strip() + " "
-
-    filename = default(input(msg), name)
-
-    while True:
-        if not filename and filename_can_be_null:
-            return filename
-        if os.path.isfile(filename):
-            return filename
-        filename = default(input(msg), name)
-
-
-def replace_file(replace_this, with_this):
-    """
-    Replace the given file with the contents of filename, retaining
-    the original filename.
-    """
-    try:
-        replace_this.close()
-        shutil.copy(with_this, replace_this.name)
-    except IOError:
-        pass
-
-
-def boolean(input_str, name):
-    """
-    Return lowercase version of first char in string, or value in name.
-    """
-    if not input_str:
-        return name
-
-    str = input_str.lower().strip()
-    if str and str[0] == "y" or str[0] == "n":
-        return str[0]
-    else:
-        return name
-
-
-def strip_base(input_str):
-    """
-    strip '/base' off the end of input_str, so we can use 'base' in
-    the branch names we present to the user.
-    """
-    if input_str and input_str.endswith("/base"):
-        return input_str[:-len("/base")]
-    return input_str.strip()
-
-
-deferred_choices = {}
-
-def gen_choices_defer(input_line, context, checklist = False):
-    """
-    Save the context hashed the name of the input item, which will be
-    passed to the gen function later.
-    """
-    name = input_line.props["name"]
-
-    try:
-        nameappend = input_line.props["nameappend"]
-    except KeyError:
-        nameappend = ""
-
-    try:
-        branches_base = input_line.props["branches_base"]
-    except KeyError:
-        branches_base = ""
-
-    filename = input_line.props["filename"]
-
-    closetag_start = filename.find(CLOSE_TAG)
-
-    if closetag_start != -1:
-        filename = filename[closetag_start + len(CLOSE_TAG):]
-
-    filename = filename.strip()
-    filename = os.path.splitext(filename)[0]
-
-    captured_context = capture_context(context)
-    context["filename"] = filename
-    captured_context["filename"] = filename
-    context["nameappend"] = nameappend
-    captured_context["nameappend"] = nameappend
-    context["branches_base"] = branches_base
-    captured_context["branches_base"] = branches_base
-
-    deferred_choice = (input_line, captured_context, checklist)
-    key = name + "_" + filename + "_" + nameappend
-    deferred_choices[key] = deferred_choice
-
-
-def invoke_deferred_choices(name):
-    """
-    Invoke the choice generation function using the context hashed by
-    'name'.
-    """
-    deferred_choice = deferred_choices[name]
-    input_line = deferred_choice[0]
-    context = deferred_choice[1]
-    checklist = deferred_choice[2]
-
-    context["name"] = name
-
-    choices = input_line.gen_choices(context, checklist)
-
-    return choices
-
-
-class ChoicelistInputLine(ListInputLine):
-    """
-    Base class for choicelist Input lines.
-    props:
-        name: example - "xserver_choice"
-        msg:  example - "Please select an xserver for this machine"
-    result:
-        Sets the value of the variable specified by 'name' to whichever Choice was chosen
-        example - xserver_choice = "xserver_vesa"
-    """
-    def __init__(self, props, tag, lineno):
-        ListInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        InputLine.gen(self, context)
-
-        gen_choices_defer(self, context)
-        name = self.props["name"]
-        nameappend = context["nameappend"]
-        filename = context["filename"]
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        line = name + " = default(invoke_deferred_choices(\"" + name + "_" + filename + "_" + nameappend + "\"), \"" + default_choice + "\")"
-
-        return line
-
-
-class ListValInputLine(InputLine):
-    """
-    Abstract base class for choice and checkbox Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        InputLine.__init__(self, props, tag, lineno)
-
-        try:
-            self.val = self.props["val"]
-        except KeyError:
-            self.parse_error("No input 'val' property found", self.lineno, self.line)
-
-        try:
-            self.desc = self.props["msg"]
-        except KeyError:
-            self.parse_error("No input 'msg' property found", self.lineno, self.line)
-
-
-class ChoiceInputLine(ListValInputLine):
-    """
-    Base class for choicelist item Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        ListValInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        return None
-
-
-class ChecklistInputLine(ListInputLine):
-    """
-    Base class for checklist Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        ListInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        InputLine.gen(self, context)
-
-        gen_choices_defer(self, context, True)
-        name = self.props["name"]
-        nameappend = context["nameappend"]
-        filename = context["filename"]
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        line = name + " = default(invoke_deferred_choices(\"" + name + "_" + filename + "_" + nameappend + "\"), \"" + default_choice + "\")"
-
-        return line
-
-
-class CheckInputLine(ListValInputLine):
-    """
-    Base class for checklist item Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        ListValInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        return None
-
-
-dirname_substitutions = {}
-
-class SubstrateBase(object):
-    """
-    Base class for both expanded and unexpanded file and dir container
-    objects.
-    """
-    def __init__(self, filename, filebase, out_filebase):
-        self.filename = filename
-        self.filebase = filebase
-        self.translated_filename = filename
-        self.out_filebase = out_filebase
-        self.raw_lines = []
-        self.expanded_lines = []
-        self.prev_choicelist = None
-
-    def parse_error(self, msg, lineno, line):
-         raise SyntaxError("%s: [%s: %d]: %s" % (msg, self.filename, lineno, line))
-
-    def expand_input_tag(self, tag, lineno):
-        """
-        Input tags consist of the word 'input' at the beginning,
-        followed by name:value property pairs which are converted into
-        a dictionary.
-        """
-        propstr = tag[len(INPUT_TAG):]
-
-        props = dict(prop.split(":", 1) for prop in shlex.split(propstr))
-        props["filename"] = self.filename
-
-        input_type = props[INPUT_TYPE_PROPERTY]
-        if not props[INPUT_TYPE_PROPERTY]:
-            self.parse_error("No input 'type' property found", lineno, tag)
-
-        if input_type == "boolean":
-            return BooleanInputLine(props, tag, lineno)
-        if input_type == "edit":
-            return EditBoxInputLine(props, tag, lineno)
-        if input_type == "edit-git-repo":
-            return GitRepoEditBoxInputLine(props, tag, lineno)
-        if input_type == "edit-file":
-            return FileEditBoxInputLine(props, tag, lineno)
-        elif input_type == "choicelist":
-            self.prev_choicelist = ChoicelistInputLine(props, tag, lineno)
-            return self.prev_choicelist
-        elif input_type == "choice":
-            if not self.prev_choicelist:
-                self.parse_error("Found 'choice' input tag but no previous choicelist",
-                                 lineno, tag)
-            choice = ChoiceInputLine(props, tag, lineno)
-            self.prev_choicelist.choices.append(choice)
-            return choice
-        elif input_type == "checklist":
-            return ChecklistInputLine(props, tag, lineno)
-        elif input_type == "check":
-            return CheckInputLine(props, tag, lineno)
-
-    def expand_assignment_tag(self, start, line, lineno):
-        """
-        Expand all tags in a line.
-        """
-        expanded_line = AssignmentLine(line.rstrip())
-
-        while start != -1:
-            end = line.find(CLOSE_TAG, start)
-            if end == -1:
-                self.parse_error("No close tag found for assignment tag", lineno, line)
-            else:
-                name = line[start + len(ASSIGN_TAG):end].strip()
-                expanded_line.add_assignment(start, end + len(CLOSE_TAG), name)
-                start = line.find(ASSIGN_TAG, end)
-
-        return expanded_line
-
-    def expand_tag(self, line, lineno):
-        """
-        Returns a processed tag line, or None if there was no tag
-
-        The rules for tags are very simple:
-            - No nested tags
-            - Tags start with {{ and end with }}
-            - An assign tag, {{=, can appear anywhere and will
-              be replaced with what the assignment evaluates to
-            - Any other tag occupies the whole line it is on
-                - if there's anything else on the tag line, it's an error
-                - if it starts with 'input', it's an input tag and
-                  will only be used for prompting and setting variables
-                - anything else is straight Python
-                - tags are in effect only until the next blank line or tag or 'pass' tag
-                - we don't have indentation in tags, but we need some way to end a block
-                  forcefully without blank lines or other tags - that's the 'pass' tag
-                - todo: implement pass tag
-                - directories and filenames can have tags as well, but only assignment
-                  and 'if' code lines
-                - directories and filenames are the only case where normal tags can
-                  coexist with normal text on the same 'line'
-        """
-        start = line.find(ASSIGN_TAG)
-        if start != -1:
-            return self.expand_assignment_tag(start, line, lineno)
-
-        start = line.find(OPEN_TAG)
-        if start == -1:
-            return None
-
-        end = line.find(CLOSE_TAG, 0)
-        if end == -1:
-             self.parse_error("No close tag found for open tag", lineno, line)
-
-        tag = line[start + len(OPEN_TAG):end].strip()
-
-        if not tag.lstrip().startswith(INPUT_TAG):
-            return CodeLine(tag)
-
-        return self.expand_input_tag(tag, lineno)
-
-    def append_translated_filename(self, filename):
-        """
-        Simply append filename to translated_filename
-        """
-        self.translated_filename = os.path.join(self.translated_filename, filename)
-
-    def get_substituted_file_or_dir_name(self, first_line, tag):
-        """
-        If file or dir names contain name substitutions, return the name
-        to substitute.  Note that this is just the file or dirname and
-        doesn't include the path.
-        """
-        filename = first_line.find(tag)
-        if filename != -1:
-            filename += len(tag)
-        substituted_filename = first_line[filename:].strip()
-        this = substituted_filename.find(" this")
-        if this != -1:
-            head, tail = os.path.split(self.filename)
-            substituted_filename = substituted_filename[:this + 1] + tail
-            if tag == DIRNAME_TAG: # get rid of .noinstall in dirname
-                substituted_filename = substituted_filename.split('.')[0]
-
-        return substituted_filename
-
-    def get_substituted_filename(self, first_line):
-        """
-        If a filename contains a name substitution, return the name to
-        substitute.  Note that this is just the filename and doesn't
-        include the path.
-        """
-        return self.get_substituted_file_or_dir_name(first_line, FILENAME_TAG)
-
-    def get_substituted_dirname(self, first_line):
-        """
-        If a dirname contains a name substitution, return the name to
-        substitute.  Note that this is just the dirname and doesn't
-        include the path.
-        """
-        return self.get_substituted_file_or_dir_name(first_line, DIRNAME_TAG)
-
-    def substitute_filename(self, first_line):
-        """
-        Find the filename in first_line and append it to translated_filename.
-        """
-        substituted_filename = self.get_substituted_filename(first_line)
-        self.append_translated_filename(substituted_filename);
-
-    def substitute_dirname(self, first_line):
-        """
-        Find the dirname in first_line and append it to translated_filename.
-        """
-        substituted_dirname = self.get_substituted_dirname(first_line)
-        self.append_translated_filename(substituted_dirname);
-
-    def is_filename_substitution(self, line):
-        """
-        Do we have a filename subustition?
-        """
-        if line.find(FILENAME_TAG) != -1:
-            return True
-        return False
-
-    def is_dirname_substitution(self, line):
-        """
-        Do we have a dirname subustition?
-        """
-        if line.find(DIRNAME_TAG) != -1:
-            return True
-        return False
-
-    def translate_dirname(self, first_line):
-        """
-        Just save the first_line mapped by filename.  The later pass
-        through the directories will look for a dirname.noinstall
-        match and grab the substitution line.
-        """
-        dirname_substitutions[self.filename] = first_line
-
-    def translate_dirnames_in_path(self, path):
-        """
-        Translate dirnames below this file or dir, not including tail.
-        dirname_substititions is keyed on actual untranslated filenames.
-        translated_path contains the subsititutions for each element.
-        """
-        remainder = path[len(self.filebase)+1:]
-        translated_path = untranslated_path = self.filebase
-
-        untranslated_dirs = remainder.split(os.sep)
-
-        for dir in untranslated_dirs:
-            key = os.path.join(untranslated_path, dir + '.noinstall')
-            try:
-                first_line = dirname_substitutions[key]
-            except KeyError:
-                translated_path = os.path.join(translated_path, dir)
-                untranslated_path = os.path.join(untranslated_path, dir)
-                continue
-            substituted_dir = self.get_substituted_dirname(first_line)
-            translated_path = os.path.join(translated_path, substituted_dir)
-            untranslated_path = os.path.join(untranslated_path, dir)
-
-        return translated_path
-
-    def translate_file_or_dir_name(self):
-        """
-        Originally we were allowed to use open/close/assign tags and python
-        code in the filename, which fit in nicely with the way we
-        processed the templates and generated code.  Now that we can't
-        do that, we make those tags proper file contents and have this
-        pass substitute the nice but non-functional names with those
-        'strange' ones, and then proceed as usual.
-
-        So, if files or matching dir<.noinstall> files contain
-        filename substitutions, this function translates them into the
-        corresponding 'strange' names, which future passes will expand
-        as they always have.  The resulting pathname is kept in the
-        file or directory's translated_filename.  Another way to think
-        about it is that self.filename is the input filename, and
-        translated_filename is the output filename before expansion.
-        """
-        # remove leaf file or dirname
-        head, tail = os.path.split(self.filename)
-        translated_path = self.translate_dirnames_in_path(head)
-        self.translated_filename = translated_path
-
-        # This is a dirname - does it have a matching .noinstall with
-        # a substitution?  If so, apply the dirname subsititution.
-        if not os.path.isfile(self.filename):
-            key = self.filename + ".noinstall"
-            try:
-                first_line = dirname_substitutions[key]
-            except KeyError:
-                self.append_translated_filename(tail)
-                return
-            self.substitute_dirname(first_line)
-            return
-
-        f = open(self.filename)
-        first_line = f.readline()
-        f.close()
-
-        # This is a normal filename not needing translation, just use
-        # it as-is.
-        if not first_line or not first_line.startswith("#"):
-            self.append_translated_filename(tail)
-            return
-
-        # If we have a filename substitution (first line in the file
-        # is a FILENAME_TAG line) do the substitution now.  If we have
-        # a dirname substitution (DIRNAME_TAG in dirname.noinstall
-        # meta-file), hash it so we can apply it when we see the
-        # matching dirname later.  Otherwise we have a regular
-        # filename, just use it as-is.
-        if self.is_filename_substitution(first_line):
-            self.substitute_filename(first_line)
-        elif self.is_dirname_substitution(first_line):
-            self.translate_dirname(first_line)
-        else:
-            self.append_translated_filename(tail)
-
-    def expand_file_or_dir_name(self):
-        """
-        Expand file or dir names into codeline.  Dirnames and
-        filenames can only have assignments or if statements.  First
-        translate if statements into CodeLine + (dirname or filename
-        creation).
-        """
-        lineno = 0
-
-        line = self.translated_filename[len(self.filebase):]
-        if line.startswith("/"):
-            line = line[1:]
-        opentag_start = -1
-
-        start = line.find(OPEN_TAG)
-        while start != -1:
-            if not line[start:].startswith(ASSIGN_TAG):
-                opentag_start = start
-                break
-            start += len(ASSIGN_TAG)
-            start = line.find(OPEN_TAG, start)
-
-        if opentag_start != -1:
-            end = line.find(CLOSE_TAG, opentag_start)
-            if end == -1:
-                self.parse_error("No close tag found for open tag", lineno, line)
-            # we have a {{ tag i.e. code
-            tag = line[opentag_start + len(OPEN_TAG):end].strip()
-            if not tag.lstrip().startswith(IF_TAG):
-                self.parse_error("Only 'if' tags are allowed in file or directory names",
-                                 lineno, line)
-            self.expanded_lines.append(CodeLine(tag))
-
-            # everything after }} is the actual filename (possibly with assignments)
-            # everything before is the pathname
-            line = line[:opentag_start] + line[end + len(CLOSE_TAG):].strip()
-
-        assign_start = line.find(ASSIGN_TAG)
-        if assign_start != -1:
-            assignment_tag = self.expand_assignment_tag(assign_start, line, lineno)
-            if isinstance(self, SubstrateFile):
-                assignment_tag.is_filename = True
-                assignment_tag.out_filebase = self.out_filebase
-            elif isinstance(self, SubstrateDir):
-                assignment_tag.is_dirname = True
-                assignment_tag.out_filebase = self.out_filebase
-            self.expanded_lines.append(assignment_tag)
-            return
-
-        normal_line = NormalLine(line)
-        if isinstance(self, SubstrateFile):
-            normal_line.is_filename = True
-            normal_line.out_filebase = self.out_filebase
-        elif isinstance(self, SubstrateDir):
-            normal_line.is_dirname = True
-            normal_line.out_filebase = self.out_filebase
-        self.expanded_lines.append(normal_line)
-
-    def expand(self):
-        """
-        Expand the file or dir name first, eventually this ends up
-        creating the file or dir.
-        """
-        self.translate_file_or_dir_name()
-        self.expand_file_or_dir_name()
-
-
-class SubstrateFile(SubstrateBase):
-    """
-    Container for both expanded and unexpanded substrate files.
-    """
-    def __init__(self, filename, filebase, out_filebase):
-        SubstrateBase.__init__(self, filename, filebase, out_filebase)
-
-    def read(self):
-        if self.raw_lines:
-            return
-        f = open(self.filename)
-        self.raw_lines = f.readlines()
-
-    def expand(self):
-        """Expand the contents of all template tags in the file."""
-        SubstrateBase.expand(self)
-        self.read()
-
-        for lineno, line in enumerate(self.raw_lines):
-            # only first line can be a filename substitition
-            if lineno == 0 and line.startswith("#") and FILENAME_TAG in line:
-                continue # skip it - we've already expanded it
-            expanded_line = self.expand_tag(line, lineno + 1) # humans not 0-based
-            if not expanded_line:
-                expanded_line = NormalLine(line.rstrip())
-            self.expanded_lines.append(expanded_line)
-
-    def gen(self, context = None):
-        """Generate the code that generates the BSP."""
-        base_indent = 0
-
-        indent = new_indent = base_indent
-
-        for line in self.expanded_lines:
-            genline = line.gen(context)
-            if not genline:
-                continue
-            if isinstance(line, InputLine):
-                line.generated_line = genline
-                continue
-            if genline.startswith(OPEN_START):
-                if indent == 1:
-                    base_indent = 1
-            if indent:
-                if genline == BLANKLINE_STR or (not genline.startswith(NORMAL_START)
-                                                and not genline.startswith(OPEN_START)):
-                    indent = new_indent = base_indent
-            if genline.endswith(":"):
-                new_indent = base_indent + 1
-            line.generated_line = (indent * INDENT_STR) + genline
-            indent = new_indent
-
-
-class SubstrateDir(SubstrateBase):
-    """
-    Container for both expanded and unexpanded substrate dirs.
-    """
-    def __init__(self, filename, filebase, out_filebase):
-        SubstrateBase.__init__(self, filename, filebase, out_filebase)
-
-    def expand(self):
-        SubstrateBase.expand(self)
-
-    def gen(self, context = None):
-        """Generate the code that generates the BSP."""
-        indent = new_indent = 0
-        for line in self.expanded_lines:
-            genline = line.gen(context)
-            if not genline:
-                continue
-            if genline.endswith(":"):
-                new_indent = 1
-            else:
-                new_indent = 0
-            line.generated_line = (indent * INDENT_STR) + genline
-            indent = new_indent
-
-
-def expand_target(target, all_files, out_filebase):
-    """
-    Expand the contents of all template tags in the target.  This
-    means removing tags and categorizing or creating lines so that
-    future passes can process and present input lines and generate the
-    corresponding lines of the Python program that will be exec'ed to
-    actually produce the final BSP.  'all_files' includes directories.
-    """
-    for root, dirs, files in os.walk(target):
-        for file in files:
-            if file.endswith("~") or file.endswith("#"):
-                continue
-            f = os.path.join(root, file)
-            sfile = SubstrateFile(f, target, out_filebase)
-            sfile.expand()
-            all_files.append(sfile)
-
-        for dir in dirs:
-            d = os.path.join(root, dir)
-            sdir = SubstrateDir(d, target, out_filebase)
-            sdir.expand()
-            all_files.append(sdir)
-
-
-def gen_program_machine_lines(machine, program_lines):
-    """
-    Use the input values we got from the command line.
-    """
-    line = "machine = \"" + machine + "\""
-    program_lines.append(line)
-
-    line = "layer_name = \"" + machine + "\""
-    program_lines.append(line)
-
-
-def sort_inputlines(input_lines):
-    """Sort input lines according to priority (position)."""
-    input_lines.sort(key = lambda l: l.prio)
-
-
-def find_parent_dependency(lines, depends_on):
-    for i, line in lines:
-        if isinstance(line, CodeLine):
-            continue
-        if line.props["name"] == depends_on:
-            return i
-
-    return -1
-
-
-def process_inputline_dependencies(input_lines, all_inputlines):
-    """If any input lines depend on others, put the others first."""
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            group_inputlines = []
-            process_inputline_dependencies(line.group, group_inputlines)
-            line.group = group_inputlines
-            all_inputlines.append(line)
-            continue
-
-        if isinstance(line, CodeLine) or isinstance(line, NormalLine):
-            all_inputlines.append(line)
-            continue
-
-        try:
-            depends_on = line.props["depends-on"]
-            depends_codeline = "if " + line.props["depends-on"] + " == \"" + line.props["depends-on-val"] + "\":"
-            all_inputlines.append(CodeLine(depends_codeline))
-            all_inputlines.append(line)
-        except KeyError:
-            all_inputlines.append(line)
-
-
-def conditional_filename(filename):
-    """
-    Check if the filename itself contains a conditional statement.  If
-    so, return a codeline for it.
-    """
-    opentag_start = filename.find(OPEN_TAG)
-
-    if opentag_start != -1:
-        if filename[opentag_start:].startswith(ASSIGN_TAG):
-            return None
-        end = filename.find(CLOSE_TAG, opentag_start)
-        if end == -1:
-            print("No close tag found for open tag in filename %s" % filename)
-            sys.exit(1)
-
-        # we have a {{ tag i.e. code
-        tag = filename[opentag_start + len(OPEN_TAG):end].strip()
-        if not tag.lstrip().startswith(IF_TAG):
-            print("Only 'if' tags are allowed in file or directory names, filename: %s" % filename)
-            sys.exit(1)
-
-        return CodeLine(tag)
-
-    return None
-
-
-class InputLineGroup(InputLine):
-    """
-    InputLine that does nothing but group other input lines
-    corresponding to all the input lines in a SubstrateFile so they
-    can be generated as a group.  prio is the only property used.
-    """
-    def __init__(self, codeline):
-        InputLine.__init__(self, {}, "", 0)
-        self.group = []
-        self.prio = sys.maxsize
-        self.group.append(codeline)
-
-    def append(self, line):
-        self.group.append(line)
-        if line.prio < self.prio:
-            self.prio = line.prio
-
-    def len(self):
-        return len(self.group)
-
-
-def gather_inputlines(files):
-    """
-    Gather all the InputLines - we want to generate them first.
-    """
-    all_inputlines = []
-    input_lines = []
-
-    for file in files:
-        if isinstance(file, SubstrateFile):
-            group = None
-            basename = os.path.basename(file.translated_filename)
-
-            codeline = conditional_filename(basename)
-            if codeline:
-                group = InputLineGroup(codeline)
-
-            have_condition = False
-            condition_to_write = None
-            for line in file.expanded_lines:
-                if isinstance(line, CodeLine):
-                    have_condition = True
-                    condition_to_write = line
-                    continue
-                if isinstance(line, InputLine):
-                    if group:
-                        if condition_to_write:
-                            condition_to_write.prio = line.prio
-                            condition_to_write.discard = True
-                            group.append(condition_to_write)
-                            condition_to_write = None
-                        group.append(line)
-                    else:
-                        if condition_to_write:
-                            condition_to_write.prio = line.prio
-                            condition_to_write.discard = True
-                            input_lines.append(condition_to_write)
-                            condition_to_write = None
-                        input_lines.append(line)
-                else:
-                    if condition_to_write:
-                        condition_to_write = None
-                    if have_condition:
-                        if not line.line.strip():
-                            line.discard = True
-                            input_lines.append(line)
-                    have_condition = False
-
-            if group and group.len() > 1:
-                input_lines.append(group)
-
-    sort_inputlines(input_lines)
-    process_inputline_dependencies(input_lines, all_inputlines)
-
-    return all_inputlines
-
-
-def run_program_lines(linelist, codedump):
-    """
-    For a single file, print all the python code into a buf and execute it.
-    """
-    buf = "\n".join(linelist)
-
-    if codedump:
-        of = open("bspgen.out", "w")
-        of.write(buf)
-        of.close()
-    exec(buf)
-
-
-def gen_target(files, context = None):
-    """
-    Generate the python code for each file.
-    """
-    for file in files:
-        file.gen(context)
-
-
-def gen_program_header_lines(program_lines):
-    """
-    Generate any imports we need.
-    """
-    program_lines.append("current_file = \"\"")
-
-
-def gen_supplied_property_vals(properties, program_lines):
-    """
-    Generate user-specified entries for input values instead of
-    generating input prompts.
-    """
-    for name, val in properties.items():
-        program_line = name + " = \"" + val + "\""
-        program_lines.append(program_line)
-
-
-def gen_initial_property_vals(input_lines, program_lines):
-    """
-    Generate null or default entries for input values, so we don't
-    have undefined variables.
-    """
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            gen_initial_property_vals(line.group, program_lines)
-            continue
-
-        if isinstance(line, InputLine):
-            try:
-                name = line.props["name"]
-                try:
-                    default_val = "\"" + line.props["default"] + "\""
-                except:
-                    default_val = "\"\""
-                program_line = name + " = " + default_val
-                program_lines.append(program_line)
-            except KeyError:
-                pass
-
-
-def gen_program_input_lines(input_lines, program_lines, context, in_group = False):
-    """
-    Generate only the input lines used for prompting the user.  For
-    that, we only have input lines and CodeLines that affect the next
-    input line.
-    """
-    indent = new_indent = 0
-
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            gen_program_input_lines(line.group, program_lines, context, True)
-            continue
-        if not line.line.strip():
-            continue
-
-        genline = line.gen(context)
-        if not genline:
-            continue
-        if genline.endswith(":"):
-            new_indent += 1
-        else:
-            if indent > 1 or (not in_group and indent):
-                new_indent -= 1
-
-        line.generated_line = (indent * INDENT_STR) + genline
-        program_lines.append(line.generated_line)
-
-        indent = new_indent
-
-
-def gen_program_lines(target_files, program_lines):
-    """
-    Generate the program lines that make up the BSP generation
-    program.  This appends the generated lines of all target_files to
-    program_lines, and skips input lines, which are dealt with
-    separately, or omitted.
-    """
-    for file in target_files:
-        if file.filename.endswith("noinstall"):
-            continue
-
-        for line in file.expanded_lines:
-            if isinstance(line, InputLine):
-                continue
-            if line.discard:
-                continue
-
-            program_lines.append(line.generated_line)
-
-
-def create_context(machine, arch, scripts_path):
-    """
-    Create a context object for use in deferred function invocation.
-    """
-    context = {}
-
-    context["machine"] = machine
-    context["arch"] = arch
-    context["scripts_path"] = scripts_path
-
-    return context
-
-
-def capture_context(context):
-    """
-    Create a context object for use in deferred function invocation.
-    """
-    captured_context = {}
-
-    captured_context["machine"] = context["machine"]
-    captured_context["arch"] = context["arch"]
-    captured_context["scripts_path"] = context["scripts_path"]
-
-    return captured_context
-
-
-def expand_targets(context, bsp_output_dir, expand_common=True):
-    """
-    Expand all the tags in both the common and machine-specific
-    'targets'.
-
-    If expand_common is False, don't expand the common target (this
-    option is used to create special-purpose layers).
-    """
-    target_files = []
-
-    machine = context["machine"]
-    arch = context["arch"]
-    scripts_path = context["scripts_path"]
-
-    lib_path = scripts_path + '/lib'
-    bsp_path = lib_path + '/bsp'
-    arch_path = bsp_path + '/substrate/target/arch'
-
-    if expand_common:
-        common = os.path.join(arch_path, "common")
-        expand_target(common, target_files, bsp_output_dir)
-
-    arches = os.listdir(arch_path)
-    if arch not in arches or arch == "common":
-        print("Invalid karch, exiting\n")
-        sys.exit(1)
-
-    target = os.path.join(arch_path, arch)
-    expand_target(target, target_files, bsp_output_dir)
-
-    gen_target(target_files, context)
-
-    return target_files
-
-
-def yocto_common_create(machine, target, scripts_path, layer_output_dir, codedump, properties_file, properties_str="", expand_common=True):
-    """
-    Common layer-creation code
-
-    machine - user-defined machine name (if needed, will generate 'machine' var)
-    target - the 'target' the layer will be based on, must be one in
-           scripts/lib/bsp/substrate/target/arch
-    scripts_path - absolute path to yocto /scripts dir
-    layer_output_dir - dirname to create for layer
-    codedump - dump generated code to bspgen.out
-    properties_file - use values from this file if nonempty i.e no prompting
-    properties_str - use values from this string if nonempty i.e no prompting
-    expand_common - boolean, use the contents of (for bsp layers) arch/common
-    """
-    if os.path.exists(layer_output_dir):
-        print("\nlayer output dir already exists, exiting. (%s)" % layer_output_dir)
-        sys.exit(1)
-
-    properties = None
-
-    if properties_file:
-        try:
-            infile = open(properties_file, "r")
-            properties = json.load(infile)
-        except IOError:
-            print("Couldn't open properties file %s for reading, exiting" % properties_file)
-            sys.exit(1)
-        except ValueError:
-            print("Wrong format on properties file %s, exiting" % properties_file)
-            sys.exit(1)
-
-    if properties_str and not properties:
-        properties = json.loads(properties_str)
-
-    os.mkdir(layer_output_dir)
-
-    context = create_context(machine, target, scripts_path)
-    target_files = expand_targets(context, layer_output_dir, expand_common)
-
-    input_lines = gather_inputlines(target_files)
-
-    program_lines = []
-
-    gen_program_header_lines(program_lines)
-
-    gen_initial_property_vals(input_lines, program_lines)
-
-    if properties:
-        gen_supplied_property_vals(properties, program_lines)
-
-    gen_program_machine_lines(machine, program_lines)
-
-    if not properties:
-        gen_program_input_lines(input_lines, program_lines, context)
-
-    gen_program_lines(target_files, program_lines)
-
-    run_program_lines(program_lines, codedump)
-
-
-def yocto_layer_create(layer_name, scripts_path, layer_output_dir, codedump, properties_file, properties=""):
-    """
-    Create yocto layer
-
-    layer_name - user-defined layer name
-    scripts_path - absolute path to yocto /scripts dir
-    layer_output_dir - dirname to create for layer
-    codedump - dump generated code to bspgen.out
-    properties_file - use values from this file if nonempty i.e no prompting
-    properties - use values from this string if nonempty i.e no prompting
-    """
-    yocto_common_create(layer_name, "layer", scripts_path, layer_output_dir, codedump, properties_file, properties, False)
-
-    print("\nNew layer created in %s.\n" % layer_output_dir)
-    print("Don't forget to add it to your BBLAYERS (for details see %s/README)." % layer_output_dir)
-
-
-def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties=None):
-    """
-    Create bsp
-
-    machine - user-defined machine name
-    arch - the arch the bsp will be based on, must be one in
-           scripts/lib/bsp/substrate/target/arch
-    scripts_path - absolute path to yocto /scripts dir
-    bsp_output_dir - dirname to create for BSP
-    codedump - dump generated code to bspgen.out
-    properties_file - use values from this file if nonempty i.e no prompting
-    properties - use values from this string if nonempty i.e no prompting
-    """
-    yocto_common_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties)
-
-    print("\nNew %s BSP created in %s" % (arch, bsp_output_dir))
-
-
-def print_dict(items, indent = 0):
-    """
-    Print the values in a possibly nested dictionary.
-    """
-    for key, val in items.items():
-        print("    "*indent + "\"%s\" :" % key)
-        if type(val) == dict:
-            print("{")
-            print_dict(val, indent + 1)
-            print("    "*indent + "}")
-        else:
-            print("%s" % val)
-
-
-def get_properties(input_lines):
-    """
-    Get the complete set of properties for all the input items in the
-    BSP, as a possibly nested dictionary.
-    """
-    properties = {}
-
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            statement = line.group[0].line
-            group_properties = get_properties(line.group)
-            properties[statement] = group_properties
-            continue
-
-        if not isinstance(line, InputLine):
-            continue
-
-        if isinstance(line, ChoiceInputLine):
-            continue
-
-        props = line.props
-        item = {}
-        name = props["name"]
-        for key, val in props.items():
-            if not key == "name":
-                item[key] = val
-        properties[name] = item
-
-    return properties
-
-
-def yocto_layer_list_properties(arch, scripts_path, properties_file, expand_common=True):
-    """
-    List the complete set of properties for all the input items in the
-    layer.  If properties_file is non-null, write the complete set of
-    properties as a nested JSON object corresponding to a possibly
-    nested dictionary.
-    """
-    context = create_context("unused", arch, scripts_path)
-    target_files = expand_targets(context, "unused", expand_common)
-
-    input_lines = gather_inputlines(target_files)
-
-    properties = get_properties(input_lines)
-    if properties_file:
-        try:
-            of = open(properties_file, "w")
-        except IOError:
-            print("Couldn't open properties file %s for writing, exiting" % properties_file)
-            sys.exit(1)
-
-        json.dump(properties, of, indent=1)
-    else:
-        print_dict(properties)
-
-
-def split_nested_property(property):
-    """
-    A property name of the form x.y describes a nested property
-    i.e. the property y is contained within x and can be addressed
-    using standard JSON syntax for nested properties.  Note that if a
-    property name itself contains '.', it should be contained in
-    double quotes.
-    """
-    splittable_property = ""
-    in_quotes = False
-    for c in property:
-        if c == '.' and not in_quotes:
-            splittable_property += '\n'
-            continue
-        if c == '"':
-            in_quotes = not in_quotes
-        splittable_property += c
-
-    split_properties = splittable_property.split('\n')
-
-    if len(split_properties) > 1:
-        return split_properties
-
-    return None
-
-
-def find_input_line_group(substring, input_lines):
-    """
-    Find and return the InputLineGroup containing the specified substring.
-    """
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            if substring in line.group[0].line:
-                return line
-
-    return None
-
-
-def find_input_line(name, input_lines):
-    """
-    Find the input line with the specified name.
-    """
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            l = find_input_line(name, line.group)
-            if l:
-                return l
-
-        if isinstance(line, InputLine):
-            try:
-                if line.props["name"] == name:
-                    return line
-                if line.props["name"] + "_" + line.props["nameappend"] == name:
-                    return line
-            except KeyError:
-                pass
-
-    return None
-
-
-def print_values(type, values_list):
-    """
-    Print the values in the given list of values.
-    """
-    if type == "choicelist":
-        for value in values_list:
-            print("[\"%s\", \"%s\"]" % (value[0], value[1]))
-    elif type == "boolean":
-        for value in values_list:
-            print("[\"%s\", \"%s\"]" % (value[0], value[1]))
-
-
-def yocto_layer_list_property_values(arch, property, scripts_path, properties_file, expand_common=True):
-    """
-    List the possible values for a given input property.  If
-    properties_file is non-null, write the complete set of properties
-    as a JSON object corresponding to an array of possible values.
-    """
-    context = create_context("unused", arch, scripts_path)
-    context["name"] = property
-
-    target_files = expand_targets(context, "unused", expand_common)
-
-    input_lines = gather_inputlines(target_files)
-
-    properties = get_properties(input_lines)
-
-    nested_properties = split_nested_property(property)
-    if nested_properties:
-        # currently the outer property of a nested property always
-        # corresponds to an input line group
-        input_line_group = find_input_line_group(nested_properties[0], input_lines)
-        if input_line_group:
-            input_lines[:] = input_line_group.group[1:]
-            # The inner property of a nested property name is the
-            # actual property name we want, so reset to that
-            property = nested_properties[1]
-
-    input_line = find_input_line(property, input_lines)
-    if not input_line:
-        print("Couldn't find values for property %s" % property)
-        return
-
-    values_list = []
-
-    type = input_line.props["type"]
-    if type == "boolean":
-        values_list.append(["y", "n"])
-    elif type == "choicelist" or type == "checklist":
-        try:
-            gen_fn = input_line.props["gen"]
-            if nested_properties:
-                context["filename"] = nested_properties[0]
-                try:
-                    context["branches_base"] = input_line.props["branches_base"]
-                except KeyError:
-                    context["branches_base"] = None
-            values_list = input_line.gen_choices_list(context, False)
-        except KeyError:
-            for choice in input_line.choices:
-                choicepair = []
-                choicepair.append(choice.val)
-                choicepair.append(choice.desc)
-                values_list.append(choicepair)
-
-    if properties_file:
-        try:
-            of = open(properties_file, "w")
-        except IOError:
-            print("Couldn't open properties file %s for writing, exiting" % properties_file)
-            sys.exit(1)
-
-        json.dump(values_list, of)
-
-    print_values(type, values_list)
-
-
-def yocto_bsp_list(args, scripts_path):
-    """
-    Print available architectures, or the complete list of properties
-    defined by the BSP, or the possible values for a particular BSP
-    property.
-    """
-    if args.karch == "karch":
-        lib_path = scripts_path + '/lib'
-        bsp_path = lib_path + '/bsp'
-        arch_path = bsp_path + '/substrate/target/arch'
-        print("Architectures available:")
-        for arch in os.listdir(arch_path):
-            if arch == "common" or arch == "layer":
-                continue
-            print("    %s" % arch)
-        return
-
-    if args.properties:
-        yocto_layer_list_properties(args.karch, scripts_path, args.properties_file)
-    elif args.property:
-        yocto_layer_list_property_values(args.karch, args.property, scripts_path, args.properties_file)
-
-
-
-def yocto_layer_list(args, scripts_path, properties_file):
-    """
-    Print the complete list of input properties defined by the layer,
-    or the possible values for a particular layer property.
-    """
-    if len(args) < 1:
-        return False
-
-    if len(args) < 1 or len(args) > 2:
-        return False
-
-    if len(args) == 1:
-        if args[0] == "properties":
-            yocto_layer_list_properties("layer", scripts_path, properties_file, False)
-        else:
-            return False
-
-    if len(args) == 2:
-        if args[0] == "property":
-            yocto_layer_list_property_values("layer", args[1], scripts_path, properties_file, False)
-        else:
-            return False
-
-    return True
-
-
-def map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch):
-    """
-    Return the linux-yocto bsp branch to use with the specified
-    kbranch.  This handles the -standard variants for 3.4 and 3.8; the
-    other variants don't need mappings.
-    """
-    if need_new_kbranch == "y":
-        kbranch = new_kbranch
-    else:
-        kbranch = existing_kbranch
-
-    if kbranch.startswith("standard/common-pc-64"):
-        return "bsp/common-pc-64/common-pc-64-standard.scc"
-    if kbranch.startswith("standard/common-pc"):
-        return "bsp/common-pc/common-pc-standard.scc"
-    else:
-        return "ktypes/standard/standard.scc"
-
-
-def map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch):
-    """
-    Return the linux-yocto bsp branch to use with the specified
-    kbranch.  This handles the -preempt-rt variants for 3.4 and 3.8;
-    the other variants don't need mappings.
-    """
-    if need_new_kbranch == "y":
-        kbranch = new_kbranch
-    else:
-        kbranch = existing_kbranch
-
-    if kbranch.startswith("standard/preempt-rt/common-pc-64"):
-        return "bsp/common-pc-64/common-pc-64-preempt-rt.scc"
-    if kbranch.startswith("standard/preempt-rt/common-pc"):
-        return "bsp/common-pc/common-pc-preempt-rt.scc"
-    else:
-        return "ktypes/preempt-rt/preempt-rt.scc"
-
-
-def map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch):
-    """
-    Return the linux-yocto bsp branch to use with the specified
-    kbranch.  This handles the -tiny variants for 3.4 and 3.8; the
-    other variants don't need mappings.
-    """
-    if need_new_kbranch == "y":
-        kbranch = new_kbranch
-    else:
-        kbranch = existing_kbranch
-
-    if kbranch.startswith("standard/tiny/common-pc"):
-        return "bsp/common-pc/common-pc-tiny.scc"
-    else:
-        return "ktypes/tiny/tiny.scc"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/help.py b/import-layers/yocto-poky/scripts/lib/bsp/help.py
deleted file mode 100644
index 85d446b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/help.py
+++ /dev/null
@@ -1,1054 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# This module implements some basic help invocation functions along
-# with the bulk of the help topic text for the Yocto BSP Tools.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-import subprocess
-import logging
-
-
-def subcommand_error(args):
-    logging.info("invalid subcommand %s" % args[0])
-
-
-def display_help(subcommand, subcommands):
-    """
-    Display help for subcommand.
-    """
-    if subcommand not in subcommands:
-        return False
-
-    help = subcommands.get(subcommand, subcommand_error)[2]
-    pager = subprocess.Popen('less', stdin=subprocess.PIPE)
-    pager.communicate(bytes(help, 'UTF-8'))
-
-    return True
-
-
-def yocto_help(args, usage_str, subcommands):
-    """
-    Subcommand help dispatcher.
-    """
-    if len(args) == 1 or not display_help(args[1], subcommands):
-        print(usage_str)
-
-
-def invoke_subcommand(args, parser, main_command_usage, subcommands):
-    """
-    Dispatch to subcommand handler borrowed from combo-layer.
-    Should use argparse, but has to work in 2.6.
-    """
-    if not args:
-        logging.error("No subcommand specified, exiting")
-        parser.print_help()
-    elif args[0] == "help":
-        yocto_help(args, main_command_usage, subcommands)
-    elif args[0] not in subcommands:
-        logging.error("Unsupported subcommand %s, exiting\n" % (args[0]))
-        parser.print_help()
-    else:
-        usage = subcommands.get(args[0], subcommand_error)[1]
-        subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
-
-
-##
-# yocto-bsp help and usage strings
-##
-
-yocto_bsp_usage = """
-
- Create a customized Yocto BSP layer.
-
- usage: yocto-bsp [--version] [--help] COMMAND [ARGS]
-
- Current 'yocto-bsp' commands are:
-    create            Create a new Yocto BSP
-    list              List available values for options and BSP properties
-
- See 'yocto-bsp help COMMAND' for more information on a specific command.
-"""
-
-yocto_bsp_help_usage = """
-
- usage: yocto-bsp help <subcommand>
-
- This command displays detailed help for the specified subcommand.
-"""
-
-yocto_bsp_create_usage = """
-
- Create a new Yocto BSP
-
- usage: yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
-            [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
-            [-c | --codedump] [-s | --skip-git-check]
-
- This command creates a Yocto BSP based on the specified parameters.
- The new BSP will be a new Yocto BSP layer contained by default within
- the top-level directory specified as 'meta-bsp-name'.  The -o option
- can be used to place the BSP layer in a directory with a different
- name and location.
-
- The value of the 'karch' parameter determines the set of files that
- will be generated for the BSP, along with the specific set of
- 'properties' that will be used to fill out the BSP-specific portions
- of the BSP.  The possible values for the 'karch' parameter can be
- listed via 'yocto-bsp list karch'.
-
- NOTE: Once created, you should add your new layer to your
- bblayers.conf file in order for it to be subsequently seen and
- modified by the yocto-kernel tool.
-
- See 'yocto bsp help create' for more detailed instructions.
-"""
-
-yocto_bsp_create_help = """
-
-NAME
-    yocto-bsp create - Create a new Yocto BSP
-
-SYNOPSIS
-    yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
-        [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
-        [-c | --codedump] [-s | --skip-git-check]
-
-DESCRIPTION
-    This command creates a Yocto BSP based on the specified
-    parameters.  The new BSP will be a new Yocto BSP layer contained
-    by default within the top-level directory specified as
-    'meta-bsp-name'.  The -o option can be used to place the BSP layer
-    in a directory with a different name and location.
-
-    The value of the 'karch' parameter determines the set of files
-    that will be generated for the BSP, along with the specific set of
-    'properties' that will be used to fill out the BSP-specific
-    portions of the BSP.  The possible values for the 'karch' parameter
-    can be listed via 'yocto-bsp list karch'.
-
-    The BSP-specific properties that define the values that will be
-    used to generate a particular BSP can be specified on the
-    command-line using the -i option and supplying a JSON object
-    consisting of the set of name:value pairs needed by the BSP.
-
-    If the -i option is not used, the user will be interactively
-    prompted for each of the required property values, which will then
-    be used as values for BSP generation.
-
-    The set of properties available for a given architecture can be
-    listed using the 'yocto-bsp list' command.
-
-    Specifying -c causes the Python code generated and executed to
-    create the BSP to be dumped to the 'bspgen.out' file in the
-    current directory, and is useful for debugging.
-
-    NOTE: Once created, you should add your new layer to your
-    bblayers.conf file in order for it to be subsequently seen and
-    modified by the yocto-kernel tool.
-
-    For example, assuming your poky repo is at /path/to/poky, your new
-    BSP layer is at /path/to/poky/meta-mybsp, and your build directory
-    is /path/to/build:
-
-    $ gedit /path/to/build/conf/bblayers.conf
-
-    BBLAYERS ?= " \\
-      /path/to/poky/meta \\
-      /path/to/poky/meta-poky \\
-      /path/to/poky/meta-mybsp \\
-      "
-"""
-
-yocto_bsp_list_usage = """
-
- usage: yocto-bsp list karch
-        yocto-bsp list <karch> --properties
-                [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>]
-        yocto-bsp list <karch> --property <xxx>
-                [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>]
-
- This command enumerates the complete set of possible values for a
- specified option or property needed by the BSP creation process.
-
- The first form enumerates all the possible values that exist and can
- be specified for the 'karch' parameter to the 'yocto bsp create'
- command.
-
- The second form enumerates all the possible properties that exist and
- must have values specified for them in the 'yocto bsp create' command
- for the given 'karch'.
-
- The third form enumerates all the possible values that exist and can
- be specified for any of the enumerable properties of the given
- 'karch' in the 'yocto bsp create' command.
-
- See 'yocto-bsp help list' for more details.
-"""
-
-yocto_bsp_list_help = """
-
-NAME
-    yocto-bsp list - List available values for options and BSP properties
-
-SYNOPSIS
-    yocto-bsp list karch
-    yocto-bsp list <karch> --properties
-            [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
-    yocto-bsp list <karch> --property <xxx>
-            [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
-
-DESCRIPTION
-    This command enumerates the complete set of possible values for a
-    specified option or property needed by the BSP creation process.
-
-    The first form enumerates all the possible values that exist and
-    can be specified for the 'karch' parameter to the 'yocto bsp
-    create' command.  Example output for the 'list karch' command:
-
-    $ yocto-bsp list karch
-    Architectures available:
-        arm
-        powerpc
-        i386
-        mips
-        mips64
-        x86_64
-        qemu
-
-    The second form enumerates all the possible properties that exist
-    and must have values specified for them in the 'yocto bsp create'
-    command for the given 'karch'.  This command is mainly meant to
-    allow the development user interface alternatives to the default
-    text-based prompting interface.  If the -o option is specified,
-    the list of properties, in addition to being displayed, will be
-    written to the specified file as a JSON object.  In this case, the
-    object will consist of the set of name:value pairs corresponding
-    to the (possibly nested) dictionary of properties defined by the
-    input statements used by the BSP.  Some example output for the
-    'list --properties' command:
-
-    $ yocto-bsp list arm --properties
-    "touchscreen" : {
-        "msg" : Does your BSP have a touchscreen? (y/N)
-        "default" : n
-        "type" : boolean
-    }
-    "uboot_loadaddress" : {
-        "msg" : Please specify a value for UBOOT_LOADADDRESS.
-        "default" : 0x80008000
-        "type" : edit
-        "prio" : 40
-    }
-    "kernel_choice" : {
-        "prio" : 10
-        "default" : linux-yocto_3.2
-        "depends-on" : use_default_kernel
-        "depends-on-val" : n
-        "msg" : Please choose the kernel to use in this BSP =>
-        "type" : choicelist
-        "gen" : bsp.kernel.kernels
-    }
-    "if kernel_choice == "linux-yocto_3.0":" : {
-        "base_kbranch_linux_yocto_3_0" : {
-            "prio" : 20
-            "default" : yocto/standard
-            "depends-on" : new_kbranch_linux_yocto_3_0
-            "depends-on-val" : y
-            "msg" : Please choose a machine branch to base this BSP on =>
-            "type" : choicelist
-            "gen" : bsp.kernel.all_branches
-    }
-    .
-    .
-    .
-
-    Each entry in the output consists of the name of the input element
-    e.g. "touchscreen", followed by the properties defined for that
-    element enclosed in braces.  This information should provide
-    sufficient information to create a complete user interface with.
-    Two features of the scheme provide for conditional input.  First,
-    if a Python "if" statement appears in place of an input element
-    name, the set of enclosed input elements apply and should be
-    presented to the user only if the 'if' statement evaluates to
-    true.  The test in the if statement will always reference another
-    input element in the list, which means that the element being
-    tested should be presented to the user before the elements
-    enclosed by the if block.  Secondly, in a similar way, some
-    elements contain "depends-on" and depends-on-val" tags, which mean
-    that the affected input element should only be presented to the
-    user if the element it depends on has already been presented to
-    the user and the user has selected the specified value for that
-    element.
-
-    The third form enumerates all the possible values that exist and
-    can be specified for any of the enumerable properties of the given
-    'karch' in the 'yocto bsp create' command.  If the -o option is
-    specified, the list of values for the given property, in addition
-    to being displayed, will be written to the specified file as a
-    JSON object.  In this case, the object will consist of the set of
-    name:value pairs corresponding to the array of property values
-    associated with the property.
-
-    $ yocto-bsp list i386 --property xserver_choice
-        ["xserver_vesa", "VESA xserver support"]
-        ["xserver_i915", "i915 xserver support"]
-
-    $ yocto-bsp list arm --property base_kbranch_linux_yocto_3_0
-        Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.0...
-        ["yocto/base", "yocto/base"]
-        ["yocto/eg20t", "yocto/eg20t"]
-        ["yocto/gma500", "yocto/gma500"]
-        ["yocto/pvr", "yocto/pvr"]
-        ["yocto/standard/arm-versatile-926ejs", "yocto/standard/arm-versatile-926ejs"]
-        ["yocto/standard/base", "yocto/standard/base"]
-        ["yocto/standard/cedartrail", "yocto/standard/cedartrail"]
-        .
-        .
-        .
-        ["yocto/standard/qemu-ppc32", "yocto/standard/qemu-ppc32"]
-        ["yocto/standard/routerstationpro", "yocto/standard/routerstationpro"]
-
-    The third form as well is meant mainly for developers of
-    alternative interfaces - it allows the developer to fetch the
-    possible values for a given input element on-demand.  This
-    on-demand capability is especially valuable for elements that
-    require relatively expensive remote operations to fulfill, such as
-    the example that returns the set of branches available in a remote
-    git tree above.
-
-"""
-
-##
-# yocto-kernel help and usage strings
-##
-
-yocto_kernel_usage = """
-
- Modify and list Yocto BSP kernel config items and patches.
-
- usage: yocto-kernel [--version] [--help] COMMAND [ARGS]
-
- Current 'yocto-kernel' commands are:
-   config list       List the modifiable set of bare kernel config options for a BSP
-   config add        Add or modify bare kernel config options for a BSP
-   config rm         Remove bare kernel config options from a BSP
-   patch list        List the patches associated with a BSP
-   patch add         Patch the Yocto kernel for a BSP
-   patch rm          Remove patches from a BSP
-   feature list      List the features used by a BSP
-   feature add       Have a BSP use a feature
-   feature rm        Have a BSP stop using a feature
-   features list     List the features available to BSPs
-   feature describe  Describe a particular feature
-   feature create    Create a new BSP-local feature
-   feature destroy   Remove a BSP-local feature
-
- See 'yocto-kernel help COMMAND' for more information on a specific command.
-
-"""
-
-
-yocto_kernel_help_usage = """
-
- usage: yocto-kernel help <subcommand>
-
- This command displays detailed help for the specified subcommand.
-"""
-
-yocto_kernel_config_list_usage = """
-
- List the modifiable set of bare kernel config options for a BSP
-
- usage: yocto-kernel config list <bsp-name>
-
- This command lists the 'modifiable' config items for a BSP i.e. the
- items which are eligible for modification or removal by other
- yocto-kernel commands.
-
- 'modifiable' config items are the config items contained a BSP's
- user-config.cfg base config.
-"""
-
-
-yocto_kernel_config_list_help = """
-
-NAME
-    yocto-kernel config list - List the modifiable set of bare kernel
-    config options for a BSP
-
-SYNOPSIS
-    yocto-kernel config list <bsp-name>
-
-DESCRIPTION
-    This command lists the 'modifiable' config items for a BSP
-    i.e. the items which are eligible for modification or removal by
-    other yocto-kernel commands.
-"""
-
-
-yocto_kernel_config_add_usage = """
-
- Add or modify bare kernel config options for a BSP
-
- usage: yocto-kernel config add <bsp-name> [<CONFIG_XXX=x> ...]
-
- This command adds one or more CONFIG_XXX=x items to a BSP's user-config.cfg
- base config.
-"""
-
-
-yocto_kernel_config_add_help = """
-
-NAME
-    yocto-kernel config add - Add or modify bare kernel config options
-    for a BSP
-
-SYNOPSIS
-    yocto-kernel config add <bsp-name> [<CONFIG_XXX=x> ...]
-
-DESCRIPTION
-    This command adds one or more CONFIG_XXX=x items to a BSP's
-    foo.cfg base config.
-
-    NOTE: It's up to the user to determine whether or not the config
-    options being added make sense or not - this command does no
-    sanity checking or verification of any kind to ensure that a
-    config option really makes sense and will actually be set in in
-    the final config.  For example, if a config option depends on
-    other config options, it will be turned off by kconfig if the
-    other options aren't set correctly.
-"""
-
-
-yocto_kernel_config_rm_usage = """
-
- Remove bare kernel config options from a BSP
-
- usage: yocto-kernel config rm <bsp-name>
-
- This command removes (turns off) one or more CONFIG_XXX items from a
- BSP's user-config.cfg base config.
-
- The set of config items available to be removed by this command for a
- BSP is listed and the user prompted for the specific items to remove.
-"""
-
-
-yocto_kernel_config_rm_help = """
-
-NAME
-    yocto-kernel config rm - Remove bare kernel config options from a
-    BSP
-
-SYNOPSIS
-    yocto-kernel config rm <bsp-name>
-
-DESCRIPTION
-    This command removes (turns off) one or more CONFIG_XXX items from a
-    BSP's user-config.cfg base config.
-
-    The set of config items available to be removed by this command
-    for a BSP is listed and the user prompted for the specific items
-    to remove.
-"""
-
-
-yocto_kernel_patch_list_usage = """
-
- List the patches associated with the kernel for a BSP
-
- usage: yocto-kernel patch list <bsp-name>
-
- This command lists the patches associated with a BSP.
-
- NOTE: this only applies to patches listed in the kernel recipe's
- user-patches.scc file (and currently repeated in its SRC_URI).
-"""
-
-
-yocto_kernel_patch_list_help = """
-
-NAME
-    yocto-kernel patch list - List the patches associated with the kernel
-    for a BSP
-
-SYNOPSIS
-    yocto-kernel patch list <bsp-name>
-
-DESCRIPTION
-    This command lists the patches associated with a BSP.
-
-    NOTE: this only applies to patches listed in the kernel recipe's
-    user-patches.scc file (and currently repeated in its SRC_URI).
-"""
-
-
-yocto_kernel_patch_add_usage = """
-
- Patch the Yocto kernel for a specific BSP
-
- usage: yocto-kernel patch add <bsp-name> [<PATCH> ...]
-
- This command adds one or more patches to a BSP's machine branch.  The
- patch will be added to the BSP's linux-yocto kernel user-patches.scc
- file (and currently repeated in its SRC_URI) and will be guaranteed
- to be applied in the order specified.
-"""
-
-
-yocto_kernel_patch_add_help = """
-
-NAME
-    yocto-kernel patch add - Patch the Yocto kernel for a specific BSP
-
-SYNOPSIS
-    yocto-kernel patch add <bsp-name> [<PATCH> ...]
-
-DESCRIPTION
-    This command adds one or more patches to a BSP's machine branch.
-    The patch will be added to the BSP's linux-yocto kernel
-    user-patches.scc file (and currently repeated in its SRC_URI) and
-    will be guaranteed to be applied in the order specified.
-
-    NOTE: It's up to the user to determine whether or not the patches
-    being added makes sense or not - this command does no sanity
-    checking or verification of any kind to ensure that a patch can
-    actually be applied to the BSP's kernel branch; it's assumed that
-    the user has already done that.
-"""
-
-
-yocto_kernel_patch_rm_usage = """
-
- Remove a patch from the Yocto kernel for a specific BSP
-
- usage: yocto-kernel patch rm <bsp-name>
-
- This command removes one or more patches from a BSP's machine branch.
- The patch will be removed from the BSP's linux-yocto kernel
- user-patches.scc file (and currently repeated in its SRC_URI) and
- kernel SRC_URI dir.
-
- The set of patches available to be removed by this command for a BSP
- is listed and the user prompted for the specific patches to remove.
-"""
-
-
-yocto_kernel_patch_rm_help = """
-
-NAME
-    yocto-kernel patch rm - Remove a patch from the Yocto kernel for a specific BSP
-
-SYNOPSIS
-    yocto-kernel patch rm <bsp-name>
-
-DESCRIPTION
-    This command removes one or more patches from a BSP's machine
-    branch.  The patch will be removed from the BSP's linux-yocto
-    kernel user-patches.scc file (and currently repeated in its
-    SRC_URI).
-
-    The set of patches available to be removed by this command for a
-    BSP is listed and the user prompted for the specific patches to
-    remove.
-"""
-
-yocto_kernel_feature_list_usage = """
-
- List the BSP features that are being used by a BSP
-
- usage: yocto-kernel feature list <bsp-name>
-
- This command lists the features being used by a BSP i.e. the features
- which are eligible for modification or removal by other yocto-kernel
- commands.
-
- 'modifiable' features are the features listed in a BSP's
- user-features.scc file.
-"""
-
-
-yocto_kernel_feature_list_help = """
-
-NAME
-    yocto-kernel feature list - List the modifiable set of features
-    being used by a BSP
-
-SYNOPSIS
-    yocto-kernel feature list <bsp-name>
-
-DESCRIPTION
-    This command lists the 'modifiable' features being used by a BSP
-    i.e. the features which are eligible for modification or removal
-    by other yocto-kernel commands.
-"""
-
-
-yocto_kernel_feature_add_usage = """
-
- Add to or modify the list of features being used for a BSP
-
- usage: yocto-kernel feature add <bsp-name> [/xxxx/yyyy/feature.scc ...]
-
- This command adds one or more feature items to a BSP's kernel
- user-features.scc file, which is the file used to manage features in
- a yocto-bsp-generated BSP.  Features to be added must be specified as
- fully-qualified feature names.
-"""
-
-
-yocto_kernel_feature_add_help = """
-
-NAME
-    yocto-kernel feature add - Add to or modify the list of features
-    being used for a BSP
-
-SYNOPSIS
-    yocto-kernel feature add <bsp-name> [/xxxx/yyyy/feature.scc ...]
-
-DESCRIPTION
-    This command adds one or more feature items to a BSP's
-    user-features.scc file, which is the file used to manage features
-    in a yocto-bsp-generated BSP.  Features to be added must be
-    specified as fully-qualified feature names.
-"""
-
-
-yocto_kernel_feature_rm_usage = """
-
- Remove a feature from the list of features being used for a BSP
-
- usage: yocto-kernel feature rm <bsp-name>
-
- This command removes (turns off) one or more features from a BSP's
- user-features.scc file, which is the file used to manage features in
- a yocto-bsp-generated BSP.
-
- The set of features available to be removed by this command for a BSP
- is listed and the user prompted for the specific items to remove.
-"""
-
-
-yocto_kernel_feature_rm_help = """
-
-NAME
-    yocto-kernel feature rm - Remove a feature from the list of
-    features being used for a BSP
-
-SYNOPSIS
-    yocto-kernel feature rm <bsp-name>
-
-DESCRIPTION
-    This command removes (turns off) one or more features from a BSP's
-    user-features.scc file, which is the file used to manage features
-    in a yocto-bsp-generated BSP.
-
-    The set of features available to be removed by this command for a
-    BSP is listed and the user prompted for the specific items to
-    remove.
-"""
-
-
-yocto_kernel_available_features_list_usage = """
-
- List the set of kernel features available to a BSP
-
- usage: yocto-kernel features list <bsp-name>
-
- This command lists the complete set of kernel features available to a
- BSP.  This includes the features contained in linux-yocto meta
- branches as well as recipe-space features defined locally to the BSP.
-"""
-
-
-yocto_kernel_available_features_list_help = """
-
-NAME
-    yocto-kernel features list - List the set of kernel features
-    available to a BSP
-
-SYNOPSIS
-    yocto-kernel features list <bsp-name>
-
-DESCRIPTION
-     This command lists the complete set of kernel features available
-     to a BSP.  This includes the features contained in linux-yocto
-     meta branches as well as recipe-space features defined locally to
-     the BSP.
-"""
-
-
-yocto_kernel_feature_describe_usage = """
-
- Print the description and compatibility information for a given kernel feature
-
- usage: yocto-kernel feature describe <bsp-name> [/xxxx/yyyy/feature.scc ...]
-
- This command prints the description and compatibility of a specific
- feature in the format 'description [compatibility].
-"""
-
-
-yocto_kernel_feature_describe_help = """
-
-NAME
-    yocto-kernel feature describe - print the description and
-    compatibility information for a given kernel feature
-
-SYNOPSIS
-    yocto-kernel feature describe <bsp-name> [/xxxx/yyyy/feature.scc ...]
-
-DESCRIPTION
-    This command prints the description and compatibility of a
-    specific feature in the format 'description [compatibility].  If
-    the feature doesn't define a description or compatibility, a
-    string with generic unknown values will be printed.
-"""
-
-
-yocto_kernel_feature_create_usage = """
-
- Create a recipe-space kernel feature in a BSP
-
- usage: yocto-kernel feature create <bsp-name> newfeature.scc \
-        "Feature Description" capabilities [<CONFIG_XXX=x> ...] [<PATCH> ...]
-
- This command creates a new kernel feature from the bare config
- options and patches specified on the command-line.
-"""
-
-
-yocto_kernel_feature_create_help = """
-
-NAME
-    yocto-kernel feature create - create a recipe-space kernel feature
-    in a BSP
-
-SYNOPSIS
-    yocto-kernel feature create <bsp-name> newfeature.scc \
-        "Feature Description" capabilities [<CONFIG_XXX=x> ...] [<PATCH> ...]
-
-DESCRIPTION
-    This command creates a new kernel feature from the bare config
-    options and patches specified on the command-line.  The new
-    feature will be created in recipe-space, specifically in either
-    the kernel .bbappend's /files/cfg or /files/features subdirectory,
-    depending on whether or not the feature contains config items only
-    or config items along with patches.  The named feature must end
-    with .scc and must not contain a feature directory to contain the
-    feature (this will be determined automatically), and a feature
-    description in double-quotes along with a capabilities string
-    (which for the time being can be one of: 'all' or 'board').
-"""
-
-
-yocto_kernel_feature_destroy_usage = """
-
- Destroy a recipe-space kernel feature in a BSP
-
- usage: yocto-kernel feature destroy <bsp-name> feature.scc
-
- This command destroys a kernel feature defined in the specified BSP's
- recipe-space kernel definition.
-"""
-
-
-yocto_kernel_feature_destroy_help = """
-
-NAME
-    yocto-kernel feature destroy <bsp-name> feature.scc - destroy a
-    recipe-space kernel feature in a BSP
-
-SYNOPSIS
-    yocto-kernel feature destroy <bsp-name> feature.scc
-
-DESCRIPTION
-    This command destroys a kernel feature defined in the specified
-    BSP's recipe-space kernel definition.  The named feature must end
-    with .scc and must not contain a feature directory to contain the
-    feature (this will be determined automatically).  If the kernel
-    feature is in use by a BSP, it can't be removed until the BSP
-    stops using it (see yocto-kernel feature rm to stop using it).
-"""
-
-##
-# yocto-layer help and usage strings
-##
-
-yocto_layer_usage = """
-
- Create a generic Yocto layer.
-
- usage: yocto-layer [--version] [--help] COMMAND [ARGS]
-
- Current 'yocto-layer' commands are:
-    create            Create a new generic Yocto layer
-    list              List available values for input options and properties
-
- See 'yocto-layer help COMMAND' for more information on a specific command.
-"""
-
-yocto_layer_help_usage = """
-
- usage: yocto-layer help <subcommand>
-
- This command displays detailed help for the specified subcommand.
-"""
-
-yocto_layer_create_usage = """
-
- WARNING: this plugin will be removed starting 2.5 development in favour
- of using 'bitbake-layers create-layer' script/plugin, offering a single
- script to manage layers.
-
- Create a new generic Yocto layer
-
- usage: yocto-layer create <layer-name> [layer_priority]
-            [-o <DIRNAME> | --outdir <DIRNAME>]
-            [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
-
- This command creates a generic Yocto layer based on the specified
- parameters.  The new layer will be a new Yocto layer contained by
- default within the top-level directory specified as
- 'meta-layer-name'.  The -o option can be used to place the layer in a
- directory with a different name and location.
-
- If layer_priority is specified, a simple layer will be created using
- the given layer priority, and the user will not be prompted for
- further input.
-
- NOTE: Once created, you should add your new layer to your
- bblayers.conf file in order for it to be subsequently seen and
- modified by the yocto-kernel tool.  Instructions for doing this can
- be found in the README file generated in the layer's top-level
- directory.
-
- See 'yocto layer help create' for more detailed instructions.
-"""
-
-yocto_layer_create_help = """
-
-WARNING: this plugin will be removed starting 2.5 development in favour
-of using 'bitbake-layers create-layer' script/plugin, offering a single
-script to manage layers.
-
-NAME
-    yocto-layer create - Create a new generic Yocto layer
-
-SYNOPSIS
-    yocto-layer create <layer-name> [layer_priority]
-        [-o <DIRNAME> | --outdir <DIRNAME>]
-        [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
-
-DESCRIPTION
-    This command creates a generic Yocto layer based on the specified
-    parameters.  The new layer will be a new Yocto layer contained by
-    default within the top-level directory specified as
-    'meta-layer-name'.  The -o option can be used to place the layer
-    in a directory with a different name and location.
-
-    If layer_priority is specified, a simple layer will be created
-    using the given layer priority, and the user will not be prompted
-    for further input.
-
-    The layer-specific properties that define the values that will be
-    used to generate the layer can be specified on the command-line
-    using the -i option and supplying a JSON object consisting of the
-    set of name:value pairs needed by the layer.
-
-    If the -i option is not used, the user will be interactively
-    prompted for each of the required property values, which will then
-    be used as values for layer generation.
-
-    The set of properties available can be listed using the
-    'yocto-layer list' command.
-
-    Specifying -c causes the Python code generated and executed to
-    create the layer to be dumped to the 'bspgen.out' file in the
-    current directory, and is useful for debugging.
-
-    NOTE: Once created, you should add your new layer to your
-    bblayers.conf file in order for it to be subsequently seen and
-    modified by the yocto-kernel tool.  Instructions for doing this
-    can be found in the README file generated in the layer's top-level
-    directory.
-
-    For example, assuming your poky repo is at /path/to/poky, your new
-    layer is at /path/to/poky/meta-mylayer, and your build directory
-    is /path/to/build:
-
-    $ gedit /path/to/build/conf/bblayers.conf
-
-    BBLAYERS ?= " \\
-      /path/to/poky/meta \\
-      /path/to/poky/meta-yocto \\
-      /path/to/poky/meta-mylayer \\
-      "
-"""
-
-yocto_layer_list_usage = """
-
- usage: yocto-layer list properties
-                [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>]
-        yocto-layer list property <xxx>
-                [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>]
-
- This command enumerates the complete set of possible values for a
- specified option or property needed by the layer creation process.
-
- The first form enumerates all the possible properties that exist and
- must have values specified for them in the 'yocto-layer create'
- command.
-
- The second form enumerates all the possible values that exist and can
- be specified for any of the enumerable properties in the 'yocto-layer
- create' command.
-
- See 'yocto-layer help list' for more details.
-"""
-
-yocto_layer_list_help = """
-
-NAME
-    yocto-layer list - List available values for layer input options and properties
-
-SYNOPSIS
-    yocto-layer list properties
-            [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
-    yocto-layer list property <xxx>
-            [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
-
-DESCRIPTION
-    This command enumerates the complete set of possible values for a
-    specified option or property needed by the layer creation process.
-
-    The first form enumerates all the possible properties that exist
-    and must have values specified for them in the 'yocto-layer
-    create' command.  This command is mainly meant to aid the
-    development of user interface alternatives to the default
-    text-based prompting interface.  If the -o option is specified,
-    the list of properties, in addition to being displayed, will be
-    written to the specified file as a JSON object.  In this case, the
-    object will consist of the set of name:value pairs corresponding
-    to the (possibly nested) dictionary of properties defined by the
-    input statements used by the BSP.  Some example output for the
-    'list properties' command:
-
-    $ yocto-layer list properties
-    "example_bbappend_name" : {
-        "default" : example
-        "msg" : Please enter the name you'd like to use for your bbappend file:
-        "type" : edit
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "create_example_recipe" : {
-        "default" : n
-        "msg" : Would you like to have an example recipe created? (y/n)
-        "type" : boolean
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "example_recipe_name" : {
-        "default" : example
-        "msg" : Please enter the name you'd like to use for your example recipe:
-        "type" : edit
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "layer_priority" : {
-        "default" : 6
-        "msg" : Please enter the layer priority you'd like to use for the layer:
-        "type" : edit
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "create_example_bbappend" : {
-        "default" : n
-        "msg" : Would you like to have an example bbappend file created? (y/n)
-        "type" : boolean
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "example_bbappend_version" : {
-        "default" : 0.1
-        "msg" : Please enter the version number you'd like to use for your bbappend file (this should match the recipe you're appending to):
-        "type" : edit
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-
-    Each entry in the output consists of the name of the input element
-    e.g. "layer_priority", followed by the properties defined for that
-    element enclosed in braces.  This information should provide
-    sufficient information to create a complete user interface.  Two
-    features of the scheme provide for conditional input.  First, if a
-    Python "if" statement appears in place of an input element name,
-    the set of enclosed input elements apply and should be presented
-    to the user only if the 'if' statement evaluates to true.  The
-    test in the if statement will always reference another input
-    element in the list, which means that the element being tested
-    should be presented to the user before the elements enclosed by
-    the if block.  Secondly, in a similar way, some elements contain
-    "depends-on" and depends-on-val" tags, which mean that the
-    affected input element should only be presented to the user if the
-    element it depends on has already been presented to the user and
-    the user has selected the specified value for that element.
-
-    The second form enumerates all the possible values that exist and
-    can be specified for any of the enumerable properties in the
-    'yocto-layer create' command.  If the -o option is specified, the
-    list of values for the given property, in addition to being
-    displayed, will be written to the specified file as a JSON object.
-    In this case, the object will consist of the set of name:value
-    pairs corresponding to the array of property values associated
-    with the property.
-
-    $ yocto-layer list property layer_priority
-     [no output - layer_priority is a text field that has no enumerable values]
-
-    The second form as well is meant mainly for developers of
-    alternative interfaces - it allows the developer to fetch the
-    possible values for a given input element on-demand.  This
-    on-demand capability is especially valuable for elements that
-    require relatively expensive remote operations to fulfill, such as
-    the example that returns the set of branches available in a remote
-    git tree above.
-
-"""
-
-##
-# test code
-##
-
-test_bsp_properties = {
-    'smp': 'yes',
-    'touchscreen': 'yes',
-    'keyboard': 'no',
-    'xserver': 'yes',
-    'xserver_choice': 'xserver-i915',
-    'features': ['goodfeature', 'greatfeature'],
-    'tunefile': 'tune-quark',
-}
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/kernel.py b/import-layers/yocto-poky/scripts/lib/bsp/kernel.py
deleted file mode 100644
index a3ee325..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/kernel.py
+++ /dev/null
@@ -1,1069 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# This module implements the kernel-related functions used by
-# 'yocto-kernel' to manage kernel config items and patches for Yocto
-# BSPs.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-import sys
-import os
-import shutil
-from .tags import *
-import glob
-import subprocess
-from .engine import create_context
-
-def find_bblayers():
-    """
-    Find and return a sanitized list of the layers found in BBLAYERS.
-    """
-    try:
-        builddir = os.environ["BUILDDIR"]
-    except KeyError:
-        print("BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)")
-        sys.exit(1)
-    bblayers_conf = os.path.join(builddir, "conf/bblayers.conf")
-
-    layers = []
-
-    bitbake_env_cmd = "bitbake -e"
-    bitbake_env_lines = subprocess.Popen(bitbake_env_cmd, shell=True,
-                                         stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    if not bitbake_env_lines:
-        print("Couldn't get '%s' output, exiting." % bitbake_env_cmd)
-        sys.exit(1)
-
-    for line in bitbake_env_lines.split('\n'):
-        bblayers = get_line_val(line, "BBLAYERS")
-        if (bblayers):
-            break
-
-    if not bblayers:
-        print("Couldn't find BBLAYERS in %s output, exiting." % bitbake_env_cmd)
-        sys.exit(1)
-
-    raw_layers = bblayers.split()
-
-    for layer in raw_layers:
-        if layer == 'BBLAYERS' or '=' in layer:
-            continue
-        layers.append(layer)
-
-    return layers
-
-
-def get_line_val(line, key):
-    """
-    Extract the value from the VAR="val" string
-    """
-    if line.startswith(key + "="):
-        stripped_line = line.split('=')[1]
-        stripped_line = stripped_line.replace('\"', '')
-        return stripped_line
-    return None
-
-
-def find_meta_layer():
-    """
-    Find and return the meta layer in BBLAYERS.
-    """
-    layers = find_bblayers()
-
-    for layer in layers:
-        if layer.endswith("meta"):
-            return layer
-
-    return None
-
-
-def find_bsp_layer(machine):
-    """
-    Find and return a machine's BSP layer in BBLAYERS.
-    """
-    layers = find_bblayers()
-
-    for layer in layers:
-        if layer.endswith(machine):
-            return layer
-
-    print("Unable to find the BSP layer for machine %s." % machine)
-    print("Please make sure it is listed in bblayers.conf")
-    sys.exit(1)
-
-
-def gen_choices_str(choices):
-    """
-    Generate a numbered list of choices from a list of choices for
-    display to the user.
-    """
-    choices_str = ""
-
-    for i, choice in enumerate(choices):
-        choices_str += "\t" + str(i + 1) + ") " + choice + "\n"
-
-    return choices_str
-
-
-def open_user_file(scripts_path, machine, userfile, mode):
-    """
-    Find one of the user files (user-config.cfg, user-patches.scc)
-    associated with the machine (could be in files/,
-    linux-yocto-custom/, etc).  Returns the open file if found, None
-    otherwise.
-
-    The caller is responsible for closing the file returned.
-    """
-    layer = find_bsp_layer(machine)
-    linuxdir = os.path.join(layer, "recipes-kernel/linux")
-    linuxdir_list = os.listdir(linuxdir)
-    for fileobj in linuxdir_list:
-        fileobj_path = os.path.join(linuxdir, fileobj)
-        if os.path.isdir(fileobj_path):
-            userfile_name = os.path.join(fileobj_path, userfile)
-            try:
-                f = open(userfile_name, mode)
-                return f
-            except IOError:
-                continue
-    return None
-
-
-def read_config_items(scripts_path, machine):
-    """
-    Find and return a list of config items (CONFIG_XXX) in a machine's
-    user-defined config fragment [${machine}-user-config.cfg].
-    """
-    config_items = []
-
-    f = open_user_file(scripts_path, machine, machine+"-user-config.cfg", "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s and not s.startswith("#"):
-            config_items.append(s)
-    f.close()
-
-    return config_items
-
-
-def write_config_items(scripts_path, machine, config_items):
-    """
-    Write (replace) the list of config items (CONFIG_XXX) in a
-    machine's user-defined config fragment [${machine}=user-config.cfg].
-    """
-    f = open_user_file(scripts_path, machine, machine+"-user-config.cfg", "w")
-    for item in config_items:
-        f.write(item + "\n")
-    f.close()
-
-    kernel_contents_changed(scripts_path, machine)
-
-
-def yocto_kernel_config_list(scripts_path, machine):
-    """
-    Display the list of config items (CONFIG_XXX) in a machine's
-    user-defined config fragment [${machine}-user-config.cfg].
-    """
-    config_items = read_config_items(scripts_path, machine)
-
-    print("The current set of machine-specific kernel config items for %s is:" % machine)
-    print(gen_choices_str(config_items))
-
-
-def yocto_kernel_config_rm(scripts_path, machine):
-    """
-    Display the list of config items (CONFIG_XXX) in a machine's
-    user-defined config fragment [${machine}-user-config.cfg], prompt the user
-    for one or more to remove, and remove them.
-    """
-    config_items = read_config_items(scripts_path, machine)
-
-    print("Specify the kernel config items to remove:")
-    inp = input(gen_choices_str(config_items))
-    rm_choices = inp.split()
-    rm_choices.sort()
-
-    removed = []
-
-    for choice in reversed(rm_choices):
-        try:
-            idx = int(choice) - 1
-        except ValueError:
-            print("Invalid choice (%s), exiting" % choice)
-            sys.exit(1)
-        if idx < 0 or idx >= len(config_items):
-            print("Invalid choice (%d), exiting" % (idx + 1))
-            sys.exit(1)
-        removed.append(config_items.pop(idx))
-
-    write_config_items(scripts_path, machine, config_items)
-
-    print("Removed items:")
-    for r in removed:
-        print("\t%s" % r)
-
-
-def yocto_kernel_config_add(scripts_path, machine, config_items):
-    """
-    Add one or more config items (CONFIG_XXX) to a machine's
-    user-defined config fragment [${machine}-user-config.cfg].
-    """
-    new_items = []
-    dup_items = []
-
-    cur_items = read_config_items(scripts_path, machine)
-
-    for item in config_items:
-        if not item.startswith("CONFIG") or (not "=y" in item and not "=m" in item):
-            print("Invalid config item (%s), exiting" % item)
-            sys.exit(1)
-        if item not in cur_items and item not in new_items:
-            new_items.append(item)
-        else:
-            dup_items.append(item)
-
-    if len(new_items) > 0:
-        cur_items.extend(new_items)
-        write_config_items(scripts_path, machine, cur_items)
-        print("Added item%s:" % ("" if len(new_items)==1 else "s"))
-        for n in new_items:
-            print("\t%s" % n)
-
-    if len(dup_items) > 0:
-        output="The following item%s already exist%s in the current configuration, ignoring %s:" % \
-            (("","s", "it") if len(dup_items)==1 else ("s", "", "them" ))
-        print(output)
-        for n in dup_items:
-            print("\t%s" % n)
-
-def find_current_kernel(bsp_layer, machine):
-    """
-    Determine the kernel and version currently being used in the BSP.
-    """
-    machine_conf = os.path.join(bsp_layer, "conf/machine/" + machine + ".conf")
-
-    preferred_kernel = preferred_kernel_version = preferred_version_varname = None
-
-    f = open(machine_conf, "r")
-    lines = f.readlines()
-    for line in lines:
-        if line.strip().startswith("PREFERRED_PROVIDER_virtual/kernel"):
-            preferred_kernel = line.split()[-1]
-            preferred_kernel = preferred_kernel.replace('\"','')
-            preferred_version_varname = "PREFERRED_VERSION_" + preferred_kernel
-        if preferred_version_varname and line.strip().startswith(preferred_version_varname):
-            preferred_kernel_version = line.split()[-1]
-            preferred_kernel_version = preferred_kernel_version.replace('\"','')
-            preferred_kernel_version = preferred_kernel_version.replace('%','')
-
-    if preferred_kernel and preferred_kernel_version:
-        return preferred_kernel + "_" + preferred_kernel_version
-    elif preferred_kernel:
-        return preferred_kernel
-
-
-def find_filesdir(scripts_path, machine):
-    """
-    Find the name of the 'files' dir associated with the machine
-    (could be in files/, linux-yocto-custom/, etc).  Returns the name
-    of the files dir if found, None otherwise.
-    """
-    layer = find_bsp_layer(machine)
-    filesdir = None
-    linuxdir = os.path.join(layer, "recipes-kernel/linux")
-    linuxdir_list = os.listdir(linuxdir)
-    for fileobj in linuxdir_list:
-        fileobj_path = os.path.join(linuxdir, fileobj)
-        if os.path.isdir(fileobj_path):
-            # this could be files/ or linux-yocto-custom/, we have no way of distinguishing
-            # so we take the first (and normally only) dir we find as the 'filesdir'
-            filesdir = fileobj_path
-
-    return filesdir
-
-
-def read_patch_items(scripts_path, machine):
-    """
-    Find and return a list of patch items in a machine's user-defined
-    patch list [${machine}-user-patches.scc].
-    """
-    patch_items = []
-
-    f = open_user_file(scripts_path, machine, machine+"-user-patches.scc", "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s and not s.startswith("#"):
-            fields = s.split()
-            if not fields[0] == "patch":
-                continue
-            patch_items.append(fields[1])
-    f.close()
-
-    return patch_items
-
-
-def write_patch_items(scripts_path, machine, patch_items):
-    """
-    Write (replace) the list of patches in a machine's user-defined
-    patch list [${machine}-user-patches.scc].
-    """
-    f = open_user_file(scripts_path, machine, machine+"-user-patches.scc", "w")
-    for item in patch_items:
-        f.write("patch " + item + "\n")
-    f.close()
-
-    kernel_contents_changed(scripts_path, machine)
-
-
-def yocto_kernel_patch_list(scripts_path, machine):
-    """
-    Display the list of patches in a machine's user-defined patch list
-    [${machine}-user-patches.scc].
-    """
-    patches = read_patch_items(scripts_path, machine)
-
-    print("The current set of machine-specific patches for %s is:" % machine)
-    print(gen_choices_str(patches))
-
-
-def yocto_kernel_patch_rm(scripts_path, machine):
-    """
-    Remove one or more patches from a machine's user-defined patch
-    list [${machine}-user-patches.scc].
-    """
-    patches = read_patch_items(scripts_path, machine)
-
-    print("Specify the patches to remove:")
-    inp = input(gen_choices_str(patches))
-    rm_choices = inp.split()
-    rm_choices.sort()
-
-    removed = []
-
-    filesdir = find_filesdir(scripts_path, machine)
-    if not filesdir:
-        print("Couldn't rm patch(es) since we couldn't find a 'files' dir")
-        sys.exit(1)
-
-    for choice in reversed(rm_choices):
-        try:
-            idx = int(choice) - 1
-        except ValueError:
-            print("Invalid choice (%s), exiting" % choice)
-            sys.exit(1)
-        if idx < 0 or idx >= len(patches):
-            print("Invalid choice (%d), exiting" % (idx + 1))
-            sys.exit(1)
-        filesdir_patch = os.path.join(filesdir, patches[idx])
-        if os.path.isfile(filesdir_patch):
-            os.remove(filesdir_patch)
-        removed.append(patches[idx])
-        patches.pop(idx)
-
-    write_patch_items(scripts_path, machine, patches)
-
-    print("Removed patches:")
-    for r in removed:
-        print("\t%s" % r)
-
-
-def yocto_kernel_patch_add(scripts_path, machine, patches):
-    """
-    Add one or more patches to a machine's user-defined patch list
-    [${machine}-user-patches.scc].
-    """
-    existing_patches = read_patch_items(scripts_path, machine)
-
-    for patch in patches:
-        if os.path.basename(patch) in existing_patches:
-            print("Couldn't add patch (%s) since it's already been added" % os.path.basename(patch))
-            sys.exit(1)
-
-    filesdir = find_filesdir(scripts_path, machine)
-    if not filesdir:
-        print("Couldn't add patch (%s) since we couldn't find a 'files' dir to add it to" % os.path.basename(patch))
-        sys.exit(1)
-
-    new_patches = []
-
-    for patch in patches:
-        if not os.path.isfile(patch):
-            print("Couldn't find patch (%s), exiting" % patch)
-            sys.exit(1)
-        basename = os.path.basename(patch)
-        filesdir_patch = os.path.join(filesdir, basename)
-        shutil.copyfile(patch, filesdir_patch)
-        new_patches.append(basename)
-
-    cur_items = read_patch_items(scripts_path, machine)
-    cur_items.extend(new_patches)
-    write_patch_items(scripts_path, machine, cur_items)
-
-    print("Added patches:")
-    for n in new_patches:
-        print("\t%s" % n)
-
-
-def inc_pr(line):
-    """
-    Add 1 to the PR value in the given bbappend PR line.  For the PR
-    lines in kernel .bbappends after modifications.  Handles PRs of
-    the form PR := "${PR}.1" as well as PR = "r0".
-    """
-    idx = line.find("\"")
-
-    pr_str = line[idx:]
-    pr_str = pr_str.replace('\"','')
-    fields = pr_str.split('.')
-    if len(fields) > 1:
-        fields[1] = str(int(fields[1]) + 1)
-        pr_str = "\"" + '.'.join(fields) + "\"\n"
-    else:
-        pr_val = pr_str[1:]
-        pr_str = "\"" + "r" + str(int(pr_val) + 1) + "\"\n"
-    idx2 = line.find("\"", idx + 1)
-    line = line[:idx] + pr_str
-    
-    return line
-
-
-def kernel_contents_changed(scripts_path, machine):
-    """
-    Do what we need to do to notify the system that the kernel
-    recipe's contents have changed.
-    """
-    layer = find_bsp_layer(machine)
-
-    kernel = find_current_kernel(layer, machine)
-    if not kernel:
-        print("Couldn't determine the kernel for this BSP, exiting.")
-        sys.exit(1)
-
-    kernel_bbfile = os.path.join(layer, "recipes-kernel/linux/" + kernel + ".bbappend")
-    if not os.path.isfile(kernel_bbfile):
-        kernel_bbfile = os.path.join(layer, "recipes-kernel/linux/" + kernel + ".bb")
-        if not os.path.isfile(kernel_bbfile):
-            return
-    kernel_bbfile_prev = kernel_bbfile + ".prev"
-    shutil.copyfile(kernel_bbfile, kernel_bbfile_prev)
-
-    ifile = open(kernel_bbfile_prev, "r")
-    ofile = open(kernel_bbfile, "w")
-    ifile_lines = ifile.readlines()
-    for ifile_line in ifile_lines:
-        if ifile_line.strip().startswith("PR"):
-            ifile_line = inc_pr(ifile_line)
-        ofile.write(ifile_line)
-    ofile.close()
-    ifile.close()
-
-
-def kernels(context):
-    """
-    Return the list of available kernels in the BSP i.e. corresponding
-    to the kernel .bbappends found in the layer.
-    """
-    archdir = os.path.join(context["scripts_path"], "lib/bsp/substrate/target/arch/" + context["arch"])
-    kerndir = os.path.join(archdir, "recipes-kernel/linux")
-    bbglob = os.path.join(kerndir, "*.bbappend")
-
-    bbappends = glob.glob(bbglob)
-
-    kernels = []
-
-    for kernel in bbappends:
-        filename = os.path.splitext(os.path.basename(kernel))[0]
-        idx = filename.find(CLOSE_TAG)
-        if idx != -1:
-            filename = filename[idx + len(CLOSE_TAG):].strip()
-        kernels.append(filename)
-
-    kernels.append("custom")
-
-    return kernels
-
-
-def extract_giturl(file):
-    """
-    Extract the git url of the kernel repo from the kernel recipe's
-    SRC_URI.
-    """
-    url = None
-    f = open(file, "r")
-    lines = f.readlines()
-    for line in lines:
-        line = line.strip()
-        if line.startswith("SRC_URI"):
-            line = line[len("SRC_URI"):].strip()
-            if line.startswith("="):
-                line = line[1:].strip()
-                if line.startswith("\""):
-                    line = line[1:].strip()
-                    prot = "git"
-                    for s in line.split(";"):
-                        if s.startswith("git://"):
-                            url = s
-                        if s.startswith("protocol="):
-                            prot = s.split("=")[1]
-                    if url:
-                        url = prot + url[3:]
-    return url
-
-
-def find_giturl(context):
-    """
-    Find the git url of the kernel repo from the kernel recipe's
-    SRC_URI.
-    """
-    name = context["name"]
-    filebase = context["filename"]
-    scripts_path = context["scripts_path"]
-
-    meta_layer = find_meta_layer()
-
-    kerndir = os.path.join(meta_layer, "recipes-kernel/linux")
-    bbglob = os.path.join(kerndir, "*.bb")
-    bbs = glob.glob(bbglob)
-    for kernel in bbs:
-        filename = os.path.splitext(os.path.basename(kernel))[0]
-        if filename in filebase:
-            giturl = extract_giturl(kernel)
-            return giturl
-    
-    return None
-
-
-def read_features(scripts_path, machine):
-    """
-    Find and return a list of features in a machine's user-defined
-    features fragment [${machine}-user-features.scc].
-    """
-    features = []
-
-    f = open_user_file(scripts_path, machine, machine+"-user-features.scc", "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s and not s.startswith("#"):
-            feature_include = s.split()
-            features.append(feature_include[1].strip())
-    f.close()
-
-    return features
-
-
-def write_features(scripts_path, machine, features):
-    """
-    Write (replace) the list of feature items in a
-    machine's user-defined features fragment [${machine}=user-features.cfg].
-    """
-    f = open_user_file(scripts_path, machine, machine+"-user-features.scc", "w")
-    for item in features:
-        f.write("include " + item + "\n")
-    f.close()
-
-    kernel_contents_changed(scripts_path, machine)
-
-
-def yocto_kernel_feature_list(scripts_path, machine):
-    """
-    Display the list of features used in a machine's user-defined
-    features fragment [${machine}-user-features.scc].
-    """
-    features = read_features(scripts_path, machine)
-
-    print("The current set of machine-specific features for %s is:" % machine)
-    print(gen_choices_str(features))
-
-
-def yocto_kernel_feature_rm(scripts_path, machine):
-    """
-    Display the list of features used in a machine's user-defined
-    features fragment [${machine}-user-features.scc], prompt the user
-    for one or more to remove, and remove them.
-    """
-    features = read_features(scripts_path, machine)
-
-    print("Specify the features to remove:")
-    inp = input(gen_choices_str(features))
-    rm_choices = inp.split()
-    rm_choices.sort()
-
-    removed = []
-
-    for choice in reversed(rm_choices):
-        try:
-            idx = int(choice) - 1
-        except ValueError:
-            print("Invalid choice (%s), exiting" % choice)
-            sys.exit(1)
-        if idx < 0 or idx >= len(features):
-            print("Invalid choice (%d), exiting" % (idx + 1))
-            sys.exit(1)
-        removed.append(features.pop(idx))
-
-    write_features(scripts_path, machine, features)
-
-    print("Removed features:")
-    for r in removed:
-        print("\t%s" % r)
-
-
-def yocto_kernel_feature_add(scripts_path, machine, features):
-    """
-    Add one or more features a machine's user-defined features
-    fragment [${machine}-user-features.scc].
-    """
-    new_items = []
-
-    for item in features:
-        if not item.endswith(".scc"):
-            print("Invalid feature (%s), exiting" % item)
-            sys.exit(1)
-        new_items.append(item)
-
-    cur_items = read_features(scripts_path, machine)
-    cur_items.extend(new_items)
-
-    write_features(scripts_path, machine, cur_items)
-
-    print("Added features:")
-    for n in new_items:
-        print("\t%s" % n)
-
-
-def find_feature_url(git_url):
-    """
-    Find the url of the kern-features.rc kernel for the kernel repo
-    specified from the BSP's kernel recipe SRC_URI.
-    """
-    feature_url = ""
-    if git_url.startswith("git://"):
-        git_url = git_url[len("git://"):].strip()
-        s = git_url.split("/")
-        if s[1].endswith(".git"):
-            s[1] = s[1][:len(s[1]) - len(".git")]
-        feature_url = "http://" + s[0] + "/cgit/cgit.cgi/" + s[1] + \
-            "/plain/meta/cfg/kern-features.rc?h=meta"
-
-    return feature_url
-
-
-def find_feature_desc(lines):
-    """
-    Find the feature description and compatibility in the passed-in
-    set of lines.  Returns a string string of the form 'desc
-    [compat]'.
-    """
-    desc = "no description available"
-    compat = "unknown"
-
-    for line in lines:
-        idx = line.find("KFEATURE_DESCRIPTION")
-        if idx != -1:
-            desc = line[idx + len("KFEATURE_DESCRIPTION"):].strip()
-            if desc.startswith("\""):
-                desc = desc[1:]
-                if desc.endswith("\""):
-                    desc = desc[:-1]
-        else:
-            idx = line.find("KFEATURE_COMPATIBILITY")
-            if idx != -1:
-                compat = line[idx + len("KFEATURE_COMPATIBILITY"):].strip()
-
-    return desc + " [" + compat + "]"
-
-
-def print_feature_descs(layer, feature_dir):
-    """
-    Print the feature descriptions for the features in feature_dir.
-    """
-    kernel_files_features = os.path.join(layer, "recipes-kernel/linux/files/" +
-                                         feature_dir)
-    for root, dirs, files in os.walk(kernel_files_features):
-        for file in files:
-            if file.endswith("~") or file.endswith("#"):
-                continue
-            if file.endswith(".scc"):
-                fullpath = os.path.join(layer, "recipes-kernel/linux/files/" +
-                                        feature_dir + "/" + file)
-                f = open(fullpath)
-                feature_desc = find_feature_desc(f.readlines())
-                print(feature_dir + "/" + file + ": " + feature_desc)
-
-
-def yocto_kernel_available_features_list(scripts_path, machine):
-    """
-    Display the list of all the kernel features available for use in
-    BSPs, as gathered from the set of feature sources.
-    """
-    layer = find_bsp_layer(machine)
-    kernel = find_current_kernel(layer, machine)
-    if not kernel:
-        print("Couldn't determine the kernel for this BSP, exiting.")
-        sys.exit(1)
-
-    context = create_context(machine, "arch", scripts_path)
-    context["name"] = "name"
-    context["filename"] = kernel
-    giturl = find_giturl(context)
-    feature_url = find_feature_url(giturl)
-
-    feature_cmd = "wget -q -O - " + feature_url
-    tmp = subprocess.Popen(feature_cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    print("The current set of kernel features available to %s is:\n" % machine)
-
-    if tmp:
-        tmpline = tmp.split("\n")
-        in_kernel_options = False
-        for line in tmpline:
-            if not "=" in line:
-                if in_kernel_options:
-                    break
-                if "kernel-options" in line:
-                    in_kernel_options = True
-                continue
-            if in_kernel_options:
-                feature_def = line.split("=")
-                feature_type = feature_def[0].strip()
-                feature = feature_def[1].strip()
-                desc = get_feature_desc(giturl, feature)
-                print("%s: %s" % (feature, desc))
-
-    print("[local]")
-
-    print_feature_descs(layer, "cfg")
-    print_feature_descs(layer, "features")
-
-
-def find_feature_desc_url(git_url, feature):
-    """
-    Find the url of the kernel feature in the kernel repo specified
-    from the BSP's kernel recipe SRC_URI.
-    """
-    feature_desc_url = ""
-    if git_url.startswith("git://"):
-        git_url = git_url[len("git://"):].strip()
-        s = git_url.split("/")
-        if s[1].endswith(".git"):
-            s[1] = s[1][:len(s[1]) - len(".git")]
-        feature_desc_url = "http://" + s[0] + "/cgit/cgit.cgi/" + s[1] + \
-            "/plain/meta/cfg/kernel-cache/" + feature + "?h=meta"
-
-    return feature_desc_url
-
-
-def get_feature_desc(git_url, feature):
-    """
-    Return a feature description of the form 'description [compatibility]
-    BSPs, as gathered from the set of feature sources.
-    """
-    feature_desc_url = find_feature_desc_url(git_url, feature)
-    feature_desc_cmd = "wget -q -O - " + feature_desc_url
-    tmp = subprocess.Popen(feature_desc_cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    return find_feature_desc(tmp.split("\n"))
-
-
-def yocto_kernel_feature_describe(scripts_path, machine, feature):
-    """
-    Display the description of a specific kernel feature available for
-    use in a BSP.
-    """
-    layer = find_bsp_layer(machine)
-
-    kernel = find_current_kernel(layer, machine)
-    if not kernel:
-        print("Couldn't determine the kernel for this BSP, exiting.")
-        sys.exit(1)
-
-    context = create_context(machine, "arch", scripts_path)
-    context["name"] = "name"
-    context["filename"] = kernel
-    giturl = find_giturl(context)
-
-    desc = get_feature_desc(giturl, feature)
-
-    print(desc)
-
-
-def check_feature_name(feature_name):
-    """
-    Sanity-check the feature name for create/destroy.  Return False if not OK.
-    """
-    if not feature_name.endswith(".scc"):
-        print("Invalid feature name (must end with .scc) [%s], exiting" % feature_name)
-        return False
-
-    if "/" in feature_name:
-        print("Invalid feature name (don't specify directory) [%s], exiting" % feature_name)
-        return False
-
-    return True
-
-
-def check_create_input(feature_items):
-    """
-    Sanity-check the create input.  Return False if not OK.
-    """
-    if not check_feature_name(feature_items[0]):
-        return False
-
-    if feature_items[1].endswith(".patch") or feature_items[1].startswith("CONFIG_"):
-        print("Missing description and/or compatibilty [%s], exiting" % feature_items[1])
-        return False
-
-    if feature_items[2].endswith(".patch") or feature_items[2].startswith("CONFIG_"):
-        print("Missing description and/or compatibility [%s], exiting" % feature_items[1])
-        return False
-
-    return True
-
-
-def yocto_kernel_feature_create(scripts_path, machine, feature_items):
-    """
-    Create a recipe-space kernel feature in a BSP.
-    """
-    if not check_create_input(feature_items):
-        sys.exit(1)
-
-    feature = feature_items[0]
-    feature_basename = feature.split(".")[0]
-    feature_description = feature_items[1]
-    feature_compat = feature_items[2]
-
-    patches = []
-    cfg_items = []
-
-    for item in feature_items[3:]:
-        if item.endswith(".patch"):
-            patches.append(item)
-        elif item.startswith("CONFIG"):
-            if ("=y" in item or "=m" in item):
-                cfg_items.append(item)
-        else:
-            print("Invalid feature item (must be .patch or CONFIG_*) [%s], exiting" % item)
-            sys.exit(1)
-
-    feature_dirname = "cfg"
-    if patches:
-        feature_dirname = "features"
-
-    filesdir = find_filesdir(scripts_path, machine)
-    if not filesdir:
-        print("Couldn't add feature (%s), no 'files' dir found" % feature)
-        sys.exit(1)
-
-    featdir = os.path.join(filesdir, feature_dirname)
-    if not os.path.exists(featdir):
-        os.mkdir(featdir)
-
-    for patch in patches:
-        if not os.path.isfile(patch):
-            print("Couldn't find patch (%s), exiting" % patch)
-            sys.exit(1)
-        basename = os.path.basename(patch)
-        featdir_patch = os.path.join(featdir, basename)
-        shutil.copyfile(patch, featdir_patch)
-
-    new_cfg_filename = os.path.join(featdir, feature_basename + ".cfg")
-    new_cfg_file = open(new_cfg_filename, "w")
-    for cfg_item in cfg_items:
-        new_cfg_file.write(cfg_item + "\n")
-    new_cfg_file.close()
-
-    new_feature_filename = os.path.join(featdir, feature_basename + ".scc")
-    new_feature_file = open(new_feature_filename, "w")
-    new_feature_file.write("define KFEATURE_DESCRIPTION \"" + feature_description + "\"\n")
-    new_feature_file.write("define KFEATURE_COMPATIBILITY " + feature_compat + "\n\n")
-
-    for patch in patches:
-        patch_dir, patch_file = os.path.split(patch)
-        new_feature_file.write("patch " + patch_file + "\n")
-
-    new_feature_file.write("kconf non-hardware " + feature_basename + ".cfg\n")
-    new_feature_file.close()
-
-    print("Added feature:")
-    print("\t%s" % feature_dirname + "/" + feature)
-
-
-def feature_in_use(scripts_path, machine, feature):
-    """
-    Determine whether the specified feature is in use by the BSP.
-    Return True if so, False otherwise.
-    """
-    features = read_features(scripts_path, machine)
-    for f in features:
-        if f == feature:
-            return True
-    return False
-
-
-def feature_remove(scripts_path, machine, feature):
-    """
-    Remove the specified feature from the available recipe-space
-    features defined for the BSP.
-    """
-    features = read_features(scripts_path, machine)
-    new_features = []
-    for f in features:
-        if f == feature:
-            continue
-        new_features.append(f)
-    write_features(scripts_path, machine, new_features)
-
-
-def yocto_kernel_feature_destroy(scripts_path, machine, feature):
-    """
-    Remove a recipe-space kernel feature from a BSP.
-    """
-    if not check_feature_name(feature):
-        sys.exit(1)
-
-    if feature_in_use(scripts_path, machine, "features/" + feature) or \
-            feature_in_use(scripts_path, machine, "cfg/" + feature):
-        print("Feature %s is in use (use 'feature rm' to un-use it first), exiting" % feature)
-        sys.exit(1)
-
-    filesdir = find_filesdir(scripts_path, machine)
-    if not filesdir:
-        print("Couldn't destroy feature (%s), no 'files' dir found" % feature)
-        sys.exit(1)
-
-    feature_dirname = "features"
-    featdir = os.path.join(filesdir, feature_dirname)
-    if not os.path.exists(featdir):
-        print("Couldn't find feature directory (%s)" % feature_dirname)
-        sys.exit(1)
-
-    feature_fqn = os.path.join(featdir, feature)
-    if not os.path.exists(feature_fqn):
-        feature_dirname = "cfg"
-        featdir = os.path.join(filesdir, feature_dirname)
-        if not os.path.exists(featdir):
-            print("Couldn't find feature directory (%s)" % feature_dirname)
-            sys.exit(1)
-        feature_fqn = os.path.join(featdir, feature_filename)
-        if not os.path.exists(feature_fqn):
-            print("Couldn't find feature (%s)" % feature)
-            sys.exit(1)
-
-    f = open(feature_fqn, "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s.startswith("patch ") or s.startswith("kconf "):
-            split_line = s.split()
-            filename = os.path.join(featdir, split_line[-1])
-            if os.path.exists(filename):
-                os.remove(filename)
-    f.close()
-    os.remove(feature_fqn)
-
-    feature_remove(scripts_path, machine, feature)
-
-    print("Removed feature:")
-    print("\t%s" % feature_dirname + "/" + feature)
-
-
-def base_branches(context):
-    """
-    Return a list of the base branches found in the kernel git repo.
-    """
-    giturl = find_giturl(context)
-
-    print("Getting branches from remote repo %s..." % giturl)
-
-    gitcmd = "git ls-remote %s *heads* 2>&1" % (giturl)
-    tmp = subprocess.Popen(gitcmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    branches = []
-
-    if tmp:
-        tmpline = tmp.split("\n")
-        for line in tmpline:
-            if len(line)==0:
-                break;
-            if not line.endswith("base"):
-                continue;
-            idx = line.find("refs/heads/")
-            kbranch = line[idx + len("refs/heads/"):]
-            if kbranch.find("/") == -1 and kbranch.find("base") == -1:
-                continue
-            idx = kbranch.find("base")
-            branches.append(kbranch[:idx - 1])
-
-    return branches
-
-
-def all_branches(context):
-    """
-    Return a list of all the branches found in the kernel git repo.
-    """
-    giturl = find_giturl(context)
-
-    print("Getting branches from remote repo %s..." % giturl)
-
-    gitcmd = "git ls-remote %s *heads* 2>&1" % (giturl)
-    tmp = subprocess.Popen(gitcmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    branches = []
-
-    base_prefixes = None
-
-    try:
-        branches_base = context["branches_base"]
-        if branches_base:
-            base_prefixes = branches_base.split(":")
-    except KeyError:
-        pass
-
-    arch = context["arch"]
-
-    if tmp:
-        tmpline = tmp.split("\n")
-        for line in tmpline:
-            if len(line)==0:
-                break;
-            idx = line.find("refs/heads/")
-            kbranch = line[idx + len("refs/heads/"):]
-            kbranch_prefix = kbranch.rsplit("/", 1)[0]
-
-            if base_prefixes:
-                for base_prefix in base_prefixes:
-                    if kbranch_prefix == base_prefix:
-                        branches.append(kbranch)
-                continue
-
-            if (kbranch.find("/") != -1 and
-                (kbranch.find("standard") != -1 or kbranch.find("base") != -1) or
-                kbranch == "base"):
-                branches.append(kbranch)
-                continue
-
-    return branches
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/conf/machine/machine.conf
deleted file mode 100644
index 624750c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/conf/machine/machine.conf
+++ /dev/null
@@ -1,100 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
-           xf86-video-fbdev \
-           "
-
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
-
-EXTRA_IMAGEDEPENDS += "u-boot"
-
-{{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_cortexa8" }}
-{{ input type:"choice" val:"tune_arm1136jf_s" msg:"arm1136jf-s tuning optimizations" }}
-{{ input type:"choice" val:"tune_arm920t" msg:"arm920t tuning optimizations" }}
-{{ input type:"choice" val:"tune_arm926ejs" msg:"arm926ejs tuning optimizations" }}
-{{ input type:"choice" val:"tune_arm9tdmi" msg:"arm9tdmi tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa5" msg:"cortexa5 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa7" msg:"cortexa7 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa8" msg:"cortexa8 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa9" msg:"cortexa9 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa15" msg:"cortexa15 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexm1" msg:"cortexm1 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexm3" msg:"cortexm3 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexr4" msg:"cortexr4 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ep9312" msg:"ep9312 tuning optimizations" }}
-{{ input type:"choice" val:"tune_iwmmxt" msg:"iwmmxt tuning optimizations" }}
-{{ input type:"choice" val:"tune_strongarm1100" msg:"strongarm1100 tuning optimizations" }}
-{{ input type:"choice" val:"tune_xscale" msg:"xscale tuning optimizations" }}
-{{ if tunefile == "tune_arm1136jf_s": }}
-include conf/machine/include/tune-arm1136jf-s.inc
-{{ if tunefile == "tune_arm920t": }}
-include conf/machine/include/tune-arm920t.inc
-{{ if tunefile == "tune_arm926ejs": }}
-include conf/machine/include/tune-arm926ejs.inc
-{{ if tunefile == "tune_arm9tdmi": }}
-include conf/machine/include/tune-arm9tdmi.inc
-{{ if tunefile == "tune_cortexa5": }}
-include conf/machine/include/tune-cortexa5.inc
-{{ if tunefile == "tune_cortexa7": }}
-include conf/machine/include/tune-cortexa7.inc
-{{ if tunefile == "tune_cortexa8": }}
-DEFAULTTUNE ?= "cortexa8hf-neon"
-include conf/machine/include/tune-cortexa8.inc
-{{ if tunefile == "tune_cortexa9": }}
-include conf/machine/include/tune-cortexa9.inc
-{{ if tunefile == "tune_cortexa15": }}
-include conf/machine/include/tune-cortexa15.inc
-{{ if tunefile == "tune_cortexm1": }}
-include conf/machine/include/tune-cortexm1.inc
-{{ if tunefile == "tune_cortexm3": }}
-include conf/machine/include/tune-cortexm3.inc
-{{ if tunefile == "tune_cortexr4": }}
-include conf/machine/include/tune-cortexr4.inc
-{{ if tunefile == "tune_ep9312": }}
-include conf/machine/include/tune-ep9312.inc
-{{ if tunefile == "tune_iwmmxt": }}
-include conf/machine/include/tune-iwmmxt.inc
-{{ if tunefile == "tune_strongarm1100": }}
-include conf/machine/include/tune-strongarm1100.inc
-{{ if tunefile == "tune_xscale": }}
-include conf/machine/include/tune-xscale.inc
-
-IMAGE_FSTYPES += "tar.bz2 jffs2"
-EXTRA_IMAGECMD_jffs2 = "-lnp "
-
-SERIAL_CONSOLE = "115200 ttyO0"
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-KERNEL_IMAGETYPE = "uImage"
-KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb"
-KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
-
-SPL_BINARY = "MLO"
-UBOOT_SUFFIX = "img"
-{{ input type:"edit" name:"uboot_machine" prio:"40" msg:"Please specify a value for UBOOT_MACHINE:" default:"am335x_evm_config" }}
-UBOOT_MACHINE = "{{=uboot_machine}}"
-{{ input type:"edit" name:"uboot_entrypoint" prio:"40" msg:"Please specify a value for UBOOT_ENTRYPOINT:" default:"0x80008000" }}
-UBOOT_ENTRYPOINT = "{{=uboot_entrypoint}}"
-{{ input type:"edit" name:"uboot_loadaddress" prio:"40" msg:"Please specify a value for UBOOT_LOADADDRESS:" default:"0x80008000" }}
-UBOOT_LOADADDRESS = "{{=uboot_loadaddress}}"
-
-MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
-
-IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
deleted file mode 100644
index bc52893..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
+++ /dev/null
@@ -1,34 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
-Section "Module"
-	Load	"extmod"
-	Load	"dbe"
-	Load	"glx"
-	Load	"freetype"
-	Load	"type1"
-	Load	"record"
-	Load	"dri"
-EndSection
-
-Section "Monitor"
-	Identifier	"Builtin Default Monitor"
-EndSection
-
-Section "Device"
-	Identifier	"Builtin Default fbdev Device 0"
-	Driver		"omapfb"
-EndSection
-
-Section "Screen"
-	Identifier	"Builtin Default fbdev Screen 0"
-	Device		"Builtin Default fbdev Device 0"
-	Monitor		"Builtin Default Monitor"
-EndSection
-
-Section "ServerLayout"
-	Identifier	"Builtin Default Layout"
-	Screen		"Builtin Default fbdev Screen 0"
-EndSection
-
-Section "ServerFlags"
-	Option		"DontZap"  "0"
-EndSection
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 3083003..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg
deleted file mode 100644
index 9bfc90c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg
+++ /dev/null
@@ -1,31 +0,0 @@
-# yocto-bsp-filename {{=machine}}-non_hardware.cfg
-#
-# Miscellaneous filesystems
-#
-CONFIG_NFS_DEF_FILE_IO_SIZE=1024
-
-#
-# Multiple Device Support
-#
-# CONFIG_MD is not set
-
-# Kernel Features
-#
-CONFIG_NO_HZ=y
-
-#
-# CPUIdle
-#
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_FS=y
-
-#
-# Power management options
-#
-CONFIG_PM_DEBUG=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index ea6966c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,15 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH arm
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for preempt-rt kernels
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index 8a88157..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,15 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH arm
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for standard kernels
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 921b7e7..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH arm
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 47489e4..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 97f747f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index a2e1ae0..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,321 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-#
-# System Type
-#
-CONFIG_ARCH_OMAP=y
-
-#
-# TI OMAP Implementations
-#
-# CONFIG_ARCH_OMAP2 is not set
-CONFIG_ARCH_OMAP3=y
-
-#
-# TI OMAP Common Features
-#
-CONFIG_ARCH_OMAP2PLUS=y
-
-#
-# OMAP Feature Selections
-#
-CONFIG_OMAP_32K_TIMER=y
-CONFIG_OMAP_32K_TIMER_HZ=128
-CONFIG_OMAP_DM_TIMER=y
-CONFIG_OMAP_RESET_CLOCKS=y
-CONFIG_OMAP_SMARTREFLEX=y
-CONFIG_OMAP_SMARTREFLEX_CLASS3=y
-CONFIG_OMAP_MBOX_FWK=m
-CONFIG_OMAP_MBOX_KFIFO_SIZE=256
-
-#
-# OMAP Board Type
-#
-CONFIG_MACH_OMAP3_BEAGLE=y
-
-#
-# Processor Features
-#
-CONFIG_ARM_THUMBEE=y
-CONFIG_ARM_ERRATA_430973=y
-
-#
-# Kernel Features
-#
-CONFIG_LEDS=y
-
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_OMAP=y
-CONFIG_SERIAL_OMAP_CONSOLE=y
-
-#
-# At least one emulation must be selected
-#
-CONFIG_VFP=y
-CONFIG_NEON=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_RUNTIME=y
-
-#
-# Generic Driver Options
-#
-CONFIG_MTD=y
-CONFIG_MTD_CMDLINE_PARTS=y
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_INTELEXT=y
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_NAND=y
-
-CONFIG_MTD_NAND_OMAP2=y
-
-CONFIG_MTD_UBI=y
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_SMSC911X=y
-CONFIG_USB_NET_SMSC95XX=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_EVDEV=y
-
-#
-# Input Device Drivers
-#
-CONFIG_KEYBOARD_TWL4030=y
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_ADS7846=y
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_I2C=y
-CONFIG_I2C_OMAP=y
-CONFIG_SPI=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_OMAP24XX=y
-
-#
-# I2C GPIO expanders:
-#
-CONFIG_GPIO_TWL4030=y
-
-#
-# SPI GPIO expanders:
-#
-CONFIG_OMAP_WATCHDOG=y
-CONFIG_WATCHDOG_NOWAYOUT=y
-
-#
-# Multifunction device drivers
-#
-CONFIG_TWL4030_CORE=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_DUMMY=y
-CONFIG_REGULATOR_TWL4030=y
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_DRM=m
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FIRMWARE_EDID is not set
-# CONFIG_FB_DDC is not set
-# CONFIG_FB_BOOT_VESA_SUPPORT is not set
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
-# CONFIG_FB_SYS_FILLRECT is not set
-# CONFIG_FB_SYS_COPYAREA is not set
-# CONFIG_FB_SYS_IMAGEBLIT is not set
-# CONFIG_FB_FOREIGN_ENDIAN is not set
-# CONFIG_FB_SYS_FOPS is not set
-# CONFIG_FB_SVGALIB is not set
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-# CONFIG_FB_TILEBLITTING is not set
-
-#
-# Frame buffer hardware drivers
-#
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_TMIO is not set
-# CONFIG_FB_VIRTUAL is not set
-# CONFIG_FB_METRONOME is not set
-# CONFIG_FB_MB862XX is not set
-# CONFIG_FB_BROADSHEET is not set
-# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
-CONFIG_OMAP2_VRAM=y
-CONFIG_OMAP2_VRFB=y
-CONFIG_OMAP2_DSS=y
-CONFIG_OMAP2_VRAM_SIZE=14
-CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
-# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
-CONFIG_OMAP2_DSS_DPI=y
-# CONFIG_OMAP2_DSS_RFBI is not set
-CONFIG_OMAP2_DSS_VENC=y
-# CONFIG_OMAP2_DSS_SDI is not set
-CONFIG_OMAP2_DSS_DSI=y
-# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
-CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
-CONFIG_FB_OMAP2=y
-CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
-CONFIG_FB_OMAP2_NUM_FBS=2
-
-#
-# OMAP2/3 Display Device Drivers
-#
-CONFIG_PANEL_GENERIC_DPI=y
-CONFIG_PANEL_DVI=y
-CONFIG_PANEL_SHARP_LS037V7DW01=y
-# CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set
-# CONFIG_PANEL_TAAL is not set
-CONFIG_PANEL_TPO_TD043MTEA1=m
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-
-#
-# Display device support
-#
-CONFIG_DISPLAY_SUPPORT=y
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-
-#
-# Console display driver support
-#
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_LOGO=y
-# CONFIG_VGA_CONSOLE is not set
-
-# DMA Devices
-CONFIG_DMADEVICES=y
-CONFIG_DMA_OMAP=y
-CONFIG_DMA_OF=y
-
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_SOC=y
-CONFIG_SND_OMAP_SOC=y
-CONFIG_SND_OMAP_SOC_OMAP_TWL4030=y
-
-#
-# USB Input Devices
-#
-CONFIG_USB=y
-CONFIG_USB_SUPPORT=y
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_OTG=y
-# CONFIG_USB_OTG_WHITELIST is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_MUSB_HDRC=y
-CONFIG_USB_MUSB_OMAP2PLUS=y
-CONFIG_USB_OMAP=y
-
-#
-# OMAP 343x high speed USB support
-#
-CONFIG_USB_MUSB_OTG=y
-CONFIG_USB_GADGET_MUSB_HDRC=y
-CONFIG_USB_MUSB_HDRC_HCD=y
-CONFIG_USB_INVENTRA_DMA=y
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_DUALSPEED=y
-CONFIG_USB_OTG_UTILS=y
-CONFIG_TWL4030_USB=y
-
-# USB gadget modules
-CONFIG_USB_G_NCM=y
-CONFIG_USB_MASS_STORAGE=y
-
-CONFIG_MMC=y
-
-#
-# MMC/SD Host Controller Drivers
-#
-CONFIG_MMC_OMAP_HS=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_TWL4030=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_VFAT_FS=y
-
-#
-# Multimedia core support
-#
-
-# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
-
-#
-# Advanced Power Management Emulation support
-#
-CONFIG_APM_EMULATION=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index fb3866f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,6 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-kconf non-hardware {{machine}}-non_hardware.cfg
-
-include features/usb-net/usb-net.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index dfbecb5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index e874c9e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index a809c76..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT
deleted file mode 100644
index fb950dc..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy 
-of this software and associated documentation files (the "Software"), to deal 
-in the Software without restriction, including without limitation the rights 
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-copies of the Software, and to permit persons to whom the Software is 
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in 
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-THE SOFTWARE.
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README
deleted file mode 100644
index 928659f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README
+++ /dev/null
@@ -1,118 +0,0 @@
-This README file contains information on building the meta-{{=machine}}
-BSP layer, and booting the images contained in the /binary directory.
-Please see the corresponding sections below for details.
-
-
-Dependencies
-============
-
-This layer depends on:
-
-  URI: git://git.openembedded.org/bitbake
-  branch: master
-
-  URI: git://git.openembedded.org/openembedded-core
-  layers: meta
-  branch: master
-
-  URI: git://git.yoctoproject.org/xxxx
-  layers: xxxx
-  branch: master
-
-
-Patches
-=======
-
-Please submit any patches against this BSP to the Yocto mailing list
-(yocto@yoctoproject.org) and cc: the maintainer:
-
-Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
-
-Please see the meta-xxxx/MAINTAINERS file for more details.
-
-
-Table of Contents
-=================
-
-  I. Building the meta-{{=machine}} BSP layer
- II. Booting the images in /binary
-
-
-I. Building the meta-{{=machine}} BSP layer
-========================================
-
---- replace with specific instructions for your layer ---
-
-In order to build an image with BSP support for a given release, you
-need to download the corresponding BSP tarball from the 'Board Support
-Package (BSP) Downloads' page of the Yocto Project website.
-
-Having done that, and assuming you extracted the BSP tarball contents
-at the top-level of your yocto build tree, you can build a
-{{=machine}} image by adding the location of the meta-{{=machine}}
-layer to bblayers.conf, along with any other layers needed (to access
-common metadata shared between BSPs) e.g.:
-
-  yocto/meta-xxxx \
-  yocto/meta-xxxx/meta-{{=machine}} \
-
-To enable the {{=machine}} layer, add the {{=machine}} MACHINE to local.conf:
-
-  MACHINE ?= "{{=machine}}"
-
-You should then be able to build a {{=machine}} image as such:
-
-  $ source oe-init-build-env
-  $ bitbake core-image-sato
-
-At the end of a successful build, you should have a live image that
-you can boot from a USB flash drive (see instructions on how to do
-that below, in the section 'Booting the images from /binary').
-
-As an alternative to downloading the BSP tarball, you can also work
-directly from the meta-xxxx git repository.  For each BSP in the
-'meta-xxxx' repository, there are multiple branches, one corresponding
-to each major release starting with 'laverne' (0.90), in addition to
-the latest code which tracks the current master (note that not all
-BSPs are present in every release).  Instead of extracting a BSP
-tarball at the top level of your yocto build tree, you can
-equivalently check out the appropriate branch from the meta-xxxx
-repository at the same location.
-
-
-II. Booting the images in /binary
-=================================
-
---- replace with specific instructions for your platform ---
-
-This BSP contains bootable live images, which can be used to directly
-boot Yocto off of a USB flash drive.
-
-Under Linux, insert a USB flash drive.  Assuming the USB flash drive
-takes device /dev/sdf, use dd to copy the live image to it.  For
-example:
-
-# dd if=core-image-sato-{{=machine}}-20101207053738.hddimg of=/dev/sdf
-# sync
-# eject /dev/sdf
-
-This should give you a bootable USB flash device.  Insert the device
-into a bootable USB socket on the target, and power on.  This should
-result in a system booted to the Sato graphical desktop.
-
-If you want a terminal, use the arrows at the top of the UI to move to
-different pages of available applications, one of which is named
-'Terminal'.  Clicking that should give you a root terminal.
-
-If you want to ssh into the system, you can use the root terminal to
-ifconfig the IP address and use that to ssh in.  The root password is
-empty, so to log in type 'root' for the user name and hit 'Enter' at
-the Password prompt: and you should be in.
-
-----
-
-If you find you're getting corrupt images on the USB (it doesn't show
-the syslinux boot: prompt, or the boot: prompt contains strange
-characters), try doing this first:
-
-# dd if=/dev/zero of=/dev/sdf bs=1M count=512
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README.sources b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README.sources
deleted file mode 100644
index 3c4cb7b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README.sources
+++ /dev/null
@@ -1,17 +0,0 @@
-The sources for the packages comprising the images shipped with this
-BSP can be found at the following location:
-
-http://downloads.yoctoproject.org/mirror/sources/
-
-The metadata used to generate the images shipped with this BSP, in
-addition to the code contained in this BSP, can be found at the
-following location:
-
-http://www.yoctoproject.org/downloads/yocto-1.1/poky-edison-6.0.tar.bz2
-
-The metadata used to generate the images shipped with this BSP, in
-addition to the code contained in this BSP, can also be found at the
-following locations:
-
-git://git.yoctoproject.org/poky.git
-git://git.yoctoproject.org/meta-xxxx
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf
deleted file mode 100644
index 5529f45..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# We have a conf and classes directory, add to BBPATH
-BBPATH .= ":${LAYERDIR}"
-
-# We have a recipes-* directories, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
-	${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_COLLECTIONS += "{{=machine}}"
-BBFILE_PATTERN_{{=machine}} = "^${LAYERDIR}/"
-BBFILE_PRIORITY_{{=machine}} = "6"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig
deleted file mode 100644
index 3b85d38..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig
+++ /dev/null
@@ -1,5 +0,0 @@
-# Assume a USB mouse and keyboard are connected
-{{ input type:"boolean" name:"touchscreen" msg:"Does your BSP have a touchscreen? (y/n)" default:"n" }}
-HAVE_TOUCHSCREEN={{=touchscreen}}
-{{ input type:"boolean" name:"keyboard" msg:"Does your BSP have a keyboard? (y/n)" default:"y" }}
-HAVE_KEYBOARD={{=keyboard}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend
deleted file mode 100644
index 6d4804d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 663dddb..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,26 +0,0 @@
-{{ if kernel_choice == "custom": }}
-{{ input type:"boolean" name:"custom_kernel_remote" prio:"20" msg:"Is the custom kernel you'd like to use in a remote git repo? (y/n)" default:"y"}}
-
-{{ if kernel_choice == "custom" and custom_kernel_remote == "y": }}
-{{ input type:"edit-git-repo" name:"custom_kernel_remote_path" prio:"20" msg:"Please enter the full URI to the remote git repo (the default corresponds to linux-stable v3.16.3)" default:"git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"}}
-
-{{ if kernel_choice == "custom" and custom_kernel_remote == "n": }}
-{{ input type:"edit-git-repo" name:"custom_kernel_local_path" prio:"20" msg:"You've indicated that you're not using a remote git repo.  Please enter the full path to the local git repo you want to use (the default assumes a local linux-stable v3.16.3)" default:"/home/trz/yocto/kernels/linux-stable.git"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"boolean" name:"custom_kernel_need_kbranch" prio:"20" msg:"Do you need to use a specific (non-master) branch? (y/n)" default:"n"}}
-
-{{ if kernel_choice == "custom" and custom_kernel_need_kbranch == "y": }}
-{{ input type:"edit" name:"custom_kernel_kbranch" prio:"20" msg:"Please enter the branch you want to use (the default branch corresponds to the linux-stable 'linux-3.16.y' branch):" default:"linux-3.16.y"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"edit" name:"custom_kernel_srcrev" prio:"20" msg:"Please enter the SRCREV (commit id) you'd like to use (use '${AUTOREV}' to track the current HEAD):" default:"${AUTOREV}"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"edit" name:"custom_kernel_linux_version" prio:"20" msg:"Please enter the Linux version of the kernel you've specified:" default:"3.16.3"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"edit" name:"custom_kernel_linux_version_extension" prio:"20" msg:"Please enter a Linux version extension if you want (it will show up at the end of the kernel name shown by uname):" default:"-custom"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"edit-file" name:"custom_kernel_defconfig" prio:"20" msg:"It's recommended (but not required) that custom kernels be built using a defconfig.  Please enter the full path to the defconfig for your kernel (NOTE: if you don't specify a defconfig the kernel probably won't build or boot):" default:""}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb
deleted file mode 100644
index 3ba4226..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "custom": }} this
-# This file was derived from the linux-yocto-custom.bb recipe in
-# oe-core.
-#
-# linux-yocto-custom.bb:
-#
-#   A yocto-bsp-generated kernel recipe that uses the linux-yocto and
-#   oe-core kernel classes to apply a subset of yocto kernel
-#   management to git managed kernel repositories.
-#
-# Warning:
-#
-#   Building this kernel without providing a defconfig or BSP
-#   configuration will result in build or boot errors. This is not a
-#   bug.
-#
-# Notes:
-#
-#   patches: patches can be merged into to the source git tree itself,
-#            added via the SRC_URI, or controlled via a BSP
-#            configuration.
-#
-#   example configuration addition:
-#            SRC_URI += "file://smp.cfg"
-#   example patch addition:
-#            SRC_URI += "file://0001-linux-version-tweak.patch
-#   example feature addition:
-#            SRC_URI += "file://feature.scc"
-#
-
-inherit kernel
-require recipes-kernel/linux/linux-yocto.inc
-
-{{ if kernel_choice == "custom" and custom_kernel_remote == "y": }}
-SRC_URI = "{{=custom_kernel_remote_path}};protocol=git;bareclone=1;branch=${KBRANCH}"
-{{ if kernel_choice == "custom" and custom_kernel_remote == "n": }}
-SRC_URI = "git://{{=custom_kernel_local_path}};protocol=file;bareclone=1;branch=${KBRANCH}"
-
-SRC_URI += "file://defconfig"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-{{ if kernel_choice == "custom" and custom_kernel_need_kbranch == "y" and custom_kernel_kbranch and custom_kernel_kbranch != "master": }}
-KBRANCH = "{{=custom_kernel_kbranch}}"
-
-LINUX_VERSION ?= "{{=custom_kernel_linux_version}}"
-LINUX_VERSION_EXTENSION ?= "{{=custom_kernel_linux_version_extension}}"
-
-SRCREV="{{=custom_kernel_srcrev}}"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall
deleted file mode 100644
index 017d206..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice == "custom": }} linux-yocto-custom
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig
deleted file mode 100644
index ceb0ffa..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Placeholder for custom default kernel configuration.  yocto-bsp will
-# replace this file with a user-specified defconfig.
-#
-{{ if custom_kernel_defconfig: replace_file(of, custom_kernel_defconfig) }}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg
deleted file mode 100644
index 922309d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg
+++ /dev/null
@@ -1,9 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
-#
-# Used by yocto-kernel to manage config options.
-#
-# yocto-kernel may change the contents of this file in any
-# way it sees fit, including removing comments like this,
-# so don't manually make any modifications you don't want
-# to lose.
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc
deleted file mode 100644
index 6d1138f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc
+++ /dev/null
@@ -1,9 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
-#
-# Used by yocto-kernel to manage patches.
-#
-# yocto-kernel may change the contents of this file in any
-# way it sees fit, including removing comments like this,
-# so don't manually make any modifications you don't want
-# to lose.
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg
deleted file mode 100644
index 1ba8201..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-#
-# A convenient place to add config options, nothing more.
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc
deleted file mode 100644
index 64d3ed1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc
+++ /dev/null
@@ -1,16 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-#
-# The top-level 'feature' for the {{=machine}} custom kernel.
-#
-# Essentially this is a convenient top-level container or starting
-# point for adding lower-level config fragements and features.
-#
-
-# {{=machine}}.cfg in the linux-yocto-custom subdir is just a
-# convenient place for adding random config fragments.
-
-kconf hardware {{=machine}}.cfg
-
-# These are used by yocto-kernel to add config fragments and features.
-# Don't remove if you plan on using yocto-kernel with this BSP.
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf
deleted file mode 100644
index 4745c1c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf
+++ /dev/null
@@ -1,69 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_core2" }}
-{{ input type:"choice" val:"tune_i586" msg:"i586 tuning optimizations" }}
-{{ input type:"choice" val:"tune_atom" msg:"Atom tuning optimizations" }}
-{{ input type:"choice" val:"tune_core2" msg:"Core2 tuning optimizations" }}
-{{ if tunefile == "tune_i586": }}
-require conf/machine/include/tune-i586.inc
-{{ if tunefile == "tune_atom": }}
-require conf/machine/include/tune-atom.inc
-{{ if tunefile == "tune_core2": }}
-DEFAULTTUNE="core2-32"
-require conf/machine/include/tune-core2.inc
-
-require conf/machine/include/x86-base.inc
-
-MACHINE_FEATURES += "wifi efi pcbios"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-
-{{ if xserver == "y": }}
-{{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_vesa" }}
-{{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }}
-{{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }}
-{{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }}
-{{ input type:"choice" val:"xserver_fbdev" msg:"fbdev xserver support" }}
-{{ input type:"choice" val:"xserver_modesetting" msg:"modesetting xserver support" }}
-
-{{ if xserver == "y" and kernel_choice != "linux-yocto_4.8" and kernel_choice != "linux-yocto_4.4" and kernel_choice != "linux-yocto_4.1" and kernel_choice != "custom": xserver_choice = "xserver_i915" }}
-
-{{ if xserver == "y": }}
-XSERVER ?= "${XSERVER_X86_BASE} \
-           ${XSERVER_X86_EXT} \
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-           ${XSERVER_X86_VESA} \
-{{ if xserver == "y" and xserver_choice == "xserver_i915": }}
-           ${XSERVER_X86_I915} \
-{{ if xserver == "y" and xserver_choice == "xserver_i965": }}
-           ${XSERVER_X86_I965} \
-{{ if xserver == "y" and xserver_choice == "xserver_fbdev": }}
-           ${XSERVER_X86_FBDEV} \
-{{ if xserver == "y" and xserver_choice == "xserver_modesetting": }}
-           ${XSERVER_X86_MODESETTING} \
-{{ if xserver == "y": }}
-           "
-
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d eee-acpi-scripts"
-
-EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
-
-GLIBC_ADDONS = "nptl"
-
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-APPEND += "video=vesafb vga=0x318"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
deleted file mode 100644
index ac9a0f1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 3083003..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index 7146e23..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,17 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH i386
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for preempt-rt kernels
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index 38d1ca5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,17 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH i386
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for standard kernels
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 91373b3..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH i386
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 69efdcc..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 85be26d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 4c59daa..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index fe5b882..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,58 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-CONFIG_X86_32=y
-# Must explicitly disable 64BIT
-# CONFIG_64BIT is not set
-
-CONFIG_MATOM=y
-CONFIG_PRINTK=y
-
-# Basic hardware support for the box - network, USB, PCI, sound
-CONFIG_NETDEVICES=y
-CONFIG_ATA=y
-CONFIG_ATA_GENERIC=y
-CONFIG_ATA_SFF=y
-CONFIG_PCI=y
-CONFIG_MMC=y
-CONFIG_MMC_SDHCI=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_R8169=y
-CONFIG_PATA_SCH=y
-CONFIG_MMC_SDHCI_PCI=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_NET=y
-CONFIG_USB_UHCI_HCD=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_HDA_INTEL=y
-CONFIG_SATA_AHCI=y
-CONFIG_AGP=y
-CONFIG_PM=y
-CONFIG_ACPI=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_INPUT=y
-
-# Make sure these are on, otherwise the bootup won't be fun
-CONFIG_EXT3_FS=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_MODULES=y
-CONFIG_SHMEM=y
-CONFIG_TMPFS=y
-CONFIG_PACKET=y
-
-# Needed for booting (and using) USB memory sticks
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ISO8859_1=y
-
-CONFIG_RD_GZIP=y
-
-# Needed for booting (and using) CD images
-CONFIG_BLK_DEV_SR=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 3e4c54f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,19 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include features/intel-e1xxxx/intel-e100.scc
-include features/intel-e1xxxx/intel-e1xxxx.scc
-
-{{ if xserver == "y" and xserver_choice == "xserver_i915" or xserver_choice == "xserver_i965": }}
-include features/i915/i915.scc
-
-include features/serial/8250.scc
-include features/ericsson-3g/f5521gw.scc
-
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-include cfg/vesafb.scc
-
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/power/intel.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index f8616ed..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index 20d57f6..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index 0a9d475..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT
deleted file mode 100644
index 89de354..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README
deleted file mode 100644
index ca6527c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README
+++ /dev/null
@@ -1,64 +0,0 @@
-This README file contains information on the contents of the
-{{=layer_name}} layer.
-
-Please see the corresponding sections below for details.
-
-
-Dependencies
-============
-
-This layer depends on:
-
-  URI: git://git.openembedded.org/bitbake
-  branch: master
-
-  URI: git://git.openembedded.org/openembedded-core
-  layers: meta
-  branch: master
-
-  URI: git://git.yoctoproject.org/xxxx
-  layers: xxxx
-  branch: master
-
-
-Patches
-=======
-
-Please submit any patches against the {{=layer_name}} layer to the
-xxxx mailing list (xxxx@zzzz.org) and cc: the maintainer:
-
-Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
-
-
-Table of Contents
-=================
-
-  I. Adding the {{=layer_name}} layer to your build
- II. Misc
-
-
-I. Adding the {{=layer_name}} layer to your build
-=================================================
-
---- replace with specific instructions for the {{=layer_name}} layer ---
-
-In order to use this layer, you need to make the build system aware of
-it.
-
-Assuming the {{=layer_name}} layer exists at the top-level of your
-yocto build tree, you can add it to the build system by adding the
-location of the {{=layer_name}} layer to bblayers.conf, along with any
-other layers needed. e.g.:
-
-  BBLAYERS ?= " \
-    /path/to/yocto/meta \
-    /path/to/yocto/meta-poky \
-    /path/to/yocto/meta-yocto-bsp \
-    /path/to/yocto/meta-{{=layer_name}} \
-    "
-
-
-II. Misc
-========
-
---- replace with specific information about the {{=layer_name}} layer ---
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf
deleted file mode 100644
index bdffe17..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# We have a conf and classes directory, add to BBPATH
-BBPATH .= ":${LAYERDIR}"
-
-# We have recipes-* directories, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
-	${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_COLLECTIONS += "{{=layer_name}}"
-BBFILE_PATTERN_{{=layer_name}} = "^${LAYERDIR}/"
-BBFILE_PRIORITY_{{=layer_name}} = "{{=layer_priority}}"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
deleted file mode 100644
index e2a89c3..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
+++ /dev/null
@@ -1,14 +0,0 @@
-{{ input type:"edit" name:"layer_priority" prio:"20" msg:"Please enter the layer priority you'd like to use for the layer:" default:"6"}}
-
-{{ input type:"boolean" name:"create_example_recipe" prio:"20" msg:"Would you like to have an example recipe created? (y/n)" default:"n"}}
-
-{{ if create_example_recipe == "y": }}
-{{ input type:"edit" name:"example_recipe_name" prio:"20" msg:"Please enter the name you'd like to use for your example recipe:" default:"example"}}
-
-{{ input type:"boolean" name:"create_example_bbappend" prio:"20" msg:"Would you like to have an example bbappend file created? (y/n)" default:"n"}}
-
-{{ if create_example_bbappend == "y": }}
-{{ input type:"edit" name:"example_bbappend_name" prio:"20" msg:"Please enter the name you'd like to use for your bbappend file:" default:"example"}}
-
-{{ if create_example_bbappend == "y": }}
-{{ input type:"edit" name:"example_bbappend_version" prio:"20" msg:"Please enter the version number you'd like to use for your bbappend file (this should match the recipe you're appending to):" default:"0.1"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall
deleted file mode 100644
index 3594e65..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if create_example_bbappend == "y": }} recipes-example-bbappend
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend
deleted file mode 100644
index 3531330..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend
+++ /dev/null
@@ -1,9 +0,0 @@
-# yocto-bsp-filename {{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
-
-#
-# This .bbappend doesn't yet do anything - replace this text with
-# modifications to the example_0.1.bb recipe, or whatever recipe it is
-# that you want to modify with this .bbappend (make sure you change
-# the recipe name (PN) and version (PV) to match).
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall
deleted file mode 100644
index 46df8a8..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=example_bbappend_name}}-{{=example_bbappend_version}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch
deleted file mode 100644
index 2000a34..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# This is a non-functional placeholder file, here for example purposes
-# only.
-#
-# If you had a patch for your recipe, you'd put it in this directory
-# and reference it from your recipe's SRC_URI:
-#
-#  SRC_URI += "file://example.patch"
-#
-# Note that you could also rename the directory containing this patch
-# to remove the version number or simply rename it 'files'.  Doing so
-# allows you to use the same directory for multiple recipes.
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall
deleted file mode 100644
index b0069b1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if create_example_recipe == "y": }} recipes-example
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
deleted file mode 100644
index e534d36..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-# yocto-bsp-filename {{=example_recipe_name}}_0.1.bb
-#
-# This file was derived from the 'Hello World!' example recipe in the
-# Yocto Project Development Manual.
-#
-
-SUMMARY = "Simple helloworld application"
-SECTION = "examples"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-
-SRC_URI = "file://helloworld.c"
-
-S = "${WORKDIR}"
-
-do_compile() {
-	     ${CC} ${LDFLAGS} helloworld.c -o helloworld
-}
-
-do_install() {
-	     install -d ${D}${bindir}
-	     install -m 0755 helloworld ${D}${bindir}
-}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall
deleted file mode 100644
index c319c19..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=example_recipe_name}}-0.1
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch
deleted file mode 100644
index 2000a34..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# This is a non-functional placeholder file, here for example purposes
-# only.
-#
-# If you had a patch for your recipe, you'd put it in this directory
-# and reference it from your recipe's SRC_URI:
-#
-#  SRC_URI += "file://example.patch"
-#
-# Note that you could also rename the directory containing this patch
-# to remove the version number or simply rename it 'files'.  Doing so
-# allows you to use the same directory for multiple recipes.
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c
deleted file mode 100644
index 71f2e46..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
-    printf("Hello World!\n");
-
-    return 0;
-}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf
deleted file mode 100644
index 37da253..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf
+++ /dev/null
@@ -1,38 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-require conf/machine/include/tune-mips32.inc
-
-MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 serial"
-
-KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
-KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
-            xf86-video-fbdev"
-
-SERIAL_CONSOLE = "115200 ttyS0"
-USE_VT ?= "0"
-
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-
-IMAGE_FSTYPES ?= "jffs2 tar.bz2"
-JFFS2_ERASEBLOCK = "0x10000"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index a128255..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index b34f3d3..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 64f395b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 47489e4..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 85be26d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 97f747f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 2fe4766..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-CONFIG_MIPS=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 792fdc9..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,6 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include cfg/usb-mass-storage.scc
-include cfg/fs/vfat.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index dfbecb5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index e874c9e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index a809c76..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf
deleted file mode 100644
index a8eea2c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf
+++ /dev/null
@@ -1,38 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-require conf/machine/include/tune-mips64.inc
-
-MACHINE_FEATURES = "pci ext2 ext3 serial"
-
-KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
-KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
-            xf86-video-fbdev"
-
-SERIAL_CONSOLE = "115200 ttyS0"
-USE_VT ?= "0"
-
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-
-IMAGE_FSTYPES ?= "jffs2 tar.bz2"
-JFFS2_ERASEBLOCK = "0x10000"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index a128255..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index b34f3d3..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 64f395b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 69efdcc..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 85be26d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 4c59daa..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 0cc906b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,66 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-#SOC
-CONFIG_CAVIUM_OCTEON_SOC=y
-CONFIG_CAVIUM_CN63XXP1=y
-CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=2
-
-#Kernel
-CONFIG_SMP=y
-CONFIG_NR_CPUS=32
-#Executable file formats
-CONFIG_MIPS32_COMPAT=y
-CONFIG_MIPS32_O32=y
-CONFIG_MIPS32_N32=y
-
-
-#PCI
-CONFIG_PCI=y
-CONFIG_PCI_MSI=y
-
-#I2C
-CONFIG_I2C=y
-CONFIG_I2C_OCTEON=y
-
-CONFIG_HW_RANDOM_OCTEON=y
-
-#SPI
-CONFIG_SPI=y
-CONFIG_SPI_OCTEON=y
-
-#Misc
-CONFIG_EEPROM_AT24=y
-CONFIG_EEPROM_AT25=y
-CONFIG_OCTEON_WDT=y
-
-CONFIG_STAGING=y
-
-#Ethernet
-CONFIG_OCTEON_ETHERNET=y
-CONFIG_OCTEON_MGMT_ETHERNET=y
-CONFIG_MDIO_OCTEON=y
-
-#PHY
-CONFIG_MARVELL_PHY=y
-CONFIG_BROADCOM_PHY=y
-CONFIG_BCM87XX_PHY=y
-
-
-#USB
-CONFIG_USB=y
-CONFIG_OCTEON_USB=y
-CONFIG_USB_OCTEON_EHCI=y
-CONFIG_USB_OCTEON_OHCI=y
-CONFIG_USB_OCTEON2_COMMON=y
-
-CONFIG_MTD=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CMDLINE_PARTS=y
-
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_NR_UARTS=2
-CONFIG_SERIAL_8250_RUNTIME_UARTS=2
-CONFIG_SERIAL_8250_DW=y
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 792fdc9..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,6 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include cfg/usb-mass-storage.scc
-include cfg/fs/vfat.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index 336a956..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index 5333c30..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index 7d18566..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf
deleted file mode 100644
index 352b972..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf
+++ /dev/null
@@ -1,86 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-TARGET_FPU = ""
-
-{{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_ppce300c3" }}
-{{ input type:"choice" val:"tune_ppc476" msg:"ppc476 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppc603e" msg:"ppc603e tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppc7400" msg:"ppc7400 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce300c2" msg:"ppce300c2 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce300c3" msg:"ppce300c3 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce500" msg:"ppce500 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce500mc" msg:"ppce500mc tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce500v2" msg:"ppce500v2 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce5500" msg:"ppce5500 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce6500" msg:"ppce6500 tuning optimizations" }}
-{{ input type:"choice" val:"tune_power5" msg:"power5 tuning optimizations" }}
-{{ input type:"choice" val:"tune_power6" msg:"power6 tuning optimizations" }}
-{{ input type:"choice" val:"tune_power7" msg:"power7 tuning optimizations" }}
-{{ if tunefile == "tune_ppc476": }}
-include conf/machine/include/tune-ppc476.inc
-{{ if tunefile == "tune_ppc603e": }}
-include conf/machine/include/tune-ppc603e.inc
-{{ if tunefile == "tune_ppc7400": }}
-include conf/machine/include/tune-ppc7400.inc
-{{ if tunefile == "tune_ppce300c2": }}
-include conf/machine/include/tune-ppce300c2.inc
-{{ if tunefile == "tune_ppce300c3": }}
-include conf/machine/include/tune-ppce300c3.inc
-{{ if tunefile == "tune_ppce500": }}
-include conf/machine/include/tune-ppce500.inc
-{{ if tunefile == "tune_ppce500mc": }}
-include conf/machine/include/tune-ppce500mc.inc
-{{ if tunefile == "tune_ppce500v2": }}
-include conf/machine/include/tune-ppce500v2.inc
-{{ if tunefile == "tune_ppce5500": }}
-include conf/machine/include/tune-ppce5500.inc
-{{ if tunefile == "tune_ppce6500": }}
-include conf/machine/include/tune-ppce6500.inc
-{{ if tunefile == "tune_power5": }}
-include conf/machine/include/tune-power5.inc
-{{ if tunefile == "tune_power6": }}
-include conf/machine/include/tune-power6.inc
-{{ if tunefile == "tune_power7": }}
-include conf/machine/include/tune-power7.inc
-
-KERNEL_IMAGETYPE = "uImage"
-
-EXTRA_IMAGEDEPENDS += "u-boot"
-UBOOT_MACHINE_{{=machine}} = "MPC8315ERDB_config"
-
-SERIAL_CONSOLE = "115200 ttyS0"
-
-MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
-           xf86-video-fbdev"
-
-PREFERRED_VERSION_u-boot ?= "v2016.01%"
-{{ input type:"edit" name:"uboot_entrypoint" prio:"40" msg:"Please specify a value for UBOOT_ENTRYPOINT:" default:"0x00000000" }}
-UBOOT_ENTRYPOINT = "{{=uboot_entrypoint}}"
-
-{{ input type:"edit" name:"kernel_devicetree" prio:"40" msg:"Please specify a [arch/powerpc/boot/dts/xxx] value for KERNEL_DEVICETREE:" default:"mpc8315erdb.dts" }}
-KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/{{=kernel_devicetree}}"
-
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-
-IMAGE_FSTYPES ?= "jffs2 tar.bz2"
-JFFS2_ERASEBLOCK = "0x4000"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index 91ccfb8..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH powerpc
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index c166fcd..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH powerpc
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 2701fd8..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH powerpc
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 47489e4..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 97f747f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 5bfe1fe..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,164 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-..........................................................................
-.                                WARNING
-.
-. This file is a kernel configuration fragment, and not a full kernel
-. configuration file.  The final kernel configuration is made up of
-. an assembly of processed fragments, each of which is designed to
-. capture a specific part of the final configuration (e.g. platform
-. configuration, feature configuration, and board specific hardware
-. configuration).  For more information on kernel configuration, please
-. consult the product documentation.
-.
-..........................................................................
-CONFIG_PPC32=y
-CONFIG_PPC_OF=y
-CONFIG_PPC_UDBG_16550=y
-
-#
-# Processor support
-#
-CONFIG_PPC_83xx=y
-
-#
-# Platform support
-#
-CONFIG_MPC831x_RDB=y
-# CONFIG_PPC_CHRP is not set
-# CONFIG_PPC_PMAC is not set
-
-#
-# Bus options
-#
-CONFIG_PCI=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=y
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_OF_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLOCK=y
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_AMDSTD=y
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_PHYSMAP_OF=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_GIANFAR=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_NR_UARTS=2
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_8xxx_WDT=y
-
-#
-# I2C support
-#
-CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_MPC=y
-
-CONFIG_SENSORS_LM75=y
-
-CONFIG_MISC_DEVICES=y
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_EEPROM_AT24=y
-
-#
-# SPI support
-#
-CONFIG_SPI=y
-# CONFIG_SPI_DEBUG is not set
-CONFIG_SPI_MASTER=y
-
-#
-# SPI Master Controller Drivers
-#
-CONFIG_SPI_MPC8xxx=y
-
-#
-# SPI Protocol Masters
-#
-CONFIG_HWMON=y
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_SCSI_LOGGING=y
-
-CONFIG_ATA=y
-CONFIG_ATA_VERBOSE_ERROR=y
-CONFIG_SATA_FSL=y
-CONFIG_ATA_SFF=y
-
-#
-# USB support
-#
-CONFIG_USB=m
-CONFIG_USB_DEVICEFS=y
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_FSL=y
-CONFIG_USB_STORAGE=m
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_CLASS=y
-
-#
-# I2C RTC drivers
-#
-CONFIG_RTC_DRV_DS1307=y
-
-CONFIG_KGDB_8250=m
-
-CONFIG_CRYPTO_DEV_TALITOS=m
-
-CONFIG_FSL_DMA=y
-
-CONFIG_MMC=y
-CONFIG_MMC_SPI=m
-
-CONFIG_USB_FSL_MPH_DR_OF=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 89bb97e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,8 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include cfg/usb-mass-storage.scc
-include cfg/fs/vfat.scc
-
-include cfg/dmaengine.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index dfbecb5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index e874c9e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index a809c76..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf
deleted file mode 100644
index 9188858..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf
+++ /dev/null
@@ -1,71 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
-
-{{ input type:"choicelist" name:"qemuarch" prio:"5" msg:"Which qemu architecture would you like to use?" default:"i386" }}
-{{ input type:"choice" val:"i386" msg:"i386    (32-bit)" }}
-{{ input type:"choice" val:"x86_64" msg:"x86_64  (64-bit)" }}
-{{ input type:"choice" val:"arm" msg:"ARM     (32-bit)" }}
-{{ input type:"choice" val:"powerpc" msg:"PowerPC (32-bit)" }}
-{{ input type:"choice" val:"mips" msg:"MIPS    (32-bit)" }}
-{{ input type:"choice" val:"mips64" msg:"MIPS64  (64-bit)" }}
-{{ if qemuarch == "i386": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-i586.inc
-{{ if qemuarch == "x86_64": }}
-require conf/machine/include/qemu.inc
-DEFAULTTUNE ?= "core2-64"
-require conf/machine/include/tune-core2.inc
-{{ if qemuarch == "arm": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-arm926ejs.inc
-{{ if qemuarch == "powerpc": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-ppc7400.inc
-{{ if qemuarch == "mips": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-mips32.inc
-{{ if qemuarch == "mips64": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-mips64.inc
-
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-MACHINE_FEATURES += "x86"
-KERNEL_IMAGETYPE = "bzImage"
-SERIAL_CONSOLE = "115200 ttyS0"
-XSERVER = "xserver-xorg \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast', '', d)} \
-           xf86-video-vmware"
-
-{{ if qemuarch == "arm": }}
-KERNEL_IMAGETYPE = "zImage"
-SERIAL_CONSOLE = "115200 ttyAMA0"
-
-{{ if qemuarch == "powerpc": }}
-KERNEL_IMAGETYPE = "vmlinux"
-SERIAL_CONSOLE = "115200 ttyS0"
-
-{{ if qemuarch == "mips" or qemuarch == "mips64": }}
-KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
-SERIAL_CONSOLE = "115200 ttyS0"
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces
deleted file mode 100644
index 1696776..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces
+++ /dev/null
@@ -1,5 +0,0 @@
-# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
- 
-# The loopback interface
-auto lo
-iface lo inet loopback
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend
deleted file mode 100644
index 72d991c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
deleted file mode 100644
index 3bdde79..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
+++ /dev/null
@@ -1,77 +0,0 @@
-
-Section "Files"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Generic Keyboard"
-    Driver        "evdev"
-    Option        "CoreKeyboard"
-    Option        "Device"      "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
-    Option        "XkbRules"    "xorg"
-    Option        "XkbModel"    "evdev"
-    Option        "XkbLayout"    "us"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Configured Mouse"
-{{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips" or qemuarch == "mips64": }}
-    Driver        "mouse"
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-    Driver        "vmmouse"
-
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/mice"
-    Option        "Protocol"        "ImPS/2"
-    Option        "ZAxisMapping"        "4 5"
-    Option        "Emulate3Buttons"    "true"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Qemu Tablet"
-    Driver        "evdev"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/touchscreen0"
-    Option        "USB"           "on"
-EndSection
-
-Section "Device"
-    Identifier    "Graphics Controller"
-{{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips" or qemuarch == "mips64": }}
-    Driver        "fbdev"
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-    Driver        "vmware"
-
-EndSection
-
-Section "Monitor"
-    Identifier    "Generic Monitor"
-    Option        "DPMS"
-    # 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz
-    Modeline "1024x600_60.00"   49.00  1024 1072 1168 1312  600 603 613 624 -hsync +vsync
-    # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz
-    ModeLine "640x480"    25.2  640  656  752  800    480  490  492  525 -hsync -vsync
-    # 640x480 @ 72Hz (VESA) hsync: 37.9kHz
-    ModeLine "640x480"    31.5  640  664  704  832    480  489  491  520 -hsync -vsync
-    # 640x480 @ 75Hz (VESA) hsync: 37.5kHz
-    ModeLine "640x480"    31.5  640  656  720  840    480  481  484  500 -hsync -vsync
-    # 640x480 @ 85Hz (VESA) hsync: 43.3kHz
-    ModeLine "640x480"    36.0  640  696  752  832    480  481  484  509 -hsync -vsync
-EndSection
-
-Section "Screen"
-    Identifier    "Default Screen"
-    Device        "Graphics Controller"
-    Monitor        "Generic Monitor"
-    SubSection "Display"
-        Modes     "640x480"
-    EndSubSection
-EndSection
-
-Section "ServerLayout"
-    Identifier    "Default Layout"
-    Screen        "Default Screen"
-    InputDevice    "Generic Keyboard"
-    # InputDevice    "Configured Mouse"
-    InputDevice    "QEMU Tablet"
-    Option         "AllowEmptyInput" "no"
-EndSection
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 72d991c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 0fb5283..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index a81b858..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH {{=qemuarch}}
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index 43cf642..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,20 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH {{=qemuarch}}
-
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if qemuarch == "arm": }}
-include bsp/arm-versatile-926ejs/arm-versatile-926ejs-standard nopatch
-{{ if qemuarch == "powerpc": }}
-include bsp/qemu-ppc32/qemu-ppc32-standard nopatch
-{{ if qemuarch == "mips": }}
-include bsp/mti-malta32/mti-malta32-be-standard nopatch
-{{ if qemuarch == "mips64": }}
-include bsp/mti-malta64/mti-malta64-be-standard nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 41d4c6f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH {{=qemuarch}}
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 69efdcc..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 4c59daa..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 3fa4ed0..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-{{ if qemuarch == "i386": }}
-# CONFIG_64BIT is not set
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index d25d0a0..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,3 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index d7b9cef..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,59 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index 8c0fd15..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 83eb216..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 22abc23..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index 851d96c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index d7ce37e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index 71be913..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf
deleted file mode 100644
index e4b8251..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf
+++ /dev/null
@@ -1,65 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_core2" }}
-{{ input type:"choice" val:"tune_core2" msg:"Core2 tuning optimizations" }}
-{{ input type:"choice" val:"tune_corei7" msg:"Corei7 tuning optimizations" }}
-{{ if tunefile == "tune_core2": }}
-DEFAULTTUNE ?= "core2-64"
-require conf/machine/include/tune-core2.inc
-{{ if tunefile == "tune_corei7": }}
-DEFAULTTUNE ?= "corei7-64"
-require conf/machine/include/tune-corei7.inc
-
-require conf/machine/include/x86-base.inc
-
-MACHINE_FEATURES += "wifi efi pcbios"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-
-{{ if xserver == "y": }}
-{{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_i915" }}
-
-{{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }}
-{{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }}
-{{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }}
-{{ input type:"choice" val:"xserver_fbdev" msg:"fbdev xserver support" }}
-{{ input type:"choice" val:"xserver_modesetting" msg:"modesetting xserver support" }}
-{{ if xserver == "y": }}
-XSERVER ?= "${XSERVER_X86_BASE} \
-           ${XSERVER_X86_EXT} \
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-           ${XSERVER_X86_VESA} \
-{{ if xserver == "y" and xserver_choice == "xserver_i915": }}
-           ${XSERVER_X86_I915} \
-{{ if xserver == "y" and xserver_choice == "xserver_i965": }}
-           ${XSERVER_X86_I965} \
-{{ if xserver == "y" and xserver_choice == "xserver_fbdev": }}
-           ${XSERVER_X86_FBDEV} \
-{{ if xserver == "y" and xserver_choice == "xserver_modesetting": }}
-           ${XSERVER_X86_MODESETTING} \
-{{ if xserver == "y": }}
-           "
-
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d eee-acpi-scripts"
-
-EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
-
-GLIBC_ADDONS = "nptl"
-
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-APPEND += "video=vesafb vga=0x318"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
deleted file mode 100644
index ac9a0f1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 3083003..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index bbeeecd..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,17 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH x86_64
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for preempt-rt kernels
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index a2b2910..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,17 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH x86_64
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for standard kernels
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index b53706f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH x86_64
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 47489e4..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 97f747f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 3290dde..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,48 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-CONFIG_PRINTK=y
-
-# Basic hardware support for the box - network, USB, PCI, sound                     
-CONFIG_NETDEVICES=y
-CONFIG_ATA=y
-CONFIG_ATA_GENERIC=y
-CONFIG_ATA_SFF=y
-CONFIG_PCI=y
-CONFIG_MMC=y
-CONFIG_MMC_SDHCI=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_R8169=y
-CONFIG_PATA_SCH=y
-CONFIG_MMC_SDHCI_PCI=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_NET=y
-CONFIG_USB_UHCI_HCD=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_HDA_INTEL=y
-
-# Make sure these are on, otherwise the bootup won't be fun                         
-CONFIG_EXT3_FS=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_MODULES=y
-CONFIG_SHMEM=y
-CONFIG_TMPFS=y
-CONFIG_PACKET=y
-
-CONFIG_I2C=y                                                                        
-CONFIG_AGP=y                                                                        
-CONFIG_PM=y                                                                         
-CONFIG_ACPI=y                                                                       
-CONFIG_INPUT=y                                                                      
-                                                                                    
-# Needed for booting (and using) USB memory sticks                                  
-CONFIG_BLK_DEV_LOOP=y                                                               
-CONFIG_NLS_CODEPAGE_437=y                                                           
-CONFIG_NLS_ISO8859_1=y                                                              
-                                                                                    
-CONFIG_RD_GZIP=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 9d20d19..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,12 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include features/serial/8250.scc
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-include cfg/vesafb.scc
-{{ if xserver == "y" and xserver_choice == "xserver_i915" or xserver_choice == "xserver_i965": }}
-include features/i915/i915.scc
-
-include cfg/usb-mass-storage.scc
-include features/power/intel.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index dfbecb5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index e874c9e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index a809c76..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/tags.py b/import-layers/yocto-poky/scripts/lib/bsp/tags.py
deleted file mode 100644
index 3719427..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/tags.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# This module provides a place to define common constants for the
-# Yocto BSP Tools.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-OPEN_TAG =     "{{"
-CLOSE_TAG =    "}}"
-ASSIGN_TAG =   "{{="
-INPUT_TAG =    "input"
-IF_TAG =       "if"
-FILENAME_TAG = "yocto-bsp-filename"
-DIRNAME_TAG =  "yocto-bsp-dirname"
-
-INDENT_STR =  "    "
-
-BLANKLINE_STR = "of.write(\"\\n\")"
-NORMAL_START =  "of.write"
-OPEN_START =    "current_file ="
-
-INPUT_TYPE_PROPERTY = "type"
-
-SRC_URI_FILE = "file://"
-
-GIT_CHECK_URI = "git://git.yoctoproject.org/linux-yocto-dev.git"
-
-
-
diff --git a/import-layers/yocto-poky/scripts/lib/checklayer/__init__.py b/import-layers/yocto-poky/scripts/lib/checklayer/__init__.py
index 288c457..2618416 100644
--- a/import-layers/yocto-poky/scripts/lib/checklayer/__init__.py
+++ b/import-layers/yocto-poky/scripts/lib/checklayer/__init__.py
@@ -56,9 +56,11 @@
         priority = ldata.getVar('BBFILE_PRIORITY_%s' % name)
         pattern = ldata.getVar('BBFILE_PATTERN_%s' % name)
         depends = ldata.getVar('LAYERDEPENDS_%s' % name)
+        compat = ldata.getVar('LAYERSERIES_COMPAT_%s' % name)
         collections[name]['priority'] = priority
         collections[name]['pattern'] = pattern
         collections[name]['depends'] = depends
+        collections[name]['compat'] = compat
 
     return collections
 
diff --git a/import-layers/yocto-poky/scripts/lib/checklayer/cases/common.py b/import-layers/yocto-poky/scripts/lib/checklayer/cases/common.py
index a13c108..1bef61b 100644
--- a/import-layers/yocto-poky/scripts/lib/checklayer/cases/common.py
+++ b/import-layers/yocto-poky/scripts/lib/checklayer/cases/common.py
@@ -51,3 +51,8 @@
         msg = compare_signatures(self.td['sigs'], curr_sigs)
         if msg is not None:
             self.fail('Adding layer %s changed signatures.\n%s' % (self.tc.layer['name'], msg))
+
+    def test_layerseries_compat(self):
+        for collection_name, collection_data in self.tc.layer['collections'].items():
+            self.assertTrue(collection_data['compat'], "Collection %s from layer %s does not set compatible oe-core versions via LAYERSERIES_COMPAT_collection." \
+                 % (collection_name, self.tc.layer['name']))
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/__init__.py b/import-layers/yocto-poky/scripts/lib/devtool/__init__.py
index 94e3d7d..89f098a 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/__init__.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/__init__.py
@@ -220,6 +220,20 @@
         commit_cmd += ['-m', commitmsg]
         bb.process.run(commit_cmd, cwd=repodir)
 
+    # Ensure singletask.lock (as used by externalsrc.bbclass) is ignored by git
+    excludes = []
+    excludefile = os.path.join(repodir, '.git', 'info', 'exclude')
+    try:
+        with open(excludefile, 'r') as f:
+            excludes = f.readlines()
+    except FileNotFoundError:
+        pass
+    if 'singletask.lock\n' not in excludes:
+        excludes.append('singletask.lock\n')
+    with open(excludefile, 'w') as f:
+        for line in excludes:
+            f.write(line)
+
     bb.process.run('git checkout -b %s' % devbranch, cwd=repodir)
     bb.process.run('git tag -f %s' % basetag, cwd=repodir)
 
@@ -337,3 +351,33 @@
             for pn in newunlocked:
                 f.write('    ' + pn)
             f.write('"')
+
+def check_prerelease_version(ver, operation):
+    if 'pre' in ver or 'rc' in ver:
+        logger.warning('Version "%s" looks like a pre-release version. '
+                       'If that is the case, in order to ensure that the '
+                       'version doesn\'t appear to go backwards when you '
+                       'later upgrade to the final release version, it is '
+                       'recommmended that instead you use '
+                       '<current version>+<pre-release version> e.g. if '
+                       'upgrading from 1.9 to 2.0-rc2 use "1.9+2.0-rc2". '
+                       'If you prefer not to reset and re-try, you can change '
+                       'the version after %s succeeds using "devtool rename" '
+                       'with -V/--version.' % (ver, operation))
+
+def check_git_repo_dirty(repodir):
+    """Check if a git repository is clean or not"""
+    stdout, _ = bb.process.run('git status --porcelain', cwd=repodir)
+    return stdout
+
+def check_git_repo_op(srctree, ignoredirs=None):
+    """Check if a git repository is in the middle of a rebase"""
+    stdout, _ = bb.process.run('git rev-parse --show-toplevel', cwd=srctree)
+    topleveldir = stdout.strip()
+    if ignoredirs and topleveldir in ignoredirs:
+        return
+    gitdir = os.path.join(topleveldir, '.git')
+    if os.path.exists(os.path.join(gitdir, 'rebase-merge')):
+        raise DevtoolError("Source tree %s appears to be in the middle of a rebase - please resolve this first" % srctree)
+    if os.path.exists(os.path.join(gitdir, 'rebase-apply')):
+        raise DevtoolError("Source tree %s appears to be in the middle of 'git am' or 'git apply' - please resolve this first" % srctree)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/deploy.py b/import-layers/yocto-poky/scripts/lib/devtool/deploy.py
index 9cc4927..52e261d 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/deploy.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/deploy.py
@@ -213,9 +213,7 @@
 
         scp_port = ''
         ssh_port = ''
-        if not args.port:
-            raise DevtoolError("If you specify -P/--port then you must provide the port to be used to connect to the target")
-        else:
+        if args.port:
             scp_port = "-P %s" % args.port
             ssh_port = "-p %s" % args.port
 
@@ -280,9 +278,7 @@
 
     scp_port = ''
     ssh_port = ''
-    if not args.port:
-        raise DevtoolError("If you specify -P/--port then you must provide the port to be used to connect to the target")
-    else:
+    if args.port:
         scp_port = "-P %s" % args.port
         ssh_port = "-p %s" % args.port
 
@@ -328,7 +324,7 @@
     parser_deploy.add_argument('-n', '--dry-run', help='List files to be deployed only', action='store_true')
     parser_deploy.add_argument('-p', '--no-preserve', help='Do not preserve existing files', action='store_true')
     parser_deploy.add_argument('--no-check-space', help='Do not check for available space before deploying', action='store_true')
-    parser_deploy.add_argument('-P', '--port', default='22', help='Port to use for connection to the target')
+    parser_deploy.add_argument('-P', '--port', help='Specify port to use for connection to the target')
 
     strip_opts = parser_deploy.add_mutually_exclusive_group(required=False)
     strip_opts.add_argument('-S', '--strip',
@@ -350,5 +346,5 @@
     parser_undeploy.add_argument('-s', '--show-status', help='Show progress/status output', action='store_true')
     parser_undeploy.add_argument('-a', '--all', help='Undeploy all recipes deployed on the target', action='store_true')
     parser_undeploy.add_argument('-n', '--dry-run', help='List files to be undeployed only', action='store_true')
-    parser_undeploy.add_argument('-P', '--port', default='22', help='Port to use for connection to the target')
+    parser_undeploy.add_argument('-P', '--port', help='Specify port to use for connection to the target')
     parser_undeploy.set_defaults(func=undeploy)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/search.py b/import-layers/yocto-poky/scripts/lib/devtool/search.py
index 054985b..b4f209b 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/search.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/search.py
@@ -36,44 +36,74 @@
 
         keyword_rc = re.compile(args.keyword)
 
-        for fn in os.listdir(pkgdata_dir):
-            pfn = os.path.join(pkgdata_dir, fn)
-            if not os.path.isfile(pfn):
+        def print_match(pn):
+            rd = parse_recipe(config, tinfoil, pn, True)
+            if not rd:
+                return
+            summary = rd.getVar('SUMMARY')
+            if summary == rd.expand(defsummary):
+                summary = ''
+            print("%s  %s" % (pn.ljust(20), summary))
+
+
+        matches = []
+        if os.path.exists(pkgdata_dir):
+            for fn in os.listdir(pkgdata_dir):
+                pfn = os.path.join(pkgdata_dir, fn)
+                if not os.path.isfile(pfn):
+                    continue
+
+                packages = []
+                match = False
+                if keyword_rc.search(fn):
+                    match = True
+
+                if not match:
+                    with open(pfn, 'r') as f:
+                        for line in f:
+                            if line.startswith('PACKAGES:'):
+                                packages = line.split(':', 1)[1].strip().split()
+
+                    for pkg in packages:
+                        if keyword_rc.search(pkg):
+                            match = True
+                            break
+                        if os.path.exists(os.path.join(pkgdata_dir, 'runtime', pkg + '.packaged')):
+                            with open(os.path.join(pkgdata_dir, 'runtime', pkg), 'r') as f:
+                                for line in f:
+                                    if ': ' in line:
+                                        splitline = line.split(':', 1)
+                                        key = splitline[0]
+                                        value = splitline[1].strip()
+                                    if key in ['PKG_%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
+                                        if keyword_rc.search(value):
+                                            match = True
+                                            break
+                if match:
+                    print_match(fn)
+                    matches.append(fn)
+        else:
+            logger.warning('Package data is not available, results may be limited')
+
+        for recipe in tinfoil.all_recipes():
+            if args.fixed_setup and 'nativesdk' in recipe.inherits():
                 continue
 
-            packages = []
             match = False
-            if keyword_rc.search(fn):
+            if keyword_rc.search(recipe.pn):
                 match = True
-
-            if not match:
-                with open(pfn, 'r') as f:
-                    for line in f:
-                        if line.startswith('PACKAGES:'):
-                            packages = line.split(':', 1)[1].strip().split()
-
-                for pkg in packages:
-                    if keyword_rc.search(pkg):
+            else:
+                for prov in recipe.provides:
+                    if keyword_rc.search(prov):
                         match = True
                         break
-                    if os.path.exists(os.path.join(pkgdata_dir, 'runtime', pkg + '.packaged')):
-                        with open(os.path.join(pkgdata_dir, 'runtime', pkg), 'r') as f:
-                            for line in f:
-                                if ': ' in line:
-                                    splitline = line.split(':', 1)
-                                    key = splitline[0]
-                                    value = splitline[1].strip()
-                                if key in ['PKG_%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
-                                    if keyword_rc.search(value):
-                                        match = True
-                                        break
-
-            if match:
-                rd = parse_recipe(config, tinfoil, fn, True)
-                summary = rd.getVar('SUMMARY')
-                if summary == rd.expand(defsummary):
-                    summary = ''
-                print("%s  %s" % (fn.ljust(20), summary))
+                if not match:
+                    for rprov in recipe.rprovides:
+                        if keyword_rc.search(rprov):
+                            match = True
+                            break
+            if match and not recipe.pn in matches:
+                print_match(recipe.pn)
     finally:
         tinfoil.shutdown()
 
@@ -82,7 +112,7 @@
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
     parser_search = subparsers.add_parser('search', help='Search available recipes',
-                                            description='Searches for available target recipes. Matches on recipe name, package name, description and installed files, and prints the recipe name on match.',
+                                            description='Searches for available recipes. Matches on recipe name, package name, description and installed files, and prints the recipe name and summary on match.',
                                             group='info')
-    parser_search.add_argument('keyword', help='Keyword to search for (regular expression syntax allowed)')
-    parser_search.set_defaults(func=search, no_workspace=True)
+    parser_search.add_argument('keyword', help='Keyword to search for (regular expression syntax allowed, use quotes to avoid shell expansion)')
+    parser_search.set_defaults(func=search, no_workspace=True, fixed_setup=context.fixed_setup)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/standard.py b/import-layers/yocto-poky/scripts/lib/devtool/standard.py
index beea0d4..a1e8e1d 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/standard.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/standard.py
@@ -30,11 +30,13 @@
 import glob
 import filecmp
 from collections import OrderedDict
-from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, update_unlockedsigs, DevtoolError
+from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, update_unlockedsigs, check_prerelease_version, check_git_repo_dirty, check_git_repo_op, DevtoolError
 from devtool import parse_recipe
 
 logger = logging.getLogger('devtool')
 
+override_branch_prefix = 'devtool-override-'
+
 
 def add(args, config, basepath, workspace):
     """Entry point for the devtool 'add' subcommand"""
@@ -298,6 +300,8 @@
 
         _add_md5(config, recipename, appendfile)
 
+        check_prerelease_version(rd.getVar('PV'), 'devtool add')
+
         logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile)
 
     finally:
@@ -339,19 +343,45 @@
                            "from working. You will need to disable this "
                            "first." % pn)
 
-def _move_file(src, dst):
-    """Move a file. Creates all the directory components of destination path."""
+def _dry_run_copy(src, dst, dry_run_outdir, base_outdir):
+    """Common function for copying a file to the dry run output directory"""
+    relpath = os.path.relpath(dst, base_outdir)
+    if relpath.startswith('..'):
+        raise Exception('Incorrect base path %s for path %s' % (base_outdir, dst))
+    dst = os.path.join(dry_run_outdir, relpath)
     dst_d = os.path.dirname(dst)
     if dst_d:
         bb.utils.mkdirhier(dst_d)
-    shutil.move(src, dst)
+    # Don't overwrite existing files, otherwise in the case of an upgrade
+    # the dry-run written out recipe will be overwritten with an unmodified
+    # version
+    if not os.path.exists(dst):
+        shutil.copy(src, dst)
 
-def _copy_file(src, dst):
+def _move_file(src, dst, dry_run_outdir=None, base_outdir=None):
+    """Move a file. Creates all the directory components of destination path."""
+    dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+    logger.debug('Moving %s to %s%s' % (src, dst, dry_run_suffix))
+    if dry_run_outdir:
+        # We want to copy here, not move
+        _dry_run_copy(src, dst, dry_run_outdir, base_outdir)
+    else:
+        dst_d = os.path.dirname(dst)
+        if dst_d:
+            bb.utils.mkdirhier(dst_d)
+        shutil.move(src, dst)
+
+def _copy_file(src, dst, dry_run_outdir=None):
     """Copy a file. Creates all the directory components of destination path."""
-    dst_d = os.path.dirname(dst)
-    if dst_d:
-        bb.utils.mkdirhier(dst_d)
-    shutil.copy(src, dst)
+    dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+    logger.debug('Copying %s to %s%s' % (src, dst, dry_run_suffix))
+    if dry_run_outdir:
+        _dry_run_copy(src, dst, dry_run_outdir, base_outdir)
+    else:
+        dst_d = os.path.dirname(dst)
+        if dst_d:
+            bb.utils.mkdirhier(dst_d)
+        shutil.copy(src, dst)
 
 def _git_ls_tree(repodir, treeish='HEAD', recursive=False):
     """List contents of a git treeish"""
@@ -397,7 +427,7 @@
     """Entry point for the devtool 'extract' subcommand"""
     import bb
 
-    tinfoil = setup_tinfoil(basepath=basepath)
+    tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     if not tinfoil:
         # Error already shown
         return 1
@@ -407,7 +437,7 @@
             return 1
 
         srctree = os.path.abspath(args.srctree)
-        initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
+        initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
         logger.info('Source tree extracted to %s' % srctree)
 
         if initial_rev:
@@ -421,7 +451,7 @@
     """Entry point for the devtool 'sync' subcommand"""
     import bb
 
-    tinfoil = setup_tinfoil(basepath=basepath)
+    tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     if not tinfoil:
         # Error already shown
         return 1
@@ -431,7 +461,7 @@
             return 1
 
         srctree = os.path.abspath(args.srctree)
-        initial_rev = _extract_source(srctree, args.keep_temp, args.branch, True, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
+        initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, True, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=True)
         logger.info('Source tree %s synchronized' % srctree)
 
         if initial_rev:
@@ -442,7 +472,7 @@
         tinfoil.shutdown()
 
 
-def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil):
+def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil, no_overrides=False):
     """Extract sources of a recipe"""
     import oe.recipeutils
     import oe.patch
@@ -472,6 +502,16 @@
         bb.utils.mkdirhier(srctree)
         os.rmdir(srctree)
 
+    extra_overrides = []
+    if not no_overrides:
+        history = d.varhistory.variable('SRC_URI')
+        for event in history:
+            if not 'flag' in event:
+                if event['op'].startswith(('_append[', '_prepend[')):
+                    extra_overrides.append(event['op'].split('[')[1].split(']')[0])
+        if extra_overrides:
+            logger.info('SRC_URI contains some conditional appends/prepends - will create branches to represent these')
+
     initial_rev = None
 
     appendexisted = False
@@ -514,6 +554,8 @@
             if not is_kernel_yocto:
                 f.write('PATCHTOOL = "git"\n')
                 f.write('PATCH_COMMIT_FUNCTIONS = "1"\n')
+            if extra_overrides:
+                f.write('DEVTOOL_EXTRA_OVERRIDES = "%s"\n' % ':'.join(extra_overrides))
             f.write('inherit devtool-source\n')
             f.write('###--- _extract_source\n')
 
@@ -542,11 +584,15 @@
         if not res:
             raise DevtoolError('Extracting source for %s failed' % pn)
 
-        with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
-            initial_rev = f.read()
+        try:
+            with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
+                initial_rev = f.read()
 
-        with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
-            srcsubdir = f.read()
+            with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
+                srcsubdir = f.read()
+        except FileNotFoundError as e:
+            raise DevtoolError('Something went wrong with source extraction - the devtool-source class was not active or did not function correctly:\n%s' % str(e))
+        srcsubdir_rel = os.path.relpath(srcsubdir, os.path.join(tempdir, 'workdir'))
 
         tempdir_localdir = os.path.join(tempdir, 'oe-local-files')
         srctree_localdir = os.path.join(srctree, 'oe-local-files')
@@ -613,7 +659,7 @@
             logger.info('Preserving temporary directory %s' % tempdir)
         else:
             shutil.rmtree(tempdir)
-    return initial_rev
+    return initial_rev, srcsubdir_rel
 
 def _add_md5(config, recipename, filename):
     """Record checksum of a file (or recursively for a directory) to the md5-file of the workspace"""
@@ -670,12 +716,13 @@
     """Entry point for the devtool 'modify' subcommand"""
     import bb
     import oe.recipeutils
+    import oe.patch
 
     if args.recipename in workspace:
         raise DevtoolError("recipe %s is already in your workspace" %
                            args.recipename)
 
-    tinfoil = setup_tinfoil(basepath=basepath)
+    tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     try:
         rd = parse_recipe(config, tinfoil, args.recipename, True)
         if not rd:
@@ -710,14 +757,16 @@
 
         initial_rev = None
         commits = []
+        check_commits = False
         if not args.no_extract:
-            initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
+            initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
             if not initial_rev:
                 return 1
             logger.info('Source tree extracted to %s' % srctree)
             # Get list of commits since this revision
             (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=srctree)
             commits = stdout.split()
+            check_commits = True
         else:
             if os.path.exists(os.path.join(srctree, '.git')):
                 # Check if it's a tree previously extracted by us
@@ -725,6 +774,8 @@
                     (stdout, _) = bb.process.run('git branch --contains devtool-base', cwd=srctree)
                 except bb.process.ExecutionError:
                     stdout = ''
+                if stdout:
+                    check_commits = True
                 for line in stdout.splitlines():
                     if line.startswith('*'):
                         (stdout, _) = bb.process.run('git rev-parse devtool-base', cwd=srctree)
@@ -734,6 +785,33 @@
                     (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree)
                     initial_rev = stdout.rstrip()
 
+        branch_patches = {}
+        if check_commits:
+            # Check if there are override branches
+            (stdout, _) = bb.process.run('git branch', cwd=srctree)
+            branches = []
+            for line in stdout.rstrip().splitlines():
+                branchname = line[2:].rstrip()
+                if branchname.startswith(override_branch_prefix):
+                    branches.append(branchname)
+            if branches:
+                logger.warn('SRC_URI is conditionally overridden in this recipe, thus several %s* branches have been created, one for each override that makes changes to SRC_URI. It is recommended that you make changes to the %s branch first, then checkout and rebase each %s* branch and update any unique patches there (duplicates on those branches will be ignored by devtool finish/update-recipe)' % (override_branch_prefix, args.branch, override_branch_prefix))
+            branches.insert(0, args.branch)
+            seen_patches = []
+            for branch in branches:
+                branch_patches[branch] = []
+                (stdout, _) = bb.process.run('git log devtool-base..%s' % branch, cwd=srctree)
+                for line in stdout.splitlines():
+                    line = line.strip()
+                    if line.startswith(oe.patch.GitApplyTree.patch_line_prefix):
+                        origpatch = line[len(oe.patch.GitApplyTree.patch_line_prefix):].split(':', 1)[-1].strip()
+                        if not origpatch in seen_patches:
+                            seen_patches.append(origpatch)
+                            branch_patches[branch].append(origpatch)
+
+        # Need to grab this here in case the source is within a subdirectory
+        srctreebase = srctree
+
         # Check that recipe isn't using a shared workdir
         s = os.path.abspath(rd.getVar('S'))
         workdir = os.path.abspath(rd.getVar('WORKDIR'))
@@ -748,7 +826,8 @@
             # Local files can be modified/tracked in separate subdir under srctree
             # Mostly useful for packages with S != WORKDIR
             f.write('FILESPATH_prepend := "%s:"\n' %
-                    os.path.join(srctree, 'oe-local-files'))
+                    os.path.join(srctreebase, 'oe-local-files'))
+            f.write('# srctreebase: %s\n' % srctreebase)
 
             f.write('\ninherit externalsrc\n')
             f.write('# NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND\n')
@@ -772,6 +851,11 @@
                 f.write('\n# initial_rev: %s\n' % initial_rev)
                 for commit in commits:
                     f.write('# commit: %s\n' % commit)
+            if branch_patches:
+                for branch in branch_patches:
+                    if branch == args.branch:
+                        continue
+                    f.write('# patches_%s: %s\n' % (branch, ','.join(branch_patches[branch])))
 
         update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn])
 
@@ -977,21 +1061,29 @@
     return 0
 
 
-def _get_patchset_revs(srctree, recipe_path, initial_rev=None):
+def _get_patchset_revs(srctree, recipe_path, initial_rev=None, force_patch_refresh=False):
     """Get initial and update rev of a recipe. These are the start point of the
     whole patchset and start point for the patches to be re-generated/updated.
     """
     import bb
 
+    # Get current branch
+    stdout, _ = bb.process.run('git rev-parse --abbrev-ref HEAD',
+                               cwd=srctree)
+    branchname = stdout.rstrip()
+
     # Parse initial rev from recipe if not specified
     commits = []
+    patches = []
     with open(recipe_path, 'r') as f:
         for line in f:
             if line.startswith('# initial_rev:'):
                 if not initial_rev:
                     initial_rev = line.split(':')[-1].strip()
-            elif line.startswith('# commit:'):
+            elif line.startswith('# commit:') and not force_patch_refresh:
                 commits.append(line.split(':')[-1].strip())
+            elif line.startswith('# patches_%s:' % branchname):
+                patches = line.split(':')[-1].strip().split(',')
 
     update_rev = initial_rev
     changed_revs = None
@@ -1010,7 +1102,7 @@
         except bb.process.ExecutionError as err:
             stdout = None
 
-        if stdout is not None:
+        if stdout is not None and not force_patch_refresh:
             changed_revs = []
             for line in stdout.splitlines():
                 if line.startswith('+ '):
@@ -1018,7 +1110,7 @@
                     if rev in newcommits:
                         changed_revs.append(rev)
 
-    return initial_rev, update_rev, changed_revs
+    return initial_rev, update_rev, changed_revs, patches
 
 def _remove_file_entries(srcuri, filelist):
     """Remove file:// entries from SRC_URI"""
@@ -1044,8 +1136,11 @@
             srcuri.insert(i, newentry)
             break
 
-def _remove_source_files(append, files, destpath):
+def _remove_source_files(append, files, destpath, no_report_remove=False, dry_run=False):
     """Unlink existing patch files"""
+
+    dry_run_suffix = ' (dry-run)' if dry_run else ''
+
     for path in files:
         if append:
             if not destpath:
@@ -1053,19 +1148,21 @@
             path = os.path.join(destpath, os.path.basename(path))
 
         if os.path.exists(path):
-            logger.info('Removing file %s' % path)
-            # FIXME "git rm" here would be nice if the file in question is
-            #       tracked
-            # FIXME there's a chance that this file is referred to by
-            #       another recipe, in which case deleting wouldn't be the
-            #       right thing to do
-            os.remove(path)
-            # Remove directory if empty
-            try:
-                os.rmdir(os.path.dirname(path))
-            except OSError as ose:
-                if ose.errno != errno.ENOTEMPTY:
-                    raise
+            if not no_report_remove:
+                logger.info('Removing file %s%s' % (path, dry_run_suffix))
+            if not dry_run:
+                # FIXME "git rm" here would be nice if the file in question is
+                #       tracked
+                # FIXME there's a chance that this file is referred to by
+                #       another recipe, in which case deleting wouldn't be the
+                #       right thing to do
+                os.remove(path)
+                # Remove directory if empty
+                try:
+                    os.rmdir(os.path.dirname(path))
+                except OSError as ose:
+                    if ose.errno != errno.ENOTEMPTY:
+                        raise
 
 
 def _export_patches(srctree, rd, start_rev, destdir, changed_revs=None):
@@ -1085,6 +1182,7 @@
 
     existing_patches = dict((os.path.basename(path), path) for path in
                             oe.recipeutils.get_recipe_patches(rd))
+    logger.debug('Existing patches: %s' % existing_patches)
 
     # Generate patches from Git, exclude local files directory
     patch_pathspec = _git_exclude_path(srctree, 'oe-local-files')
@@ -1166,7 +1264,7 @@
     return False
 
 
-def _export_local_files(srctree, rd, destdir):
+def _export_local_files(srctree, rd, destdir, srctreebase):
     """Copy local files from srctree to given location.
        Returns three-tuple of dicts:
          1. updated - files that already exist in SRCURI
@@ -1186,7 +1284,7 @@
     updated = OrderedDict()
     added = OrderedDict()
     removed = OrderedDict()
-    local_files_dir = os.path.join(srctree, 'oe-local-files')
+    local_files_dir = os.path.join(srctreebase, 'oe-local-files')
     git_files = _git_ls_tree(srctree)
     if 'oe-local-files' in git_files:
         # If tracked by Git, take the files from srctree HEAD. First get
@@ -1199,9 +1297,9 @@
         new_set = list(_git_ls_tree(srctree, tree, True).keys())
     elif os.path.isdir(local_files_dir):
         # If not tracked by Git, just copy from working copy
-        new_set = _ls_tree(os.path.join(srctree, 'oe-local-files'))
+        new_set = _ls_tree(local_files_dir)
         bb.process.run(['cp', '-ax',
-                        os.path.join(srctree, 'oe-local-files', '.'), destdir])
+                        os.path.join(local_files_dir, '.'), destdir])
     else:
         new_set = []
 
@@ -1266,13 +1364,16 @@
     return os.path.join(recipedir, rd.getVar('BPN'))
 
 
-def _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remove):
+def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, no_report_remove, dry_run_outdir=None):
     """Implement the 'srcrev' mode of update-recipe"""
     import bb
     import oe.recipeutils
 
+    dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+
     recipefile = rd.getVar('FILE')
-    logger.info('Updating SRCREV in recipe %s' % os.path.basename(recipefile))
+    recipedir = os.path.basename(recipefile)
+    logger.info('Updating SRCREV in recipe %s%s' % (recipedir, dry_run_suffix))
 
     # Get HEAD revision
     try:
@@ -1292,9 +1393,11 @@
     srcuri = orig_src_uri.split()
     tempdir = tempfile.mkdtemp(prefix='devtool')
     update_srcuri = False
+    appendfile = None
     try:
         local_files_dir = tempfile.mkdtemp(dir=tempdir)
-        upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir)
+        srctreebase = workspace[recipename]['srctreebase']
+        upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase)
         if not no_remove:
             # Find list of existing patches in recipe file
             patches_dir = tempfile.mkdtemp(dir=tempdir)
@@ -1316,29 +1419,36 @@
             if update_srcuri:
                 removevalues  = {'SRC_URI': removedentries}
                 patchfields['SRC_URI'] = '\\\n    '.join(srcuri)
-            _, destpath = oe.recipeutils.bbappend_recipe(
-                    rd, appendlayerdir, files, wildcardver=wildcard_version,
-                    extralines=patchfields, removevalues=removevalues)
+            if dry_run_outdir:
+                logger.info('Creating bbappend (dry-run)')
+            else:
+                appendfile, destpath = oe.recipeutils.bbappend_recipe(
+                        rd, appendlayerdir, files, wildcardver=wildcard_version,
+                        extralines=patchfields, removevalues=removevalues,
+                        redirect_output=dry_run_outdir)
         else:
             files_dir = _determine_files_dir(rd)
             for basepath, path in upd_f.items():
-                logger.info('Updating file %s' % basepath)
+                logger.info('Updating file %s%s' % (basepath, dry_run_suffix))
                 if os.path.isabs(basepath):
                     # Original file (probably with subdir pointing inside source tree)
                     # so we do not want to move it, just copy
-                    _copy_file(basepath, path)
+                    _copy_file(basepath, path, dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 else:
-                    _move_file(os.path.join(local_files_dir, basepath), path)
+                    _move_file(os.path.join(local_files_dir, basepath), path,
+                               dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 update_srcuri= True
             for basepath, path in new_f.items():
-                logger.info('Adding new file %s' % basepath)
+                logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
                 _move_file(os.path.join(local_files_dir, basepath),
-                           os.path.join(files_dir, basepath))
+                           os.path.join(files_dir, basepath),
+                           dry_run_outdir=dry_run_outdir,
+                           base_outdir=recipedir)
                 srcuri.append('file://%s' % basepath)
                 update_srcuri = True
             if update_srcuri:
                 patchfields['SRC_URI'] = ' '.join(srcuri)
-            oe.recipeutils.patch_recipe(rd, recipefile, patchfields)
+            ret = oe.recipeutils.patch_recipe(rd, recipefile, patchfields, redirect_output=dry_run_outdir)
     finally:
         shutil.rmtree(tempdir)
     if not 'git://' in orig_src_uri:
@@ -1346,47 +1456,62 @@
                     'point to a git repository where you have pushed your '
                     'changes')
 
-    _remove_source_files(appendlayerdir, remove_files, destpath)
-    return True
+    _remove_source_files(appendlayerdir, remove_files, destpath, no_report_remove, dry_run=dry_run_outdir)
+    return True, appendfile, remove_files
 
-def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, initial_rev):
+def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, no_report_remove, initial_rev, dry_run_outdir=None, force_patch_refresh=False):
     """Implement the 'patch' mode of update-recipe"""
     import bb
     import oe.recipeutils
 
     recipefile = rd.getVar('FILE')
+    recipedir = os.path.dirname(recipefile)
     append = workspace[recipename]['bbappend']
     if not os.path.exists(append):
         raise DevtoolError('unable to find workspace bbappend for recipe %s' %
                            recipename)
 
-    initial_rev, update_rev, changed_revs = _get_patchset_revs(srctree, append, initial_rev)
+    initial_rev, update_rev, changed_revs, filter_patches = _get_patchset_revs(srctree, append, initial_rev, force_patch_refresh)
     if not initial_rev:
         raise DevtoolError('Unable to find initial revision - please specify '
                            'it with --initial-rev')
 
+    appendfile = None
     dl_dir = rd.getVar('DL_DIR')
     if not dl_dir.endswith('/'):
         dl_dir += '/'
 
+    dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+
     tempdir = tempfile.mkdtemp(prefix='devtool')
     try:
         local_files_dir = tempfile.mkdtemp(dir=tempdir)
-        upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir)
+        if filter_patches:
+            upd_f = {}
+            new_f = {}
+            del_f = {}
+        else:
+            srctreebase = workspace[recipename]['srctreebase']
+            upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase)
 
         remove_files = []
         if not no_remove:
             # Get all patches from source tree and check if any should be removed
             all_patches_dir = tempfile.mkdtemp(dir=tempdir)
-            upd_p, new_p, del_p = _export_patches(srctree, rd, initial_rev,
-                                                  all_patches_dir)
+            _, _, del_p = _export_patches(srctree, rd, initial_rev,
+                                          all_patches_dir)
             # Remove deleted local files and  patches
             remove_files = list(del_f.values()) + list(del_p.values())
 
         # Get updated patches from source tree
         patches_dir = tempfile.mkdtemp(dir=tempdir)
-        upd_p, new_p, del_p = _export_patches(srctree, rd, update_rev,
-                                              patches_dir, changed_revs)
+        upd_p, new_p, _ = _export_patches(srctree, rd, update_rev,
+                                          patches_dir, changed_revs)
+        logger.debug('Pre-filtering: update: %s, new: %s' % (dict(upd_p), dict(new_p)))
+        if filter_patches:
+            new_p = {}
+            upd_p = {k:v for k,v in upd_p.items() if k in filter_patches}
+            remove_files = [f for f in remove_files if f in filter_patches]
         updatefiles = False
         updaterecipe = False
         destpath = None
@@ -1405,10 +1530,11 @@
                         remaining = ['file://' + os.path.basename(item) for
                                      item in remaining]
                         removevalues = {'SRC_URI': removedentries + remaining}
-                _, destpath = oe.recipeutils.bbappend_recipe(
+                appendfile, destpath = oe.recipeutils.bbappend_recipe(
                                 rd, appendlayerdir, files,
                                 wildcardver=wildcard_version,
-                                removevalues=removevalues)
+                                removevalues=removevalues,
+                                redirect_output=dry_run_outdir)
             else:
                 logger.info('No patches or local source files needed updating')
         else:
@@ -1419,9 +1545,11 @@
                 if os.path.isabs(basepath):
                     # Original file (probably with subdir pointing inside source tree)
                     # so we do not want to move it, just copy
-                    _copy_file(basepath, path)
+                    _copy_file(basepath, path,
+                               dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 else:
-                    _move_file(os.path.join(local_files_dir, basepath), path)
+                    _move_file(os.path.join(local_files_dir, basepath), path,
+                               dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 updatefiles = True
             for basepath, path in upd_p.items():
                 patchfn = os.path.join(patches_dir, basepath)
@@ -1433,39 +1561,45 @@
                     _replace_srcuri_entry(srcuri, basepath, 'file://%s' % basepath)
                     updaterecipe = True
                 else:
-                    logger.info('Updating patch %s' % basepath)
-                logger.debug('Moving new patch %s to %s' % (patchfn, path))
-                _move_file(patchfn, path)
+                    logger.info('Updating patch %s%s' % (basepath, dry_run_suffix))
+                _move_file(patchfn, path,
+                           dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 updatefiles = True
             # Add any new files
             for basepath, path in new_f.items():
-                logger.info('Adding new file %s' % basepath)
+                logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
                 _move_file(os.path.join(local_files_dir, basepath),
-                           os.path.join(files_dir, basepath))
+                           os.path.join(files_dir, basepath),
+                           dry_run_outdir=dry_run_outdir,
+                           base_outdir=recipedir)
                 srcuri.append('file://%s' % basepath)
                 updaterecipe = True
             for basepath, path in new_p.items():
-                logger.info('Adding new patch %s' % basepath)
+                logger.info('Adding new patch %s%s' % (basepath, dry_run_suffix))
                 _move_file(os.path.join(patches_dir, basepath),
-                           os.path.join(files_dir, basepath))
+                           os.path.join(files_dir, basepath),
+                           dry_run_outdir=dry_run_outdir,
+                           base_outdir=recipedir)
                 srcuri.append('file://%s' % basepath)
                 updaterecipe = True
             # Update recipe, if needed
             if _remove_file_entries(srcuri, remove_files)[0]:
                 updaterecipe = True
             if updaterecipe:
-                logger.info('Updating recipe %s' % os.path.basename(recipefile))
-                oe.recipeutils.patch_recipe(rd, recipefile,
-                                            {'SRC_URI': ' '.join(srcuri)})
+                if not dry_run_outdir:
+                    logger.info('Updating recipe %s' % os.path.basename(recipefile))
+                ret = oe.recipeutils.patch_recipe(rd, recipefile,
+                                                  {'SRC_URI': ' '.join(srcuri)},
+                                                  redirect_output=dry_run_outdir)
             elif not updatefiles:
                 # Neither patches nor recipe were updated
                 logger.info('No patches or files need updating')
-                return False
+                return False, None, []
     finally:
         shutil.rmtree(tempdir)
 
-    _remove_source_files(appendlayerdir, remove_files, destpath)
-    return True
+    _remove_source_files(appendlayerdir, remove_files, destpath, no_report_remove, dry_run=dry_run_outdir)
+    return True, appendfile, remove_files
 
 def _guess_recipe_update_mode(srctree, rdata):
     """Guess the recipe update mode to use"""
@@ -1489,18 +1623,73 @@
 
     return 'patch'
 
-def _update_recipe(recipename, workspace, rd, mode, appendlayerdir, wildcard_version, no_remove, initial_rev):
+def _update_recipe(recipename, workspace, rd, mode, appendlayerdir, wildcard_version, no_remove, initial_rev, no_report_remove=False, dry_run_outdir=None, no_overrides=False, force_patch_refresh=False):
     srctree = workspace[recipename]['srctree']
     if mode == 'auto':
         mode = _guess_recipe_update_mode(srctree, rd)
 
-    if mode == 'srcrev':
-        updated = _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remove)
-    elif mode == 'patch':
-        updated = _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, initial_rev)
-    else:
-        raise DevtoolError('update_recipe: invalid mode %s' % mode)
-    return updated
+    override_branches = []
+    mainbranch = None
+    startbranch = None
+    if not no_overrides:
+        stdout, _ = bb.process.run('git branch', cwd=srctree)
+        other_branches = []
+        for line in stdout.splitlines():
+            branchname = line[2:]
+            if line.startswith('* '):
+                startbranch = branchname
+            if branchname.startswith(override_branch_prefix):
+                override_branches.append(branchname)
+            else:
+                other_branches.append(branchname)
+
+        if override_branches:
+            logger.debug('_update_recipe: override branches: %s' % override_branches)
+            logger.debug('_update_recipe: other branches: %s' % other_branches)
+            if startbranch.startswith(override_branch_prefix):
+                if len(other_branches) == 1:
+                    mainbranch = other_branches[1]
+                else:
+                    raise DevtoolError('Unable to determine main branch - please check out the main branch in source tree first')
+            else:
+                mainbranch = startbranch
+
+    checkedout = None
+    anyupdated = False
+    appendfile = None
+    allremoved = []
+    if override_branches:
+        logger.info('Handling main branch (%s)...' % mainbranch)
+        if startbranch != mainbranch:
+            bb.process.run('git checkout %s' % mainbranch, cwd=srctree)
+        checkedout = mainbranch
+    try:
+        branchlist = [mainbranch] + override_branches
+        for branch in branchlist:
+            crd = bb.data.createCopy(rd)
+            if branch != mainbranch:
+                logger.info('Handling branch %s...' % branch)
+                override = branch[len(override_branch_prefix):]
+                crd.appendVar('OVERRIDES', ':%s' % override)
+                bb.process.run('git checkout %s' % branch, cwd=srctree)
+                checkedout = branch
+
+            if mode == 'srcrev':
+                updated, appendf, removed = _update_recipe_srcrev(recipename, workspace, srctree, crd, appendlayerdir, wildcard_version, no_remove, no_report_remove, dry_run_outdir)
+            elif mode == 'patch':
+                updated, appendf, removed = _update_recipe_patch(recipename, workspace, srctree, crd, appendlayerdir, wildcard_version, no_remove, no_report_remove, initial_rev, dry_run_outdir, force_patch_refresh)
+            else:
+                raise DevtoolError('update_recipe: invalid mode %s' % mode)
+            if updated:
+                anyupdated = True
+            if appendf:
+                appendfile = appendf
+            allremoved.extend(removed)
+    finally:
+        if startbranch and checkedout != startbranch:
+            bb.process.run('git checkout %s' % startbranch, cwd=srctree)
+
+    return anyupdated, appendfile, allremoved
 
 def update_recipe(args, config, basepath, workspace):
     """Entry point for the devtool 'update-recipe' subcommand"""
@@ -1521,7 +1710,12 @@
         if not rd:
             return 1
 
-        updated = _update_recipe(args.recipename, workspace, rd, args.mode, args.append, args.wildcard_version, args.no_remove, args.initial_rev)
+        dry_run_output = None
+        dry_run_outdir = None
+        if args.dry_run:
+            dry_run_output = tempfile.TemporaryDirectory(prefix='devtool')
+            dry_run_outdir = dry_run_output.name
+        updated, _, _ = _update_recipe(args.recipename, workspace, rd, args.mode, args.append, args.wildcard_version, args.no_remove, args.initial_rev, dry_run_outdir=dry_run_outdir, no_overrides=args.no_overrides, force_patch_refresh=args.force_patch_refresh)
 
         if updated:
             rf = rd.getVar('FILE')
@@ -1550,6 +1744,7 @@
 
 def _reset(recipes, no_clean, config, basepath, workspace):
     """Reset one or more recipes"""
+    import oe.path
 
     def clean_preferred_provider(pn, layerconf_path):
         """Remove PREFERRED_PROVIDER from layer.conf'"""
@@ -1596,6 +1791,13 @@
     for pn in recipes:
         _check_preserve(config, pn)
 
+        appendfile = workspace[pn]['bbappend']
+        if os.path.exists(appendfile):
+            # This shouldn't happen, but is possible if devtool errored out prior to
+            # writing the md5 file. We need to delete this here or the recipe won't
+            # actually be reset
+            os.remove(appendfile)
+
         preservepath = os.path.join(config.workspace_path, 'attic', pn, pn)
         def preservedir(origdir):
             if os.path.exists(origdir):
@@ -1608,20 +1810,23 @@
                         preservedir(os.path.join(root, dn))
                 os.rmdir(origdir)
 
-        preservedir(os.path.join(config.workspace_path, 'recipes', pn))
+        recipefile = workspace[pn]['recipefile']
+        if recipefile and oe.path.is_path_parent(config.workspace_path, recipefile):
+            # This should always be true if recipefile is set, but just in case
+            preservedir(os.path.dirname(recipefile))
         # We don't automatically create this dir next to appends, but the user can
         preservedir(os.path.join(config.workspace_path, 'appends', pn))
 
-        srctree = workspace[pn]['srctree']
-        if os.path.isdir(srctree):
-            if os.listdir(srctree):
+        srctreebase = workspace[pn]['srctreebase']
+        if os.path.isdir(srctreebase):
+            if os.listdir(srctreebase):
                 # We don't want to risk wiping out any work in progress
                 logger.info('Leaving source tree %s as-is; if you no '
                             'longer need it then please delete it manually'
-                            % srctree)
+                            % srctreebase)
             else:
                 # This is unlikely, but if it's empty we can just remove it
-                os.rmdir(srctree)
+                os.rmdir(srctreebase)
 
         clean_preferred_provider(pn, config.workspace_path)
 
@@ -1656,9 +1861,7 @@
         layerdir = layers.get('meta', None)
     else:
         layerdir = layers.get(layername, None)
-    if layerdir:
-        layerdir = os.path.abspath(layerdir)
-    return layerdir or layername
+    return os.path.abspath(layerdir or layername)
 
 def finish(args, config, basepath, workspace):
     """Entry point for the devtool 'finish' subcommand"""
@@ -1667,6 +1870,20 @@
 
     check_workspace_recipe(workspace, args.recipename)
 
+    dry_run_suffix = ' (dry-run)' if args.dry_run else ''
+
+    # Grab the equivalent of COREBASE without having to initialise tinfoil
+    corebasedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
+
+    srctree = workspace[args.recipename]['srctree']
+    check_git_repo_op(srctree, [corebasedir])
+    dirty = check_git_repo_dirty(srctree)
+    if dirty:
+        if args.force:
+            logger.warning('Source tree is not clean, continuing as requested by -f/--force')
+        else:
+            raise DevtoolError('Source tree is not clean:\n\n%s\nEnsure you have committed your changes or use -f/--force if you are sure there\'s nothing that needs to be committed' % dirty)
+
     no_clean = False
     tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     try:
@@ -1675,7 +1892,9 @@
             return 1
 
         destlayerdir = _get_layer(args.destination, tinfoil.config_data)
-        origlayerdir = oe.recipeutils.find_layerdir(rd.getVar('FILE'))
+        recipefile = rd.getVar('FILE')
+        recipedir = os.path.dirname(recipefile)
+        origlayerdir = oe.recipeutils.find_layerdir(recipefile)
 
         if not os.path.isdir(destlayerdir):
             raise DevtoolError('Unable to find layer or directory matching "%s"' % args.destination)
@@ -1694,6 +1913,8 @@
                 elif line.startswith('# original_files:'):
                     origfilelist = line.split(':')[1].split()
 
+        destlayerbasedir = oe.recipeutils.find_layerdir(destlayerdir)
+
         if origlayerdir == config.workspace_path:
             # Recipe file itself is in workspace, update it there first
             appendlayerdir = None
@@ -1707,7 +1928,7 @@
                 raise DevtoolError("Unable to determine destination layer path - check that %s specifies an actual layer and %s/conf/layer.conf specifies BBFILES. You may also need to specify a more complete path." % (args.destination, destlayerdir))
             # Warn if the layer isn't in bblayers.conf (the code to create a bbappend will do this in other cases)
             layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS').split()]
-            if not os.path.abspath(destlayerdir) in layerdirs:
+            if not os.path.abspath(destlayerbasedir) in layerdirs:
                 bb.warn('Specified destination layer is not currently enabled in bblayers.conf, so the %s recipe will now be unavailable in your current configuration until you add the layer there' % args.recipename)
 
         elif destlayerdir == origlayerdir:
@@ -1719,37 +1940,103 @@
             appendlayerdir = destlayerdir
             destpath = None
 
+        # Actually update the recipe / bbappend
+        removing_original = (origpath and origfilelist and oe.recipeutils.find_layerdir(origpath) == destlayerbasedir)
+        dry_run_output = None
+        dry_run_outdir = None
+        if args.dry_run:
+            dry_run_output = tempfile.TemporaryDirectory(prefix='devtool')
+            dry_run_outdir = dry_run_output.name
+        updated, appendfile, removed = _update_recipe(args.recipename, workspace, rd, args.mode, appendlayerdir, wildcard_version=True, no_remove=False, no_report_remove=removing_original, initial_rev=args.initial_rev, dry_run_outdir=dry_run_outdir, no_overrides=args.no_overrides, force_patch_refresh=args.force_patch_refresh)
+        removed = [os.path.relpath(pth, recipedir) for pth in removed]
+
         # Remove any old files in the case of an upgrade
-        if origpath and origfilelist and oe.recipeutils.find_layerdir(origpath) == oe.recipeutils.find_layerdir(destlayerdir):
+        if removing_original:
             for fn in origfilelist:
                 fnp = os.path.join(origpath, fn)
-                try:
-                    os.remove(fnp)
-                except FileNotFoundError:
-                    pass
-
-        # Actually update the recipe / bbappend
-        _update_recipe(args.recipename, workspace, rd, args.mode, appendlayerdir, wildcard_version=True, no_remove=False, initial_rev=args.initial_rev)
+                if fn in removed or not os.path.exists(os.path.join(recipedir, fn)):
+                    logger.info('Removing file %s%s' % (fnp, dry_run_suffix))
+                if not args.dry_run:
+                    try:
+                        os.remove(fnp)
+                    except FileNotFoundError:
+                        pass
 
         if origlayerdir == config.workspace_path and destpath:
             # Recipe file itself is in the workspace - need to move it and any
             # associated files to the specified layer
             no_clean = True
-            logger.info('Moving recipe file to %s' % destpath)
-            recipedir = os.path.dirname(rd.getVar('FILE'))
+            logger.info('Moving recipe file to %s%s' % (destpath, dry_run_suffix))
             for root, _, files in os.walk(recipedir):
                 for fn in files:
                     srcpath = os.path.join(root, fn)
                     relpth = os.path.relpath(os.path.dirname(srcpath), recipedir)
                     destdir = os.path.abspath(os.path.join(destpath, relpth))
-                    bb.utils.mkdirhier(destdir)
-                    shutil.move(srcpath, os.path.join(destdir, fn))
+                    destfp = os.path.join(destdir, fn)
+                    _move_file(srcpath, destfp, dry_run_outdir=dry_run_outdir, base_outdir=destpath)
 
+        if dry_run_outdir:
+            import difflib
+            comparelist = []
+            for root, _, files in os.walk(dry_run_outdir):
+                for fn in files:
+                    outf = os.path.join(root, fn)
+                    relf = os.path.relpath(outf, dry_run_outdir)
+                    logger.debug('dry-run: output file %s' % relf)
+                    if fn.endswith('.bb'):
+                        if origfilelist and origpath and destpath:
+                            # Need to match this up with the pre-upgrade recipe file
+                            for origf in origfilelist:
+                                if origf.endswith('.bb'):
+                                    comparelist.append((os.path.abspath(os.path.join(origpath, origf)),
+                                                        outf,
+                                                        os.path.abspath(os.path.join(destpath, relf))))
+                                    break
+                        else:
+                            # Compare to the existing recipe
+                            comparelist.append((recipefile, outf, recipefile))
+                    elif fn.endswith('.bbappend'):
+                        if appendfile:
+                            if os.path.exists(appendfile):
+                                comparelist.append((appendfile, outf, appendfile))
+                            else:
+                                comparelist.append((None, outf, appendfile))
+                    else:
+                        if destpath:
+                            recipedest = destpath
+                        elif appendfile:
+                            recipedest = os.path.dirname(appendfile)
+                        else:
+                            recipedest = os.path.dirname(recipefile)
+                        destfp = os.path.join(recipedest, relf)
+                        if os.path.exists(destfp):
+                            comparelist.append((destfp, outf, destfp))
+            output = ''
+            for oldfile, newfile, newfileshow in comparelist:
+                if oldfile:
+                    with open(oldfile, 'r') as f:
+                        oldlines = f.readlines()
+                else:
+                    oldfile = '/dev/null'
+                    oldlines = []
+                with open(newfile, 'r') as f:
+                    newlines = f.readlines()
+                if not newfileshow:
+                    newfileshow = newfile
+                diff = difflib.unified_diff(oldlines, newlines, oldfile, newfileshow)
+                difflines = list(diff)
+                if difflines:
+                    output += ''.join(difflines)
+            if output:
+                logger.info('Diff of changed files:\n%s' % output)
     finally:
         tinfoil.shutdown()
 
     # Everything else has succeeded, we can now reset
-    _reset([args.recipename], no_clean=no_clean, config=config, basepath=basepath, workspace=workspace)
+    if args.dry_run:
+        logger.info('Resetting recipe (dry-run)')
+    else:
+        _reset([args.recipename], no_clean=no_clean, config=config, basepath=basepath, workspace=workspace)
 
     return 0
 
@@ -1803,6 +2090,7 @@
     group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
     group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
     parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (when not using -n/--no-extract) (default "%(default)s")')
+    parser_modify.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
     parser_modify.add_argument('--keep-temp', help='Keep temporary directory (for debugging)', action="store_true")
     parser_modify.set_defaults(func=modify, fixed_setup=context.fixed_setup)
 
@@ -1812,6 +2100,7 @@
     parser_extract.add_argument('recipename', help='Name of recipe to extract the source for')
     parser_extract.add_argument('srctree', help='Path to where to extract the source tree')
     parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (default "%(default)s")')
+    parser_extract.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
     parser_extract.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
     parser_extract.set_defaults(func=extract, fixed_setup=context.fixed_setup)
 
@@ -1843,6 +2132,9 @@
     parser_update_recipe.add_argument('--append', '-a', help='Write changes to a bbappend in the specified layer instead of the recipe', metavar='LAYERDIR')
     parser_update_recipe.add_argument('--wildcard-version', '-w', help='In conjunction with -a/--append, use a wildcard to make the bbappend apply to any recipe version', action='store_true')
     parser_update_recipe.add_argument('--no-remove', '-n', action="store_true", help='Don\'t remove patches, only add or update')
+    parser_update_recipe.add_argument('--no-overrides', '-O', action="store_true", help='Do not handle other override branches (if they exist)')
+    parser_update_recipe.add_argument('--dry-run', '-N', action="store_true", help='Dry-run (just report changes instead of writing them)')
+    parser_update_recipe.add_argument('--force-patch-refresh', action="store_true", help='Update patches in the layer even if they have not been modified (useful for refreshing patch context)')
     parser_update_recipe.set_defaults(func=update_recipe)
 
     parser_status = subparsers.add_parser('status', help='Show workspace status',
@@ -1859,10 +2151,14 @@
     parser_reset.set_defaults(func=reset)
 
     parser_finish = subparsers.add_parser('finish', help='Finish working on a recipe in your workspace',
-                                         description='Pushes any committed changes to the specified recipe to the specified layer and removes it from your workspace. Roughly equivalent to an update-recipe followed by reset, except the update-recipe step will do the "right thing" depending on the recipe and the destination layer specified.',
+                                         description='Pushes any committed changes to the specified recipe to the specified layer and removes it from your workspace. Roughly equivalent to an update-recipe followed by reset, except the update-recipe step will do the "right thing" depending on the recipe and the destination layer specified. Note that your changes must have been committed to the git repository in order to be recognised.',
                                          group='working', order=-100)
     parser_finish.add_argument('recipename', help='Recipe to finish')
     parser_finish.add_argument('destination', help='Layer/path to put recipe into. Can be the name of a layer configured in your bblayers.conf, the path to the base of a layer, or a partial path inside a layer. %(prog)s will attempt to complete the path based on the layer\'s structure.')
     parser_finish.add_argument('--mode', '-m', choices=['patch', 'srcrev', 'auto'], default='auto', help='Update mode (where %(metavar)s is %(choices)s; default is %(default)s)', metavar='MODE')
     parser_finish.add_argument('--initial-rev', help='Override starting revision for patches')
+    parser_finish.add_argument('--force', '-f', action="store_true", help='Force continuing even if there are uncommitted changes in the source tree repository')
+    parser_finish.add_argument('--no-overrides', '-O', action="store_true", help='Do not handle other override branches (if they exist)')
+    parser_finish.add_argument('--dry-run', '-N', action="store_true", help='Dry-run (just report changes instead of writing them)')
+    parser_finish.add_argument('--force-patch-refresh', action="store_true", help='Update patches in the layer even if they have not been modified (useful for refreshing patch context)')
     parser_finish.set_defaults(func=finish)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/upgrade.py b/import-layers/yocto-poky/scripts/lib/devtool/upgrade.py
index f1b3ff0..c3fd866 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/upgrade.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/upgrade.py
@@ -33,7 +33,7 @@
 
 import oe.recipeutils
 from devtool import standard
-from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build, update_unlockedsigs
+from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build, update_unlockedsigs, check_prerelease_version
 
 logger = logging.getLogger('devtool')
 
@@ -55,17 +55,6 @@
         dest_path = os.path.join(dest, path)
         shutil.move(os.path.join(orig, path), dest_path)
 
-def _get_checksums(rf):
-    import re
-    checksums = {}
-    with open(rf) as f:
-        for line in f:
-            for cs in ['md5sum', 'sha256sum']:
-                m = re.match("^SRC_URI\[%s\].*=.*\"(.*)\"" % cs, line)
-                if m:
-                    checksums[cs] = m.group(1)
-    return checksums
-
 def _remove_patch_dirs(recipefolder):
     for root, dirs, files in os.walk(recipefolder):
         for d in dirs:
@@ -202,6 +191,8 @@
         __run('git tag -f devtool-base-new')
         md5 = None
         sha256 = None
+        _, _, _, _, _, params = bb.fetch2.decodeurl(uri)
+        srcsubdir_rel = params.get('destsuffix', 'git')
         if not srcbranch:
             check_branch, check_branch_err = __run('git branch -r --contains %s' % srcrev)
             get_branch = [x.strip() for x in check_branch.splitlines()]
@@ -236,6 +227,7 @@
 
         tmpsrctree = _get_srctree(tmpdir)
         srctree = os.path.abspath(srctree)
+        srcsubdir_rel = os.path.relpath(tmpsrctree, tmpdir)
 
         # Delete all sources so we ensure no stray files are left over
         for item in os.listdir(srctree):
@@ -251,8 +243,15 @@
         _copy_source_code(tmpsrctree, srctree)
 
         (stdout,_) = __run('git ls-files --modified --others --exclude-standard')
-        for f in stdout.splitlines():
-            __run('git add "%s"' % f)
+        filelist = stdout.splitlines()
+        pbar = bb.ui.knotty.BBProgress('Adding changed files', len(filelist))
+        pbar.start()
+        batchsize = 100
+        for i in range(0, len(filelist), batchsize):
+            batch = filelist[i:i+batchsize]
+            __run('git add -A %s' % ' '.join(['"%s"' % item for item in batch]))
+            pbar.update(i)
+        pbar.finish()
 
         useroptions = []
         oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd)
@@ -264,10 +263,8 @@
 
     if no_patch:
         patches = oe.recipeutils.get_recipe_patches(crd)
-        if len(patches):
-            logger.warn('By user choice, the following patches will NOT be applied')
-            for patch in patches:
-                logger.warn("%s" % os.path.basename(patch))
+        if patches:
+            logger.warn('By user choice, the following patches will NOT be applied to the new source tree:\n  %s' % '\n  '.join([os.path.basename(patch) for patch in patches]))
     else:
         __run('git checkout devtool-patched -b %s' % branch)
         skiptag = False
@@ -292,9 +289,28 @@
         else:
             shutil.rmtree(tmpsrctree)
 
-    return (rev, md5, sha256, srcbranch)
+    return (rev, md5, sha256, srcbranch, srcsubdir_rel)
 
-def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, workspace, tinfoil, rd):
+def _add_license_diff_to_recipe(path, diff):
+    notice_text = """# FIXME: the LIC_FILES_CHKSUM values have been updated by 'devtool upgrade'.
+# The following is the difference between the old and the new license text.
+# Please update the LICENSE value if needed, and summarize the changes in
+# the commit message via 'License-Update:' tag.
+# (example: 'License-Update: copyright years updated.')
+#
+# The changes:
+#
+"""
+    commented_diff = "\n".join(["# {}".format(l) for l in diff.split('\n')])
+    with open(path, 'rb') as f:
+        orig_content = f.read()
+    with open(path, 'wb') as f:
+        f.write(notice_text.encode())
+        f.write(commented_diff.encode())
+        f.write("\n#\n\n".encode())
+        f.write(orig_content)
+
+def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, srcsubdir_new, workspace, tinfoil, rd, license_diff, new_licenses):
     """Creates the new recipe under workspace"""
 
     bpn = rd.getVar('BPN')
@@ -346,9 +362,67 @@
 
     newvalues['PR'] = None
 
+    # Work out which SRC_URI entries have changed in case the entry uses a name
+    crd = rd.createCopy()
+    crd.setVar('PV', newpv)
+    for var, value in newvalues.items():
+        crd.setVar(var, value)
+    old_src_uri = (rd.getVar('SRC_URI') or '').split()
+    new_src_uri = (crd.getVar('SRC_URI') or '').split()
+    newnames = []
+    addnames = []
+    for newentry in new_src_uri:
+        _, _, _, _, _, params = bb.fetch2.decodeurl(newentry)
+        if 'name' in params:
+            newnames.append(params['name'])
+            if newentry not in old_src_uri:
+                addnames.append(params['name'])
+    # Find what's been set in the original recipe
+    oldnames = []
+    noname = False
+    for varflag in rd.getVarFlags('SRC_URI'):
+        if varflag.endswith(('.md5sum', '.sha256sum')):
+            name = varflag.rsplit('.', 1)[0]
+            if name not in oldnames:
+                oldnames.append(name)
+        elif varflag in ['md5sum', 'sha256sum']:
+            noname = True
+    # Even if SRC_URI has named entries it doesn't have to actually use the name
+    if noname and addnames and addnames[0] not in oldnames:
+        addnames = []
+    # Drop any old names (the name actually might include ${PV})
+    for name in oldnames:
+        if name not in newnames:
+            newvalues['SRC_URI[%s.md5sum]' % name] = None
+            newvalues['SRC_URI[%s.sha256sum]' % name] = None
+
     if md5 and sha256:
-        newvalues['SRC_URI[md5sum]'] = md5
-        newvalues['SRC_URI[sha256sum]'] = sha256
+        if addnames:
+            nameprefix = '%s.' % addnames[0]
+        else:
+            nameprefix = ''
+        newvalues['SRC_URI[%smd5sum]' % nameprefix] = md5
+        newvalues['SRC_URI[%ssha256sum]' % nameprefix] = sha256
+
+    if srcsubdir_new != srcsubdir_old:
+        s_subdir_old = os.path.relpath(os.path.abspath(rd.getVar('S')), rd.getVar('WORKDIR'))
+        s_subdir_new = os.path.relpath(os.path.abspath(crd.getVar('S')), crd.getVar('WORKDIR'))
+        if srcsubdir_old == s_subdir_old and srcsubdir_new != s_subdir_new:
+            # Subdir for old extracted source matches what S points to (it should!)
+            # but subdir for new extracted source doesn't match what S will be
+            newvalues['S'] = '${WORKDIR}/%s' % srcsubdir_new.replace(newpv, '${PV}')
+            if crd.expand(newvalues['S']) == crd.expand('${WORKDIR}/${BP}'):
+                # It's the default, drop it
+                # FIXME what if S is being set in a .inc?
+                newvalues['S'] = None
+                logger.info('Source subdirectory has changed, dropping S value since it now matches the default ("${WORKDIR}/${BP}")')
+            else:
+                logger.info('Source subdirectory has changed, updating S value')
+
+    if license_diff:
+        newlicchksum = " ".join(["file://{};md5={}".format(l["path"], l["actual_md5"]) + (";beginline={}".format(l["beginline"]) if l["beginline"] else "") + (";endline={}".format(l["endline"]) if l["endline"] else "") for l in new_licenses])
+        newvalues["LIC_FILES_CHKSUM"] = newlicchksum
+        _add_license_diff_to_recipe(fullpath, license_diff)
 
     rd = tinfoil.parse_recipe_file(fullpath, False)
     oe.recipeutils.patch_recipe(rd, fullpath, newvalues)
@@ -377,14 +451,53 @@
     if configerr:
         raise DevtoolError('Your git configuration is incomplete which will prevent rebases from working:\n' + '\n'.join(configerr))
 
+def _extract_licenses(srcpath, recipe_licenses):
+    licenses = []
+    for url in recipe_licenses.split():
+        license = {}
+        (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
+        license['path'] = path
+        license['md5'] = parm.get('md5', '')
+        license['beginline'], license['endline'] = 0, 0
+        if 'beginline' in parm:
+            license['beginline'] = int(parm['beginline'])
+        if 'endline' in parm:
+            license['endline'] = int(parm['endline'])
+        license['text'] = []
+        with open(os.path.join(srcpath, path), 'rb') as f:
+            import hashlib
+            actual_md5 = hashlib.md5()
+            lineno = 0
+            for line in f:
+                lineno += 1
+                if (lineno >= license['beginline']) and ((lineno <= license['endline']) or not license['endline']):
+                    license['text'].append(line.decode(errors='ignore'))
+                    actual_md5.update(line)
+        license['actual_md5'] = actual_md5.hexdigest()
+        licenses.append(license)
+    return licenses
+
+def _generate_license_diff(old_licenses, new_licenses):
+    need_diff = False
+    for l in new_licenses:
+        if l['md5'] != l['actual_md5']:
+            need_diff = True
+            break
+    if need_diff == False:
+        return None
+
+    import difflib
+    diff = ''
+    for old, new in zip(old_licenses, new_licenses):
+        for line in difflib.unified_diff(old['text'], new['text'], old['path'], new['path']):
+            diff = diff + line
+    return diff
 
 def upgrade(args, config, basepath, workspace):
     """Entry point for the devtool 'upgrade' subcommand"""
 
     if args.recipename in workspace:
         raise DevtoolError("recipe %s is already in your workspace" % args.recipename)
-    if not args.version and not args.srcrev:
-        raise DevtoolError("You must provide a version using the --version/-V option, or for recipes that fetch from an SCM such as git, the --srcrev/-S option")
     if args.srcbranch and not args.srcrev:
         raise DevtoolError("If you specify --srcbranch/-B then you must use --srcrev/-S to specify the revision" % args.recipename)
 
@@ -407,22 +520,43 @@
         else:
             srctree = standard.get_default_srctree(config, pn)
 
+        # try to automatically discover latest version and revision if not provided on command line
+        if not args.version and not args.srcrev:
+            version_info = oe.recipeutils.get_recipe_upstream_version(rd)
+            if version_info['version'] and not version_info['version'].endswith("new-commits-available"):
+                args.version = version_info['version']
+            if version_info['revision']:
+                args.srcrev = version_info['revision']
+        if not args.version and not args.srcrev:
+            raise DevtoolError("Automatic discovery of latest version/revision failed - you must provide a version using the --version/-V option, or for recipes that fetch from an SCM such as git, the --srcrev/-S option.")
+
         standard._check_compatible_recipe(pn, rd)
         old_srcrev = rd.getVar('SRCREV')
         if old_srcrev == 'INVALID':
             old_srcrev = None
         if old_srcrev and not args.srcrev:
             raise DevtoolError("Recipe specifies a SRCREV value; you must specify a new one when upgrading")
-        if rd.getVar('PV') == args.version and old_srcrev == args.srcrev:
+        old_ver = rd.getVar('PV')
+        if old_ver == args.version and old_srcrev == args.srcrev:
             raise DevtoolError("Current and upgrade versions are the same version")
+        if args.version:
+            if bb.utils.vercmp_string(args.version, old_ver) < 0:
+                logger.warning('Upgrade version %s compares as less than the current version %s. If you are using a package feed for on-target upgrades or providing this recipe for general consumption, then you should increment PE in the recipe (or if there is no current PE value set, set it to "1")' % (args.version, old_ver))
+            check_prerelease_version(args.version, 'devtool upgrade')
 
         rf = None
+        license_diff = None
         try:
-            rev1 = standard._extract_source(srctree, False, 'devtool-orig', False, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
-            rev2, md5, sha256, srcbranch = _extract_new_source(args.version, srctree, args.no_patch,
+            logger.info('Extracting current version source...')
+            rev1, srcsubdir1 = standard._extract_source(srctree, False, 'devtool-orig', False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
+            old_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM'))
+            logger.info('Extracting upgraded version source...')
+            rev2, md5, sha256, srcbranch, srcsubdir2 = _extract_new_source(args.version, srctree, args.no_patch,
                                                     args.srcrev, args.srcbranch, args.branch, args.keep_temp,
                                                     tinfoil, rd)
-            rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, srcbranch, config.workspace_path, tinfoil, rd)
+            new_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM'))
+            license_diff = _generate_license_diff(old_licenses, new_licenses)
+            rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, srcbranch, srcsubdir1, srcsubdir2, config.workspace_path, tinfoil, rd, license_diff, new_licenses)
         except bb.process.CmdError as e:
             _upgrade_error(e, rf, srctree)
         except DevtoolError as e:
@@ -433,10 +567,32 @@
                         copied, config.workspace_path, rd)
         standard._add_md5(config, pn, af)
 
-        update_unlockedsigs(basepath, workspace, [pn], args.fixed_setup)
+        update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn])
 
         logger.info('Upgraded source extracted to %s' % srctree)
         logger.info('New recipe is %s' % rf)
+        if license_diff:
+            logger.info('License checksums have been updated in the new recipe; please refer to it for the difference between the old and the new license texts.')
+    finally:
+        tinfoil.shutdown()
+    return 0
+
+def latest_version(args, config, basepath, workspace):
+    """Entry point for the devtool 'latest_version' subcommand"""
+    tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
+    try:
+        rd = parse_recipe(config, tinfoil, args.recipename, True)
+        if not rd:
+            return 1
+        version_info = oe.recipeutils.get_recipe_upstream_version(rd)
+        # "new-commits-available" is an indication that upstream never issues version tags
+        if not version_info['version'].endswith("new-commits-available"):
+            logger.info("Current version: {}".format(version_info['current_version']))
+            logger.info("Latest version: {}".format(version_info['version']))
+            if version_info['revision']:
+                logger.info("Latest version's commit: {}".format(version_info['revision']))
+        else:
+            logger.info("Latest commit: {}".format(version_info['revision']))
     finally:
         tinfoil.shutdown()
     return 0
@@ -451,13 +607,20 @@
                                            group='starting')
     parser_upgrade.add_argument('recipename', help='Name of recipe to upgrade (just name - no version, path or extension)')
     parser_upgrade.add_argument('srctree',  nargs='?', help='Path to where to extract the source tree. If not specified, a subdirectory of %s will be used.' % defsrctree)
-    parser_upgrade.add_argument('--version', '-V', help='Version to upgrade to (PV)')
-    parser_upgrade.add_argument('--srcrev', '-S', help='Source revision to upgrade to (required if fetching from an SCM such as git)')
+    parser_upgrade.add_argument('--version', '-V', help='Version to upgrade to (PV). If omitted, latest upstream version will be determined and used, if possible.')
+    parser_upgrade.add_argument('--srcrev', '-S', help='Source revision to upgrade to (useful when fetching from an SCM such as git)')
     parser_upgrade.add_argument('--srcbranch', '-B', help='Branch in source repository containing the revision to use (if fetching from an SCM such as git)')
     parser_upgrade.add_argument('--branch', '-b', default="devtool", help='Name for new development branch to checkout (default "%(default)s")')
     parser_upgrade.add_argument('--no-patch', action="store_true", help='Do not apply patches from the recipe to the new source code')
+    parser_upgrade.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
     group = parser_upgrade.add_mutually_exclusive_group()
     group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
     group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
     parser_upgrade.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
     parser_upgrade.set_defaults(func=upgrade, fixed_setup=context.fixed_setup)
+
+    parser_latest_version = subparsers.add_parser('latest-version', help='Report the latest version of an existing recipe',
+                                                  description='Queries the upstream server for what the latest upstream release is (for git, tags are checked, for tarballs, a list of them is obtained, and one with the highest version number is reported)',
+                                                  group='info')
+    parser_latest_version.add_argument('recipename', help='Name of recipe to query (just name - no version, path or extension)')
+    parser_latest_version.set_defaults(func=latest_version)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/utilcmds.py b/import-layers/yocto-poky/scripts/lib/devtool/utilcmds.py
index b745116..7cd139f 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/utilcmds.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/utilcmds.py
@@ -32,6 +32,12 @@
 
 def _find_recipe_path(args, config, basepath, workspace):
     if args.any_recipe:
+        logger.warning('-a/--any-recipe option is now always active, and thus the option will be removed in a future release')
+    if args.recipename in workspace:
+        recipefile = workspace[args.recipename]['recipefile']
+    else:
+        recipefile = None
+    if not recipefile:
         tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
         try:
             rd = parse_recipe(config, tinfoil, args.recipename, True)
@@ -40,12 +46,6 @@
             recipefile = rd.getVar('FILE')
         finally:
             tinfoil.shutdown()
-    else:
-        check_workspace_recipe(workspace, args.recipename)
-        recipefile = workspace[args.recipename]['recipefile']
-        if not recipefile:
-            raise DevtoolError("Recipe file for %s is not under the workspace" %
-                               args.recipename)
     return recipefile
 
 
@@ -222,19 +222,21 @@
 
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
-    parser_edit_recipe = subparsers.add_parser('edit-recipe', help='Edit a recipe file in your workspace',
-                                         description='Runs the default editor (as specified by the EDITOR variable) on the specified recipe. Note that the recipe file itself must be in the workspace (i.e. as a result of "devtool add" or "devtool upgrade"); you can override this with the -a/--any-recipe option.',
+    parser_edit_recipe = subparsers.add_parser('edit-recipe', help='Edit a recipe file',
+                                         description='Runs the default editor (as specified by the EDITOR variable) on the specified recipe. Note that this will be quicker for recipes in the workspace as the cache does not need to be loaded in that case.',
                                          group='working')
     parser_edit_recipe.add_argument('recipename', help='Recipe to edit')
-    parser_edit_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Edit any recipe, not just where the recipe file itself is in the workspace')
+    # FIXME drop -a at some point in future
+    parser_edit_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Does nothing (exists for backwards-compatibility)')
     parser_edit_recipe.set_defaults(func=edit_recipe)
 
     # Find-recipe
-    parser_find_recipe = subparsers.add_parser('find-recipe', help='Find a recipe file in your workspace',
-                                         description='By default, this will find a recipe file in your workspace; you can override this with the -a/--any-recipe option.',
+    parser_find_recipe = subparsers.add_parser('find-recipe', help='Find a recipe file',
+                                         description='Finds a recipe file. Note that this will be quicker for recipes in the workspace as the cache does not need to be loaded in that case.',
                                          group='working')
     parser_find_recipe.add_argument('recipename', help='Recipe to find')
-    parser_find_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Find any recipe, not just where the recipe file itself is in the workspace')
+    # FIXME drop -a at some point in future
+    parser_find_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Does nothing (exists for backwards-compatibility)')
     parser_find_recipe.set_defaults(func=find_recipe)
 
     # NOTE: Needed to override the usage string here since the default
diff --git a/import-layers/yocto-poky/scripts/lib/recipetool/create.py b/import-layers/yocto-poky/scripts/lib/recipetool/create.py
index 5bf939e..a371028 100644
--- a/import-layers/yocto-poky/scripts/lib/recipetool/create.py
+++ b/import-layers/yocto-poky/scripts/lib/recipetool/create.py
@@ -383,8 +383,10 @@
         # which causes decodeurl to fail getting the right host and path
         if len(host.split(':')) > 1:
             splitslash = host.split(':')
-            host = splitslash[0]
-            path = '/' + splitslash[1] + path
+            # Port number should not be split from host
+            if not re.match('^[0-9]+$', splitslash[1]):
+                host = splitslash[0]
+                path = '/' + splitslash[1] + path
         #Algorithm:
         # if user is defined, append protocol=ssh or if a protocol is defined, then honor the user-defined protocol
         # if no user & password is defined, check for scheme type and append the protocol with the scheme type
@@ -433,6 +435,9 @@
         source = 'file://%s' % os.path.abspath(source)
 
     if scriptutils.is_src_url(source):
+        # Warn about github archive URLs
+        if re.match('https?://github.com/[^/]+/[^/]+/archive/.+(\.tar\..*|\.zip)$', source):
+            logger.warn('github archive files are not guaranteed to be stable and may be re-generated over time. If the latter occurs, the checksums will likely change and the recipe will fail at do_fetch. It is recommended that you point to an actual commit or tag in the repository instead (using the repository URL in conjunction with the -S/--srcrev option).')
         # Fetch a URL
         fetchuri = reformat_git_uri(urldefrag(source)[0])
         if args.binary:
diff --git a/import-layers/yocto-poky/scripts/lib/recipetool/create_npm.py b/import-layers/yocto-poky/scripts/lib/recipetool/create_npm.py
index ae53972..bb42a5c 100644
--- a/import-layers/yocto-poky/scripts/lib/recipetool/create_npm.py
+++ b/import-layers/yocto-poky/scripts/lib/recipetool/create_npm.py
@@ -73,7 +73,6 @@
                     license = license.replace(' ', '_')
                     if not license[0] == '(':
                         license = '(' + license + ')'
-                    print('LICENSE: {}'.format(license))
                 else:
                     license = license.replace('AND', '&')
                     if license[0] == '(':
@@ -321,6 +320,7 @@
                     blacklist = True
                     break
             if (not blacklist and 'linux' not in pkg_os) or '!linux' in pkg_os:
+                pkg = pdata.get('name', 'Unnamed package')
                 logger.debug(2, "Skipping %s since it's incompatible with Linux" % pkg)
                 return False
         return True
diff --git a/import-layers/yocto-poky/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in b/import-layers/yocto-poky/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
new file mode 100644
index 0000000..7300e65
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
@@ -0,0 +1,3 @@
+bootloader --ptable gpt
+part /boot --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/boot --fstype=vfat --label boot --active --align 1024 --use-uuid --overhead-factor 1.0
+part / --source rootfs --fstype=ext4 --label root --align 1024 --exclude-path boot/
diff --git a/import-layers/yocto-poky/scripts/lib/wic/filemap.py b/import-layers/yocto-poky/scripts/lib/wic/filemap.py
index 77e32b9..a72fa09 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/filemap.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/filemap.py
@@ -37,7 +37,15 @@
     # Get the block size of the host file-system for the image file by calling
     # the FIGETBSZ ioctl (number 2).
     binary_data = fcntl.ioctl(file_obj, 2, struct.pack('I', 0))
-    return struct.unpack('I', binary_data)[0]
+    bsize = struct.unpack('I', binary_data)[0]
+    if not bsize:
+        import os
+        stat = os.fstat(file_obj.fileno())
+        if hasattr(stat, 'st_blksize'):
+            bsize = stat.st_blksize
+        else:
+            raise IOError("Unable to determine block size")
+    return bsize
 
 class ErrorNotSupp(Exception):
     """
diff --git a/import-layers/yocto-poky/scripts/lib/wic/help.py b/import-layers/yocto-poky/scripts/lib/wic/help.py
index 2ac45e0..842b868 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/help.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/help.py
@@ -576,6 +576,10 @@
           partition. In other words, it 'prepares' the final partition
           image which will be incorporated into the disk image.
 
+      do_post_partition()
+          Called after the partition is created. It is useful to add post
+          operations e.g. signing the partition.
+
       do_configure_partition()
           Called before do_prepare_partition(), typically used to
           create custom configuration files for a partition, for
@@ -863,7 +867,10 @@
        This is achieved by wic adding entries to the fstab during image
        generation. In order for a valid fstab to be generated one of the
        --ondrive, --ondisk or --use-uuid partition options must be used for
-       each partition that specifies a mountpoint.
+       each partition that specifies a mountpoint.  Note that with --use-uuid
+       and non-root <mountpoint>, including swap, the mount program must
+       understand the PARTUUID syntax.  This currently excludes the busybox
+       versions of these applications.
 
 
        The following are supported 'part' options:
@@ -986,6 +993,11 @@
                  in bootloader configuration before running wic. In this case .wks file can
                  be generated or modified to set preconfigured parition UUID using this option.
 
+         --fsuuid: This option is specific to wic. It specifies filesystem UUID.
+                   It's useful if preconfigured filesystem UUID is added to kernel command line
+                   in bootloader configuration before running wic. In this case .wks file can
+                   be generated or modified to set preconfigured filesystem UUID using this option.
+
          --system-id: This option is specific to wic. It specifies partition system id. It's useful
                       for the harware that requires non-default partition system ids. The parameter
                       in one byte long hex number either with 0x prefix or without it.
diff --git a/import-layers/yocto-poky/scripts/lib/wic/ksparser.py b/import-layers/yocto-poky/scripts/lib/wic/ksparser.py
index 7850e81..e590b2f 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/ksparser.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/ksparser.py
@@ -161,6 +161,7 @@
         part.add_argument('--system-id', type=systemidtype)
         part.add_argument('--use-uuid', action='store_true')
         part.add_argument('--uuid')
+        part.add_argument('--fsuuid')
 
         bootloader = subparsers.add_parser('bootloader')
         bootloader.add_argument('--append')
@@ -195,6 +196,11 @@
                         raise KickStartError('%s:%d: %s' % \
                                              (confpath, lineno, err))
                     if line.startswith('part'):
+                        # SquashFS does not support UUID
+                        if parsed.fstype == 'squashfs' and parsed.use_uuid:
+                            err = "%s:%d: SquashFS does not support UUID" \
+                                  % (confpath, lineno)
+                            raise KickStartError(err)
                         # using ArgumentParser one cannot easily tell if option
                         # was passed as argument, if said option has a default
                         # value; --overhead-factor/--extra-space cannot be used
diff --git a/import-layers/yocto-poky/scripts/lib/wic/partition.py b/import-layers/yocto-poky/scripts/lib/wic/partition.py
index 84fe85d..3fe5c4e 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/partition.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/partition.py
@@ -26,6 +26,7 @@
 
 import logging
 import os
+import uuid
 
 from wic import WicError
 from wic.misc import exec_cmd, exec_native_cmd, get_bitbake_var
@@ -61,6 +62,7 @@
         self.system_id = args.system_id
         self.use_uuid = args.use_uuid
         self.uuid = args.uuid
+        self.fsuuid = args.fsuuid
 
         self.lineno = lineno
         self.source_file = ""
@@ -183,6 +185,9 @@
         plugin.do_prepare_partition(self, srcparams_dict, creator,
                                     cr_workdir, oe_builddir, bootimg_dir,
                                     kernel_dir, rootfs_dir, native_sysroot)
+        plugin.do_post_partition(self, srcparams_dict, creator,
+                                    cr_workdir, oe_builddir, bootimg_dir,
+                                    kernel_dir, rootfs_dir, native_sysroot)
 
         # further processing required Partition.size to be an integer, make
         # sure that it is one
@@ -197,12 +202,12 @@
                            (self.mountpoint, self.size, self.fixed_size))
 
     def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
-                       native_sysroot):
+                       native_sysroot, real_rootfs = True):
         """
         Prepare content for a rootfs partition i.e. create a partition
         and fill it from a /rootfs dir.
 
-        Currently handles ext2/3/4, btrfs and vfat.
+        Currently handles ext2/3/4, btrfs, vfat and squashfs.
         """
         p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
         p_localstatedir = os.environ.get("PSEUDO_LOCALSTATEDIR",
@@ -221,7 +226,7 @@
             os.remove(rootfs)
 
         # Get rootfs size from bitbake variable if it's not set in .ks file
-        if not self.size:
+        if not self.size and real_rootfs:
             # Bitbake variable ROOTFS_SIZE is calculated in
             # Image._get_rootfs_size method from meta/lib/oe/image.py
             # using IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGNMENT,
@@ -264,8 +269,8 @@
         if self.label:
             label_str = "-L %s" % self.label
 
-        mkfs_cmd = "mkfs.%s %s %s %s -d %s" % \
-            (self.fstype, extraopts, rootfs, label_str, rootfs_dir)
+        mkfs_cmd = "mkfs.%s %s %s %s -U %s -d %s" % \
+            (self.fstype, extraopts, rootfs, label_str, self.fsuuid, rootfs_dir)
         exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
 
         mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs)
@@ -275,8 +280,6 @@
                              native_sysroot, pseudo):
         """
         Prepare content for a btrfs rootfs partition.
-
-        Currently handles ext2/3/4 and btrfs.
         """
         du_cmd = "du -ks %s" % rootfs_dir
         out = exec_cmd(du_cmd)
@@ -291,9 +294,9 @@
         if self.label:
             label_str = "-L %s" % self.label
 
-        mkfs_cmd = "mkfs.%s -b %d -r %s %s %s %s" % \
+        mkfs_cmd = "mkfs.%s -b %d -r %s %s %s -U %s %s" % \
             (self.fstype, rootfs_size * 1024, rootfs_dir, label_str,
-             self.mkfs_extraopts, rootfs)
+             self.mkfs_extraopts, self.fsuuid, rootfs)
         exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
 
     def prepare_rootfs_msdos(self, rootfs, oe_builddir, rootfs_dir,
@@ -317,8 +320,9 @@
 
         extraopts = self.mkfs_extraopts or '-S 512'
 
-        dosfs_cmd = "mkdosfs %s %s %s -C %s %d" % \
-                    (label_str, size_str, extraopts, rootfs, rootfs_size)
+        dosfs_cmd = "mkdosfs %s -i %s %s %s -C %s %d" % \
+                    (label_str, self.fsuuid, size_str, extraopts, rootfs,
+                     max(8250, rootfs_size))
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir)
@@ -354,8 +358,8 @@
         if self.label:
             label_str = "-L %s" % self.label
 
-        mkfs_cmd = "mkfs.%s -F %s %s %s" % \
-            (self.fstype, extraopts, label_str, rootfs)
+        mkfs_cmd = "mkfs.%s -F %s %s -U %s %s" % \
+            (self.fstype, extraopts, label_str, self.fsuuid, rootfs)
         exec_native_cmd(mkfs_cmd, native_sysroot)
 
     def prepare_empty_partition_btrfs(self, rootfs, oe_builddir,
@@ -371,8 +375,8 @@
         if self.label:
             label_str = "-L %s" % self.label
 
-        mkfs_cmd = "mkfs.%s -b %d %s %s %s" % \
-                   (self.fstype, self.size * 1024, label_str,
+        mkfs_cmd = "mkfs.%s -b %d %s -U %s %s %s" % \
+                   (self.fstype, self.size * 1024, label_str, self.fsuuid,
                     self.mkfs_extraopts, rootfs)
         exec_native_cmd(mkfs_cmd, native_sysroot)
 
@@ -393,8 +397,9 @@
 
         extraopts = self.mkfs_extraopts or '-S 512'
 
-        dosfs_cmd = "mkdosfs %s %s %s -C %s %d" % \
-                    (label_str, extraopts, size_str, rootfs, blocks)
+        dosfs_cmd = "mkdosfs %s -i %s %s %s -C %s %d" % \
+                    (label_str, self.fsuuid, extraopts, size_str, rootfs,
+                     blocks)
 
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
@@ -412,9 +417,9 @@
         with open(path, 'w') as sparse:
             os.ftruncate(sparse.fileno(), self.size * 1024)
 
-        import uuid
         label_str = ""
         if self.label:
             label_str = "-L %s" % self.label
-        mkswap_cmd = "mkswap %s -U %s %s" % (label_str, str(uuid.uuid1()), path)
+
+        mkswap_cmd = "mkswap %s -U %s %s" % (label_str, self.fsuuid, path)
         exec_native_cmd(mkswap_cmd, native_sysroot)
diff --git a/import-layers/yocto-poky/scripts/lib/wic/pluginbase.py b/import-layers/yocto-poky/scripts/lib/wic/pluginbase.py
index c009820..686d2fe 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/pluginbase.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/pluginbase.py
@@ -137,3 +137,13 @@
         'prepares' the partition to be incorporated into the image.
         """
         logger.debug("SourcePlugin: do_prepare_partition: part: %s", part)
+
+    @classmethod
+    def do_post_partition(cls, part, source_params, creator, cr_workdir,
+                             oe_builddir, bootimg_dir, kernel_dir, rootfs_dir,
+                             native_sysroot):
+        """
+        Called after the partition is created. It is useful to add post
+        operations e.g. security signing the partition.
+        """
+        logger.debug("SourcePlugin: do_post_partition: part: %s", part)
diff --git a/import-layers/yocto-poky/scripts/lib/wic/plugins/imager/direct.py b/import-layers/yocto-poky/scripts/lib/wic/plugins/imager/direct.py
index da1c061..1fa6b91 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/plugins/imager/direct.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/plugins/imager/direct.py
@@ -63,6 +63,7 @@
 
         # parse possible 'rootfs=name' items
         self.rootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' '))
+        self.replaced_rootfs_paths = {}
         self.bootimg_dir = bootimg_dir
         self.kernel_dir = kernel_dir
         self.native_sysroot = native_sysroot
@@ -141,7 +142,15 @@
                 continue
 
             if part.use_uuid:
-                device_name = "PARTUUID=%s" % part.uuid
+                if part.fsuuid:
+                    # FAT UUID is different from others
+                    if len(part.fsuuid) == 10:
+                        device_name = "UUID=%s-%s" % \
+                                       (part.fsuuid[2:6], part.fsuuid[6:])
+                    else:
+                        device_name = "UUID=%s" % part.fsuuid
+                else:
+                    device_name = "PARTUUID=%s" % part.uuid
             else:
                 # mmc device partitions are named mmcblk0p1, mmcblk0p2..
                 prefix = 'p' if  part.disk.startswith('mmcblk') else ''
@@ -175,6 +184,7 @@
             new_rootfs = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
         if new_rootfs:
             # rootfs was copied to update fstab
+            self.replaced_rootfs_paths[new_rootfs] = self.rootfs_dir['ROOTFS_DIR']
             self.rootfs_dir['ROOTFS_DIR'] = new_rootfs
 
         for part in self.parts:
@@ -250,7 +260,10 @@
                 suffix = ':'
             else:
                 suffix = '["%s"]:' % (part.mountpoint or part.label)
-            msg += '  ROOTFS_DIR%s%s\n' % (suffix.ljust(20), part.rootfs_dir)
+            rootdir = part.rootfs_dir
+            if rootdir in self.replaced_rootfs_paths:
+                rootdir = self.replaced_rootfs_paths[rootdir]
+            msg += '  ROOTFS_DIR%s%s\n' % (suffix.ljust(20), rootdir)
 
         msg += '  BOOTIMG_DIR:                  %s\n' % self.bootimg_dir
         msg += '  KERNEL_DIR:                   %s\n' % self.kernel_dir
@@ -334,13 +347,18 @@
                     continue
                 part.realnum = realnum
 
-        # generate parition UUIDs
+        # generate parition and filesystem UUIDs
         for part in self.partitions:
             if not part.uuid and part.use_uuid:
                 if self.ptable_format == 'gpt':
                     part.uuid = str(uuid.uuid4())
                 else: # msdos partition table
                     part.uuid = '%08x-%02d' % (self.identifier, part.realnum)
+            if not part.fsuuid:
+                if part.fstype == 'vfat' or part.fstype == 'msdos':
+                    part.fsuuid = '0x' + str(uuid.uuid4())[:8].upper()
+                else:
+                    part.fsuuid = str(uuid.uuid4())
 
     def prepare(self, imager):
         """Prepare an image. Call prepare method of all image partitions."""
diff --git a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py
index 4c4f36a..beb74d7 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -240,7 +240,8 @@
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot.img" % cr_workdir
 
-        dosfs_cmd = "mkdosfs -n efi -C %s %d" % (bootimg, blocks)
+        dosfs_cmd = "mkdosfs -n efi -i %s -C %s %d" % \
+                    (part.fsuuid, bootimg, blocks)
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
diff --git a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py
index 67e5498..b239fc0 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -129,4 +129,4 @@
 
         logger.debug('Prepare boot partition using rootfs in %s', hdddir)
         part.prepare_rootfs(cr_workdir, oe_builddir, hdddir,
-                            native_sysroot)
+                            native_sysroot, False)
diff --git a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 56da468..d599112 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -186,7 +186,8 @@
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot%s.img" % (cr_workdir, part.lineno)
 
-        dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (bootimg, blocks)
+        dosfs_cmd = "mkdosfs -n boot -i %s -S 512 -C %s %d" % \
+                    (part.fsuuid, bootimg, blocks)
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
diff --git a/import-layers/yocto-poky/scripts/oe-buildenv-internal b/import-layers/yocto-poky/scripts/oe-buildenv-internal
index 77f98a3..6773872 100755
--- a/import-layers/yocto-poky/scripts/oe-buildenv-internal
+++ b/import-layers/yocto-poky/scripts/oe-buildenv-internal
@@ -101,6 +101,7 @@
 
 if [ -z "$BITBAKEDIR" ]; then
     BITBAKEDIR="$OEROOT/bitbake$BBEXTRA"
+    test -d "$BITBAKEDIR" || BITBAKEDIR="$OEROOT/../bitbake$BBEXTRA"
 fi
 
 BITBAKEDIR=$(readlink -f "$BITBAKEDIR")
diff --git a/import-layers/yocto-poky/scripts/oe-depends-dot b/import-layers/yocto-poky/scripts/oe-depends-dot
new file mode 100755
index 0000000..5cec23b
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/oe-depends-dot
@@ -0,0 +1,121 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2018 Wind River Systems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+import os
+import sys
+import argparse
+import logging
+import re
+
+class Dot(object):
+    def __init__(self):
+        parser = argparse.ArgumentParser(
+            description="Analyse recipe-depends.dot generated by bitbake -g",
+            epilog="Use %(prog)s --help to get help")
+        parser.add_argument("dotfile",
+            help = "Specify the dotfile", nargs = 1, action='store', default='')
+        parser.add_argument("-k", "--key",
+            help = "Specify the key, e.g., recipe name",
+            action="store", default='')
+        parser.add_argument("-d", "--depends",
+            help = "Print the key's dependencies",
+            action="store_true", default=False)
+        parser.add_argument("-w", "--why",
+            help = "Print why the key is built",
+            action="store_true", default=False)
+        parser.add_argument("-r", "--remove",
+            help = "Remove duplicated dependencies to reduce the size of the dot files."
+                    " For example, A->B, B->C, A->C, then A->C can be removed.",
+            action="store_true", default=False)
+
+        self.args = parser.parse_args()
+
+        if len(sys.argv) != 3 and len(sys.argv) < 5:
+            print('ERROR: Not enough args, see --help for usage')
+
+    def main(self):
+        #print(self.args.dotfile[0])
+        # The format is {key: depends}
+        depends = {}
+        with open(self.args.dotfile[0], 'r') as f:
+            for line in f.readlines():
+                if ' -> ' not in line:
+                    continue
+                line_no_quotes = line.replace('"', '')
+                m = re.match("(.*) -> (.*)", line_no_quotes)
+                if not m:
+                    print('WARNING: Found unexpected line: %s' % line)
+                    continue
+                key = m.group(1)
+                if key == "meta-world-pkgdata":
+                    continue
+                dep = m.group(2)
+                if key in depends:
+                    if not key in depends[key]:
+                        depends[key].add(dep)
+                    else:
+                        print('WARNING: Fonud duplicated line: %s' % line)
+                else:
+                    depends[key] = set()
+                    depends[key].add(dep)
+
+        if self.args.remove:
+            reduced_depends = {}
+            for k, deps in depends.items():
+                child_deps = set()
+                added = set()
+                # Both direct and indirect depends are already in the dict, so
+                # we don't have to do this recursively.
+                for dep in deps:
+                    if dep in depends:
+                        child_deps |= depends[dep]
+
+                reduced_depends[k] = deps - child_deps
+                outfile= '%s-reduced%s' % (self.args.dotfile[0][:-4], self.args.dotfile[0][-4:])
+            with open(outfile, 'w') as f:
+                print('Saving reduced dot file to %s' % outfile)
+                f.write('digraph depends {\n')
+                for k, v in reduced_depends.items():
+                    for dep in v:
+                        f.write('"%s" -> "%s"\n' % (k, dep))
+                f.write('}\n')
+            sys.exit(0)
+
+        if self.args.key not in depends:
+            print("ERROR: Can't find key %s in %s" % (self.args.key, self.args.dotfile[0]))
+            sys.exit(1)
+
+        if self.args.depends:
+            if self.args.key in depends:
+                print('Depends: %s' % ' '.join(depends[self.args.key]))
+
+        reverse_deps = []
+        if self.args.why:
+            for k, v in depends.items():
+                if self.args.key in v and not k in reverse_deps:
+                    reverse_deps.append(k)
+            print('Because: %s' % ' '.join(reverse_deps))
+
+if __name__ == "__main__":
+    try:
+        dot = Dot()
+        ret = dot.main()
+    except Exception as esc:
+        ret = 1
+        import traceback
+        traceback.print_exc()
+    sys.exit(ret)
diff --git a/import-layers/yocto-poky/scripts/oe-pkgdata-util b/import-layers/yocto-poky/scripts/oe-pkgdata-util
index c6fba56..aea8a57 100755
--- a/import-layers/yocto-poky/scripts/oe-pkgdata-util
+++ b/import-layers/yocto-poky/scripts/oe-pkgdata-util
@@ -252,32 +252,72 @@
     print('\n'.join(items))
 
 def lookup_recipe(args):
+    def parse_pkgdatafile(pkgdatafile):
+        with open(pkgdatafile, 'r') as f:
+            found = False
+            for line in f:
+                if line.startswith('PN:'):
+                    print("%s" % line.split(':', 1)[1].strip())
+                    found = True
+                    break
+            if not found:
+                logger.error("Unable to find PN entry in %s" % pkgdatafile)
+                sys.exit(1)
+
     # Handle both multiple arguments and multiple values within an arg (old syntax)
     pkgs = []
     for pkgitem in args.pkg:
         pkgs.extend(pkgitem.split())
 
-    mappings = defaultdict(list)
     for pkg in pkgs:
-        pkgfile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg)
-        if os.path.exists(pkgfile):
-            with open(pkgfile, 'r') as f:
-                for line in f:
-                    fields = line.rstrip().split(': ')
-                    if fields[0] == 'PN':
-                        mappings[pkg].append(fields[1])
-                        break
-    if len(mappings) < len(pkgs):
-        missing = list(set(pkgs) - set(mappings.keys()))
-        logger.error("The following packages could not be found: %s" % ', '.join(missing))
-        sys.exit(1)
-
-    items = []
-    for pkg in pkgs:
-        items.extend(mappings.get(pkg, []))
-    print('\n'.join(items))
+        providepkgpath = os.path.join(args.pkgdata_dir, "runtime-rprovides", pkg)
+        if os.path.exists(providepkgpath):
+            for f in os.listdir(providepkgpath):
+                if f != pkg:
+                    print("%s is in the RPROVIDES of %s:" % (pkg, f))
+                pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", f)
+                parse_pkgdatafile(pkgdatafile)
+            break
+        pkgdatafile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg)
+        if not os.path.exists(pkgdatafile):
+            logger.error("The following packages could not be found: %s" % pkg)
+            sys.exit(1)
+        parse_pkgdatafile(pkgdatafile)
 
 def package_info(args):
+    def parse_pkgdatafile(pkgdatafile):
+        with open(pkgdatafile, 'r') as f:
+            pkge = ''
+            pkgr = ''
+            pe = ''
+            pr = ''
+            for line in f:
+                if line.startswith('PKGV:'):
+                    pkg_version = line.split(':', 1)[1].strip()
+                elif line.startswith('PKGE:'):
+                    pkge = line.split(':', 1)[1].strip()
+                elif line.startswith('PKGR:'):
+                    pkgr = line.split(':', 1)[1].strip()
+                elif line.startswith('PN:'):
+                    recipe = line.split(':', 1)[1].strip()
+                elif line.startswith('PV:'):
+                    recipe_version = line.split(':', 1)[1].strip()
+                elif line.startswith('PE:'):
+                    pe = line.split(':', 1)[1].strip()
+                elif line.startswith('PR:'):
+                    pr = line.split(':', 1)[1].strip()
+                elif line.startswith('PKGSIZE'):
+                    pkg_size = line.split(':', 1)[1].strip()
+            if pkge:
+                pkg_version = pkge + ":" + pkg_version
+            if pkgr:
+                pkg_version = pkg_version + "-" + pkgr
+            if pe:
+                recipe_version = pe + ":" + recipe_version
+            if pr:
+                recipe_version = recipe_version + "-" + pr
+            print("%s %s %s %s %s" % (pkg, pkg_version, recipe, recipe_version, pkg_size))
+
     # Handle both multiple arguments and multiple values within an arg (old syntax)
     packages = []
     if args.file:
@@ -293,51 +333,20 @@
             logger.error("No packages specified")
             sys.exit(1)
 
-    mappings = defaultdict(lambda: defaultdict(str))
     for pkg in packages:
-        pkgfile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg)
-        if os.path.exists(pkgfile):
-            with open(pkgfile, 'r') as f:
-                for line in f:
-                    fields = line.rstrip().split(': ')
-                    if fields[0].endswith("_" + pkg):
-                        k = fields[0][:len(fields[0]) - len(pkg) - 1]
-                    else:
-                        k = fields[0]
-                    v = fields[1] if len(fields) == 2 else ""
-                    mappings[pkg][k] = v
-
-    if len(mappings) < len(packages):
-        missing = list(set(packages) - set(mappings.keys()))
-        logger.error("The following packages could not be found: %s" %
-                     ', '.join(missing))
-        sys.exit(1)
-
-    items = []
-    for pkg in packages:
-        pkg_version = mappings[pkg]['PKGV']
-        if mappings[pkg]['PKGE']:
-            pkg_version = mappings[pkg]['PKGE'] + ":" + pkg_version
-        if mappings[pkg]['PKGR']:
-            pkg_version = pkg_version + "-" + mappings[pkg]['PKGR']
-        recipe = mappings[pkg]['PN']
-        recipe_version = mappings[pkg]['PV']
-        if mappings[pkg]['PE']:
-            recipe_version = mappings[pkg]['PE'] + ":" + recipe_version
-        if mappings[pkg]['PR']:
-            recipe_version = recipe_version + "-" + mappings[pkg]['PR']
-        pkg_size = mappings[pkg]['PKGSIZE']
-
-        line = "%s %s %s %s %s" % (pkg, pkg_version, recipe, recipe_version, pkg_size)
-
-        if args.extra:
-            for var in args.extra:
-                val = mappings[pkg][var].strip()
-                val = re.sub(r'\s+', ' ', val)
-                line += ' "%s"' % val
-
-        items.append(line)
-    print('\n'.join(items))
+        providepkgpath = os.path.join(args.pkgdata_dir, "runtime-rprovides", pkg)
+        if os.path.exists(providepkgpath):
+            for f in os.listdir(providepkgpath):
+                if f != pkg:
+                    print("%s is in the RPROVIDES of %s:" % (pkg, f))
+                pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", f)
+                parse_pkgdatafile(pkgdatafile)
+            break
+        pkgdatafile = os.path.join(args.pkgdata_dir, "runtime-reverse", pkg)
+        if not os.path.exists(pkgdatafile):
+            logger.error("Unable to find any built runtime package named %s" % pkg)
+            sys.exit(1)
+        parse_pkgdatafile(pkgdatafile)
 
 def get_recipe_pkgs(pkgdata_dir, recipe, unpackaged):
     recipedatafile = os.path.join(pkgdata_dir, recipe)
@@ -426,6 +435,26 @@
 
 def list_pkg_files(args):
     import json
+    def parse_pkgdatafile(pkgdatafile, long=False):
+        with open(pkgdatafile, 'r') as f:
+            found = False
+            for line in f:
+                if line.startswith('FILES_INFO:'):
+                    found = True
+                    val = line.split(':', 1)[1].strip()
+                    dictval = json.loads(val)
+                    if long:
+                        width = max(map(len, dictval), default=0)
+                        for fullpth in sorted(dictval):
+                            print("\t{:{width}}\t{}".format(fullpth, dictval[fullpth], width=width))
+                    else:
+                        for fullpth in sorted(dictval):
+                            print("\t%s" % fullpth)
+                    break
+            if not found:
+                logger.error("Unable to find FILES_INFO entry in %s" % pkgdatafile)
+                sys.exit(1)
+
 
     if args.recipe:
         if args.pkg:
@@ -455,25 +484,22 @@
                     continue
                 logger.error("Unable to find any built runtime package named %s" % pkg)
                 sys.exit(1)
+            parse_pkgdatafile(pkgdatafile, args.long)
+
         else:
+            providepkgpath = os.path.join(args.pkgdata_dir, "runtime-rprovides", pkg)
+            if os.path.exists(providepkgpath):
+                for f in os.listdir(providepkgpath):
+                    if f != pkg:
+                        print("%s is in the RPROVIDES of %s:" % (pkg, f))
+                    pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", f)
+                    parse_pkgdatafile(pkgdatafile, args.long)
+                continue
             pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", pkg)
             if not os.path.exists(pkgdatafile):
                 logger.error("Unable to find any built recipe-space package named %s" % pkg)
                 sys.exit(1)
-
-        with open(pkgdatafile, 'r') as f:
-            found = False
-            for line in f:
-                if line.startswith('FILES_INFO:'):
-                    found = True
-                    val = line.split(':', 1)[1].strip()
-                    dictval = json.loads(val)
-                    for fullpth in sorted(dictval):
-                        print("\t%s" % fullpth)
-                    break
-            if not found:
-                logger.error("Unable to find FILES_INFO entry in %s" % pkgdatafile)
-                sys.exit(1)
+            parse_pkgdatafile(pkgdatafile, args.long)
 
 def find_path(args):
     import json
@@ -527,6 +553,7 @@
     parser_list_pkg_files.add_argument('-r', '--runtime', help='Specified package(s) are runtime package names instead of recipe-space package names', action='store_true')
     parser_list_pkg_files.add_argument('-p', '--recipe', help='Report on all packages produced by the specified recipe')
     parser_list_pkg_files.add_argument('-u', '--unpackaged', help='Include unpackaged (i.e. empty) packages (only useful with -p/--recipe)', action='store_true')
+    parser_list_pkg_files.add_argument('-l', '--long', help='Show more information per file', action='store_true')
     parser_list_pkg_files.set_defaults(func=list_pkg_files)
 
     parser_lookup_recipe = subparsers.add_parser('lookup-recipe',
diff --git a/import-layers/yocto-poky/scripts/oe-setup-rpmrepo b/import-layers/yocto-poky/scripts/oe-setup-rpmrepo
deleted file mode 100755
index df1c614..0000000
--- a/import-layers/yocto-poky/scripts/oe-setup-rpmrepo
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/bash
-#
-# This utility setup the necessary metadata for an rpm repo
-#
-# Copyright (c) 2011 Intel Corp.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-# Don't use TMPDIR from the external environment, it may be a distro
-# variable pointing to /tmp (e.g. within X on OpenSUSE)
-# Instead, use OE_TMPDIR for passing this in externally.
-TMPDIR="$OE_TMPDIR"
-
-setup_tmpdir() {
-    if [ -z "$TMPDIR" ]; then
-        # Try to get TMPDIR from bitbake
-        type -P bitbake &>/dev/null || {
-            echo "In order for this script to dynamically infer paths";
-            echo "to kernels or filesystem images, you either need";
-            echo "bitbake in your PATH or to source oe-init-build-env";
-            echo "before running this script" >&2;
-            exit 1; }
-
-        # We have bitbake in PATH, get TMPDIR from bitbake
-        TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
-        if [ -z "$TMPDIR" ]; then
-            echo "Error: this script needs to be run from your build directory,"
-            echo "or you need to explicitly set TMPDIR in your environment"
-            exit 1
-        fi
-    fi
-}
-
-setup_tmpdir
-
-function usage() {
-    echo 'Usage: oe-setup-rpmrepo rpm-dir'
-    echo ''
-    echo 'OpenEmbedded setup-rpmrepo - setup rpm repository'
-    echo ''
-    echo 'arguments:'
-    echo "  rpm-dir               rpm repo directory, default is $TMPDIR/deploy/rpm"
-    echo ''
-}
-
-if [ $# -gt 1 -o "$1" = '--help' -o "$1" = '-h' ]; then
-    usage
-    exit 2
-fi
-
-setup_sysroot() {
-	# Toolchain installs set up $OECORE_NATIVE_SYSROOT in their
-	# environment script. If that variable isn't set, we're
-	# either in an in-tree poky scenario or the environment
-	# script wasn't source'd.
-	if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
-		setup_tmpdir
-		BUILD_ARCH=`uname -m`
-		BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
-		BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
-
-		OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS
-	fi 
-}
-
-setup_sysroot
-
-
-if [ -n "$1" ]; then
-	RPM_DIR="$1"
-else
-	RPM_DIR="$TMPDIR/deploy/rpm"
-fi
-
-if [ ! -d "$RPM_DIR" ]; then
-   	echo "Error: rpm dir $RPM_DIR doesn't exist"
-	exit 1
-fi
-
-CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo_c
-if [ ! -e "$CREATEREPO" ]; then
-   	echo "Error: can't find createrepo binary"
-	echo "please run bitbake createrepo-native first"
-	exit 1
-fi
-
-export PATH=${PATH}:${OECORE_NATIVE_SYSROOT}/usr/bin
-
-$CREATEREPO "$RPM_DIR"
-
-exit 0
diff --git a/import-layers/yocto-poky/scripts/postinst-intercepts/delay_to_first_boot b/import-layers/yocto-poky/scripts/postinst-intercepts/delay_to_first_boot
new file mode 100644
index 0000000..ecdbef9
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/postinst-intercepts/delay_to_first_boot
@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 1
diff --git a/import-layers/yocto-poky/scripts/runqemu b/import-layers/yocto-poky/scripts/runqemu
index 0ed1eec..d998494 100755
--- a/import-layers/yocto-poky/scripts/runqemu
+++ b/import-layers/yocto-poky/scripts/runqemu
@@ -69,6 +69,7 @@
 of the following environment variables (in any order):
   KERNEL - the kernel image file to use
   ROOTFS - the rootfs image file or nfsroot directory to use
+  DEVICE_TREE - the device tree blob to use
   MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
   Simplified QEMU command-line options can be passed with:
     nographic - disable video console
@@ -178,6 +179,7 @@
         self.env_vars = ('MACHINE',
                         'ROOTFS',
                         'KERNEL',
+                        'DEVICE_TREE',
                         'DEPLOY_DIR_IMAGE',
                         'OE_TMPDIR',
                         'OECORE_NATIVE_SYSROOT',
@@ -584,16 +586,20 @@
                 raise RunQemuError("Can't find OVMF firmware: %s" % ovmf)
 
     def check_kernel(self):
-        """Check and set kernel, dtb"""
+        """Check and set kernel"""
         # The vm image doesn't need a kernel
         if self.fstype in self.vmtypes:
             return
 
+        # See if the user supplied a KERNEL option
+        if self.get('KERNEL'):
+            self.kernel = self.get('KERNEL')
+
         # QB_DEFAULT_KERNEL is always a full file path
         kernel_name = os.path.basename(self.get('QB_DEFAULT_KERNEL'))
 
         # The user didn't want a kernel to be loaded
-        if kernel_name == "none":
+        if kernel_name == "none" and not self.kernel:
             return
 
         deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
@@ -609,8 +615,18 @@
         if not os.path.exists(self.kernel):
             raise RunQemuError("KERNEL %s not found" % self.kernel)
 
+    def check_dtb(self):
+        """Check and set dtb"""
+        # Did the user specify a device tree?
+        if self.get('DEVICE_TREE'):
+            self.dtb = self.get('DEVICE_TREE')
+            if not os.path.exists(self.dtb):
+                raise RunQemuError('Specified DTB not found: %s' % self.dtb)
+            return
+
         dtb = self.get('QB_DTB')
         if dtb:
+            deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
             cmd_match = "%s/%s" % (deploy_dir_image, dtb)
             cmd_startswith = "%s/%s*" % (deploy_dir_image, dtb)
             cmd_wild = "%s/*.dtb" % deploy_dir_image
@@ -679,6 +695,7 @@
         self.check_rootfs()
         self.check_ovmf()
         self.check_kernel()
+        self.check_dtb()
         self.check_biosdir()
         self.check_mem()
         self.check_tcpserial()
@@ -1089,6 +1106,10 @@
             qbsys = 'mipsel'
         elif mach == 'qemumips64el':
             qbsys = 'mips64el'
+        elif mach == 'qemuriscv64':
+            qbsys = 'riscv64'
+        elif mach == 'qemuriscv32':
+            qbsys = 'riscv32'
 
         return 'qemu-system-%s' % qbsys
 
diff --git a/import-layers/yocto-poky/scripts/test-dependencies.sh b/import-layers/yocto-poky/scripts/test-dependencies.sh
deleted file mode 100755
index 0b94de8..0000000
--- a/import-layers/yocto-poky/scripts/test-dependencies.sh
+++ /dev/null
@@ -1,286 +0,0 @@
-#!/bin/bash
-
-# Author: Martin Jansa <martin.jansa@gmail.com>
-#
-# Copyright (c) 2013 Martin Jansa <Martin.Jansa@gmail.com>
-
-# Used to detect missing dependencies or automagically
-# enabled dependencies which aren't explicitly enabled
-# or disabled. Using bash to have PIPESTATUS variable.
-
-# It does 3 builds of <target>
-# 1st to populate sstate-cache directory and sysroot
-# 2nd to rebuild each recipe with every possible
-#     dependency found in sysroot (which stays populated
-#     from 1st build
-# 3rd to rebuild each recipe only with dependencies defined
-#     in DEPENDS
-# 4th (optional) repeat build like 3rd to make sure that
-#     minimal versions of dependencies defined in DEPENDS
-#     is also enough
-
-# Global vars
-tmpdir=
-targets=
-recipes=
-buildhistory=
-buildtype=
-default_targets="world"
-default_buildhistory="buildhistory"
-default_buildtype="1 2 3 c"
-
-usage () {
-  cat << EOF
-Welcome to utility to detect missing or autoenabled dependencies.
-WARNING: this utility will completely remove your tmpdir (make sure
-         you don't have important buildhistory or persistent dir there).
-$0 <OPTION>
-
-Options:
-  -h, --help
-        Display this help and exit.
-
-  --tmpdir=<tmpdir>
-        Specify tmpdir, will use the environment variable TMPDIR if it is not specified.
-        Something like /OE/oe-core/tmp-eglibc (no / at the end).
-
-  --targets=<targets>
-        List of targets separated by space, will use the environment variable TARGETS if it is not specified.
-        It will run "bitbake <targets>" to populate sysroots.
-        Default value is "world".
-
-  --recipes=<recipes>
-        File with list of recipes we want to rebuild with minimal and maximal sysroot.
-        Will use the environment variable RECIPES if it is not specified.
-        Default value will use all packages ever recorded in buildhistory directory.
-
-  --buildhistory=<buildhistory>
-        Path to buildhistory directory, it needs to be enabled in your config,
-        because it's used to detect different dependencies and to create list
-        of recipes to rebuild when it's not specified.
-        Will use the environment variable BUILDHISTORY if it is not specified.
-        Default value is "buildhistory"
-
-  --buildtype=<buildtype>
-        There are 4 types of build:
-          1: build to populate sstate-cache directory and sysroot
-          2: build to rebuild each recipe with every possible dep
-          3: build to rebuild each recipe with minimal dependencies
-          4: build to rebuild each recipe again with minimal dependencies
-          c: compare buildhistory directories from build 2 and 3
-        Will use the environment variable BUILDTYPE if it is not specified.
-        Default value is "1 2 3 c", order is important, type 4 is optional.
-EOF
-}
-
-# Print error information and exit.
-echo_error () {
-  echo "ERROR: $1" >&2
-  exit 1
-}
-
-while [ -n "$1" ]; do
-  case $1 in
-    --tmpdir=*)
-      tmpdir=`echo $1 | sed -e 's#^--tmpdir=##' | xargs readlink -e`
-      [ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir"
-      shift
-        ;;
-    --targets=*)
-      targets=`echo $1 | sed -e 's#^--targets="*\([^"]*\)"*#\1#'`
-      shift
-        ;;
-    --recipes=*)
-      recipes=`echo $1 | sed -e 's#^--recipes="*\([^"]*\)"*#\1#'`
-      shift
-        ;;
-    --buildhistory=*)
-      buildhistory=`echo $1 | sed -e 's#^--buildhistory="*\([^"]*\)"*#\1#'`
-      shift
-        ;;
-    --buildtype=*)
-      buildtype=`echo $1 | sed -e 's#^--buildtype="*\([^"]*\)"*#\1#'`
-      shift
-        ;;
-    --help|-h)
-      usage
-      exit 0
-        ;;
-    *)
-      echo "Invalid arguments $*"
-      echo_error "Try '$0 -h' for more information."
-        ;;
-  esac
-done
-
-# tmpdir directory, use environment variable TMPDIR
-# if it was not specified, otherwise, error.
-[ -n "$tmpdir" ] || tmpdir=$TMPDIR
-[ -n "$tmpdir" ] || echo_error "No tmpdir found!"
-[ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\""
-[ -n "$targets" ] || targets=$TARGETS
-[ -n "$targets" ] || targets=$default_targets
-[ -n "$recipes" ] || recipes=$RECIPES
-[ -n "$recipes" -a ! -f "$recipes" ] && echo_error "Invalid file with list of recipes to rebuild"
-[ -n "$recipes" ] || echo "All packages ever recorded in buildhistory directory will be rebuilt"
-[ -n "$buildhistory" ] || buildhistory=$BUILDHISTORY
-[ -n "$buildhistory" ] || buildhistory=$default_buildhistory
-[ -d "$buildhistory" ] || echo_error "Invalid buildhistory directory \"$buildhistory\""
-[ -n "$buildtype" ] || buildtype=$BUILDTYPE
-[ -n "$buildtype" ] || buildtype=$default_buildtype
-echo "$buildtype" | grep -v '^[1234c ]*$' && echo_error "Invalid buildtype \"$buildtype\", only some combination of 1, 2, 3, 4, c separated by space is allowed"
-
-OUTPUT_BASE=test-dependencies/`date "+%s"`
-declare -i RESULT=0
-
-build_all() {
-  echo "===== 1st build to populate sstate-cache directory and sysroot ====="
-  OUTPUT1=${OUTPUT_BASE}/${TYPE}_all
-  mkdir -p ${OUTPUT1}
-  echo "Logs will be stored in ${OUTPUT1} directory"
-  bitbake -k $targets 2>&1 | tee -a ${OUTPUT1}/complete.log
-  RESULT+=${PIPESTATUS[0]}
-  grep "ERROR: Task.*failed" ${OUTPUT1}/complete.log > ${OUTPUT1}/failed-tasks.log
-  cat ${OUTPUT1}/failed-tasks.log | sed 's@.*/@@g; s@_.*@@g; s@\.bb, .*@@g; s@\.bb:.*@@g' | sort -u > ${OUTPUT1}/failed-recipes.log
-}
-
-build_every_recipe() {
-  if [ "${TYPE}" = "2" ] ; then
-    echo "===== 2nd build to rebuild each recipe with every possible dep ====="
-    OUTPUT_MAX=${OUTPUT_BASE}/${TYPE}_max
-    OUTPUTB=${OUTPUT_MAX}
-  else
-    echo "===== 3rd or 4th build to rebuild each recipe with minimal dependencies ====="
-    OUTPUT_MIN=${OUTPUT_BASE}/${TYPE}_min
-    OUTPUTB=${OUTPUT_MIN}
-  fi
-
-  mkdir -p ${OUTPUTB} ${OUTPUTB}/failed ${OUTPUTB}/ok
-  echo "Logs will be stored in ${OUTPUTB} directory"
-  if [ -z "$recipes" ]; then
-    ls -d $buildhistory/packages/*/* | xargs -n 1 basename | sort -u > ${OUTPUTB}/recipe.list
-    recipes=${OUTPUTB}/recipe.list
-  fi
-  if [ "${TYPE}" != "2" ] ; then
-    echo "!!!Removing tmpdir \"$tmpdir\"!!!"
-    rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null
-  fi
-  i=1
-  count=`cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u | wc -l`
-  for recipe in `cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u`; do
-    echo "Building recipe: ${recipe} ($i/$count)"
-    declare -i RECIPE_RESULT=0
-    bitbake -c cleansstate ${recipe} > ${OUTPUTB}/${recipe}.log 2>&1;
-    RECIPE_RESULT+=$?
-    bitbake ${recipe} >> ${OUTPUTB}/${recipe}.log 2>&1;
-    RECIPE_RESULT+=$?
-    if [ "${RECIPE_RESULT}" != "0" ] ; then
-      RESULT+=${RECIPE_RESULT}
-      mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/failed/
-      grep "ERROR: Task.*failed"  ${OUTPUTB}/failed/${recipe}.log | tee -a ${OUTPUTB}/failed-tasks.log
-      grep "ERROR: Task.*failed"  ${OUTPUTB}/failed/${recipe}.log | sed 's@.*/@@g; s@_.*@@g; s@\.bb, .*@@g; s@\.bb:.*@@g' >> ${OUTPUTB}/failed-recipes.log
-      # and append also ${recipe} in case the failed task was from some dependency
-      echo ${recipe} >> ${OUTPUTB}/failed-recipes.log
-    else
-      mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/ok/
-    fi
-    if [ "${TYPE}" != "2" ] ; then
-      rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null
-    fi
-    i=`expr $i + 1`
-  done
-  echo "Copying buildhistory/packages to ${OUTPUTB}"
-  cp -ra $buildhistory/packages ${OUTPUTB}
-  # This will be usefull to see which library is pulling new dependency
-  echo "Copying do_package logs to ${OUTPUTB}/do_package/"
-  mkdir ${OUTPUTB}/do_package
-  find $tmpdir/work/ -name log.do_package 2>/dev/null| while read f; do
-    # pn is 3 levels back, but we don't know if there is just one log per pn (only one arch and version)
-    # dest=`echo $f | sed 's#^.*/\([^/]*\)/\([^/]*\)/\([^/]*\)/log.do_package#\1#g'`
-    dest=`echo $f | sed "s#$tmpdir/work/##g; s#/#_#g"`
-    cp $f ${OUTPUTB}/do_package/$dest
-  done
-}
-
-compare_deps() {
-  # you can run just compare task with command like this
-  # OUTPUT_BASE=test-dependencies/1373140172 \
-  # OUTPUT_MAX=${OUTPUT_BASE}/2_max \
-  # OUTPUT_MIN=${OUTPUT_BASE}/3_min \
-  # openembedded-core/scripts/test-dependencies.sh --tmpdir=tmp-eglibc --targets=glib-2.0 --recipes=recipe_list --buildtype=c
-  echo "===== Compare dependencies recorded in \"${OUTPUT_MAX}\" and \"${OUTPUT_MIN}\" ====="
-  [ -n "${OUTPUTC}" ] || OUTPUTC=${OUTPUT_BASE}/comp
-  mkdir -p ${OUTPUTC}
-  OUTPUT_FILE=${OUTPUTC}/dependency-changes
-  echo "Differences will be stored in ${OUTPUT_FILE}, dot is shown for every 100 of checked packages"
-  echo > ${OUTPUT_FILE}
-
-  [ -d ${OUTPUT_MAX} ] || echo_error "Directory with output from build 2 \"${OUTPUT_MAX}\" does not exist"
-  [ -d ${OUTPUT_MIN} ] || echo_error "Directory with output from build 3 \"${OUTPUT_MIN}\" does not exist"
-  [ -d ${OUTPUT_MAX}/packages/ ] || echo_error "Directory with packages from build 2 \"${OUTPUT_MAX}/packages/\" does not exist"
-  [ -d ${OUTPUT_MIN}/packages/ ] || echo_error "Directory with packages from build 3 \"${OUTPUT_MIN}/packages/\" does not exist"
-  i=0
-  find ${OUTPUT_MAX}/packages/ -name latest | sed "s#${OUTPUT_MAX}/##g" | while read pkg; do
-    max_pkg=${OUTPUT_MAX}/${pkg}
-    min_pkg=${OUTPUT_MIN}/${pkg}
-    # pkg=packages/armv5te-oe-linux-gnueabi/libungif/libungif/latest
-    recipe=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\1#g'`
-    package=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\2#g'`
-    if [ ! -f "${min_pkg}" ] ; then
-      echo "ERROR: ${recipe}: ${package} package isn't created when building with minimal dependencies?" | tee -a ${OUTPUT_FILE}
-      echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
-      continue
-    fi
-    # strip version information in parenthesis
-    max_deps=`grep "^RDEPENDS = " ${max_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'`
-    min_deps=`grep "^RDEPENDS = " ${min_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'`
-    if [ "$i" = 100 ] ; then
-      echo -n "." # cheap progressbar
-      i=0
-    fi
-    if [ "${max_deps}" = "${min_deps}" ] ; then
-      # it's annoying long, but at least it's showing some progress, warnings are grepped at the end
-      echo "NOTE: ${recipe}: ${package} rdepends weren't changed" >> ${OUTPUT_FILE}
-    else
-      missing_deps=
-      for dep in ${max_deps}; do
-        if ! echo "${min_deps}" | grep -q " ${dep} " ; then
-          missing_deps="${missing_deps} ${dep}"
-          echo # to get rid of dots on last line
-          echo "WARN: ${recipe}: ${package} rdepends on ${dep}, but it isn't a build dependency?" | tee -a ${OUTPUT_FILE}
-        fi
-      done
-      if [ -n "${missing_deps}" ] ; then
-        echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
-      fi
-    fi
-    i=`expr $i + 1`
-  done
-  echo # to get rid of dots on last line
-  echo "Found differences: "
-  grep "^WARN: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.warn.log
-  echo "Found errors: "
-  grep "^ERROR: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.error.log
-  RESULT+=`cat ${OUTPUT_FILE}.warn.log | wc -l`
-  RESULT+=`cat ${OUTPUT_FILE}.error.log | wc -l`
-}
-
-for TYPE in $buildtype; do
-  case ${TYPE} in
-    1) build_all;;
-    2) build_every_recipe;;
-    3) build_every_recipe;;
-    4) build_every_recipe;;
-    c) compare_deps;;
-    *) echo_error "Invalid buildtype \"$TYPE\""
-  esac
-done
-
-cat ${OUTPUT_BASE}/*/failed-recipes.log | sort -u >> ${OUTPUT_BASE}/failed-recipes.log
-
-if [ "${RESULT}" != "0" ] ; then
-  echo "ERROR: ${RESULT} issues were found in these recipes: `cat ${OUTPUT_BASE}/failed-recipes.log | xargs`"
-fi
-
-echo "INFO: Output written in: ${OUTPUT_BASE}"
-exit ${RESULT}
diff --git a/import-layers/yocto-poky/scripts/verify-bashisms b/import-layers/yocto-poky/scripts/verify-bashisms
index dab64ef..a979bd2 100755
--- a/import-layers/yocto-poky/scripts/verify-bashisms
+++ b/import-layers/yocto-poky/scripts/verify-bashisms
@@ -89,7 +89,13 @@
     return tinfoil
 
 if __name__=='__main__':
-    import shutil
+    import argparse, shutil
+
+    parser = argparse.ArgumentParser(description='Bashim detector for shell fragments in recipes.')
+    parser.add_argument("recipes", metavar="RECIPE", nargs="*", help="recipes to check (if not specified, all will be checked)")
+    parser.add_argument("--verbose", default=False, action="store_true")
+    args = parser.parse_args()
+
     if shutil.which("checkbashisms.pl") is None:
         print("Cannot find checkbashisms.pl on $PATH, get it from https://anonscm.debian.org/cgit/collab-maint/devscripts.git/plain/scripts/checkbashisms.pl")
         sys.exit(1)
@@ -99,6 +105,8 @@
     # bitbake server is crucial, don't change it.
     def func(item):
         (filename, key, lineno), script = item
+        if args.verbose:
+            print("Scanning %s:%s" % (filename, key))
         return process(filename, key, lineno, script)
 
     import multiprocessing
@@ -110,9 +118,8 @@
     # recipecaches to handle multiconfig environments
     pkg_pn = tinfoil.cooker.recipecaches[""].pkg_pn
 
-    # TODO: use argparse and have --help
-    if len(sys.argv) > 1:
-        initial_pns = sys.argv[1:]
+    if args.recipes:
+        initial_pns = args.recipes
     else:
         initial_pns = sorted(pkg_pn)
 
diff --git a/import-layers/yocto-poky/scripts/wic b/import-layers/yocto-poky/scripts/wic
index 097084a..7392bc4 100755
--- a/import-layers/yocto-poky/scripts/wic
+++ b/import-layers/yocto-poky/scripts/wic
@@ -40,16 +40,29 @@
 from distutils import spawn
 
 # External modules
-scripts_path = os.path.abspath(os.path.dirname(__file__))
+scripts_path = os.path.dirname(os.path.realpath(__file__))
 lib_path = scripts_path + '/lib'
 sys.path.insert(0, lib_path)
-oe_lib_path = os.path.join(os.path.dirname(scripts_path), 'meta', 'lib')
-sys.path.insert(0, oe_lib_path)
+import scriptpath
+scriptpath.add_oe_lib_path()
+
+# Check whether wic is running within eSDK environment
+sdkroot = scripts_path
+if os.environ.get('SDKTARGETSYSROOT'):
+    while sdkroot != '' and sdkroot != os.sep:
+        if os.path.exists(os.path.join(sdkroot, '.devtoolbase')):
+            # Set BUILDDIR for wic to work within eSDK
+            os.environ['BUILDDIR'] = sdkroot
+            # .devtoolbase only exists within eSDK
+            # If found, initialize bitbake path for eSDK environment and append to PATH
+            sdkroot = os.path.join(os.path.dirname(scripts_path), 'bitbake', 'bin')
+            os.environ['PATH'] += ":" + sdkroot
+            break
+        sdkroot = os.path.dirname(sdkroot)
 
 bitbake_exe = spawn.find_executable('bitbake')
 if bitbake_exe:
-    bitbake_path = os.path.join(os.path.dirname(bitbake_exe), '../lib')
-    sys.path.insert(0, bitbake_path)
+    bitbake_path = scriptpath.add_bitbake_lib_path()
     from bb import cookerdata
     from bb.main import bitbake_main, BitBakeConfigParameters
 else:
diff --git a/import-layers/yocto-poky/scripts/yocto-bsp b/import-layers/yocto-poky/scripts/yocto-bsp
deleted file mode 100755
index 6fb1f41..0000000
--- a/import-layers/yocto-poky/scripts/yocto-bsp
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env python3
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# 'yocto-bsp' is the Yocto BSP Tool that helps users create a new
-# Yocto BSP.  Invoking it without any arguments will display help
-# screens for the 'yocto-bsp' command and list the available
-# 'yocto-bsp' subcommands.  Invoking a subcommand without any
-# arguments will likewise display help screens for the specified
-# subcommand.  Please use that interface for detailed help.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-import os
-import sys
-import argparse
-import logging
-
-scripts_path = os.path.dirname(os.path.realpath(__file__))
-sys.path.insert(0, scripts_path + '/lib')
-import argparse_oe
-
-from bsp.help import *
-from bsp.engine import *
-
-
-def do_create_bsp(args):
-    """
-    Command-line handling for BSP creation.  The real work is done by
-    bsp.engine.yocto_bsp_create()
-    """
-    if args.outdir:
-        bsp_output_dir = args.outdir
-    else:
-        bsp_output_dir = "meta-" + args.bspname
-
-    if args.git_check and not args.properties_file:
-        print("Checking basic git connectivity...")
-        if not verify_git_repo(GIT_CHECK_URI):
-            print("Couldn't verify git connectivity, exiting\n")
-            print("Details: couldn't access %s" % GIT_CHECK_URI)
-            print("         (this most likely indicates a network connectivity problem or")
-            print("         a misconfigured git intallation)")
-            sys.exit(1)
-        else:
-            print("Done.\n")
-
-    yocto_bsp_create(args.bspname, args.karch, scripts_path, bsp_output_dir, args.codedump, args.properties_file)
-
-
-def do_list_bsp(args):
-    """
-    Command-line handling for listing available BSP properties and
-    values.  The real work is done by bsp.engine.yocto_bsp_list()
-    """
-    yocto_bsp_list(args, scripts_path)
-
-def do_help_bsp(args):
-    """
-    Command-line help tool
-    """
-    help_text = command_help.get(args.subcommand)
-    pager = subprocess.Popen('less', stdin=subprocess.PIPE)
-    pager.communicate(bytes(help_text,'UTF-8'))
-
-command_help = {
-    "create": yocto_bsp_create_help,
-    "list":  yocto_bsp_list_help
-}
-
-
-def start_logging(loglevel):
-    logging.basicConfig(filename = 'yocto-bsp.log', filemode = 'w', level=loglevel)
-
-
-def main():
-    parser = argparse_oe.ArgumentParser(description='Create a customized Yocto BSP layer.',
-                      epilog="See '%(prog)s help <subcommand>' for more information on a specific command.")
-
-    parser.add_argument("-D", "--debug", action = "store_true",
-                      default = False, help = "output debug information")
-    subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>')
-    subparsers.required = True
-
-    create_parser = subparsers.add_parser('create', help='Create a new Yocto BSP',
-                                          description='Create a new Yocto BSP')
-    create_parser.add_argument('bspname', metavar='bsp-name', help='name for the new BSP')
-    create_parser.add_argument('karch', help='kernel architecture')
-    create_parser.add_argument("-o", "--outdir", help = "name of BSP dir to create")
-    create_parser.add_argument("-i", "--infile", dest = "properties_file",
-                      help = "name of file containing the values for BSP properties as a JSON file")
-    create_parser.add_argument("-c", "--codedump", action = "store_true", default = False,
-                      help = "dump the generated code to bspgen.out")
-    create_parser.add_argument("-s", "--skip-git-check", dest = "git_check", action = "store_false",
-                      default = True, help = "skip the git connectivity check")
-    create_parser.set_defaults(func=do_create_bsp)
-
-
-    list_parser = subparsers.add_parser('list', help='List available values for options and BSP properties')
-    list_parser.add_argument('karch', help='kernel architecture')
-    prop_group = list_parser.add_mutually_exclusive_group()
-    prop_group.add_argument("--properties", action = "store_true", default = False,
-                      help = "list all properties for the kernel architecture")
-    prop_group.add_argument("--property", help = "list available values for the property")
-    list_parser.add_argument("-o", "--outfile", dest = "properties_file",
-                      help = "dump the possible values for BSP properties to a JSON file")
-
-    list_parser.set_defaults(func=do_list_bsp)
-
-    help_parser = subparsers.add_parser('help',
-                      description='This command displays detailed help for the specified subcommand.')
-    help_parser.add_argument('subcommand', nargs='?')
-    help_parser.set_defaults(func=do_help_bsp)
-
-    args = parser.parse_args()
-
-    loglevel = logging.INFO
-    if args.debug:
-        loglevel = logging.DEBUG
-    start_logging(loglevel)
-
-    if args._subparser_name == "list":
-        if not args.karch == "karch" and not args.properties and not args.property:
-            print ("yocto-bsp list: error: one of the arguments --properties --property is required")
-            list_parser.print_help()
-
-    if args._subparser_name == "help":
-        if not args.subcommand:
-            parser.print_help()
-            return 0
-        elif not command_help.get(args.subcommand):
-            print ("yocto-bsp help: No manual entry for %s" % args.subcommand)
-            return 1
-
-    return args.func(args)
-
-if __name__ == "__main__":
-    try:
-        ret = main()
-    except Exception:
-        ret = 1
-        import traceback
-        traceback.print_exc()
-    sys.exit(ret)
diff --git a/import-layers/yocto-poky/scripts/yocto-kernel b/import-layers/yocto-poky/scripts/yocto-kernel
deleted file mode 100755
index 5c70d0c..0000000
--- a/import-layers/yocto-poky/scripts/yocto-kernel
+++ /dev/null
@@ -1,399 +0,0 @@
-#!/usr/bin/env python3
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# 'yocto-kernel' is the Yocto BSP Tool that helps users manage kernel
-# config options and patches for a Yocto BSP.  Invoking it without any
-# arguments will display help screens for the 'yocto-kernel' command
-# and list the available 'yocto-kernel' subcommands.  Invoking a
-# subcommand without any arguments will likewise display help screens
-# for the specified subcommand.  Please use that interface for
-# detailed help.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-__version__ = "0.1.0"
-
-import os
-import sys
-import optparse
-import logging
-
-scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])))
-lib_path = scripts_path + '/lib'
-sys.path = sys.path + [lib_path]
-
-from bsp.help import *
-from bsp.kernel import *
-
-
-def yocto_kernel_config_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing BSP config options.  The
-    real work is done by bsp.kernel.yocto_kernel_config_list().
-    """
-    logging.debug("yocto_kernel_config_list_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_config_list(scripts_path, args[0])
-
-
-def yocto_kernel_config_add_subcommand(args, usage_str):
-    """
-    Command-line handling for adding BSP config items.  The real work
-    is done by bsp.kernel.yocto_kernel_config_add().
-    """
-    logging.debug("yocto_kernel_config_add_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    machine = args.pop(0)
-    yocto_kernel_config_add(scripts_path, machine, args)
-
-
-def yocto_kernel_config_rm_subcommand(args, usage_str):
-    """
-    Command-line handling for removing BSP config items.  The real
-    work is done by bsp.kernel.yocto_kernel_config_rm().
-    """
-    logging.debug("yocto_kernel_config_rm_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_config_rm(scripts_path, args[0])
-
-
-def yocto_kernel_patch_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing BSP (SRC_URI patches.  The real
-    work is done by bsp.kernel.yocto_kernel_patch_list().
-    """
-    logging.debug("yocto_kernel_patch_list_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_patch_list(scripts_path, args[0])
-
-
-def yocto_kernel_patch_add_subcommand(args, usage_str):
-    """
-    Command-line handling for adding BSP patches.  The real work is
-    done by bsp.kernel.yocto_kernel_patch_add().
-    """
-    logging.debug("yocto_kernel_patch_add_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    machine = args.pop(0)
-    yocto_kernel_patch_add(scripts_path, machine, args)
-
-
-def yocto_kernel_patch_rm_subcommand(args, usage_str):
-    """
-    Command-line handling for removing BSP patches.  The real work is
-    done by bsp.kernel.yocto_kernel_patch_rm().
-    """
-    logging.debug("yocto_kernel_patch_rm_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_patch_rm(scripts_path, args[0])
-
-
-def yocto_kernel_feature_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing the BSP features that are being
-    used by the BSP.  The real work is done by
-    bsp.kernel.yocto_kernel_feature_list().
-    """
-    logging.debug("yocto_kernel_feature_list_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_feature_list(scripts_path, args[0])
-
-
-def yocto_kernel_feature_add_subcommand(args, usage_str):
-    """
-    Command-line handling for adding the use of kernel features to a
-    BSP.  The real work is done by bsp.kernel.yocto_kernel_feature_add().
-    """
-    logging.debug("yocto_kernel_feature_add_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    machine = args.pop(0)
-    yocto_kernel_feature_add(scripts_path, machine, args)
-
-
-def yocto_kernel_feature_rm_subcommand(args, usage_str):
-    """
-    Command-line handling for removing the use of kernel features from
-    a BSP.  The real work is done by bsp.kernel.yocto_kernel_feature_rm().
-    """
-    logging.debug("yocto_kernel_feature_rm_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_feature_rm(scripts_path, args[0])
-
-
-def yocto_kernel_available_features_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing all the kernel features
-    available for use in a BSP.  This includes the features present in
-    the meta branch(es) of the pointed-to repo(s) as well as the local
-    features added in recipe-space to the current BSP as well.  The
-    real work is done by bsp.kernel.yocto_kernel_available_features_list().
-    """
-    logging.debug("yocto_kernel_feature_available_features_list_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_available_features_list(scripts_path, args[0])
-
-
-def yocto_kernel_feature_describe_subcommand(args, usage_str):
-    """
-    Command-line handling for listing the description of a specific
-    kernel feature available for use in a BSP.  This includes the
-    features present in the meta branch(es) of the pointed-to repo(s)
-    as well as the local features added in recipe-space to the current
-    BSP as well.  The real work is done by
-    bsp.kernel.yocto_kernel_feature_describe().
-    """
-    logging.debug("yocto_kernel_feature_describe_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_feature_describe(scripts_path, args[0], args[1])
-
-
-def yocto_kernel_feature_create_subcommand(args, usage_str):
-    """
-    Command-line handling for creating a recipe-space kernel feature
-    in a BSP.  The real work is done by
-    bsp.kernel.yocto_kernel_feature_create().
-    """
-    logging.debug("yocto_kernel_feature_create_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 4:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    machine = args.pop(0)
-    yocto_kernel_feature_create(scripts_path, machine, args)
-
-
-def yocto_kernel_feature_destroy_subcommand(args, usage_str):
-    """
-    Command-line handling for removing a recipe-space kernel feature
-    from a BSP.  The real work is done by
-    bsp.kernel.yocto_kernel_feature_destroy().
-    """
-    logging.debug("yocto_kernel_feature_destroy_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_feature_destroy(scripts_path, args[0], args[1])
-
-
-subcommands = {
-    "config-list": [yocto_kernel_config_list_subcommand,
-                    yocto_kernel_config_list_usage,
-                    yocto_kernel_config_list_help],
-    "config-add": [yocto_kernel_config_add_subcommand,
-                   yocto_kernel_config_add_usage,
-                   yocto_kernel_config_add_help],
-    "config-rm": [yocto_kernel_config_rm_subcommand,
-                  yocto_kernel_config_rm_usage,
-                  yocto_kernel_config_rm_help],
-    "patch-list": [yocto_kernel_patch_list_subcommand,
-                   yocto_kernel_patch_list_usage,
-                   yocto_kernel_patch_list_help],
-    "patch-add": [yocto_kernel_patch_add_subcommand,
-                  yocto_kernel_patch_add_usage,
-                  yocto_kernel_patch_add_help],
-    "patch-rm": [yocto_kernel_patch_rm_subcommand,
-                 yocto_kernel_patch_rm_usage,
-                 yocto_kernel_patch_rm_help],
-    "feature-list": [yocto_kernel_feature_list_subcommand,
-                   yocto_kernel_feature_list_usage,
-                   yocto_kernel_feature_list_help],
-    "feature-add": [yocto_kernel_feature_add_subcommand,
-                  yocto_kernel_feature_add_usage,
-                  yocto_kernel_feature_add_help],
-    "feature-rm": [yocto_kernel_feature_rm_subcommand,
-                 yocto_kernel_feature_rm_usage,
-                 yocto_kernel_feature_rm_help],
-    "features-list": [yocto_kernel_available_features_list_subcommand,
-                 yocto_kernel_available_features_list_usage,
-                 yocto_kernel_available_features_list_help],
-    "feature-describe": [yocto_kernel_feature_describe_subcommand,
-                 yocto_kernel_feature_describe_usage,
-                 yocto_kernel_feature_describe_help],
-    "feature-create": [yocto_kernel_feature_create_subcommand,
-                 yocto_kernel_feature_create_usage,
-                 yocto_kernel_feature_create_help],
-    "feature-destroy": [yocto_kernel_feature_destroy_subcommand,
-                 yocto_kernel_feature_destroy_usage,
-                 yocto_kernel_feature_destroy_help],
-}
-
-
-def start_logging(loglevel):
-    logging.basicConfig(filename = 'yocto-kernel.log', filemode = 'w', level=loglevel)
-
-
-def main():
-    parser = optparse.OptionParser(version = "yocto-kernel version %s" % __version__,
-                                   usage = yocto_kernel_usage)
-
-    parser.disable_interspersed_args()
-    parser.add_option("-D", "--debug", dest = "debug", action = "store_true",
-                      default = False, help = "output debug information")
-
-    (options, args) = parser.parse_args()
-
-    loglevel = logging.INFO
-    if options.debug:
-        loglevel = logging.DEBUG
-    start_logging(loglevel)
-
-    if len(args):
-        if args[0] == "help":
-            if len(args) == 1:
-                parser.print_help()
-                sys.exit(1)
-            sc = 1
-        else:
-            sc = 0
-
-        if args[sc] == "config" or args[sc] == "patch" or \
-                args[sc] == "feature" or args[sc] == "features":
-            if len(args) < 2 + sc:
-                parser.print_help()
-                sys.exit(1)
-            args[sc] += "-" + args[sc + 1]
-            args.pop(sc + 1)
-
-    invoke_subcommand(args, parser, yocto_kernel_help_usage, subcommands)
-
-
-if __name__ == "__main__":
-    try:
-        ret = main()
-    except Exception:
-        ret = 1
-        import traceback
-        traceback.print_exc()
-    sys.exit(ret)
diff --git a/import-layers/yocto-poky/scripts/yocto-layer b/import-layers/yocto-poky/scripts/yocto-layer
deleted file mode 100755
index d58faca..0000000
--- a/import-layers/yocto-poky/scripts/yocto-layer
+++ /dev/null
@@ -1,151 +0,0 @@
-#!/usr/bin/env python3
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# 'yocto-layer' is the Yocto Tool that helps users create a new Yocto
-# layer.  Invoking it without any arguments will display help screens
-# for the 'yocto-layer' command and list the available 'yocto-layer'
-# subcommands.  Invoking a subcommand without any arguments will
-# likewise display help screens for the specified subcommand.  Please
-# use that interface for detailed help.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-__version__ = "0.1.0"
-
-import os
-import sys
-import optparse
-import logging
-
-scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])))
-lib_path = scripts_path + '/lib'
-sys.path = sys.path + [lib_path]
-
-from bsp.help import *
-from bsp.engine import *
-
-
-def yocto_layer_create_subcommand(args, usage_str):
-    """
-    Command-line handling for layer creation.  The real work is done by
-    bsp.engine.yocto_layer_create()
-    """
-    parser = optparse.OptionParser(usage = usage_str)
-
-    parser.add_option("-o", "--outdir", dest = "outdir", action = "store",
-                      help = "name of layer dir to create")
-    parser.add_option("-i", "--infile", dest = "properties_file", action = "store",
-                      help = "name of file containing the values for layer input properties as a JSON file")
-    parser.add_option("-c", "--codedump", dest = "codedump", action = "store_true",
-                      default = False, help = "dump the generated code to layergen.out")
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 1 or len(args) > 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    layer_name = args[0]
-    properties = ""
-
-    if len(args) == 2:
-        layer_priority = args[1]
-        properties = '{"layer_priority":"' + layer_priority + '"}'
-
-    if options.outdir:
-        layer_output_dir = options.outdir
-    else:
-        prefix="meta-"
-        if not layer_name.startswith(prefix):
-            layer_output_dir="%s%s"%(prefix,layer_name)
-        else:
-            layer_output_dir=layer_name
-
-    yocto_layer_create(layer_name, scripts_path, layer_output_dir, options.codedump, options.properties_file, properties)
-
-
-def yocto_layer_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing available layer properties and
-    values.  The real work is done by bsp.engine.yocto_layer_list()
-    """
-    parser = optparse.OptionParser(usage = usage_str)
-
-    parser.add_option("-o", "--outfile", action = "store", dest = "properties_file",
-                      help = "dump the possible values for layer properties to a JSON file")
-
-    (options, args) = parser.parse_args(args)
-
-    if not yocto_layer_list(args, scripts_path, options.properties_file):
-        logging.error("Bad list arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-
-subcommands = {
-    "create": [yocto_layer_create_subcommand,
-               yocto_layer_create_usage,
-               yocto_layer_create_help],
-    "list":   [yocto_layer_list_subcommand,
-               yocto_layer_list_usage,
-               yocto_layer_list_help],
-}
-
-
-def start_logging(loglevel):
-    logging.basicConfig(filename = 'yocto-layer.log', filemode = 'w', level=loglevel)
-
-
-def main():
-    parser = optparse.OptionParser(version = "yocto-layer version %s" % __version__,
-                                   usage = yocto_layer_usage)
-
-    parser.disable_interspersed_args()
-    parser.add_option("-D", "--debug", dest = "debug", action = "store_true",
-                      default = False, help = "output debug information")
-
-    (options, args) = parser.parse_args()
-
-    loglevel = logging.INFO
-    if options.debug:
-        loglevel = logging.DEBUG
-    start_logging(loglevel)
-
-    if len(args):
-        if args[0] == "help":
-            if len(args) == 1:
-                parser.print_help()
-                sys.exit(1)
-
-    invoke_subcommand(args, parser, yocto_layer_help_usage, subcommands)
-
-
-if __name__ == "__main__":
-    try:
-        ret = main()
-    except Exception:
-        ret = 1
-        import traceback
-        traceback.print_exc()
-    sys.exit(ret)
-