summaryrefslogtreecommitdiffstats
path: root/scripts/lib/bsp/substrate/target/arch/common
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/bsp/substrate/target/arch/common')
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT17
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/README118
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/README.sources17
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore0
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf10
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig5
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend2
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall26
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb58
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall1
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig5
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg9
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc9
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg4
-rw-r--r--scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc18
16 files changed, 300 insertions, 0 deletions
diff --git a/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT b/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT
new file mode 100644
index 0000000000..fb950dc69f
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT
@@ -0,0 +1,17 @@
1Permission is hereby granted, free of charge, to any person obtaining a copy
2of this software and associated documentation files (the "Software"), to deal
3in the Software without restriction, including without limitation the rights
4to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5copies of the Software, and to permit persons to whom the Software is
6furnished to do so, subject to the following conditions:
7
8The above copyright notice and this permission notice shall be included in
9all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17THE SOFTWARE.
diff --git a/scripts/lib/bsp/substrate/target/arch/common/README b/scripts/lib/bsp/substrate/target/arch/common/README
new file mode 100644
index 0000000000..928659f302
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/README
@@ -0,0 +1,118 @@
1This README file contains information on building the meta-{{=machine}}
2BSP layer, and booting the images contained in the /binary directory.
3Please see the corresponding sections below for details.
4
5
6Dependencies
7============
8
9This layer depends on:
10
11 URI: git://git.openembedded.org/bitbake
12 branch: master
13
14 URI: git://git.openembedded.org/openembedded-core
15 layers: meta
16 branch: master
17
18 URI: git://git.yoctoproject.org/xxxx
19 layers: xxxx
20 branch: master
21
22
23Patches
24=======
25
26Please submit any patches against this BSP to the Yocto mailing list
27(yocto@yoctoproject.org) and cc: the maintainer:
28
29Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
30
31Please see the meta-xxxx/MAINTAINERS file for more details.
32
33
34Table of Contents
35=================
36
37 I. Building the meta-{{=machine}} BSP layer
38 II. Booting the images in /binary
39
40
41I. Building the meta-{{=machine}} BSP layer
42========================================
43
44--- replace with specific instructions for your layer ---
45
46In order to build an image with BSP support for a given release, you
47need to download the corresponding BSP tarball from the 'Board Support
48Package (BSP) Downloads' page of the Yocto Project website.
49
50Having done that, and assuming you extracted the BSP tarball contents
51at the top-level of your yocto build tree, you can build a
52{{=machine}} image by adding the location of the meta-{{=machine}}
53layer to bblayers.conf, along with any other layers needed (to access
54common metadata shared between BSPs) e.g.:
55
56 yocto/meta-xxxx \
57 yocto/meta-xxxx/meta-{{=machine}} \
58
59To enable the {{=machine}} layer, add the {{=machine}} MACHINE to local.conf:
60
61 MACHINE ?= "{{=machine}}"
62
63You should then be able to build a {{=machine}} image as such:
64
65 $ source oe-init-build-env
66 $ bitbake core-image-sato
67
68At the end of a successful build, you should have a live image that
69you can boot from a USB flash drive (see instructions on how to do
70that below, in the section 'Booting the images from /binary').
71
72As an alternative to downloading the BSP tarball, you can also work
73directly from the meta-xxxx git repository. For each BSP in the
74'meta-xxxx' repository, there are multiple branches, one corresponding
75to each major release starting with 'laverne' (0.90), in addition to
76the latest code which tracks the current master (note that not all
77BSPs are present in every release). Instead of extracting a BSP
78tarball at the top level of your yocto build tree, you can
79equivalently check out the appropriate branch from the meta-xxxx
80repository at the same location.
81
82
83II. Booting the images in /binary
84=================================
85
86--- replace with specific instructions for your platform ---
87
88This BSP contains bootable live images, which can be used to directly
89boot Yocto off of a USB flash drive.
90
91Under Linux, insert a USB flash drive. Assuming the USB flash drive
92takes device /dev/sdf, use dd to copy the live image to it. For
93example:
94
95# dd if=core-image-sato-{{=machine}}-20101207053738.hddimg of=/dev/sdf
96# sync
97# eject /dev/sdf
98
99This should give you a bootable USB flash device. Insert the device
100into a bootable USB socket on the target, and power on. This should
101result in a system booted to the Sato graphical desktop.
102
103If you want a terminal, use the arrows at the top of the UI to move to
104different pages of available applications, one of which is named
105'Terminal'. Clicking that should give you a root terminal.
106
107If you want to ssh into the system, you can use the root terminal to
108ifconfig the IP address and use that to ssh in. The root password is
109empty, so to log in type 'root' for the user name and hit 'Enter' at
110the Password prompt: and you should be in.
111
112----
113
114If you find you're getting corrupt images on the USB (it doesn't show
115the syslinux boot: prompt, or the boot: prompt contains strange
116characters), try doing this first:
117
118# dd if=/dev/zero of=/dev/sdf bs=1M count=512
diff --git a/scripts/lib/bsp/substrate/target/arch/common/README.sources b/scripts/lib/bsp/substrate/target/arch/common/README.sources
new file mode 100644
index 0000000000..3c4cb7b435
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/README.sources
@@ -0,0 +1,17 @@
1The sources for the packages comprising the images shipped with this
2BSP can be found at the following location:
3
4http://downloads.yoctoproject.org/mirror/sources/
5
6The metadata used to generate the images shipped with this BSP, in
7addition to the code contained in this BSP, can be found at the
8following location:
9
10http://www.yoctoproject.org/downloads/yocto-1.1/poky-edison-6.0.tar.bz2
11
12The metadata used to generate the images shipped with this BSP, in
13addition to the code contained in this BSP, can also be found at the
14following locations:
15
16git://git.yoctoproject.org/poky.git
17git://git.yoctoproject.org/meta-xxxx
diff --git a/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore b/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore
diff --git a/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf b/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf
new file mode 100644
index 0000000000..5529f45954
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf
@@ -0,0 +1,10 @@
1# We have a conf and classes directory, add to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have a recipes-* directories, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
6 ${LAYERDIR}/recipes-*/*/*.bbappend"
7
8BBFILE_COLLECTIONS += "{{=machine}}"
9BBFILE_PATTERN_{{=machine}} = "^${LAYERDIR}/"
10BBFILE_PRIORITY_{{=machine}} = "6"
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall
new file mode 100644
index 0000000000..b442d02d57
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall
@@ -0,0 +1 @@
# yocto-bsp-dirname {{=machine}}
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig
new file mode 100644
index 0000000000..3b85d3821f
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig
@@ -0,0 +1,5 @@
1# Assume a USB mouse and keyboard are connected
2{{ input type:"boolean" name:"touchscreen" msg:"Does your BSP have a touchscreen? (y/n)" default:"n" }}
3HAVE_TOUCHSCREEN={{=touchscreen}}
4{{ input type:"boolean" name:"keyboard" msg:"Does your BSP have a keyboard? (y/n)" default:"y" }}
5HAVE_KEYBOARD={{=keyboard}}
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend
new file mode 100644
index 0000000000..6d4804d127
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend
@@ -0,0 +1,2 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall
new file mode 100644
index 0000000000..03b7d84ec2
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall
@@ -0,0 +1,26 @@
1{{ if kernel_choice == "custom": }}
2{{ input type:"boolean" name:"custom_kernel_remote" prio:"20" msg:"Is the custom kernel you'd like to use in a remote git repo? (y/n)" default:"y"}}
3
4{{ if kernel_choice == "custom" and custom_kernel_remote == "y": }}
5{{ input type:"edit-git-repo" name:"custom_kernel_remote_path" prio:"20" msg:"Please enter the full URI to the remote git repo (the default corresponds to linux-stable v3.13.9)" default:"git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"}}
6
7{{ if kernel_choice == "custom" and custom_kernel_remote == "n": }}
8{{ input type:"edit-git-repo" name:"custom_kernel_local_path" prio:"20" msg:"You've indicated that you're not using a remote git repo. Please enter the full path to the local git repo you want to use (the default assumes a local linux-stable v3.13.9)" default:"/home/trz/yocto/kernels/linux-stable.git"}}
9
10{{ if kernel_choice == "custom": }}
11{{ input type:"boolean" name:"custom_kernel_need_kbranch" prio:"20" msg:"Do you need to use a specific (non-master) branch? (y/n)" default:"n"}}
12
13{{ if kernel_choice == "custom" and custom_kernel_need_kbranch == "y": }}
14{{ input type:"edit" name:"custom_kernel_kbranch" prio:"20" msg:"Please enter the branch you want to use (the default branch corresponds to the linux-stable 'linux-3.13.y' branch):" default:"linux-3.13.y"}}
15
16{{ if kernel_choice == "custom": }}
17{{ input type:"edit" name:"custom_kernel_srcrev" prio:"20" msg:"Please enter the SRCREV (commit id) you'd like to use (use '${AUTOREV}' to track the current HEAD):" default:"${AUTOREV}"}}
18
19{{ if kernel_choice == "custom": }}
20{{ input type:"edit" name:"custom_kernel_linux_version" prio:"20" msg:"Please enter the Linux version of the kernel you've specified:" default:"3.13.9"}}
21
22{{ if kernel_choice == "custom": }}
23{{ input type:"edit" name:"custom_kernel_linux_version_extension" prio:"20" msg:"Please enter a Linux version extension if you want (it will show up at the end of the kernel name shown by uname):" default:"-custom"}}
24
25{{ if kernel_choice == "custom": }}
26{{ input type:"edit-file" name:"custom_kernel_defconfig" prio:"20" msg:"It's recommended (but not required) that custom kernels be built using a defconfig. Please enter the full path to the defconfig for your kernel (NOTE: if you don't specify a defconfig the kernel probably won't build or boot):" default:""}}
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb
new file mode 100644
index 0000000000..80a52e7cae
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb
@@ -0,0 +1,58 @@
1# yocto-bsp-filename {{ if kernel_choice == "custom": }} this
2# This file was derived from the linux-yocto-custom.bb recipe in
3# oe-core.
4#
5# linux-yocto-custom.bb:
6#
7# A yocto-bsp-generated kernel recipe that uses the linux-yocto and
8# oe-core kernel classes to apply a subset of yocto kernel
9# management to git managed kernel repositories.
10#
11# Warning:
12#
13# Building this kernel without providing a defconfig or BSP
14# configuration will result in build or boot errors. This is not a
15# bug.
16#
17# Notes:
18#
19# patches: patches can be merged into to the source git tree itself,
20# added via the SRC_URI, or controlled via a BSP
21# configuration.
22#
23# example configuration addition:
24# SRC_URI += "file://smp.cfg"
25# example patch addition:
26# SRC_URI += "file://0001-linux-version-tweak.patch
27# example feature addition:
28# SRC_URI += "file://feature.scc"
29#
30
31inherit kernel
32require recipes-kernel/linux/linux-yocto.inc
33
34{{ if kernel_choice == "custom" and custom_kernel_remote == "y": }}
35SRC_URI = "{{=custom_kernel_remote_path}};protocol=git;bareclone=1;branch=${KBRANCH}"
36{{ if kernel_choice == "custom" and custom_kernel_remote == "n": }}
37SRC_URI = "git://{{=custom_kernel_local_path}};protocol=file;bareclone=1;branch=${KBRANCH}"
38
39SRC_URI += "file://defconfig"
40
41SRC_URI += "file://{{=machine}}.scc \
42 file://{{=machine}}.cfg \
43 file://{{=machine}}-user-config.cfg \
44 file://{{=machine}}-user-patches.scc \
45 "
46
47{{ if kernel_choice == "custom" and custom_kernel_need_kbranch == "y" and custom_kernel_kbranch and custom_kernel_kbranch != "master": }}
48KBRANCH = "{{=custom_kernel_kbranch}}"
49
50LINUX_VERSION ?= "{{=custom_kernel_linux_version}}"
51LINUX_VERSION_EXTENSION ?= "{{=custom_kernel_linux_version_extension}}"
52
53SRCREV="{{=custom_kernel_srcrev}}"
54
55PR = "r0"
56PV = "${LINUX_VERSION}+git${SRCPV}"
57
58COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall
new file mode 100644
index 0000000000..017d206c24
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall
@@ -0,0 +1 @@
# yocto-bsp-dirname {{ if kernel_choice == "custom": }} linux-yocto-custom
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig
new file mode 100644
index 0000000000..ceb0ffa30c
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig
@@ -0,0 +1,5 @@
1#
2# Placeholder for custom default kernel configuration. yocto-bsp will
3# replace this file with a user-specified defconfig.
4#
5{{ if custom_kernel_defconfig: replace_file(of, custom_kernel_defconfig) }}
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg
new file mode 100644
index 0000000000..922309d5ab
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg
@@ -0,0 +1,9 @@
1# yocto-bsp-filename {{=machine}}-user-config.cfg
2#
3# Used by yocto-kernel to manage config options.
4#
5# yocto-kernel may change the contents of this file in any
6# way it sees fit, including removing comments like this,
7# so don't manually make any modifications you don't want
8# to lose.
9#
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc
new file mode 100644
index 0000000000..6d1138f42a
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc
@@ -0,0 +1,9 @@
1# yocto-bsp-filename {{=machine}}-user-patches.scc
2#
3# Used by yocto-kernel to manage patches.
4#
5# yocto-kernel may change the contents of this file in any
6# way it sees fit, including removing comments like this,
7# so don't manually make any modifications you don't want
8# to lose.
9#
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg
new file mode 100644
index 0000000000..1ba8201f16
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg
@@ -0,0 +1,4 @@
1# yocto-bsp-filename {{=machine}}.cfg
2#
3# A convenient place to add config options, nothing more.
4#
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc
new file mode 100644
index 0000000000..0b6b413377
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc
@@ -0,0 +1,18 @@
1# yocto-bsp-filename {{=machine}}.scc
2#
3# The top-level 'feature' for the {{=machine}} custom kernel.
4#
5# Essentially this is a convenient top-level container or starting
6# point for adding lower-level config fragements and features.
7#
8
9# {{=machine}}.cfg in the linux-yocto-custom subdir is just a
10# convenient place for adding random config fragments.
11
12kconf hardware {{=machine}}.cfg
13
14# These are used by yocto-kernel to add config fragments and features.
15# Don't remove if you plan on using yocto-kernel with this BSP.
16
17kconf hardware {{=machine}}-user-config.cfg
18include {{=machine}}-user-patches.scc