summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/scripts/lib/bsp
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/scripts/lib/bsp')
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/engine.py110
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/help.py18
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/kernel.py160
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc2
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend33
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.8.bbappend32
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf12
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc2
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend33
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.8.bbappend32
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc2
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend33
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.8.bbappend32
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc2
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend33
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.8.bbappend32
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc2
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend33
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.8.bbappend32
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc10
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg4
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend62
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.8.bbappend61
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc2
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall4
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend33
-rw-r--r--import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.8.bbappend32
33 files changed, 678 insertions, 189 deletions
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/engine.py b/import-layers/yocto-poky/scripts/lib/bsp/engine.py
index 66e2162ea..07a15bb90 100644
--- a/import-layers/yocto-poky/scripts/lib/bsp/engine.py
+++ b/import-layers/yocto-poky/scripts/lib/bsp/engine.py
@@ -34,23 +34,22 @@
import os
import sys
from abc import ABCMeta, abstractmethod
-from tags import *
+from .tags import *
import shlex
import json
import subprocess
import shutil
-class Line():
+class Line(metaclass=ABCMeta):
"""
Generic (abstract) container representing a line that will appear
in the BSP-generating program.
"""
- __metaclass__ = ABCMeta
def __init__(self, line):
self.line = line
self.generated_line = ""
- self.prio = sys.maxint
+ self.prio = sys.maxsize
self.discard = False
@abstractmethod
@@ -155,7 +154,7 @@ class InputLine(Line):
try:
self.prio = int(props["prio"])
except KeyError:
- self.prio = sys.maxint
+ self.prio = sys.maxsize
def gen(self, context = None):
try:
@@ -201,7 +200,7 @@ class EditBoxInputLine(InputLine):
msg += " [default: " + default_choice + "]"
- line = name + " = default(raw_input(\"" + msg + " \"), " + name + ")"
+ line = name + " = default(input(\"" + msg + " \"), " + name + ")"
return line
@@ -314,16 +313,15 @@ class BooleanInputLine(InputLine):
msg += " [default: " + default_choice + "]"
- line = name + " = boolean(raw_input(\"" + msg + " \"), " + name + ")"
+ line = name + " = boolean(input(\"" + msg + " \"), " + name + ")"
return line
-class ListInputLine(InputLine):
+class ListInputLine(InputLine, metaclass=ABCMeta):
"""
Base class for List-based Input lines. e.g. Choicelist, Checklist.
"""
- __metaclass__ = ABCMeta
def __init__(self, props, tag, lineno):
InputLine.__init__(self, props, tag, lineno)
@@ -464,9 +462,9 @@ class ListInputLine(InputLine):
choices_str = self.gen_choices_str(choicepairs)
choices_val_list = self.gen_choices_val_list(choicepairs)
if checklist:
- choiceval = default(find_choicevals(raw_input(msg + "\n" + choices_str), choices_val_list), default_choice)
+ choiceval = default(find_choicevals(input(msg + "\n" + choices_str), choices_val_list), default_choice)
else:
- choiceval = default(find_choiceval(raw_input(msg + "\n" + choices_str), choices_val_list), default_choice)
+ choiceval = default(find_choiceval(input(msg + "\n" + choices_str), choices_val_list), default_choice)
return choiceval
@@ -540,12 +538,12 @@ def get_verified_git_repo(input_str, name):
"""
msg = input_str.strip() + " "
- giturl = default(raw_input(msg), name)
+ giturl = default(input(msg), name)
while True:
if verify_git_repo(giturl):
return giturl
- giturl = default(raw_input(msg), name)
+ giturl = default(input(msg), name)
def get_verified_file(input_str, name, filename_can_be_null):
@@ -555,14 +553,14 @@ def get_verified_file(input_str, name, filename_can_be_null):
"""
msg = input_str.strip() + " "
- filename = default(raw_input(msg), name)
+ 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(raw_input(msg), name)
+ filename = default(input(msg), name)
def replace_file(replace_this, with_this):
@@ -1263,13 +1261,13 @@ def conditional_filename(filename):
return None
end = filename.find(CLOSE_TAG, opentag_start)
if end == -1:
- print "No close tag found for open tag in filename %s" % filename
+ 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
+ print("Only 'if' tags are allowed in file or directory names, filename: %s" % filename)
sys.exit(1)
return CodeLine(tag)
@@ -1286,7 +1284,7 @@ class InputLineGroup(InputLine):
def __init__(self, codeline):
InputLine.__init__(self, {}, "", 0)
self.group = []
- self.prio = sys.maxint
+ self.prio = sys.maxsize
self.group.append(codeline)
def append(self, line):
@@ -1364,7 +1362,7 @@ def run_program_lines(linelist, codedump):
of = open("bspgen.out", "w")
of.write(buf)
of.close()
- exec buf
+ exec(buf)
def gen_target(files, context = None):
@@ -1387,7 +1385,7 @@ 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.iteritems():
+ for name, val in properties.items():
program_line = name + " = \"" + val + "\""
program_lines.append(program_line)
@@ -1515,7 +1513,7 @@ def expand_targets(context, bsp_output_dir, expand_common=True):
arches = os.listdir(arch_path)
if arch not in arches or arch == "common":
- print "Invalid karch, exiting\n"
+ print("Invalid karch, exiting\n")
sys.exit(1)
target = os.path.join(arch_path, arch)
@@ -1541,7 +1539,7 @@ def yocto_common_create(machine, target, scripts_path, layer_output_dir, codedum
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
+ print("\nlayer output dir already exists, exiting. (%s)" % layer_output_dir)
sys.exit(1)
properties = None
@@ -1549,11 +1547,13 @@ def yocto_common_create(machine, target, scripts_path, layer_output_dir, codedum
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
+ 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)
-
- properties = json.load(infile)
if properties_str and not properties:
properties = json.loads(properties_str)
@@ -1597,8 +1597,8 @@ def yocto_layer_create(layer_name, scripts_path, layer_output_dir, codedump, pro
"""
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)
+ 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):
@@ -1616,21 +1616,21 @@ def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, prop
"""
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)
+ 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.iteritems():
- print " "*indent + "\"%s\" :" % key,
+ for key, val in items.items():
+ print(" "*indent + "\"%s\" :" % key)
if type(val) == dict:
- print "{"
+ print("{")
print_dict(val, indent + 1)
- print " "*indent + "}"
+ print(" "*indent + "}")
else:
- print "%s" % val
+ print("%s" % val)
def get_properties(input_lines):
@@ -1681,7 +1681,7 @@ def yocto_layer_list_properties(arch, scripts_path, properties_file, expand_comm
try:
of = open(properties_file, "w")
except IOError:
- print "Couldn't open properties file %s for writing, exiting" % properties_file
+ print("Couldn't open properties file %s for writing, exiting" % properties_file)
sys.exit(1)
json.dump(properties, of, indent=1)
@@ -1755,10 +1755,10 @@ def print_values(type, values_list):
"""
if type == "choicelist":
for value in values_list:
- print "[\"%s\", \"%s\"]" % (value[0], value[1])
+ print("[\"%s\", \"%s\"]" % (value[0], value[1]))
elif type == "boolean":
for value in values_list:
- print "[\"%s\", \"%s\"]" % (value[0], value[1])
+ print("[\"%s\", \"%s\"]" % (value[0], value[1]))
def yocto_layer_list_property_values(arch, property, scripts_path, properties_file, expand_common=True):
@@ -1789,7 +1789,7 @@ def yocto_layer_list_property_values(arch, property, scripts_path, properties_fi
input_line = find_input_line(property, input_lines)
if not input_line:
- print "Couldn't find values for property %s" % property
+ print("Couldn't find values for property %s" % property)
return
values_list = []
@@ -1818,7 +1818,7 @@ def yocto_layer_list_property_values(arch, property, scripts_path, properties_fi
try:
of = open(properties_file, "w")
except IOError:
- print "Couldn't open properties file %s for writing, exiting" % properties_file
+ print("Couldn't open properties file %s for writing, exiting" % properties_file)
sys.exit(1)
json.dump(values_list, of)
@@ -1826,44 +1826,28 @@ def yocto_layer_list_property_values(arch, property, scripts_path, properties_fi
print_values(type, values_list)
-def yocto_bsp_list(args, scripts_path, properties_file):
+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 len(args) < 1:
- return False
-
- if args[0] == "karch":
+ if args.karch == "karch":
lib_path = scripts_path + '/lib'
bsp_path = lib_path + '/bsp'
arch_path = bsp_path + '/substrate/target/arch'
- print "Architectures available:"
+ print("Architectures available:")
for arch in os.listdir(arch_path):
if arch == "common" or arch == "layer":
continue
- print " %s" % arch
- return True
- else:
- arch = args[0]
-
- if len(args) < 2 or len(args) > 3:
- return False
-
- if len(args) == 2:
- if args[1] == "properties":
- yocto_layer_list_properties(arch, scripts_path, properties_file)
- else:
- return False
+ print(" %s" % arch)
+ return
- if len(args) == 3:
- if args[1] == "property":
- yocto_layer_list_property_values(arch, args[2], scripts_path, properties_file)
- else:
- return False
+ 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)
- return True
def yocto_layer_list(args, scripts_path, properties_file):
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/help.py b/import-layers/yocto-poky/scripts/lib/bsp/help.py
index 85a09dd29..4f0d7721f 100644
--- a/import-layers/yocto-poky/scripts/lib/bsp/help.py
+++ b/import-layers/yocto-poky/scripts/lib/bsp/help.py
@@ -42,7 +42,7 @@ def display_help(subcommand, subcommands):
help = subcommands.get(subcommand, subcommand_error)[2]
pager = subprocess.Popen('less', stdin=subprocess.PIPE)
- pager.communicate(help)
+ pager.communicate(bytes(help, 'UTF-8'))
return True
@@ -183,9 +183,9 @@ DESCRIPTION
yocto_bsp_list_usage = """
usage: yocto-bsp list karch
- yocto-bsp list <karch> properties
+ yocto-bsp list <karch> --properties
[-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>]
- yocto-bsp list <karch> property <xxx>
+ 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
@@ -213,9 +213,9 @@ NAME
SYNOPSIS
yocto-bsp list karch
- yocto-bsp list <karch> properties
+ yocto-bsp list <karch> --properties
[--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
- yocto-bsp list <karch> property <xxx>
+ yocto-bsp list <karch> --property <xxx>
[--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
DESCRIPTION
@@ -246,9 +246,9 @@ DESCRIPTION
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:
+ 'list --properties' command:
- $ yocto-bsp list arm properties
+ $ yocto-bsp list arm --properties
"touchscreen" : {
"msg" : Does your BSP have a touchscreen? (y/N)
"default" : n
@@ -310,11 +310,11 @@ DESCRIPTION
name:value pairs corresponding to the array of property values
associated with the property.
- $ yocto-bsp list i386 property xserver_choice
+ $ 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
+ $ 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"]
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/kernel.py b/import-layers/yocto-poky/scripts/lib/bsp/kernel.py
index ba68b60fc..a3ee325a8 100644
--- a/import-layers/yocto-poky/scripts/lib/bsp/kernel.py
+++ b/import-layers/yocto-poky/scripts/lib/bsp/kernel.py
@@ -29,11 +29,10 @@
import sys
import os
import shutil
-from tags import *
+from .tags import *
import glob
import subprocess
-from engine import create_context
-
+from .engine import create_context
def find_bblayers():
"""
@@ -42,7 +41,7 @@ def find_bblayers():
try:
builddir = os.environ["BUILDDIR"]
except KeyError:
- print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)"
+ 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")
@@ -50,10 +49,10 @@ def find_bblayers():
bitbake_env_cmd = "bitbake -e"
bitbake_env_lines = subprocess.Popen(bitbake_env_cmd, shell=True,
- stdout=subprocess.PIPE).stdout.read()
+ stdout=subprocess.PIPE).stdout.read().decode('utf-8')
if not bitbake_env_lines:
- print "Couldn't get '%s' output, exiting." % bitbake_env_cmd
+ print("Couldn't get '%s' output, exiting." % bitbake_env_cmd)
sys.exit(1)
for line in bitbake_env_lines.split('\n'):
@@ -62,8 +61,7 @@ def find_bblayers():
break
if not bblayers:
- print "Couldn't find BBLAYERS in %s output, exiting." % \
- bitbake_env_cmd
+ print("Couldn't find BBLAYERS in %s output, exiting." % bitbake_env_cmd)
sys.exit(1)
raw_layers = bblayers.split()
@@ -110,8 +108,8 @@ def find_bsp_layer(machine):
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"
+ print("Unable to find the BSP layer for machine %s." % machine)
+ print("Please make sure it is listed in bblayers.conf")
sys.exit(1)
@@ -190,8 +188,8 @@ def yocto_kernel_config_list(scripts_path, machine):
"""
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)
+ 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):
@@ -202,9 +200,9 @@ def yocto_kernel_config_rm(scripts_path, machine):
"""
config_items = read_config_items(scripts_path, machine)
- print "Specify the kernel config items to remove:"
- input = raw_input(gen_choices_str(config_items))
- rm_choices = input.split()
+ print("Specify the kernel config items to remove:")
+ inp = input(gen_choices_str(config_items))
+ rm_choices = inp.split()
rm_choices.sort()
removed = []
@@ -213,18 +211,18 @@ def yocto_kernel_config_rm(scripts_path, machine):
try:
idx = int(choice) - 1
except ValueError:
- print "Invalid choice (%s), exiting" % choice
+ print("Invalid choice (%s), exiting" % choice)
sys.exit(1)
if idx < 0 or idx >= len(config_items):
- print "Invalid choice (%d), exiting" % (idx + 1)
+ 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:"
+ print("Removed items:")
for r in removed:
- print "\t%s" % r
+ print("\t%s" % r)
def yocto_kernel_config_add(scripts_path, machine, config_items):
@@ -239,7 +237,7 @@ def yocto_kernel_config_add(scripts_path, machine, config_items):
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
+ 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)
@@ -249,16 +247,16 @@ def yocto_kernel_config_add(scripts_path, machine, config_items):
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")
+ print("Added item%s:" % ("" if len(new_items)==1 else "s"))
for n in new_items:
- print "\t%s" % n
+ 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
+ print(output)
for n in dup_items:
- print "\t%s" % n
+ print("\t%s" % n)
def find_current_kernel(bsp_layer, machine):
"""
@@ -347,8 +345,8 @@ def yocto_kernel_patch_list(scripts_path, machine):
"""
patches = read_patch_items(scripts_path, machine)
- print "The current set of machine-specific patches for %s is:" % machine
- print gen_choices_str(patches)
+ 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):
@@ -358,26 +356,26 @@ def yocto_kernel_patch_rm(scripts_path, machine):
"""
patches = read_patch_items(scripts_path, machine)
- print "Specify the patches to remove:"
- input = raw_input(gen_choices_str(patches))
- rm_choices = input.split()
+ 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"
+ 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
+ print("Invalid choice (%s), exiting" % choice)
sys.exit(1)
if idx < 0 or idx >= len(patches):
- print "Invalid choice (%d), exiting" % (idx + 1)
+ print("Invalid choice (%d), exiting" % (idx + 1))
sys.exit(1)
filesdir_patch = os.path.join(filesdir, patches[idx])
if os.path.isfile(filesdir_patch):
@@ -387,9 +385,9 @@ def yocto_kernel_patch_rm(scripts_path, machine):
write_patch_items(scripts_path, machine, patches)
- print "Removed patches:"
+ print("Removed patches:")
for r in removed:
- print "\t%s" % r
+ print("\t%s" % r)
def yocto_kernel_patch_add(scripts_path, machine, patches):
@@ -401,19 +399,19 @@ def yocto_kernel_patch_add(scripts_path, machine, patches):
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)
+ 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)
+ 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
+ print("Couldn't find patch (%s), exiting" % patch)
sys.exit(1)
basename = os.path.basename(patch)
filesdir_patch = os.path.join(filesdir, basename)
@@ -424,9 +422,9 @@ def yocto_kernel_patch_add(scripts_path, machine, patches):
cur_items.extend(new_patches)
write_patch_items(scripts_path, machine, cur_items)
- print "Added patches:"
+ print("Added patches:")
for n in new_patches:
- print "\t%s" % n
+ print("\t%s" % n)
def inc_pr(line):
@@ -461,7 +459,7 @@ def kernel_contents_changed(scripts_path, machine):
kernel = find_current_kernel(layer, machine)
if not kernel:
- print "Couldn't determine the kernel for this BSP, exiting."
+ print("Couldn't determine the kernel for this BSP, exiting.")
sys.exit(1)
kernel_bbfile = os.path.join(layer, "recipes-kernel/linux/" + kernel + ".bbappend")
@@ -597,8 +595,8 @@ def yocto_kernel_feature_list(scripts_path, machine):
"""
features = read_features(scripts_path, machine)
- print "The current set of machine-specific features for %s is:" % machine
- print gen_choices_str(features)
+ 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):
@@ -609,9 +607,9 @@ def yocto_kernel_feature_rm(scripts_path, machine):
"""
features = read_features(scripts_path, machine)
- print "Specify the features to remove:"
- input = raw_input(gen_choices_str(features))
- rm_choices = input.split()
+ print("Specify the features to remove:")
+ inp = input(gen_choices_str(features))
+ rm_choices = inp.split()
rm_choices.sort()
removed = []
@@ -620,18 +618,18 @@ def yocto_kernel_feature_rm(scripts_path, machine):
try:
idx = int(choice) - 1
except ValueError:
- print "Invalid choice (%s), exiting" % choice
+ print("Invalid choice (%s), exiting" % choice)
sys.exit(1)
if idx < 0 or idx >= len(features):
- print "Invalid choice (%d), exiting" % (idx + 1)
+ print("Invalid choice (%d), exiting" % (idx + 1))
sys.exit(1)
removed.append(features.pop(idx))
write_features(scripts_path, machine, features)
- print "Removed features:"
+ print("Removed features:")
for r in removed:
- print "\t%s" % r
+ print("\t%s" % r)
def yocto_kernel_feature_add(scripts_path, machine, features):
@@ -643,7 +641,7 @@ def yocto_kernel_feature_add(scripts_path, machine, features):
for item in features:
if not item.endswith(".scc"):
- print "Invalid feature (%s), exiting" % item
+ print("Invalid feature (%s), exiting" % item)
sys.exit(1)
new_items.append(item)
@@ -652,9 +650,9 @@ def yocto_kernel_feature_add(scripts_path, machine, features):
write_features(scripts_path, machine, cur_items)
- print "Added features:"
+ print("Added features:")
for n in new_items:
- print "\t%s" % n
+ print("\t%s" % n)
def find_feature_url(git_url):
@@ -714,7 +712,7 @@ def print_feature_descs(layer, feature_dir):
feature_dir + "/" + file)
f = open(fullpath)
feature_desc = find_feature_desc(f.readlines())
- print feature_dir + "/" + file + ": " + feature_desc
+ print(feature_dir + "/" + file + ": " + feature_desc)
def yocto_kernel_available_features_list(scripts_path, machine):
@@ -725,7 +723,7 @@ def yocto_kernel_available_features_list(scripts_path, machine):
layer = find_bsp_layer(machine)
kernel = find_current_kernel(layer, machine)
if not kernel:
- print "Couldn't determine the kernel for this BSP, exiting."
+ print("Couldn't determine the kernel for this BSP, exiting.")
sys.exit(1)
context = create_context(machine, "arch", scripts_path)
@@ -735,9 +733,9 @@ def yocto_kernel_available_features_list(scripts_path, machine):
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()
+ 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
+ print("The current set of kernel features available to %s is:\n" % machine)
if tmp:
tmpline = tmp.split("\n")
@@ -754,9 +752,9 @@ def yocto_kernel_available_features_list(scripts_path, machine):
feature_type = feature_def[0].strip()
feature = feature_def[1].strip()
desc = get_feature_desc(giturl, feature)
- print "%s: %s" % (feature, desc)
+ print("%s: %s" % (feature, desc))
- print "[local]"
+ print("[local]")
print_feature_descs(layer, "cfg")
print_feature_descs(layer, "features")
@@ -786,7 +784,7 @@ def get_feature_desc(git_url, feature):
"""
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()
+ tmp = subprocess.Popen(feature_desc_cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
return find_feature_desc(tmp.split("\n"))
@@ -800,7 +798,7 @@ def yocto_kernel_feature_describe(scripts_path, machine, feature):
kernel = find_current_kernel(layer, machine)
if not kernel:
- print "Couldn't determine the kernel for this BSP, exiting."
+ print("Couldn't determine the kernel for this BSP, exiting.")
sys.exit(1)
context = create_context(machine, "arch", scripts_path)
@@ -810,7 +808,7 @@ def yocto_kernel_feature_describe(scripts_path, machine, feature):
desc = get_feature_desc(giturl, feature)
- print desc
+ print(desc)
def check_feature_name(feature_name):
@@ -818,11 +816,11 @@ 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
+ 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
+ print("Invalid feature name (don't specify directory) [%s], exiting" % feature_name)
return False
return True
@@ -836,11 +834,11 @@ def check_create_input(feature_items):
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]
+ 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]
+ print("Missing description and/or compatibility [%s], exiting" % feature_items[1])
return False
return True
@@ -868,7 +866,7 @@ def yocto_kernel_feature_create(scripts_path, machine, feature_items):
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
+ print("Invalid feature item (must be .patch or CONFIG_*) [%s], exiting" % item)
sys.exit(1)
feature_dirname = "cfg"
@@ -877,7 +875,7 @@ def yocto_kernel_feature_create(scripts_path, machine, feature_items):
filesdir = find_filesdir(scripts_path, machine)
if not filesdir:
- print "Couldn't add feature (%s), no 'files' dir found" % feature
+ print("Couldn't add feature (%s), no 'files' dir found" % feature)
sys.exit(1)
featdir = os.path.join(filesdir, feature_dirname)
@@ -886,7 +884,7 @@ def yocto_kernel_feature_create(scripts_path, machine, feature_items):
for patch in patches:
if not os.path.isfile(patch):
- print "Couldn't find patch (%s), exiting" % patch
+ print("Couldn't find patch (%s), exiting" % patch)
sys.exit(1)
basename = os.path.basename(patch)
featdir_patch = os.path.join(featdir, basename)
@@ -910,8 +908,8 @@ def yocto_kernel_feature_create(scripts_path, machine, feature_items):
new_feature_file.write("kconf non-hardware " + feature_basename + ".cfg\n")
new_feature_file.close()
- print "Added feature:"
- print "\t%s" % feature_dirname + "/" + feature
+ print("Added feature:")
+ print("\t%s" % feature_dirname + "/" + feature)
def feature_in_use(scripts_path, machine, feature):
@@ -949,18 +947,18 @@ def yocto_kernel_feature_destroy(scripts_path, machine, feature):
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
+ 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
+ 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
+ print("Couldn't find feature directory (%s)" % feature_dirname)
sys.exit(1)
feature_fqn = os.path.join(featdir, feature)
@@ -968,11 +966,11 @@ def yocto_kernel_feature_destroy(scripts_path, machine, feature):
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
+ 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
+ print("Couldn't find feature (%s)" % feature)
sys.exit(1)
f = open(feature_fqn, "r")
@@ -989,8 +987,8 @@ def yocto_kernel_feature_destroy(scripts_path, machine, feature):
feature_remove(scripts_path, machine, feature)
- print "Removed feature:"
- print "\t%s" % feature_dirname + "/" + feature
+ print("Removed feature:")
+ print("\t%s" % feature_dirname + "/" + feature)
def base_branches(context):
@@ -999,10 +997,10 @@ def base_branches(context):
"""
giturl = find_giturl(context)
- print "Getting branches from remote repo %s..." % giturl
+ 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()
+ tmp = subprocess.Popen(gitcmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
branches = []
@@ -1029,10 +1027,10 @@ def all_branches(context):
"""
giturl = find_giturl(context)
- print "Getting branches from remote repo %s..." % giturl
+ 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()
+ tmp = subprocess.Popen(gitcmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
branches = []
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
index 405972d98..8a881574d 100644
--- 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
@@ -3,7 +3,7 @@ define KMACHINE {{=machine}}
define KARCH arm
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
{{ if need_new_kbranch == "y": }}
define KTYPE {{=new_kbranch}}
branch {{=machine}}
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
index 00cf36042..0120ed055 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.8) 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.4"}}
+{{ 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.8"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
new file mode 100644
index 000000000..5fb45d9ab
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.8": }} 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}}-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.8"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.8.bbappend
new file mode 100644
index 000000000..7c0df8bcd
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.8.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.8": }} 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}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ 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_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.8"
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
index d5abe4f61..4745c1cc5 100644
--- 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
@@ -33,15 +33,7 @@ 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" and (kernel_choice == "linux-yocto_4.4" or kernel_choice == "linux-yocto_4.1"): }}
-{{ 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 == "custom": }}
+{{ 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" }}
@@ -49,7 +41,7 @@ MACHINE_FEATURES += "wifi efi pcbios"
{{ 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.4" and kernel_choice != "linux-yocto_4.1" and kernel_choice != "custom": xserver_choice = "xserver_i915" }}
+{{ 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} \
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
index 67a54be87..38d1ca558 100644
--- 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
@@ -3,7 +3,7 @@ define KMACHINE {{=machine}}
define KARCH i386
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
{{ if need_new_kbranch == "y": }}
define KTYPE {{=new_kbranch}}
branch {{=machine}}
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
index 00cf36042..0120ed055 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.8) 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.4"}}
+{{ 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.8"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
new file mode 100644
index 000000000..5fb45d9ab
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.8": }} 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}}-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.8"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.8.bbappend
new file mode 100644
index 000000000..137d8fa51
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.8.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.8": }} 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}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ 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_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.8"
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
index 7c9dc52d2..b34f3d352 100644
--- 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
@@ -3,7 +3,7 @@ define KMACHINE {{=machine}}
define KARCH mips
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
{{ if need_new_kbranch == "y": }}
define KTYPE {{=new_kbranch}}
branch {{=machine}}
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
index 00cf36042..0120ed055 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.8) 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.4"}}
+{{ 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.8"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
new file mode 100644
index 000000000..5fb45d9ab
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.8": }} 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}}-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.8"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.8.bbappend
new file mode 100644
index 000000000..7c0df8bcd
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.8.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.8": }} 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}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ 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_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.8"
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
index 7c9dc52d2..b34f3d352 100644
--- 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
@@ -3,7 +3,7 @@ define KMACHINE {{=machine}}
define KARCH mips
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
{{ if need_new_kbranch == "y": }}
define KTYPE {{=new_kbranch}}
branch {{=machine}}
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
index 00cf36042..0120ed055 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.8) 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.4"}}
+{{ 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.8"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
new file mode 100644
index 000000000..5fb45d9ab
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.8": }} 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}}-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.8"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.8.bbappend
new file mode 100644
index 000000000..accf9d5d8
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.8.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.8": }} 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}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ 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_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.8"
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
index 89b344fea..c166fcd3d 100644
--- 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
@@ -3,7 +3,7 @@ define KMACHINE {{=machine}}
define KARCH powerpc
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
{{ if need_new_kbranch == "y": }}
define KTYPE {{=new_kbranch}}
branch {{=machine}}
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
index 00cf36042..0120ed055 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.8) 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.4"}}
+{{ 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.8"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
new file mode 100644
index 000000000..5fb45d9ab
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.8": }} 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}}-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.8"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.8.bbappend
new file mode 100644
index 000000000..7c0df8bcd
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.8.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.8": }} 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}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ 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_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.8"
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
index 14554da28..43cf642d4 100644
--- 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
@@ -4,15 +4,15 @@ define KMACHINE {{=machine}}
define KARCH {{=qemuarch}}
{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
{{ if qemuarch == "arm": }}
-include bsp/arm-versatile-926ejs/arm-versatile-926ejs-standard
+include bsp/arm-versatile-926ejs/arm-versatile-926ejs-standard nopatch
{{ if qemuarch == "powerpc": }}
-include bsp/qemu-ppc32/qemu-ppc32-standard
+include bsp/qemu-ppc32/qemu-ppc32-standard nopatch
{{ if qemuarch == "mips": }}
-include bsp/mti-malta32/mti-malta32-be-standard
+include bsp/mti-malta32/mti-malta32-be-standard nopatch
{{ if qemuarch == "mips64": }}
-include bsp/mti-malta64/mti-malta64-be-standard
+include bsp/mti-malta64/mti-malta64-be-standard nopatch
{{ if need_new_kbranch == "y": }}
define KTYPE {{=new_kbranch}}
branch {{=machine}}
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
index d560784b5..3fa4ed0b7 100644
--- 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
@@ -1 +1,3 @@
-# yocto-bsp-filename {{=machine}}.cfg \ No newline at end of file
+# 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/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall
index 00cf36042..0120ed055 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.8) 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.4"}}
+{{ 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.8"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
new file mode 100644
index 000000000..c1635d6f6
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
@@ -0,0 +1,62 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.8": }} 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}}"
+
+{{ 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}}-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.8"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.8.bbappend
new file mode 100644
index 000000000..e8c3fc82e
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.8.bbappend
@@ -0,0 +1,61 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.8": }} 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}}"
+
+{{ 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}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ 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_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.8"
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
index 9c9cc9025..a2b291085 100644
--- 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
@@ -3,7 +3,7 @@ define KMACHINE {{=machine}}
define KARCH x86_64
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
+include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
{{ if need_new_kbranch == "y": }}
define KTYPE {{=new_kbranch}}
branch {{=machine}}
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
index 00cf36042..0120ed055 100644
--- 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
@@ -1,5 +1,5 @@
{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.8) 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.4"}}
+{{ 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.8"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
new file mode 100644
index 000000000..5fb45d9ab
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.8.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.8": }} 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}}-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.8"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.8.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.8.bbappend
new file mode 100644
index 000000000..7c0df8bcd
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.8.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.8": }} 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}}-standard.scc \
+ file://{{=machine}}-user-config.cfg \
+ 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_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.8"
OpenPOWER on IntegriCloud