summaryrefslogtreecommitdiffstats
path: root/meta-skeleton
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
committerTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta-skeleton
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-skeleton')
-rw-r--r--meta-skeleton/COPYING.MIT17
-rw-r--r--meta-skeleton/conf/layer.conf15
-rw-r--r--meta-skeleton/conf/multilib-example.conf13
-rw-r--r--meta-skeleton/conf/multilib-example2.conf13
-rw-r--r--meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg1
-rw-r--r--meta-skeleton/recipes-core/busybox/busybox_%.bbappend12
-rw-r--r--meta-skeleton/recipes-kernel/hello-mod/files/COPYING340
-rw-r--r--meta-skeleton/recipes-kernel/hello-mod/files/Makefile14
-rw-r--r--meta-skeleton/recipes-kernel/hello-mod/files/hello.c33
-rw-r--r--meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb18
-rw-r--r--meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb74
-rw-r--r--meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch26
-rw-r--r--meta-skeleton/recipes-kernel/linux/linux-yocto-custom/feature.scc1
-rw-r--r--meta-skeleton/recipes-kernel/linux/linux-yocto-custom/smp.cfg1
-rw-r--r--meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb13
-rw-r--r--meta-skeleton/recipes-skeleton/service/service/COPYRIGHT15
-rw-r--r--meta-skeleton/recipes-skeleton/service/service/skeleton193
-rw-r--r--meta-skeleton/recipes-skeleton/service/service/skeleton_test.c12
-rw-r--r--meta-skeleton/recipes-skeleton/service/service_0.1.bb32
-rw-r--r--meta-skeleton/recipes-skeleton/useradd/useradd-example.bb76
-rw-r--r--meta-skeleton/recipes-skeleton/useradd/useradd-example/file10
-rw-r--r--meta-skeleton/recipes-skeleton/useradd/useradd-example/file20
-rw-r--r--meta-skeleton/recipes-skeleton/useradd/useradd-example/file30
-rw-r--r--meta-skeleton/recipes-skeleton/useradd/useradd-example/file40
24 files changed, 919 insertions, 0 deletions
diff --git a/meta-skeleton/COPYING.MIT b/meta-skeleton/COPYING.MIT
new file mode 100644
index 0000000..fb950dc
--- /dev/null
+++ b/meta-skeleton/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/meta-skeleton/conf/layer.conf b/meta-skeleton/conf/layer.conf
new file mode 100644
index 0000000..aca1633
--- /dev/null
+++ b/meta-skeleton/conf/layer.conf
@@ -0,0 +1,15 @@
1# We have a conf and classes directory, add to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have recipes-* directories, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
6
7BBFILE_COLLECTIONS += "skeleton"
8BBFILE_PATTERN_skeleton = "^${LAYERDIR}/"
9BBFILE_PRIORITY_skeleton = "1"
10
11# This should only be incremented on significant changes that will
12# cause compatibility issues with other layers
13LAYERVERSION_skeleton = "1"
14
15LAYERDEPENDS_skeleton = "core"
diff --git a/meta-skeleton/conf/multilib-example.conf b/meta-skeleton/conf/multilib-example.conf
new file mode 100644
index 0000000..da6da7f
--- /dev/null
+++ b/meta-skeleton/conf/multilib-example.conf
@@ -0,0 +1,13 @@
1#
2# Sample multilib configuration which the user can either add in local.conf
3# or specific in an configuration file like this, then require it.
4#
5# This configuration specifies an x86 64 bit machine as the main machine
6# type and then adds a multilib in the "lib32" directory where those
7# libraries are compiled with the "x86" tune.
8#
9
10MACHINE = "qemux86-64"
11require conf/multilib.conf
12MULTILIBS = "multilib:lib32"
13DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
diff --git a/meta-skeleton/conf/multilib-example2.conf b/meta-skeleton/conf/multilib-example2.conf
new file mode 100644
index 0000000..2596f61
--- /dev/null
+++ b/meta-skeleton/conf/multilib-example2.conf
@@ -0,0 +1,13 @@
1#
2# Sample multilib configuration which the user can either add in local.conf
3# or specific in an configuration file like this, then require it.
4#
5# This configuration specifies an x86 64 bit machine as the main machine
6# type and then adds a multilib in the "libx32" directory where those
7# libraries are compiled with the "x86-64-x32" tune.
8#
9
10MACHINE = "qemux86-64"
11require conf/multilib.conf
12MULTILIBS = "multilib:libx32"
13DEFAULTTUNE_virtclass-multilib-libx32 = "x86-64-x32"
diff --git a/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg b/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
new file mode 100644
index 0000000..f840ecd
--- /dev/null
+++ b/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
@@ -0,0 +1 @@
# CONFIG_RFKILL is not set
diff --git a/meta-skeleton/recipes-core/busybox/busybox_%.bbappend b/meta-skeleton/recipes-core/busybox/busybox_%.bbappend
new file mode 100644
index 0000000..64cdefc
--- /dev/null
+++ b/meta-skeleton/recipes-core/busybox/busybox_%.bbappend
@@ -0,0 +1,12 @@
1# Example use of configuration fragments for busybox, which uses the same
2# mechanism as the linux-yocto kernel recipe.
3#
4# The entries here will override any entries in the base busybox recipe
5#
6# More details can be found in the Kernel Dev Manual
7# http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration
8FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
9
10SRC_URI += " \
11 file://no_rfkill.cfg \
12 "
diff --git a/meta-skeleton/recipes-kernel/hello-mod/files/COPYING b/meta-skeleton/recipes-kernel/hello-mod/files/COPYING
new file mode 100644
index 0000000..6d45519
--- /dev/null
+++ b/meta-skeleton/recipes-kernel/hello-mod/files/COPYING
@@ -0,0 +1,340 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991
3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The licenses for most software are designed to take away your
12freedom to share and change it. By contrast, the GNU General Public
13License is intended to guarantee your freedom to share and change free
14software--to make sure the software is free for all its users. This
15General Public License applies to most of the Free Software
16Foundation's software and to any other program whose authors commit to
17using it. (Some other Free Software Foundation software is covered by
18the GNU Library General Public License instead.) You can apply it to
19your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22price. Our General Public Licenses are designed to make sure that you
23have the freedom to distribute copies of free software (and charge for
24this service if you wish), that you receive source code or can get it
25if you want it, that you can change the software or use pieces of it
26in new free programs; and that you know you can do these things.
27
28 To protect your rights, we need to make restrictions that forbid
29anyone to deny you these rights or to ask you to surrender the rights.
30These restrictions translate to certain responsibilities for you if you
31distribute copies of the software, or if you modify it.
32
33 For example, if you distribute copies of such a program, whether
34gratis or for a fee, you must give the recipients all the rights that
35you have. You must make sure that they, too, receive or can get the
36source code. And you must show them these terms so they know their
37rights.
38
39 We protect your rights with two steps: (1) copyright the software, and
40(2) offer you this license which gives you legal permission to copy,
41distribute and/or modify the software.
42
43 Also, for each author's protection and ours, we want to make certain
44that everyone understands that there is no warranty for this free
45software. If the software is modified by someone else and passed on, we
46want its recipients to know that what they have is not the original, so
47that any problems introduced by others will not reflect on the original
48authors' reputations.
49
50 Finally, any free program is threatened constantly by software
51patents. We wish to avoid the danger that redistributors of a free
52program will individually obtain patent licenses, in effect making the
53program proprietary. To prevent this, we have made it clear that any
54patent must be licensed for everyone's free use or not licensed at all.
55
56 The precise terms and conditions for copying, distribution and
57modification follow.
58
59 GNU GENERAL PUBLIC LICENSE
60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
62 0. This License applies to any program or other work which contains
63a notice placed by the copyright holder saying it may be distributed
64under the terms of this General Public License. The "Program", below,
65refers to any such program or work, and a "work based on the Program"
66means either the Program or any derivative work under copyright law:
67that is to say, a work containing the Program or a portion of it,
68either verbatim or with modifications and/or translated into another
69language. (Hereinafter, translation is included without limitation in
70the term "modification".) Each licensee is addressed as "you".
71
72Activities other than copying, distribution and modification are not
73covered by this License; they are outside its scope. The act of
74running the Program is not restricted, and the output from the Program
75is covered only if its contents constitute a work based on the
76Program (independent of having been made by running the Program).
77Whether that is true depends on what the Program does.
78
79 1. You may copy and distribute verbatim copies of the Program's
80source code as you receive it, in any medium, provided that you
81conspicuously and appropriately publish on each copy an appropriate
82copyright notice and disclaimer of warranty; keep intact all the
83notices that refer to this License and to the absence of any warranty;
84and give any other recipients of the Program a copy of this License
85along with the Program.
86
87You may charge a fee for the physical act of transferring a copy, and
88you may at your option offer warranty protection in exchange for a fee.
89
90 2. You may modify your copy or copies of the Program or any portion
91of it, thus forming a work based on the Program, and copy and
92distribute such modifications or work under the terms of Section 1
93above, provided that you also meet all of these conditions:
94
95 a) You must cause the modified files to carry prominent notices
96 stating that you changed the files and the date of any change.
97
98 b) You must cause any work that you distribute or publish, that in
99 whole or in part contains or is derived from the Program or any
100 part thereof, to be licensed as a whole at no charge to all third
101 parties under the terms of this License.
102
103 c) If the modified program normally reads commands interactively
104 when run, you must cause it, when started running for such
105 interactive use in the most ordinary way, to print or display an
106 announcement including an appropriate copyright notice and a
107 notice that there is no warranty (or else, saying that you provide
108 a warranty) and that users may redistribute the program under
109 these conditions, and telling the user how to view a copy of this
110 License. (Exception: if the Program itself is interactive but
111 does not normally print such an announcement, your work based on
112 the Program is not required to print an announcement.)
113
114These requirements apply to the modified work as a whole. If
115identifiable sections of that work are not derived from the Program,
116and can be reasonably considered independent and separate works in
117themselves, then this License, and its terms, do not apply to those
118sections when you distribute them as separate works. But when you
119distribute the same sections as part of a whole which is a work based
120on the Program, the distribution of the whole must be on the terms of
121this License, whose permissions for other licensees extend to the
122entire whole, and thus to each and every part regardless of who wrote it.
123
124Thus, it is not the intent of this section to claim rights or contest
125your rights to work written entirely by you; rather, the intent is to
126exercise the right to control the distribution of derivative or
127collective works based on the Program.
128
129In addition, mere aggregation of another work not based on the Program
130with the Program (or with a work based on the Program) on a volume of
131a storage or distribution medium does not bring the other work under
132the scope of this License.
133
134 3. You may copy and distribute the Program (or a work based on it,
135under Section 2) in object code or executable form under the terms of
136Sections 1 and 2 above provided that you also do one of the following:
137
138 a) Accompany it with the complete corresponding machine-readable
139 source code, which must be distributed under the terms of Sections
140 1 and 2 above on a medium customarily used for software interchange; or,
141
142 b) Accompany it with a written offer, valid for at least three
143 years, to give any third party, for a charge no more than your
144 cost of physically performing source distribution, a complete
145 machine-readable copy of the corresponding source code, to be
146 distributed under the terms of Sections 1 and 2 above on a medium
147 customarily used for software interchange; or,
148
149 c) Accompany it with the information you received as to the offer
150 to distribute corresponding source code. (This alternative is
151 allowed only for noncommercial distribution and only if you
152 received the program in object code or executable form with such
153 an offer, in accord with Subsection b above.)
154
155The source code for a work means the preferred form of the work for
156making modifications to it. For an executable work, complete source
157code means all the source code for all modules it contains, plus any
158associated interface definition files, plus the scripts used to
159control compilation and installation of the executable. However, as a
160special exception, the source code distributed need not include
161anything that is normally distributed (in either source or binary
162form) with the major components (compiler, kernel, and so on) of the
163operating system on which the executable runs, unless that component
164itself accompanies the executable.
165
166If distribution of executable or object code is made by offering
167access to copy from a designated place, then offering equivalent
168access to copy the source code from the same place counts as
169distribution of the source code, even though third parties are not
170compelled to copy the source along with the object code.
171
172 4. You may not copy, modify, sublicense, or distribute the Program
173except as expressly provided under this License. Any attempt
174otherwise to copy, modify, sublicense or distribute the Program is
175void, and will automatically terminate your rights under this License.
176However, parties who have received copies, or rights, from you under
177this License will not have their licenses terminated so long as such
178parties remain in full compliance.
179
180 5. You are not required to accept this License, since you have not
181signed it. However, nothing else grants you permission to modify or
182distribute the Program or its derivative works. These actions are
183prohibited by law if you do not accept this License. Therefore, by
184modifying or distributing the Program (or any work based on the
185Program), you indicate your acceptance of this License to do so, and
186all its terms and conditions for copying, distributing or modifying
187the Program or works based on it.
188
189 6. Each time you redistribute the Program (or any work based on the
190Program), the recipient automatically receives a license from the
191original licensor to copy, distribute or modify the Program subject to
192these terms and conditions. You may not impose any further
193restrictions on the recipients' exercise of the rights granted herein.
194You are not responsible for enforcing compliance by third parties to
195this License.
196
197 7. If, as a consequence of a court judgment or allegation of patent
198infringement or for any other reason (not limited to patent issues),
199conditions are imposed on you (whether by court order, agreement or
200otherwise) that contradict the conditions of this License, they do not
201excuse you from the conditions of this License. If you cannot
202distribute so as to satisfy simultaneously your obligations under this
203License and any other pertinent obligations, then as a consequence you
204may not distribute the Program at all. For example, if a patent
205license would not permit royalty-free redistribution of the Program by
206all those who receive copies directly or indirectly through you, then
207the only way you could satisfy both it and this License would be to
208refrain entirely from distribution of the Program.
209
210If any portion of this section is held invalid or unenforceable under
211any particular circumstance, the balance of the section is intended to
212apply and the section as a whole is intended to apply in other
213circumstances.
214
215It is not the purpose of this section to induce you to infringe any
216patents or other property right claims or to contest validity of any
217such claims; this section has the sole purpose of protecting the
218integrity of the free software distribution system, which is
219implemented by public license practices. Many people have made
220generous contributions to the wide range of software distributed
221through that system in reliance on consistent application of that
222system; it is up to the author/donor to decide if he or she is willing
223to distribute software through any other system and a licensee cannot
224impose that choice.
225
226This section is intended to make thoroughly clear what is believed to
227be a consequence of the rest of this License.
228
229 8. If the distribution and/or use of the Program is restricted in
230certain countries either by patents or by copyrighted interfaces, the
231original copyright holder who places the Program under this License
232may add an explicit geographical distribution limitation excluding
233those countries, so that distribution is permitted only in or among
234countries not thus excluded. In such case, this License incorporates
235the limitation as if written in the body of this License.
236
237 9. The Free Software Foundation may publish revised and/or new versions
238of the General Public License from time to time. Such new versions will
239be similar in spirit to the present version, but may differ in detail to
240address new problems or concerns.
241
242Each version is given a distinguishing version number. If the Program
243specifies a version number of this License which applies to it and "any
244later version", you have the option of following the terms and conditions
245either of that version or of any later version published by the Free
246Software Foundation. If the Program does not specify a version number of
247this License, you may choose any version ever published by the Free Software
248Foundation.
249
250 10. If you wish to incorporate parts of the Program into other free
251programs whose distribution conditions are different, write to the author
252to ask for permission. For software which is copyrighted by the Free
253Software Foundation, write to the Free Software Foundation; we sometimes
254make exceptions for this. Our decision will be guided by the two goals
255of preserving the free status of all derivatives of our free software and
256of promoting the sharing and reuse of software generally.
257
258 NO WARRANTY
259
260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268REPAIR OR CORRECTION.
269
270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278POSSIBILITY OF SUCH DAMAGES.
279
280 END OF TERMS AND CONDITIONS
281
282 How to Apply These Terms to Your New Programs
283
284 If you develop a new program, and you want it to be of the greatest
285possible use to the public, the best way to achieve this is to make it
286free software which everyone can redistribute and change under these terms.
287
288 To do so, attach the following notices to the program. It is safest
289to attach them to the start of each source file to most effectively
290convey the exclusion of warranty; and each file should have at least
291the "copyright" line and a pointer to where the full notice is found.
292
293 <one line to give the program's name and a brief idea of what it does.>
294 Copyright (C) <year> <name of author>
295
296 This program is free software; you can redistribute it and/or modify
297 it under the terms of the GNU General Public License as published by
298 the Free Software Foundation; either version 2 of the License, or
299 (at your option) any later version.
300
301 This program is distributed in the hope that it will be useful,
302 but WITHOUT ANY WARRANTY; without even the implied warranty of
303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 GNU General Public License for more details.
305
306 You should have received a copy of the GNU General Public License
307 along with this program; if not, write to the Free Software
308 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
309
310
311Also add information on how to contact you by electronic and paper mail.
312
313If the program is interactive, make it output a short notice like this
314when it starts in an interactive mode:
315
316 Gnomovision version 69, Copyright (C) year name of author
317 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318 This is free software, and you are welcome to redistribute it
319 under certain conditions; type `show c' for details.
320
321The hypothetical commands `show w' and `show c' should show the appropriate
322parts of the General Public License. Of course, the commands you use may
323be called something other than `show w' and `show c'; they could even be
324mouse-clicks or menu items--whatever suits your program.
325
326You should also get your employer (if you work as a programmer) or your
327school, if any, to sign a "copyright disclaimer" for the program, if
328necessary. Here is a sample; alter the names:
329
330 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331 `Gnomovision' (which makes passes at compilers) written by James Hacker.
332
333 <signature of Ty Coon>, 1 April 1989
334 Ty Coon, President of Vice
335
336This General Public License does not permit incorporating your program into
337proprietary programs. If your program is a subroutine library, you may
338consider it more useful to permit linking proprietary applications with the
339library. If this is what you want to do, use the GNU Library General
340Public License instead of this License.
diff --git a/meta-skeleton/recipes-kernel/hello-mod/files/Makefile b/meta-skeleton/recipes-kernel/hello-mod/files/Makefile
new file mode 100644
index 0000000..4ded35f
--- /dev/null
+++ b/meta-skeleton/recipes-kernel/hello-mod/files/Makefile
@@ -0,0 +1,14 @@
1obj-m := hello.o
2
3SRC := $(shell pwd)
4
5all:
6 $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
7
8modules_install:
9 $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
10
11clean:
12 rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
13 rm -f Module.markers Module.symvers modules.order
14 rm -rf .tmp_versions Modules.symvers
diff --git a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
new file mode 100644
index 0000000..f3c0d37
--- /dev/null
+++ b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
@@ -0,0 +1,33 @@
1/******************************************************************************
2 *
3 * Copyright (C) 2011 Intel Corporation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12 * the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 *****************************************************************************/
19
20#include <linux/module.h>
21
22int init_module(void)
23{
24 printk("Hello World!\n");
25 return 0;
26}
27
28void cleanup_module(void)
29{
30 printk("Goodbye Cruel World!\n");
31}
32
33MODULE_LICENSE("GPL");
diff --git a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
new file mode 100644
index 0000000..c40b393
--- /dev/null
+++ b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
@@ -0,0 +1,18 @@
1SUMMARY = "Example of how to build an external Linux kernel module"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
4
5inherit module
6
7PR = "r0"
8PV = "0.1"
9
10SRC_URI = "file://Makefile \
11 file://hello.c \
12 file://COPYING \
13 "
14
15S = "${WORKDIR}"
16
17# The inherit of module.bbclass will automatically name module packages with
18# "kernel-module-" prefix as required by the oe-core build environment.
diff --git a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb
new file mode 100644
index 0000000..b1a0784
--- /dev/null
+++ b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb
@@ -0,0 +1,74 @@
1# linux-yocto-custom.bb:
2#
3# An example kernel recipe that uses the linux-yocto and oe-core
4# kernel classes to apply a subset of yocto kernel management to git
5# managed kernel repositories.
6#
7# To use linux-yocto-custom in your layer, create a
8# linux-yocto-custom.bbappend file containing at least the following
9# lines:
10#
11# FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
12# COMPATIBLE_MACHINE_yourmachine = "yourmachine"
13#
14# You must also provide a Linux kernel configuration. The most direct
15# method is to copy your .config to files/defconfig in your layer,
16# in the same directory as the bbappend and add file://defconfig to
17# your SRC_URI.
18#
19# To use the yocto kernel tooling to generate a BSP configuration
20# using modular configuration fragments, see the yocto-bsp and
21# yocto-kernel tools documentation.
22#
23# Warning:
24#
25# Building this example without providing a defconfig or BSP
26# configuration will result in build or boot errors. This is not a
27# bug.
28#
29#
30# Notes:
31#
32# patches: patches can be merged into to the source git tree itself,
33# added via the SRC_URI, or controlled via a BSP
34# configuration.
35#
36# defconfig: When a defconfig is provided, the linux-yocto configuration
37# uses the filename as a trigger to use a 'allnoconfig' baseline
38# before merging the defconfig into the build.
39#
40# If the defconfig file was created with make_savedefconfig,
41# not all options are specified, and should be restored with their
42# defaults, not set to 'n'. To properly expand a defconfig like
43# this, specify: KCONFIG_MODE="--alldefconfig" in the kernel
44# recipe.
45#
46# example configuration addition:
47# SRC_URI += "file://smp.cfg"
48# example patch addition (for kernel v3.4 only):
49# SRC_URI += "file://0001-linux-version-tweak.patch
50# example feature addition (for kernel v3.4 only):
51# SRC_URI += "file://feature.scc"
52#
53
54inherit kernel
55require recipes-kernel/linux/linux-yocto.inc
56
57# Override SRC_URI in a bbappend file to point at a different source
58# tree if you do not want to build from Linus' tree.
59SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"
60
61LINUX_VERSION ?= "3.4"
62LINUX_VERSION_EXTENSION ?= "-custom"
63
64# Override SRCREV to point to a different commit in a bbappend file to
65# build a different release of the Linux kernel.
66# tag: v3.4 76e10d158efb6d4516018846f60c2ab5501900bc
67SRCREV_machine="76e10d158efb6d4516018846f60c2ab5501900bc"
68
69PR = "r1"
70PV = "${LINUX_VERSION}+git${SRCPV}"
71
72# Override COMPATIBLE_MACHINE to include your machine in a bbappend
73# file. Leaving it empty here ensures an early explicit build failure.
74COMPATIBLE_MACHINE = "(^$)"
diff --git a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch
new file mode 100644
index 0000000..c9562da
--- /dev/null
+++ b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch
@@ -0,0 +1,26 @@
1From 5a55943a6bbb10a79994a0b18071b2427dffb15f Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Mon, 11 Jun 2012 15:31:42 -0400
4Subject: [PATCH] linux: version tweak
5
6Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
7---
8 Makefile | 2 +-
9 1 files changed, 1 insertions(+), 1 deletions(-)
10
11diff --git a/Makefile b/Makefile
12index a687963..f5b1ac3 100644
13--- a/Makefile
14+++ b/Makefile
15@@ -2,7 +2,7 @@ VERSION = 3
16 PATCHLEVEL = 4
17 SUBLEVEL = 0
18 EXTRAVERSION =
19-NAME = Saber-toothed Squirrel
20+NAME = Saber-toothed Squirrel-custom
21
22 # *DOCUMENTATION*
23 # To see a list of typical targets execute "make help"
24--
251.7.5.4
26
diff --git a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/feature.scc b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/feature.scc
new file mode 100644
index 0000000..aad5af4
--- /dev/null
+++ b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/feature.scc
@@ -0,0 +1 @@
patch 0001-linux-version-tweak.patch
diff --git a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/smp.cfg b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/smp.cfg
new file mode 100644
index 0000000..0c26a86
--- /dev/null
+++ b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/smp.cfg
@@ -0,0 +1 @@
# CONFIG_SMP is not set
diff --git a/meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb b/meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb
new file mode 100644
index 0000000..f13186f
--- /dev/null
+++ b/meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb
@@ -0,0 +1,13 @@
1#
2# An example of a multilib image
3#
4# This example includes a lib32 version of bash into an otherwise standard
5# sato image. It assumes a "lib32" multilib has been enabled in the user's
6# configuration (see the example conf files for examples of this.)
7#
8
9# First include a base image to base things off
10require recipes-sato/images/core-image-sato.bb
11
12# Now add the multilib packages we want to install
13IMAGE_INSTALL += "lib32-bash"
diff --git a/meta-skeleton/recipes-skeleton/service/service/COPYRIGHT b/meta-skeleton/recipes-skeleton/service/service/COPYRIGHT
new file mode 100644
index 0000000..ec3e171
--- /dev/null
+++ b/meta-skeleton/recipes-skeleton/service/service/COPYRIGHT
@@ -0,0 +1,15 @@
1Sysvinit is Copyright (C) 1991-2004 Miquel van Smoorenburg
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/meta-skeleton/recipes-skeleton/service/service/skeleton b/meta-skeleton/recipes-skeleton/service/service/skeleton
new file mode 100644
index 0000000..a3edc9d
--- /dev/null
+++ b/meta-skeleton/recipes-skeleton/service/service/skeleton
@@ -0,0 +1,193 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: skeleton
4# Required-Start: $local_fs
5# Should-Start:
6# Required-Stop: $local_fs
7# Should-Stop:
8# Default-Start: 2 3 4 5
9# Default-Stop: 0 1 6
10# Short-Description: Example initscript
11# Description: This file should be used to construct scripts to be
12# placed in /etc/init.d
13### END INIT INFO
14
15# The definition of actions: (From LSB 3.1.0)
16# start start the service
17# stop stop the service
18# restart stop and restart the service if the service is already running,
19# otherwise start the service
20# try-restart restart the service if the service is already running
21# reload cause the configuration of the service to be reloaded without
22# actually stopping and restarting the service
23# force-reload cause the configuration to be reloaded if the service supports
24# this, otherwise restart the service if it is running
25# status print the current status of the service
26
27# The start, stop, restart, force-reload, and status actions shall be supported
28# by all init scripts; the reload and the try-restart actions are optional
29
30# Common steps to convert this skeleton into a real init script
31# 1) cp skeleton <the_real_name>
32# 2) Set DESC and NAME
33# 3) Check whether the daemon app is /usr/sbin/$NAME, if not, set it.
34# 4) Set DAEMON_ARGS if there is any
35# 5) Remove the useless code
36
37# NOTE: The skeleton doesn't support the daemon which is a script unless the
38# pidof supports "-x" option, please see more comments for pidofproc ()
39# in /etc/init.d/functions
40
41# PATH should only include /usr/* if it runs after the mountnfs.sh script
42PATH=/sbin:/usr/sbin:/bin:/usr/bin
43
44DESC="skeleton"
45NAME="skeleton-test"
46DAEMON=/usr/sbin/$NAME
47DAEMON_ARGS=""
48PIDFILE=/var/run/$NAME.pid
49
50. /etc/init.d/functions || exit 1
51
52# Exit if the package is not installed
53[ -x "$DAEMON" ] || exit 0
54
55# Read configuration variable file if it is present
56[ -r /etc/default/$NAME ] && . /etc/default/$NAME
57
58#
59# Function that starts the daemon/service
60#
61do_start() {
62 local status pid
63
64 status=0
65 pid=`pidofproc $NAME` || status=$?
66 case $status in
67 0)
68 echo "$DESC already running ($pid)."
69 exit 1
70 ;;
71 *)
72 echo "Starting $DESC ..."
73 exec $DAEMON $DAEMON_ARGS >/dev/null 2>&1 || status=$?
74 echo "ERROR: Failed to start $DESC."
75 exit $status
76 ;;
77 esac
78
79 # Add code here, if necessary, that waits for the process to be ready
80 # to handle requests from services started subsequently which depend
81 # on this one. As a last resort, sleep for some time.
82}
83
84#
85# Function that stops the daemon/service
86#
87do_stop() {
88 local pid status
89
90 status=0
91 pid=`pidofproc $NAME` || status=$?
92 case $status in
93 0)
94 # Exit when fail to stop, the kill would complain when fail
95 kill -s 15 $pid >/dev/null && rm -f $PIDFILE && \
96 echo "Stopped $DESC ($pid)." || exit $?
97 ;;
98 *)
99 echo "$DESC is not running; none killed." >&2
100 ;;
101 esac
102
103 # Wait for children to finish too if this is a daemon that forks
104 # and if the daemon is only ever run from this initscript.
105 # If the above conditions are not satisfied then add some other code
106 # that waits for the process to drop all resources that could be
107 # needed by services started subsequently. A last resort is to
108 # sleep for some time.
109 return $status
110}
111
112#
113# Function that sends a SIGHUP to the daemon/service
114#
115do_reload() {
116 local pid status
117
118 status=0
119 # If the daemon can reload its configuration without
120 # restarting (for example, when it is sent a SIGHUP),
121 # then implement that here.
122 pid=`pidofproc $NAME` || status=$?
123 case $status in
124 0)
125 echo "Reloading $DESC ..."
126 kill -s 1 $pid || exit $?
127 ;;
128 *)
129 echo "$DESC is not running; none reloaded." >&2
130 ;;
131 esac
132 exit $status
133}
134
135
136#
137# Function that shows the daemon/service status
138#
139status_of_proc () {
140 local pid status
141
142 status=0
143 # pidof output null when no program is running, so no "2>/dev/null".
144 pid=`pidofproc $NAME` || status=$?
145 case $status in
146 0)
147 echo "$DESC is running ($pid)."
148 exit 0
149 ;;
150 *)
151 echo "$DESC is not running." >&2
152 exit $status
153 ;;
154 esac
155}
156
157case "$1" in
158start)
159 do_start
160 ;;
161stop)
162 do_stop || exit $?
163 ;;
164status)
165 status_of_proc
166 ;;
167restart)
168 # Always start the service regardless the status of do_stop
169 do_stop
170 do_start
171 ;;
172try-restart|force-reload)
173 # force-reload is the same as reload or try-restart according
174 # to its definition, the reload is not implemented here, so
175 # force-reload is the alias of try-restart here, but it should
176 # be the alias of reload if reload is implemented.
177 #
178 # Only start the service when do_stop succeeds
179 do_stop && do_start
180 ;;
181#reload)
182 # If the "reload" action is implemented properly, then let the
183 # force-reload be the alias of reload, and remove it from
184 # try-restart|force-reload)
185 #
186 #do_reload
187 #;;
188*)
189 echo "Usage: $0 {start|stop|status|restart|try-restart|force-reload}" >&2
190 exit 3
191 ;;
192esac
193
diff --git a/meta-skeleton/recipes-skeleton/service/service/skeleton_test.c b/meta-skeleton/recipes-skeleton/service/service/skeleton_test.c
new file mode 100644
index 0000000..96c67ac
--- /dev/null
+++ b/meta-skeleton/recipes-skeleton/service/service/skeleton_test.c
@@ -0,0 +1,12 @@
1#include <unistd.h>
2
3/* This demo does nothing except for testing /etc/init.d/skeleton */
4
5int main(int argc, char *argv[])
6{
7 daemon(0, 0);
8 while (1) {
9 sleep(1);
10 }
11 return 0;
12}
diff --git a/meta-skeleton/recipes-skeleton/service/service_0.1.bb b/meta-skeleton/recipes-skeleton/service/service_0.1.bb
new file mode 100644
index 0000000..a3ad6cc
--- /dev/null
+++ b/meta-skeleton/recipes-skeleton/service/service_0.1.bb
@@ -0,0 +1,32 @@
1SUMMARY = "The canonical example of init scripts"
2SECTION = "base"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4"
5RDEPENDS_${PN} = "initscripts"
6PR = "r0"
7
8SRC_URI = "file://skeleton \
9 file://skeleton_test.c \
10 file://COPYRIGHT \
11 "
12
13CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton"
14
15do_compile () {
16 ${CC} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test
17}
18
19do_install () {
20 install -d ${D}${sysconfdir}/init.d
21 cat ${WORKDIR}/skeleton | \
22 sed -e 's,/etc,${sysconfdir},g' \
23 -e 's,/usr/sbin,${sbindir},g' \
24 -e 's,/var,${localstatedir},g' \
25 -e 's,/usr/bin,${bindir},g' \
26 -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/skeleton
27 chmod a+x ${D}${sysconfdir}/init.d/skeleton
28
29 install -d ${D}${sbindir}
30 install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/
31}
32
diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
new file mode 100644
index 0000000..d3c02d5
--- /dev/null
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
@@ -0,0 +1,76 @@
1SUMMARY = "Example recipe for using inherit useradd"
2DESCRIPTION = "This recipe serves as an example for using features from useradd.bbclass"
3SECTION = "examples"
4PR = "r1"
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
7 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
8
9SRC_URI = "file://file1 \
10 file://file2 \
11 file://file3 \
12 file://file4"
13
14S = "${WORKDIR}"
15
16PACKAGES =+ "${PN}-user3"
17
18inherit useradd
19
20# You must set USERADD_PACKAGES when you inherit useradd. This
21# lists which output packages will include the user/group
22# creation code.
23USERADD_PACKAGES = "${PN} ${PN}-user3"
24
25# You must also set USERADD_PARAM and/or GROUPADD_PARAM when
26# you inherit useradd.
27
28# USERADD_PARAM specifies command line options to pass to the
29# useradd command. Multiple users can be created by separating
30# the commands with a semicolon. Here we'll create two users,
31# user1 and user2:
32USERADD_PARAM_${PN} = "-u 1200 -d /home/user1 -r -s /bin/bash user1; -u 1201 -d /home/user2 -r -s /bin/bash user2"
33
34# user3 will be managed in the useradd-example-user3 pacakge:
35# As an example, we use the -P option to set clear text password for user3
36USERADD_PARAM_${PN}-user3 = "-u 1202 -d /home/user3 -r -s /bin/bash -P 'user3' user3"
37
38# GROUPADD_PARAM works the same way, which you set to the options
39# you'd normally pass to the groupadd command. This will create
40# groups group1 and group2:
41GROUPADD_PARAM_${PN} = "-g 880 group1; -g 890 group2"
42
43# Likewise, we'll manage group3 in the useradd-example-user3 package:
44GROUPADD_PARAM_${PN}-user3 = "-g 900 group3"
45
46do_install () {
47 install -d -m 755 ${D}${datadir}/user1
48 install -d -m 755 ${D}${datadir}/user2
49 install -d -m 755 ${D}${datadir}/user3
50
51 install -p -m 644 file1 ${D}${datadir}/user1/
52 install -p -m 644 file2 ${D}${datadir}/user1/
53
54 install -p -m 644 file2 ${D}${datadir}/user2/
55 install -p -m 644 file3 ${D}${datadir}/user2/
56
57 install -p -m 644 file3 ${D}${datadir}/user3/
58 install -p -m 644 file4 ${D}${datadir}/user3/
59
60 # The new users and groups are created before the do_install
61 # step, so you are now free to make use of them:
62 chown -R user1 ${D}${datadir}/user1
63 chown -R user2 ${D}${datadir}/user2
64 chown -R user3 ${D}${datadir}/user3
65
66 chgrp -R group1 ${D}${datadir}/user1
67 chgrp -R group2 ${D}${datadir}/user2
68 chgrp -R group3 ${D}${datadir}/user3
69}
70
71FILES_${PN} = "${datadir}/user1/* ${datadir}/user2/*"
72FILES_${PN}-user3 = "${datadir}/user3/*"
73
74# Prevents do_package failures with:
75# debugsources.list: No such file or directory:
76INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example/file1 b/meta-skeleton/recipes-skeleton/useradd/useradd-example/file1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example/file1
diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example/file2 b/meta-skeleton/recipes-skeleton/useradd/useradd-example/file2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example/file2
diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example/file3 b/meta-skeleton/recipes-skeleton/useradd/useradd-example/file3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example/file3
diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example/file4 b/meta-skeleton/recipes-skeleton/useradd/useradd-example/file4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example/file4