2012-03-28 02:31:14 +00:00
|
|
|
# remove tasks that modify the source tree in case externalsrc is inherited
|
2015-02-19 16:39:55 +00:00
|
|
|
SRCTREECOVEREDTASKS += "do_kernel_link_vmlinux do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_shared_workdir do_fetch do_unpack do_patch"
|
2011-12-16 17:01:46 +00:00
|
|
|
|
2012-03-02 16:36:07 +00:00
|
|
|
# returns local (absolute) path names for all valid patches in the
|
|
|
|
# src_uri
|
2011-12-16 17:01:46 +00:00
|
|
|
def find_patches(d):
|
2012-07-11 17:33:43 +00:00
|
|
|
patches = src_patches(d)
|
|
|
|
patch_list=[]
|
|
|
|
for p in patches:
|
2013-09-01 07:52:40 +00:00
|
|
|
_, _, local, _, _, _ = bb.fetch.decodeurl(p)
|
2012-07-11 17:33:43 +00:00
|
|
|
patch_list.append(local)
|
2011-12-16 17:01:46 +00:00
|
|
|
|
2012-07-11 17:33:43 +00:00
|
|
|
return patch_list
|
2011-12-16 17:01:46 +00:00
|
|
|
|
2012-03-02 16:36:07 +00:00
|
|
|
# returns all the elements from the src uri that are .scc files
|
2012-02-01 14:25:03 +00:00
|
|
|
def find_sccs(d):
|
2012-07-11 17:33:43 +00:00
|
|
|
sources=src_patches(d, True)
|
|
|
|
sources_list=[]
|
|
|
|
for s in sources:
|
|
|
|
base, ext = os.path.splitext(os.path.basename(s))
|
2013-01-28 21:27:07 +00:00
|
|
|
if ext and ext in [".scc", ".cfg"]:
|
2012-07-11 17:33:43 +00:00
|
|
|
sources_list.append(s)
|
|
|
|
elif base and base in 'defconfig':
|
|
|
|
sources_list.append(s)
|
2012-02-01 14:25:03 +00:00
|
|
|
|
2012-07-11 17:33:43 +00:00
|
|
|
return sources_list
|
2012-02-01 14:25:03 +00:00
|
|
|
|
2013-01-23 20:21:52 +00:00
|
|
|
# check the SRC_URI for "kmeta" type'd git repositories. Return the name of
|
|
|
|
# the repository as it will be found in WORKDIR
|
|
|
|
def find_kernel_feature_dirs(d):
|
|
|
|
feature_dirs=[]
|
|
|
|
fetch = bb.fetch2.Fetch([], d)
|
|
|
|
for url in fetch.urls:
|
|
|
|
urldata = fetch.ud[url]
|
|
|
|
parm = urldata.parm
|
|
|
|
if "type" in parm:
|
|
|
|
type = parm["type"]
|
|
|
|
if "destsuffix" in parm:
|
|
|
|
destdir = parm["destsuffix"]
|
|
|
|
if type == "kmeta":
|
|
|
|
feature_dirs.append(destdir)
|
|
|
|
|
|
|
|
return feature_dirs
|
|
|
|
|
2013-01-28 18:07:06 +00:00
|
|
|
# find the master/machine source branch. In the same way that the fetcher proceses
|
|
|
|
# git repositories in the SRC_URI we take the first repo found, first branch.
|
2013-04-01 17:09:34 +00:00
|
|
|
def get_machine_branch(d, default):
|
2013-01-28 18:07:06 +00:00
|
|
|
fetch = bb.fetch2.Fetch([], d)
|
|
|
|
for url in fetch.urls:
|
|
|
|
urldata = fetch.ud[url]
|
|
|
|
parm = urldata.parm
|
|
|
|
if "branch" in parm:
|
|
|
|
branches = urldata.parm.get("branch").split(',')
|
|
|
|
return branches[0]
|
|
|
|
|
2013-04-01 17:09:34 +00:00
|
|
|
return default
|
2012-03-02 16:36:07 +00:00
|
|
|
|
2015-03-05 14:04:01 +00:00
|
|
|
do_kernel_metadata() {
|
2015-03-24 18:57:49 +00:00
|
|
|
set +e
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
cd ${S}
|
2012-07-07 02:47:27 +00:00
|
|
|
export KMETA=${KMETA}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
|
2011-11-21 20:59:01 +00:00
|
|
|
# if kernel tools are available in-tree, they are preferred
|
|
|
|
# and are placed on the path before any external tools. Unless
|
|
|
|
# the external tools flag is set, in that case we do nothing.
|
|
|
|
if [ -f "${S}/scripts/util/configme" ]; then
|
|
|
|
if [ -z "${EXTERNAL_KERNEL_TOOLS}" ]; then
|
|
|
|
PATH=${S}/scripts/util:${PATH}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-04-01 17:09:34 +00:00
|
|
|
machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
|
2014-03-18 02:28:03 +00:00
|
|
|
machine_srcrev="${SRCREV_machine}"
|
2014-03-19 02:50:26 +00:00
|
|
|
if [ -z "${machine_srcrev}" ]; then
|
|
|
|
# fallback to SRCREV if a non machine_meta tree is being built
|
|
|
|
machine_srcrev="${SRCREV}"
|
|
|
|
fi
|
2011-01-14 05:33:26 +00:00
|
|
|
|
2015-03-24 18:57:49 +00:00
|
|
|
# In a similar manner to the kernel itself:
|
|
|
|
#
|
|
|
|
# defconfig: $(obj)/conf
|
|
|
|
# ifeq ($(KBUILD_DEFCONFIG),)
|
|
|
|
# $< --defconfig $(Kconfig)
|
|
|
|
# else
|
|
|
|
# @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
|
|
|
|
# $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
|
|
|
|
# endif
|
|
|
|
#
|
|
|
|
# If a defconfig is specified via the KBUILD_DEFCONFIG variable, we copy it
|
|
|
|
# from the source tree, into a common location and normalized "defconfig" name,
|
|
|
|
# where the rest of the process will include and incoroporate it into the build
|
|
|
|
#
|
|
|
|
# If the fetcher has already placed a defconfig in WORKDIR (from the SRC_URI),
|
|
|
|
# we don't overwrite it, but instead warn the user that SRC_URI defconfigs take
|
|
|
|
# precendence.
|
|
|
|
#
|
|
|
|
if [ -n "${KBUILD_DEFCONFIG}" ]; then
|
|
|
|
if [ -f "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}" ]; then
|
|
|
|
if [ -f "${WORKDIR}/defconfig" ]; then
|
|
|
|
# If the two defconfigs are the same, leave the existing one in place
|
|
|
|
cmp "${WORKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}"
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
bbnote "defconfig detected in WORKDIR. ${KBUILD_DEFCONFIG} skipped"
|
|
|
|
else
|
|
|
|
cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
|
|
|
|
sccs="${WORKDIR}/defconfig"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
bbfatal "A KBUILD_DECONFIG '${KBUILD_DEFCONFIG}' was specified, but not present in the source tree"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-03-22 20:00:08 +00:00
|
|
|
# if we have a defined/set meta branch we should not be generating
|
|
|
|
# any meta data. The passed branch has what we need.
|
|
|
|
if [ -n "${KMETA}" ]; then
|
2012-08-22 04:42:05 +00:00
|
|
|
createme_flags="--disable-meta-gen --meta ${KMETA}"
|
2011-05-07 04:08:30 +00:00
|
|
|
fi
|
2012-08-22 04:42:05 +00:00
|
|
|
|
2015-03-05 14:04:01 +00:00
|
|
|
createme -v -v ${createme_flags} ${ARCH} ${machine_branch}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bbfatal "Could not create ${machine_branch}"
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
fi
|
|
|
|
|
2015-03-24 18:57:49 +00:00
|
|
|
sccs="$sccs ${@" ".join(find_sccs(d))}"
|
2012-04-13 20:55:44 +00:00
|
|
|
patches="${@" ".join(find_patches(d))}"
|
2013-01-23 20:21:52 +00:00
|
|
|
feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
|
2012-01-18 17:07:55 +00:00
|
|
|
|
2011-12-16 17:01:46 +00:00
|
|
|
# add any explicitly referenced features onto the end of the feature
|
|
|
|
# list that is passed to the kernel build scripts.
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
if [ -n "${KERNEL_FEATURES}" ]; then
|
2011-02-22 17:28:19 +00:00
|
|
|
for feat in ${KERNEL_FEATURES}; do
|
|
|
|
addon_features="$addon_features --feature $feat"
|
|
|
|
done
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
fi
|
2012-04-13 20:55:44 +00:00
|
|
|
|
2013-01-23 20:21:52 +00:00
|
|
|
# check for feature directories/repos/branches that were part of the
|
|
|
|
# SRC_URI. If they were supplied, we convert them into include directives
|
|
|
|
# for the update part of the process
|
|
|
|
if [ -n "${feat_dirs}" ]; then
|
|
|
|
for f in ${feat_dirs}; do
|
|
|
|
if [ -d "${WORKDIR}/$f/meta" ]; then
|
|
|
|
includes="$includes -I${WORKDIR}/$f/meta"
|
|
|
|
elif [ -d "${WORKDIR}/$f" ]; then
|
|
|
|
includes="$includes -I${WORKDIR}/$f"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2011-12-16 17:01:46 +00:00
|
|
|
# updates or generates the target description
|
2012-07-05 18:22:53 +00:00
|
|
|
updateme ${updateme_flags} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
|
2013-01-23 20:21:52 +00:00
|
|
|
${includes} ${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bbfatal "Could not update ${machine_branch}"
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
fi
|
2015-03-05 14:04:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_patch() {
|
|
|
|
cd ${S}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
|
|
|
|
# executes and modifies the source tree as required
|
2012-03-22 20:00:08 +00:00
|
|
|
patchme ${KMACHINE}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bberror "Could not apply patches for ${KMACHINE}."
|
|
|
|
bbfatal "Patch failures can be resolved in the devshell (bitbake -c devshell ${PN})"
|
2012-07-05 18:22:53 +00:00
|
|
|
fi
|
|
|
|
|
2014-03-18 02:28:03 +00:00
|
|
|
# check to see if the specified SRCREV is reachable from the final branch.
|
|
|
|
# if it wasn't something wrong has happened, and we should error.
|
|
|
|
if [ "${machine_srcrev}" != "AUTOINC" ]; then
|
2014-11-07 14:45:32 +00:00
|
|
|
if ! [ "$(git rev-parse --verify ${machine_srcrev}~0)" = "$(git merge-base ${machine_srcrev} HEAD)" ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bberror "SRCREV ${machine_srcrev} was specified, but is not reachable"
|
|
|
|
bbfatal "Check the BSP description for incorrect branch selection, or other errors."
|
2014-03-18 02:28:03 +00:00
|
|
|
fi
|
|
|
|
fi
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_kernel_checkout() {
|
linux-yocto: improve checkout error handling and reporting
The typical workflow for linux-yocto simply uses a remote
upstream repository (Whether it is mirrored or not), and in this
case there are no issues with consistency in the format of the
resository that is unpacked into the WORKDIR.
When working with a local linux-yocto repository for kernel
development the remote vs local branches is not always consistent
between repositories.
The suggested/documented workflow has always been to use a
bare clone of linux-yocto, and use a second working tree repository
for development. Changes flow from the working tree to the bare
clone and then into the working directory for build. A common
mistake that happens with this workflow is that the non-bare,
working repository is used instead of the bare clone version.
If a non-bare repository is reference by the SRC_URI, then the
branches that are fetched into WORKDIR are not consitent. If the
MACHINE and META branches are not present, cryptic build errors
will result.
To solve this problem, the checkout code has been changed in
several ways:
- works with a newly proposed 'bareclone' option to bitbake
- detects if a bareclone is present in WORKDIR or not and
adjustst the checkout accordingly.
- if a non-bare clone is detected, machine and meta branches
are checked. If they are not present, or can't be created
a clear error message is produced
- instead of manipulating the refs directly in the git tree,
local tracking branches are (quietly) created for remote
branches. Enabling a better workflow in the WORKDIR kernel
repository.
This has been tested with linux-yocto remote upstreams, local
bare and non-bare respositories. All builds succeed or fail
with clear error messages.
(From OE-Core rev: e3b6537cc7931636ab11ae6ed2c8fbaad9da91bc)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 01:58:47 +00:00
|
|
|
set +e
|
|
|
|
|
|
|
|
# A linux yocto SRC_URI should use the bareclone option. That
|
|
|
|
# ensures that all the branches are available in the WORKDIR version
|
2013-02-06 05:17:46 +00:00
|
|
|
# of the repository.
|
|
|
|
source_dir=`echo ${S} | sed 's%/$%%'`
|
|
|
|
source_workdir="${WORKDIR}/git"
|
2012-02-28 21:09:58 +00:00
|
|
|
if [ -d "${WORKDIR}/git/" ] && [ -d "${WORKDIR}/git/.git" ]; then
|
2013-02-06 05:17:46 +00:00
|
|
|
# case2: the repository is a non-bare clone
|
|
|
|
|
|
|
|
# if S is WORKDIR/git, then we shouldn't be moving or deleting the tree.
|
|
|
|
if [ "${source_dir}" != "${source_workdir}" ]; then
|
|
|
|
rm -rf ${S}
|
|
|
|
mv ${WORKDIR}/git ${S}
|
|
|
|
fi
|
linux-yocto: improve checkout error handling and reporting
The typical workflow for linux-yocto simply uses a remote
upstream repository (Whether it is mirrored or not), and in this
case there are no issues with consistency in the format of the
resository that is unpacked into the WORKDIR.
When working with a local linux-yocto repository for kernel
development the remote vs local branches is not always consistent
between repositories.
The suggested/documented workflow has always been to use a
bare clone of linux-yocto, and use a second working tree repository
for development. Changes flow from the working tree to the bare
clone and then into the working directory for build. A common
mistake that happens with this workflow is that the non-bare,
working repository is used instead of the bare clone version.
If a non-bare repository is reference by the SRC_URI, then the
branches that are fetched into WORKDIR are not consitent. If the
MACHINE and META branches are not present, cryptic build errors
will result.
To solve this problem, the checkout code has been changed in
several ways:
- works with a newly proposed 'bareclone' option to bitbake
- detects if a bareclone is present in WORKDIR or not and
adjustst the checkout accordingly.
- if a non-bare clone is detected, machine and meta branches
are checked. If they are not present, or can't be created
a clear error message is produced
- instead of manipulating the refs directly in the git tree,
local tracking branches are (quietly) created for remote
branches. Enabling a better workflow in the WORKDIR kernel
repository.
This has been tested with linux-yocto remote upstreams, local
bare and non-bare respositories. All builds succeed or fail
with clear error messages.
(From OE-Core rev: e3b6537cc7931636ab11ae6ed2c8fbaad9da91bc)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 01:58:47 +00:00
|
|
|
cd ${S}
|
2013-01-24 05:30:31 +00:00
|
|
|
elif [ -d "${WORKDIR}/git/" ] && [ ! -d "${WORKDIR}/git/.git" ]; then
|
2013-02-06 05:17:46 +00:00
|
|
|
# case2: the repository is a bare clone
|
|
|
|
|
|
|
|
# if S is WORKDIR/git, then we shouldn't be moving or deleting the tree.
|
|
|
|
if [ "${source_dir}" != "${source_workdir}" ]; then
|
|
|
|
rm -rf ${S}
|
|
|
|
mkdir -p ${S}/.git
|
|
|
|
mv ${WORKDIR}/git/* ${S}/.git
|
|
|
|
rm -rf ${WORKDIR}/git/
|
|
|
|
fi
|
2012-02-28 21:09:58 +00:00
|
|
|
cd ${S}
|
linux-yocto: improve checkout error handling and reporting
The typical workflow for linux-yocto simply uses a remote
upstream repository (Whether it is mirrored or not), and in this
case there are no issues with consistency in the format of the
resository that is unpacked into the WORKDIR.
When working with a local linux-yocto repository for kernel
development the remote vs local branches is not always consistent
between repositories.
The suggested/documented workflow has always been to use a
bare clone of linux-yocto, and use a second working tree repository
for development. Changes flow from the working tree to the bare
clone and then into the working directory for build. A common
mistake that happens with this workflow is that the non-bare,
working repository is used instead of the bare clone version.
If a non-bare repository is reference by the SRC_URI, then the
branches that are fetched into WORKDIR are not consitent. If the
MACHINE and META branches are not present, cryptic build errors
will result.
To solve this problem, the checkout code has been changed in
several ways:
- works with a newly proposed 'bareclone' option to bitbake
- detects if a bareclone is present in WORKDIR or not and
adjustst the checkout accordingly.
- if a non-bare clone is detected, machine and meta branches
are checked. If they are not present, or can't be created
a clear error message is produced
- instead of manipulating the refs directly in the git tree,
local tracking branches are (quietly) created for remote
branches. Enabling a better workflow in the WORKDIR kernel
repository.
This has been tested with linux-yocto remote upstreams, local
bare and non-bare respositories. All builds succeed or fail
with clear error messages.
(From OE-Core rev: e3b6537cc7931636ab11ae6ed2c8fbaad9da91bc)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 01:58:47 +00:00
|
|
|
git config core.bare false
|
2013-01-24 05:30:31 +00:00
|
|
|
else
|
2013-02-06 05:17:46 +00:00
|
|
|
# case 3: we have no git repository at all.
|
|
|
|
# To support low bandwidth options for building the kernel, we'll just
|
|
|
|
# convert the tree to a git repo and let the rest of the process work unchanged
|
2013-09-06 19:47:28 +00:00
|
|
|
|
|
|
|
# if ${S} hasn't been set to the proper subdirectory a default of "linux" is
|
|
|
|
# used, but we can't initialize that empty directory. So check it and throw a
|
|
|
|
# clear error
|
|
|
|
|
2013-01-24 05:30:31 +00:00
|
|
|
cd ${S}
|
2013-09-06 19:47:28 +00:00
|
|
|
if [ ! -f "Makefile" ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bberror "S is not set to the linux source directory. Check "
|
|
|
|
bbfatal "the recipe and set S to the proper extracted subdirectory"
|
2013-09-06 19:47:28 +00:00
|
|
|
fi
|
2014-11-22 04:51:58 +00:00
|
|
|
rm -f .gitignore
|
2013-01-24 05:30:31 +00:00
|
|
|
git init
|
|
|
|
git add .
|
|
|
|
git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
|
2014-11-22 04:51:58 +00:00
|
|
|
git clean -d -f
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
fi
|
linux-yocto: improve checkout error handling and reporting
The typical workflow for linux-yocto simply uses a remote
upstream repository (Whether it is mirrored or not), and in this
case there are no issues with consistency in the format of the
resository that is unpacked into the WORKDIR.
When working with a local linux-yocto repository for kernel
development the remote vs local branches is not always consistent
between repositories.
The suggested/documented workflow has always been to use a
bare clone of linux-yocto, and use a second working tree repository
for development. Changes flow from the working tree to the bare
clone and then into the working directory for build. A common
mistake that happens with this workflow is that the non-bare,
working repository is used instead of the bare clone version.
If a non-bare repository is reference by the SRC_URI, then the
branches that are fetched into WORKDIR are not consitent. If the
MACHINE and META branches are not present, cryptic build errors
will result.
To solve this problem, the checkout code has been changed in
several ways:
- works with a newly proposed 'bareclone' option to bitbake
- detects if a bareclone is present in WORKDIR or not and
adjustst the checkout accordingly.
- if a non-bare clone is detected, machine and meta branches
are checked. If they are not present, or can't be created
a clear error message is produced
- instead of manipulating the refs directly in the git tree,
local tracking branches are (quietly) created for remote
branches. Enabling a better workflow in the WORKDIR kernel
repository.
This has been tested with linux-yocto remote upstreams, local
bare and non-bare respositories. All builds succeed or fail
with clear error messages.
(From OE-Core rev: e3b6537cc7931636ab11ae6ed2c8fbaad9da91bc)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 01:58:47 +00:00
|
|
|
# end debare
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
|
2014-03-19 01:38:33 +00:00
|
|
|
# convert any remote branches to local tracking ones
|
|
|
|
for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
|
|
|
|
b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`;
|
|
|
|
git show-ref --quiet --verify -- "refs/heads/$b"
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
git branch $b $i > /dev/null
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2013-01-24 05:30:31 +00:00
|
|
|
# If KMETA is defined, the branch must exist, but a machine branch
|
|
|
|
# can be missing since it may be created later by the tools.
|
|
|
|
if [ -n "${KMETA}" ]; then
|
2014-03-19 01:38:33 +00:00
|
|
|
git show-ref --quiet --verify -- "refs/heads/${KMETA}"
|
|
|
|
if [ $? -eq 1 ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bberror "The branch '${KMETA}' is required and was not found"
|
|
|
|
bberror "Ensure that the SRC_URI points to a valid linux-yocto"
|
|
|
|
bbfatal "kernel repository"
|
2013-01-24 05:30:31 +00:00
|
|
|
fi
|
|
|
|
fi
|
2013-01-28 18:07:06 +00:00
|
|
|
|
2013-04-01 17:09:34 +00:00
|
|
|
|
2012-07-20 15:19:23 +00:00
|
|
|
# Create a working tree copy of the kernel by checking out a branch
|
2014-03-19 01:41:29 +00:00
|
|
|
machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
|
2013-01-28 18:07:06 +00:00
|
|
|
git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
|
2015-01-15 17:47:44 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
2014-12-01 17:20:30 +00:00
|
|
|
machine_branch="master"
|
2011-04-04 03:50:19 +00:00
|
|
|
fi
|
2014-03-19 01:41:29 +00:00
|
|
|
|
|
|
|
# checkout and clobber any unimportant files
|
|
|
|
git checkout -f ${machine_branch}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
}
|
|
|
|
do_kernel_checkout[dirs] = "${S}"
|
|
|
|
|
|
|
|
addtask kernel_checkout before do_patch after do_unpack
|
2015-03-05 14:04:01 +00:00
|
|
|
addtask kernel_metadata after do_validate_branches before do_patch
|
2015-03-27 15:21:00 +00:00
|
|
|
do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot"
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
|
2014-03-09 10:05:52 +00:00
|
|
|
do_kernel_configme[dirs] += "${S} ${B}"
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
do_kernel_configme() {
|
2014-08-21 15:14:35 +00:00
|
|
|
bbnote "kernel configme"
|
2012-07-07 02:47:27 +00:00
|
|
|
export KMETA=${KMETA}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
|
2014-04-24 18:09:39 +00:00
|
|
|
if [ -n "${KCONFIG_MODE}" ]; then
|
2011-11-15 21:10:06 +00:00
|
|
|
configmeflags=${KCONFIG_MODE}
|
|
|
|
else
|
|
|
|
# If a defconfig was passed, use =n as the baseline, which is achieved
|
|
|
|
# via --allnoconfig
|
|
|
|
if [ -f ${WORKDIR}/defconfig ]; then
|
|
|
|
configmeflags="--allnoconfig"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-08-02 19:09:50 +00:00
|
|
|
cd ${S}
|
2011-11-21 20:59:01 +00:00
|
|
|
PATH=${PATH}:${S}/scripts/util
|
2012-03-22 20:00:08 +00:00
|
|
|
configme ${configmeflags} --reconfig --output ${B} ${LINUX_KERNEL_TYPE} ${KMACHINE}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bbfatal "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
fi
|
2011-01-31 20:52:48 +00:00
|
|
|
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
echo "# Global settings from linux recipe" >> ${B}/.config
|
|
|
|
echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
|
|
|
|
}
|
|
|
|
|
2015-03-27 15:21:01 +00:00
|
|
|
addtask kernel_configme before do_configure after do_patch
|
2014-03-06 18:10:43 +00:00
|
|
|
|
2011-01-31 20:52:48 +00:00
|
|
|
python do_kernel_configcheck() {
|
2013-05-09 14:55:04 +00:00
|
|
|
import re, string, sys
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
|
2012-09-13 12:59:08 +00:00
|
|
|
# if KMETA isn't set globally by a recipe using this routine, we need to
|
|
|
|
# set the default to 'meta'. Otherwise, kconf_check is not passed a valid
|
|
|
|
# meta-series for processing
|
|
|
|
kmeta = d.getVar( "KMETA", True ) or "meta"
|
2013-08-23 18:08:16 +00:00
|
|
|
if not os.path.exists(kmeta):
|
|
|
|
kmeta = "." + kmeta
|
2012-09-13 12:59:08 +00:00
|
|
|
|
2011-12-21 20:00:02 +00:00
|
|
|
pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH', True), "${S}/scripts/util/")
|
2012-09-13 12:59:08 +00:00
|
|
|
cmd = d.expand("cd ${S}; kconf_check -config- %s/meta-series ${S} ${B}" % kmeta)
|
2013-05-09 14:55:04 +00:00
|
|
|
ret, result = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd))
|
2011-01-31 20:52:48 +00:00
|
|
|
|
2015-02-18 21:15:35 +00:00
|
|
|
config_check_visibility = int(d.getVar( "KCONF_AUDIT_LEVEL", True ) or 0)
|
2015-03-02 21:36:39 +00:00
|
|
|
bsp_check_visibility = int(d.getVar( "KCONF_BSP_AUDIT_LEVEL", True ) or 0)
|
2015-02-18 21:15:35 +00:00
|
|
|
|
|
|
|
# if config check visibility is non-zero, report dropped configuration values
|
|
|
|
mismatch_file = "${S}/" + kmeta + "/" + "mismatch.cfg"
|
|
|
|
if os.path.exists(mismatch_file):
|
|
|
|
if config_check_visibility:
|
|
|
|
with open (mismatch_file, "r") as myfile:
|
|
|
|
results = myfile.read()
|
|
|
|
bb.warn( "[kernel config]: specified values did not make it into the kernel's final configuration:\n\n%s" % results)
|
|
|
|
|
|
|
|
# if config check visibility is level 2 or higher, report non-hardware options
|
|
|
|
nonhw_file = "${S}/" + kmeta + "/" + "nonhw_report.cfg"
|
|
|
|
if os.path.exists(nonhw_file):
|
|
|
|
if config_check_visibility > 1:
|
|
|
|
with open (nonhw_file, "r") as myfile:
|
|
|
|
results = myfile.read()
|
|
|
|
bb.warn( "[kernel config]: BSP specified non-hw configuration:\n\n%s" % results)
|
2015-02-20 18:38:03 +00:00
|
|
|
|
|
|
|
bsp_desc = "${S}/" + kmeta + "/" + "top_tgt"
|
2015-03-02 21:36:39 +00:00
|
|
|
if os.path.exists(bsp_desc) and bsp_check_visibility > 1:
|
2015-02-20 18:38:03 +00:00
|
|
|
with open (bsp_desc, "r") as myfile:
|
2015-03-02 21:36:39 +00:00
|
|
|
bsp_tgt = myfile.read()
|
|
|
|
m = re.match("^(.*)scratch.obj(.*)$", bsp_tgt)
|
|
|
|
if not m is None:
|
|
|
|
bb.warn( "[kernel]: An auto generated BSP description was used, this normally indicates a misconfiguration.\n" +
|
|
|
|
"Check that your machine (%s) has an associated kernel description." % "${MACHINE}" )
|
2011-01-31 20:52:48 +00:00
|
|
|
}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
|
2012-07-20 15:19:23 +00:00
|
|
|
# Ensure that the branches (BSP and meta) are on the locations specified by
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
# their SRCREV values. If they are NOT on the right commits, the branches
|
2012-07-05 18:22:53 +00:00
|
|
|
# are corrected to the proper commit.
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
do_validate_branches() {
|
2014-03-19 01:16:10 +00:00
|
|
|
set +e
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
cd ${S}
|
2012-07-07 02:47:27 +00:00
|
|
|
export KMETA=${KMETA}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
|
2013-04-01 17:09:34 +00:00
|
|
|
machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
|
2014-03-17 14:59:16 +00:00
|
|
|
machine_srcrev="${SRCREV_machine}"
|
2013-01-28 18:07:06 +00:00
|
|
|
|
2012-03-22 20:00:08 +00:00
|
|
|
# if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to
|
|
|
|
# check and we can exit early
|
2014-03-19 02:50:26 +00:00
|
|
|
if [ "${machine_srcrev}" = "AUTOINC" ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bbnote "SRCREV validation is not required for AUTOREV"
|
2014-10-13 03:53:59 +00:00
|
|
|
elif [ "${machine_srcrev}" = "" ]; then
|
2014-11-22 04:51:58 +00:00
|
|
|
if [ "${SRCREV}" != "AUTOINC" ] && [ "${SRCREV}" != "INVALID" ]; then
|
2014-10-13 03:53:59 +00:00
|
|
|
# SRCREV_machine_<MACHINE> was not set. This means that a custom recipe
|
|
|
|
# that doesn't use the SRCREV_FORMAT "machine_meta" is being built. In
|
|
|
|
# this case, we need to reset to the give SRCREV before heading to patching
|
|
|
|
bbnote "custom recipe is being built, forcing SRCREV to ${SRCREV}"
|
|
|
|
force_srcrev="${SRCREV}"
|
|
|
|
fi
|
2014-03-19 01:34:40 +00:00
|
|
|
else
|
|
|
|
git cat-file -t ${machine_srcrev} > /dev/null
|
2014-09-26 19:04:31 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bberror "${machine_srcrev} is not a valid commit ID."
|
|
|
|
bbfatal "The kernel source tree may be out of sync"
|
2014-03-19 01:34:40 +00:00
|
|
|
fi
|
2014-03-19 02:50:26 +00:00
|
|
|
force_srcrev=${machine_srcrev}
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
fi
|
|
|
|
|
2014-02-21 05:01:00 +00:00
|
|
|
## KMETA branch validation.
|
2014-03-19 01:34:40 +00:00
|
|
|
target_meta_head="${SRCREV_meta}"
|
|
|
|
if [ "${target_meta_head}" = "AUTOINC" ] || [ "${target_meta_head}" = "" ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bbnote "SRCREV validation skipped for AUTOREV or empty meta branch"
|
2014-03-19 01:34:40 +00:00
|
|
|
else
|
|
|
|
meta_head=`git show-ref -s --heads ${KMETA}`
|
|
|
|
|
|
|
|
git cat-file -t ${target_meta_head} > /dev/null
|
|
|
|
if [ $? -ne 0 ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bberror "${target_meta_head} is not a valid commit ID"
|
|
|
|
bbfatal "The kernel source tree may be out of sync"
|
2014-03-19 01:34:40 +00:00
|
|
|
fi
|
2014-02-21 05:01:00 +00:00
|
|
|
if [ "$meta_head" != "$target_meta_head" ]; then
|
2014-08-21 15:14:35 +00:00
|
|
|
bbnote "Setting branch ${KMETA} to ${target_meta_head}"
|
2014-03-19 01:34:40 +00:00
|
|
|
git branch -m ${KMETA} ${KMETA}-orig
|
|
|
|
git checkout -q -b ${KMETA} ${target_meta_head}
|
|
|
|
if [ $? -ne 0 ];then
|
2014-08-21 15:14:35 +00:00
|
|
|
bbfatal "Could not checkout ${KMETA} branch from known hash ${target_meta_head}"
|
2012-03-22 20:00:08 +00:00
|
|
|
fi
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-03-19 01:16:10 +00:00
|
|
|
git checkout -q -f ${machine_branch}
|
2014-03-19 02:50:26 +00:00
|
|
|
if [ -n "${force_srcrev}" ]; then
|
|
|
|
# see if the branch we are about to patch has been properly reset to the defined
|
|
|
|
# SRCREV .. if not, we reset it.
|
|
|
|
branch_head=`git rev-parse HEAD`
|
|
|
|
if [ "${force_srcrev}" != "${branch_head}" ]; then
|
|
|
|
current_branch=`git rev-parse --abbrev-ref HEAD`
|
|
|
|
git branch "$current_branch-orig"
|
|
|
|
git reset --hard ${force_srcrev}
|
|
|
|
fi
|
|
|
|
fi
|
yocto-kernel: factor common routes, update to 2.6.37 and branch renaming
In order to extend and create more kernel recipes based on the
supported yocto kernel common routines need to be placed in
re-usable blocks.
To accomplish this meta/recipes-kernel/linux/linux-yocto_git.bb
is broken into three parts:
- meta/classes/kernel-yocto.bbclass: contains common routines
for checking out and configuring a yocto kernel git repository.
This should be inherited by recipes that need this functionality.
- meta/recipes-kernel/linux/linux-yocto.inc: Contains the machine
mappings, compatibility, build directives and common task
definitions for a yocto kernel based recipe. This inherits
kernel-yocto, and is the typical point of entry for other recipes.
- meta/recipes-kernel/linux/linuux-tools.inc: tasks and function definitions
for kernel recipes that want to build/export perf
It also updates the linux-yocto recipe to default to 2.6.37.
As part of the update to 2.6.37 the branch naming and conventions
have been modified to show inheritance, and be more generic.
For example:
master
meta
yocto/base
yocto/standard/arm_versatile_926ejs
yocto/standard/base
yocto/standard/beagleboard
yocto/standard/common_pc/atom-pc
yocto/standard/common_pc/base
yocto/standard/common_pc_64
yocto/standard/fsl-mpc8315e-rdb
yocto/standard/intel_atom_z530
yocto/standard/intel_core_qm57_pch
yocto/standard/mti_malta32_be
yocto/standard/preempt_rt/base
yocto/standard/preempt_rt/common_pc
yocto/standard/preempt_rt/common_pc_64
yocto/standard/preempt_rt/intel_atom_z530
yocto/standard/preempt_rt/intel_core_qm57_pch
yocto/standard/qemu_ppc32
yocto/standard/routerstationpro
In this structure:
master: tracks the mainline kernel
meta: meta information for the BSPs and kernel features
yocto/base: baseline kernel branch
yocto/standard/base: 'standard' kernel, contains features
and configs for all BSPs
yocto/standard/<machine>: represents a BSP with specific
features or configurations
The tools, tree and libc-headers have all been updated to
deal with this new structure. Also in addition to dealing with
the new structure, they continue to work with the existing
tree and will adapt at runtime to the differences.
The linux-yocto-stable_git.bb recipe continues to build the
2.6.34 based tree,and linux-yocto_git.bb builds 2.6.37. As
boards are enabled for the new kernel they will move from
-stable to the development kernel. As of now, only the
emulated targets have moved to 2.6.37-rcX
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-18 21:09:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Many scripts want to look in arch/$arch/boot for the bootable
|
|
|
|
# image. This poses a problem for vmlinux based booting. This
|
|
|
|
# task arranges to have vmlinux appear in the normalized directory
|
|
|
|
# location.
|
|
|
|
do_kernel_link_vmlinux() {
|
|
|
|
if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
|
|
|
|
mkdir ${B}/arch/${ARCH}/boot
|
|
|
|
fi
|
|
|
|
cd ${B}/arch/${ARCH}/boot
|
|
|
|
ln -sf ../../../vmlinux
|
|
|
|
}
|
|
|
|
|
2015-01-15 11:54:20 +00:00
|
|
|
OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT"
|
2013-01-18 05:19:28 +00:00
|
|
|
KBUILD_OUTPUT = "${B}"
|
2014-02-16 21:40:57 +00:00
|
|
|
|
2014-03-06 18:10:43 +00:00
|
|
|
python () {
|
|
|
|
# If diffconfig is available, ensure it runs after kernel_configme
|
|
|
|
if 'do_diffconfig' in d:
|
|
|
|
bb.build.addtask('do_diffconfig', None, 'do_kernel_configme', d)
|
|
|
|
}
|