mirror of
https://git.yoctoproject.org/poky
synced 2026-09-24 22:36:21 +02:00
Compare commits
243 Commits
yocto-4.0.
...
yocto-4.0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54af8c5e80 | ||
|
|
f91fefe108 | ||
|
|
f634b9852e | ||
|
|
78e79d47c2 | ||
|
|
f5f650aaa4 | ||
|
|
d1a5c51431 | ||
|
|
8f6035f44d | ||
|
|
ae249a900f | ||
|
|
d9f531b374 | ||
|
|
b3e1dabe66 | ||
|
|
80b4e5f953 | ||
|
|
410d7bf8cb | ||
|
|
ce477b4d6e | ||
|
|
906af0cb8b | ||
|
|
426dfdc8d2 | ||
|
|
924b38aa01 | ||
|
|
4a900fd822 | ||
|
|
4289397aaf | ||
|
|
76d570000e | ||
|
|
33faa4d392 | ||
|
|
f96bd47ea2 | ||
|
|
a818202d85 | ||
|
|
c165a558da | ||
|
|
e318dc57e3 | ||
|
|
c0a199acdc | ||
|
|
f0f023e86d | ||
|
|
d1aae420f9 | ||
|
|
d9532264b9 | ||
|
|
6c7c9b1146 | ||
|
|
3ef22a75a3 | ||
|
|
19b0baeb81 | ||
|
|
88ba7d2d3a | ||
|
|
df2f696e68 | ||
|
|
bad31561c0 | ||
|
|
e9dbcd7a01 | ||
|
|
8ffcfd69b5 | ||
|
|
f754b5d45b | ||
|
|
d95d26073d | ||
|
|
19c1f963a9 | ||
|
|
1b0b487dcc | ||
|
|
a7eb75e292 | ||
|
|
7262c0f235 | ||
|
|
558325482c | ||
|
|
3b8c412b7f | ||
|
|
8d726b790a | ||
|
|
7008d999c5 | ||
|
|
a7f86b0e78 | ||
|
|
1520bf97aa | ||
|
|
ddbdef6e58 | ||
|
|
4a7f8470c2 | ||
|
|
9b7cc27c39 | ||
|
|
306316eb80 | ||
|
|
27ec491044 | ||
|
|
2ebcefae46 | ||
|
|
7640d1f82e | ||
|
|
ac4914f538 | ||
|
|
f4d36b60f8 | ||
|
|
7a939cd7e6 | ||
|
|
064936af55 | ||
|
|
3a5ddec4d1 | ||
|
|
d00aada1d1 | ||
|
|
cfcbf783ab | ||
|
|
15b42171a3 | ||
|
|
8caaab3252 | ||
|
|
cd6f183a34 | ||
|
|
875ce46a8d | ||
|
|
755632c2fc | ||
|
|
387d01b0a4 | ||
|
|
4761cbe1ee | ||
|
|
8a09f8472f | ||
|
|
82802901c6 | ||
|
|
f22a96e5cc | ||
|
|
3562768af7 | ||
|
|
6f84c60edf | ||
|
|
eadd5efcb3 | ||
|
|
e01044d629 | ||
|
|
079e50aba0 | ||
|
|
26ffdb7a30 | ||
|
|
1110f16718 | ||
|
|
8b75148d87 | ||
|
|
75b08b43a4 | ||
|
|
c4f28d9643 | ||
|
|
30be4f67cc | ||
|
|
75cd31f6d3 | ||
|
|
f5c3c374e8 | ||
|
|
93d2e547d1 | ||
|
|
31507dd07a | ||
|
|
82e76d21dc | ||
|
|
006b4b976c | ||
|
|
d6385a54cb | ||
|
|
acd993f24c | ||
|
|
98223b776a | ||
|
|
7057b7bb2b | ||
|
|
a76bc698c4 | ||
|
|
3e73216a32 | ||
|
|
239bf770b6 | ||
|
|
d1b9e2acaa | ||
|
|
51a2c26e29 | ||
|
|
f46bb8ad10 | ||
|
|
f007ad78dd | ||
|
|
24121f9699 | ||
|
|
f8a7dbd8fb | ||
|
|
8dc22248a8 | ||
|
|
b159ad2464 | ||
|
|
a2d67684cc | ||
|
|
fdd88b549f | ||
|
|
95795dff9b | ||
|
|
6c9f29507f | ||
|
|
942c66a9fb | ||
|
|
12643571ec | ||
|
|
9536f32528 | ||
|
|
e826f80436 | ||
|
|
f19d7f427e | ||
|
|
c8fa08b01c | ||
|
|
ecba5ff495 | ||
|
|
a7657ca5ff | ||
|
|
c771630e99 | ||
|
|
39aa7af59b | ||
|
|
2629c5fe89 | ||
|
|
517e513209 | ||
|
|
973020ce12 | ||
|
|
f2c0b5cef2 | ||
|
|
1867c0de35 | ||
|
|
24646e55b2 | ||
|
|
f9527fb2ac | ||
|
|
e447b4139f | ||
|
|
f60fb52055 | ||
|
|
2e3c89e255 | ||
|
|
9200c6b310 | ||
|
|
ae28221a40 | ||
|
|
4e227eaf1c | ||
|
|
9f0a8901d1 | ||
|
|
f9a95adda5 | ||
|
|
a171408008 | ||
|
|
8d57eddc82 | ||
|
|
2fc0a78176 | ||
|
|
0207478c7b | ||
|
|
d8d6d921fa | ||
|
|
73e3b5481b | ||
|
|
df56d7c525 | ||
|
|
5f21fa7de9 | ||
|
|
b971ffa75e | ||
|
|
f966e16c3b | ||
|
|
83d53dc031 | ||
|
|
f948c66f75 | ||
|
|
b1ddd4178d | ||
|
|
95b430be16 | ||
|
|
e46e74cd90 | ||
|
|
f35f1aaf22 | ||
|
|
715fc203c2 | ||
|
|
e9a7427077 | ||
|
|
6f022adb5c | ||
|
|
59077aa77b | ||
|
|
bdea205855 | ||
|
|
bf5e50a353 | ||
|
|
3fd3ed3b11 | ||
|
|
b5b18d155e | ||
|
|
c3032cebe7 | ||
|
|
955796ad7e | ||
|
|
650980791e | ||
|
|
0f23056836 | ||
|
|
6fd2902f05 | ||
|
|
720324bd18 | ||
|
|
6a3b428c7c | ||
|
|
c969a2456c | ||
|
|
734069e81b | ||
|
|
aaf748b95f | ||
|
|
811cf0320c | ||
|
|
a6f551f516 | ||
|
|
fb38c59633 | ||
|
|
386672ff8c | ||
|
|
e06868eff3 | ||
|
|
024fa046fc | ||
|
|
7725c28871 | ||
|
|
b1c1d6d048 | ||
|
|
70f4bd1b3c | ||
|
|
72ddfbc89a | ||
|
|
36a2a0129a | ||
|
|
6da1e21e9a | ||
|
|
24e9fed15a | ||
|
|
f550a63161 | ||
|
|
8391218990 | ||
|
|
bdcc4c9909 | ||
|
|
4b721dc5c8 | ||
|
|
455b08d0a9 | ||
|
|
4537f28311 | ||
|
|
47d212a57f | ||
|
|
a721e0f85b | ||
|
|
fbf88236e3 | ||
|
|
7b43af7ad4 | ||
|
|
f989613808 | ||
|
|
3f174130d3 | ||
|
|
43e36aec34 | ||
|
|
c0b54da555 | ||
|
|
cc936073a4 | ||
|
|
36e8271ca0 | ||
|
|
49ebeb4b0d | ||
|
|
73d81d2908 | ||
|
|
9d5d4218ec | ||
|
|
e77b551dbf | ||
|
|
600b508c37 | ||
|
|
2a2ea5ac75 | ||
|
|
de59761cbb | ||
|
|
3a3afebf41 | ||
|
|
222be3e3b9 | ||
|
|
ef5214f584 | ||
|
|
bf72cdd748 | ||
|
|
fbbe0f86ba | ||
|
|
f06b171bee | ||
|
|
96d8a62454 | ||
|
|
6b0501fef3 | ||
|
|
6191449343 | ||
|
|
7ffedb40a1 | ||
|
|
1c8f2d8cad | ||
|
|
fcb2375417 | ||
|
|
91c3fc996e | ||
|
|
c58c63d48f | ||
|
|
3ba8fdef70 | ||
|
|
ee2bf45810 | ||
|
|
c156968a90 | ||
|
|
ad12417f38 | ||
|
|
7eefa6dfb6 | ||
|
|
0b624c308c | ||
|
|
22caf0ce33 | ||
|
|
74b22a5e91 | ||
|
|
25073f9c0e | ||
|
|
0e4966eb77 | ||
|
|
6b6a161273 | ||
|
|
eea8e56bed | ||
|
|
eae16020a2 | ||
|
|
81cad46d69 | ||
|
|
8b4655300d | ||
|
|
425ed15bde | ||
|
|
6cbbd132d3 | ||
|
|
e67e90c557 | ||
|
|
a54b91946c | ||
|
|
a1b812eefa | ||
|
|
7435f15930 | ||
|
|
fe7e47368e | ||
|
|
200596b5ad | ||
|
|
226bc34085 | ||
|
|
df7a37d54f | ||
|
|
dc1a3be255 |
24
SECURITY.md
Normal file
24
SECURITY.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
How to Report a Potential Vulnerability?
|
||||||
|
========================================
|
||||||
|
|
||||||
|
If you would like to report a public issue (for example, one with a released
|
||||||
|
CVE number), please report it using the
|
||||||
|
[https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Security Security Bugzilla].
|
||||||
|
If you have a patch ready, submit it following the same procedure as any other
|
||||||
|
patch as described in README.md.
|
||||||
|
|
||||||
|
If you are dealing with a not-yet released or urgent issue, please send a
|
||||||
|
message to security AT yoctoproject DOT org, including as many details as
|
||||||
|
possible: the layer or software module affected, the recipe and its version,
|
||||||
|
and any example code, if available.
|
||||||
|
|
||||||
|
Branches maintained with security fixes
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
See [https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS Stable release and LTS]
|
||||||
|
for detailed info regarding the policies and maintenance of Stable branches.
|
||||||
|
|
||||||
|
The [https://wiki.yoctoproject.org/wiki/Releases Release page] contains a list of all
|
||||||
|
releases of the Yocto Project. Versions in grey are no longer actively maintained with
|
||||||
|
security patches, but well-tested patches may still be accepted for them for
|
||||||
|
significant issues.
|
||||||
24
bitbake/SECURITY.md
Normal file
24
bitbake/SECURITY.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
How to Report a Potential Vulnerability?
|
||||||
|
========================================
|
||||||
|
|
||||||
|
If you would like to report a public issue (for example, one with a released
|
||||||
|
CVE number), please report it using the
|
||||||
|
[https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Security Security Bugzilla].
|
||||||
|
If you have a patch ready, submit it following the same procedure as any other
|
||||||
|
patch as described in README.md.
|
||||||
|
|
||||||
|
If you are dealing with a not-yet released or urgent issue, please send a
|
||||||
|
message to security AT yoctoproject DOT org, including as many details as
|
||||||
|
possible: the layer or software module affected, the recipe and its version,
|
||||||
|
and any example code, if available.
|
||||||
|
|
||||||
|
Branches maintained with security fixes
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
See [https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS Stable release and LTS]
|
||||||
|
for detailed info regarding the policies and maintenance of Stable branches.
|
||||||
|
|
||||||
|
The [https://wiki.yoctoproject.org/wiki/Releases Release page] contains a list of all
|
||||||
|
releases of the Yocto Project. Versions in grey are no longer actively maintained with
|
||||||
|
security patches, but well-tested patches may still be accepted for them for
|
||||||
|
significant issues.
|
||||||
@@ -25,6 +25,7 @@ if __name__ == "__main__":
|
|||||||
parser.add_argument('-u', '--unexpand', help='Do not expand the value (with --value)', action="store_true")
|
parser.add_argument('-u', '--unexpand', help='Do not expand the value (with --value)', action="store_true")
|
||||||
parser.add_argument('-f', '--flag', help='Specify a variable flag to query (with --value)', default=None)
|
parser.add_argument('-f', '--flag', help='Specify a variable flag to query (with --value)', default=None)
|
||||||
parser.add_argument('--value', help='Only report the value, no history and no variable name', action="store_true")
|
parser.add_argument('--value', help='Only report the value, no history and no variable name', action="store_true")
|
||||||
|
parser.add_argument('-q', '--quiet', help='Silence bitbake server logging', action="store_true")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.unexpand and not args.value:
|
if args.unexpand and not args.value:
|
||||||
@@ -35,9 +36,10 @@ if __name__ == "__main__":
|
|||||||
print("--flag only makes sense with --value")
|
print("--flag only makes sense with --value")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
with bb.tinfoil.Tinfoil(tracking=True) as tinfoil:
|
quiet = args.quiet
|
||||||
|
with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not quiet) as tinfoil:
|
||||||
if args.recipe:
|
if args.recipe:
|
||||||
tinfoil.prepare(quiet=2)
|
tinfoil.prepare(quiet=3 if quiet else 2)
|
||||||
d = tinfoil.parse_recipe(args.recipe)
|
d = tinfoil.parse_recipe(args.recipe)
|
||||||
else:
|
else:
|
||||||
tinfoil.prepare(quiet=2, config_only=True)
|
tinfoil.prepare(quiet=2, config_only=True)
|
||||||
|
|||||||
@@ -56,8 +56,7 @@ def main():
|
|||||||
nonlocal missed_hashes
|
nonlocal missed_hashes
|
||||||
nonlocal max_time
|
nonlocal max_time
|
||||||
|
|
||||||
client = hashserv.create_client(args.address)
|
with hashserv.create_client(args.address) as client:
|
||||||
|
|
||||||
for i in range(args.requests):
|
for i in range(args.requests):
|
||||||
taskhash = hashlib.sha256()
|
taskhash = hashlib.sha256()
|
||||||
taskhash.update(args.taskhash_seed.encode('utf-8'))
|
taskhash.update(args.taskhash_seed.encode('utf-8'))
|
||||||
@@ -152,8 +151,7 @@ def main():
|
|||||||
|
|
||||||
func = getattr(args, 'func', None)
|
func = getattr(args, 'func', None)
|
||||||
if func:
|
if func:
|
||||||
client = hashserv.create_client(args.address)
|
with hashserv.create_client(args.address) as client:
|
||||||
|
|
||||||
return func(args, client)
|
return func(args, client)
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -91,19 +91,19 @@ def worker_fire_prepickled(event):
|
|||||||
worker_thread_exit = False
|
worker_thread_exit = False
|
||||||
|
|
||||||
def worker_flush(worker_queue):
|
def worker_flush(worker_queue):
|
||||||
worker_queue_int = b""
|
worker_queue_int = bytearray()
|
||||||
global worker_pipe, worker_thread_exit
|
global worker_pipe, worker_thread_exit
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
worker_queue_int = worker_queue_int + worker_queue.get(True, 1)
|
worker_queue_int.extend(worker_queue.get(True, 1))
|
||||||
except queue.Empty:
|
except queue.Empty:
|
||||||
pass
|
pass
|
||||||
while (worker_queue_int or not worker_queue.empty()):
|
while (worker_queue_int or not worker_queue.empty()):
|
||||||
try:
|
try:
|
||||||
(_, ready, _) = select.select([], [worker_pipe], [], 1)
|
(_, ready, _) = select.select([], [worker_pipe], [], 1)
|
||||||
if not worker_queue.empty():
|
if not worker_queue.empty():
|
||||||
worker_queue_int = worker_queue_int + worker_queue.get()
|
worker_queue_int.extend(worker_queue.get())
|
||||||
written = os.write(worker_pipe, worker_queue_int)
|
written = os.write(worker_pipe, worker_queue_int)
|
||||||
worker_queue_int = worker_queue_int[written:]
|
worker_queue_int = worker_queue_int[written:]
|
||||||
except (IOError, OSError) as e:
|
except (IOError, OSError) as e:
|
||||||
@@ -338,12 +338,12 @@ class runQueueWorkerPipe():
|
|||||||
if pipeout:
|
if pipeout:
|
||||||
pipeout.close()
|
pipeout.close()
|
||||||
bb.utils.nonblockingfd(self.input)
|
bb.utils.nonblockingfd(self.input)
|
||||||
self.queue = b""
|
self.queue = bytearray()
|
||||||
|
|
||||||
def read(self):
|
def read(self):
|
||||||
start = len(self.queue)
|
start = len(self.queue)
|
||||||
try:
|
try:
|
||||||
self.queue = self.queue + (self.input.read(102400) or b"")
|
self.queue.extend(self.input.read(102400) or b"")
|
||||||
except (OSError, IOError) as e:
|
except (OSError, IOError) as e:
|
||||||
if e.errno != errno.EAGAIN:
|
if e.errno != errno.EAGAIN:
|
||||||
raise
|
raise
|
||||||
@@ -371,7 +371,7 @@ class BitbakeWorker(object):
|
|||||||
def __init__(self, din):
|
def __init__(self, din):
|
||||||
self.input = din
|
self.input = din
|
||||||
bb.utils.nonblockingfd(self.input)
|
bb.utils.nonblockingfd(self.input)
|
||||||
self.queue = b""
|
self.queue = bytearray()
|
||||||
self.cookercfg = None
|
self.cookercfg = None
|
||||||
self.databuilder = None
|
self.databuilder = None
|
||||||
self.data = None
|
self.data = None
|
||||||
@@ -405,7 +405,7 @@ class BitbakeWorker(object):
|
|||||||
if len(r) == 0:
|
if len(r) == 0:
|
||||||
# EOF on pipe, server must have terminated
|
# EOF on pipe, server must have terminated
|
||||||
self.sigterm_exception(signal.SIGTERM, None)
|
self.sigterm_exception(signal.SIGTERM, None)
|
||||||
self.queue = self.queue + r
|
self.queue.extend(r)
|
||||||
except (OSError, IOError):
|
except (OSError, IOError):
|
||||||
pass
|
pass
|
||||||
if len(self.queue):
|
if len(self.queue):
|
||||||
|
|||||||
@@ -15,6 +15,13 @@ import sys
|
|||||||
if sys.version_info < (3, 6, 0):
|
if sys.version_info < (3, 6, 0):
|
||||||
raise RuntimeError("Sorry, python 3.6.0 or later is required for this version of bitbake")
|
raise RuntimeError("Sorry, python 3.6.0 or later is required for this version of bitbake")
|
||||||
|
|
||||||
|
if sys.version_info < (3, 10, 0):
|
||||||
|
# With python 3.8 and 3.9, we see errors of "libgcc_s.so.1 must be installed for pthread_cancel to work"
|
||||||
|
# https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work
|
||||||
|
# https://bugs.ams1.psf.io/issue42888
|
||||||
|
# so ensure libgcc_s is loaded early on
|
||||||
|
import ctypes
|
||||||
|
libgcc_s = ctypes.CDLL('libgcc_s.so.1')
|
||||||
|
|
||||||
class BBHandledException(Exception):
|
class BBHandledException(Exception):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -126,6 +126,12 @@ class AsyncClient(object):
|
|||||||
{'ping': {}}
|
{'ping': {}}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async def __aenter__(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
async def __aexit__(self, exc_type, exc_value, traceback):
|
||||||
|
await self.close()
|
||||||
|
|
||||||
|
|
||||||
class Client(object):
|
class Client(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -176,3 +182,10 @@ class Client(object):
|
|||||||
if sys.version_info >= (3, 6):
|
if sys.version_info >= (3, 6):
|
||||||
self.loop.run_until_complete(self.loop.shutdown_asyncgens())
|
self.loop.run_until_complete(self.loop.shutdown_asyncgens())
|
||||||
self.loop.close()
|
self.loop.close()
|
||||||
|
|
||||||
|
def __enter__(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
|
self.close()
|
||||||
|
return False
|
||||||
|
|||||||
@@ -310,6 +310,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, ignored_vars, d):
|
|||||||
value += "\n_remove of %s" % r
|
value += "\n_remove of %s" % r
|
||||||
deps |= r2.references
|
deps |= r2.references
|
||||||
deps = deps | (keys & r2.execs)
|
deps = deps | (keys & r2.execs)
|
||||||
|
value = handle_contains(value, r2.contains, exclusions, d)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
if "vardepvalue" in varflags:
|
if "vardepvalue" in varflags:
|
||||||
|
|||||||
@@ -234,9 +234,10 @@ class diskMonitor:
|
|||||||
freeInode = st.f_favail
|
freeInode = st.f_favail
|
||||||
|
|
||||||
if minInode and freeInode < minInode:
|
if minInode and freeInode < minInode:
|
||||||
# Some filesystems use dynamic inodes so can't run out
|
# Some filesystems use dynamic inodes so can't run out.
|
||||||
# (e.g. btrfs). This is reported by the inode count being 0.
|
# This is reported by the inode count being 0 (btrfs) or the free
|
||||||
if st.f_files == 0:
|
# inode count being -1 (cephfs).
|
||||||
|
if st.f_files == 0 or st.f_favail == -1:
|
||||||
self.devDict[k][2] = None
|
self.devDict[k][2] = None
|
||||||
continue
|
continue
|
||||||
# Always show warning, the self.checked would always be False if the action is WARN
|
# Always show warning, the self.checked would always be False if the action is WARN
|
||||||
|
|||||||
@@ -198,15 +198,27 @@ class RunQueueScheduler(object):
|
|||||||
curr_cpu_pressure = cpu_pressure_fds.readline().split()[4].split("=")[1]
|
curr_cpu_pressure = cpu_pressure_fds.readline().split()[4].split("=")[1]
|
||||||
curr_io_pressure = io_pressure_fds.readline().split()[4].split("=")[1]
|
curr_io_pressure = io_pressure_fds.readline().split()[4].split("=")[1]
|
||||||
curr_memory_pressure = memory_pressure_fds.readline().split()[4].split("=")[1]
|
curr_memory_pressure = memory_pressure_fds.readline().split()[4].split("=")[1]
|
||||||
exceeds_cpu_pressure = self.rq.max_cpu_pressure and (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) > self.rq.max_cpu_pressure
|
|
||||||
exceeds_io_pressure = self.rq.max_io_pressure and (float(curr_io_pressure) - float(self.prev_io_pressure)) > self.rq.max_io_pressure
|
|
||||||
exceeds_memory_pressure = self.rq.max_memory_pressure and (float(curr_memory_pressure) - float(self.prev_memory_pressure)) > self.rq.max_memory_pressure
|
|
||||||
now = time.time()
|
now = time.time()
|
||||||
if now - self.prev_pressure_time > 1.0:
|
tdiff = now - self.prev_pressure_time
|
||||||
|
psi_accumulation_interval = 1.0
|
||||||
|
cpu_pressure = (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) / tdiff
|
||||||
|
io_pressure = (float(curr_io_pressure) - float(self.prev_io_pressure)) / tdiff
|
||||||
|
memory_pressure = (float(curr_memory_pressure) - float(self.prev_memory_pressure)) / tdiff
|
||||||
|
exceeds_cpu_pressure = self.rq.max_cpu_pressure and cpu_pressure > self.rq.max_cpu_pressure
|
||||||
|
exceeds_io_pressure = self.rq.max_io_pressure and io_pressure > self.rq.max_io_pressure
|
||||||
|
exceeds_memory_pressure = self.rq.max_memory_pressure and memory_pressure > self.rq.max_memory_pressure
|
||||||
|
|
||||||
|
if tdiff > psi_accumulation_interval:
|
||||||
self.prev_cpu_pressure = curr_cpu_pressure
|
self.prev_cpu_pressure = curr_cpu_pressure
|
||||||
self.prev_io_pressure = curr_io_pressure
|
self.prev_io_pressure = curr_io_pressure
|
||||||
self.prev_memory_pressure = curr_memory_pressure
|
self.prev_memory_pressure = curr_memory_pressure
|
||||||
self.prev_pressure_time = now
|
self.prev_pressure_time = now
|
||||||
|
|
||||||
|
pressure_state = (exceeds_cpu_pressure, exceeds_io_pressure, exceeds_memory_pressure)
|
||||||
|
pressure_values = (round(cpu_pressure,1), self.rq.max_cpu_pressure, round(io_pressure,1), self.rq.max_io_pressure, round(memory_pressure,1), self.rq.max_memory_pressure)
|
||||||
|
if hasattr(self, "pressure_state") and pressure_state != self.pressure_state:
|
||||||
|
bb.note("Pressure status changed to CPU: %s, IO: %s, Mem: %s (CPU: %s/%s, IO: %s/%s, Mem: %s/%s) - using %s/%s bitbake threads" % (pressure_state + pressure_values + (len(self.rq.runq_running.difference(self.rq.runq_complete)), self.rq.number_tasks)))
|
||||||
|
self.pressure_state = pressure_state
|
||||||
return (exceeds_cpu_pressure or exceeds_io_pressure or exceeds_memory_pressure)
|
return (exceeds_cpu_pressure or exceeds_io_pressure or exceeds_memory_pressure)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -1980,12 +1992,12 @@ class RunQueueExecute:
|
|||||||
# Allow the next deferred task to run. Any other deferred tasks should be deferred after that task.
|
# Allow the next deferred task to run. Any other deferred tasks should be deferred after that task.
|
||||||
# We shouldn't allow all to run at once as it is prone to races.
|
# We shouldn't allow all to run at once as it is prone to races.
|
||||||
if not found:
|
if not found:
|
||||||
bb.note("Deferred task %s now buildable" % t)
|
bb.debug(1, "Deferred task %s now buildable" % t)
|
||||||
del self.sq_deferred[t]
|
del self.sq_deferred[t]
|
||||||
update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
|
update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
|
||||||
found = t
|
found = t
|
||||||
else:
|
else:
|
||||||
bb.note("Deferring %s after %s" % (t, found))
|
bb.debug(1, "Deferring %s after %s" % (t, found))
|
||||||
self.sq_deferred[t] = found
|
self.sq_deferred[t] = found
|
||||||
|
|
||||||
def task_complete(self, task):
|
def task_complete(self, task):
|
||||||
@@ -2892,7 +2904,7 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
|
|||||||
sqdata.hashes[h] = tid
|
sqdata.hashes[h] = tid
|
||||||
else:
|
else:
|
||||||
sqrq.sq_deferred[tid] = sqdata.hashes[h]
|
sqrq.sq_deferred[tid] = sqdata.hashes[h]
|
||||||
bb.note("Deferring %s after %s" % (tid, sqdata.hashes[h]))
|
bb.debug(1, "Deferring %s after %s" % (tid, sqdata.hashes[h]))
|
||||||
|
|
||||||
update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True)
|
update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True)
|
||||||
|
|
||||||
@@ -3101,7 +3113,7 @@ class runQueuePipe():
|
|||||||
if pipeout:
|
if pipeout:
|
||||||
pipeout.close()
|
pipeout.close()
|
||||||
bb.utils.nonblockingfd(self.input)
|
bb.utils.nonblockingfd(self.input)
|
||||||
self.queue = b""
|
self.queue = bytearray()
|
||||||
self.d = d
|
self.d = d
|
||||||
self.rq = rq
|
self.rq = rq
|
||||||
self.rqexec = rqexec
|
self.rqexec = rqexec
|
||||||
@@ -3120,7 +3132,7 @@ class runQueuePipe():
|
|||||||
|
|
||||||
start = len(self.queue)
|
start = len(self.queue)
|
||||||
try:
|
try:
|
||||||
self.queue = self.queue + (self.input.read(102400) or b"")
|
self.queue.extend(self.input.read(102400) or b"")
|
||||||
except (OSError, IOError) as e:
|
except (OSError, IOError) as e:
|
||||||
if e.errno != errno.EAGAIN:
|
if e.errno != errno.EAGAIN:
|
||||||
raise
|
raise
|
||||||
|
|||||||
@@ -430,6 +430,32 @@ esac
|
|||||||
self.assertEqual(deps, set(["TESTVAR2"]))
|
self.assertEqual(deps, set(["TESTVAR2"]))
|
||||||
self.assertEqual(self.d.getVar('ANOTHERVAR').split(), ['testval3', 'anothervalue'])
|
self.assertEqual(self.d.getVar('ANOTHERVAR').split(), ['testval3', 'anothervalue'])
|
||||||
|
|
||||||
|
def test_contains_vardeps_override_operators(self):
|
||||||
|
# Check override operators handle dependencies correctly with the contains functionality
|
||||||
|
expr_plain = 'testval'
|
||||||
|
expr_prepend = '${@bb.utils.filter("TESTVAR1", "testval1", d)} '
|
||||||
|
expr_append = ' ${@bb.utils.filter("TESTVAR2", "testval2", d)}'
|
||||||
|
expr_remove = '${@bb.utils.contains("TESTVAR3", "no-testval", "testval", "", d)}'
|
||||||
|
# Check dependencies
|
||||||
|
self.d.setVar('ANOTHERVAR', expr_plain)
|
||||||
|
self.d.prependVar('ANOTHERVAR', expr_prepend)
|
||||||
|
self.d.appendVar('ANOTHERVAR', expr_append)
|
||||||
|
self.d.setVar('ANOTHERVAR:remove', expr_remove)
|
||||||
|
self.d.setVar('TESTVAR1', 'blah')
|
||||||
|
self.d.setVar('TESTVAR2', 'testval2')
|
||||||
|
self.d.setVar('TESTVAR3', 'no-testval')
|
||||||
|
deps, values = bb.data.build_dependencies("ANOTHERVAR", set(self.d.keys()), set(), set(), set(), self.d)
|
||||||
|
self.assertEqual(sorted(values.splitlines()),
|
||||||
|
sorted([
|
||||||
|
expr_prepend + expr_plain + expr_append,
|
||||||
|
'_remove of ' + expr_remove,
|
||||||
|
'TESTVAR1{testval1} = Unset',
|
||||||
|
'TESTVAR2{testval2} = Set',
|
||||||
|
'TESTVAR3{no-testval} = Set',
|
||||||
|
]))
|
||||||
|
# Check final value
|
||||||
|
self.assertEqual(self.d.getVar('ANOTHERVAR').split(), ['testval2'])
|
||||||
|
|
||||||
#Currently no wildcard support
|
#Currently no wildcard support
|
||||||
#def test_vardeps_wildcards(self):
|
#def test_vardeps_wildcards(self):
|
||||||
# self.d.setVar("oe_libinstall", "echo test")
|
# self.d.setVar("oe_libinstall", "echo test")
|
||||||
|
|||||||
@@ -324,11 +324,11 @@ class Tinfoil:
|
|||||||
self.recipes_parsed = False
|
self.recipes_parsed = False
|
||||||
self.quiet = 0
|
self.quiet = 0
|
||||||
self.oldhandlers = self.logger.handlers[:]
|
self.oldhandlers = self.logger.handlers[:]
|
||||||
|
self.localhandlers = []
|
||||||
if setup_logging:
|
if setup_logging:
|
||||||
# This is the *client-side* logger, nothing to do with
|
# This is the *client-side* logger, nothing to do with
|
||||||
# logging messages from the server
|
# logging messages from the server
|
||||||
bb.msg.logger_create('BitBake', output)
|
bb.msg.logger_create('BitBake', output)
|
||||||
self.localhandlers = []
|
|
||||||
for handler in self.logger.handlers:
|
for handler in self.logger.handlers:
|
||||||
if handler not in self.oldhandlers:
|
if handler not in self.oldhandlers:
|
||||||
self.localhandlers.append(handler)
|
self.localhandlers.append(handler)
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ def auto_shutdown():
|
|||||||
def ping(host, port):
|
def ping(host, port):
|
||||||
from . import client
|
from . import client
|
||||||
|
|
||||||
conn = client.PRClient()
|
with client.PRClient() as conn:
|
||||||
conn.connect_tcp(host, port)
|
conn.connect_tcp(host, port)
|
||||||
return conn.ping()
|
return conn.ping()
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
import json
|
import json
|
||||||
import subprocess
|
import glob
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
|
|
||||||
from orm.models import Project, ProjectTarget, Build, Layer_Version
|
from orm.models import Project, ProjectTarget, Build, Layer_Version
|
||||||
@@ -234,13 +234,11 @@ class XhrSetDefaultImageUrl(View):
|
|||||||
|
|
||||||
def scan_layer_content(layer,layer_version):
|
def scan_layer_content(layer,layer_version):
|
||||||
# if this is a local layer directory, we can immediately scan its content
|
# if this is a local layer directory, we can immediately scan its content
|
||||||
if layer.local_source_dir:
|
if os.path.isdir(layer.local_source_dir):
|
||||||
try:
|
try:
|
||||||
# recipes-*/*/*.bb
|
# recipes-*/*/*.bb
|
||||||
cmd = '%s %s' % ('ls', os.path.join(layer.local_source_dir,'recipes-*/*/*.bb'))
|
recipes_list = glob.glob(os.path.join(layer.local_source_dir, 'recipes-*/*/*.bb'))
|
||||||
recipes_list = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read()
|
for recipe in recipes_list:
|
||||||
recipes_list = recipes_list.decode("utf-8").strip()
|
|
||||||
if recipes_list and 'No such' not in recipes_list:
|
|
||||||
for recipe in recipes_list.split('\n'):
|
for recipe in recipes_list.split('\n'):
|
||||||
recipe_path = recipe[recipe.rfind('recipes-'):]
|
recipe_path = recipe[recipe.rfind('recipes-'):]
|
||||||
recipe_name = recipe[recipe.rfind('/')+1:].replace('.bb','')
|
recipe_name = recipe[recipe.rfind('/')+1:].replace('.bb','')
|
||||||
@@ -260,6 +258,9 @@ def scan_layer_content(layer,layer_version):
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("ERROR:scan_layer_content: %s" % e)
|
logger.warning("ERROR:scan_layer_content: %s" % e)
|
||||||
|
else:
|
||||||
|
logger.warning("ERROR: wrong path given")
|
||||||
|
raise KeyError("local_source_dir")
|
||||||
|
|
||||||
class XhrLayer(View):
|
class XhrLayer(View):
|
||||||
""" Delete, Get, Add and Update Layer information
|
""" Delete, Get, Add and Update Layer information
|
||||||
|
|||||||
@@ -254,10 +254,10 @@ an entire Linux distribution, including the toolchain, from source.
|
|||||||
To use such mirrors, uncomment the below lines in your ``conf/local.conf``
|
To use such mirrors, uncomment the below lines in your ``conf/local.conf``
|
||||||
file in the :term:`Build Directory`::
|
file in the :term:`Build Directory`::
|
||||||
|
|
||||||
BB_SIGNATURE_HANDLER = "OEEquivHash"
|
|
||||||
BB_HASHSERVE = "auto"
|
|
||||||
BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687"
|
BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687"
|
||||||
SSTATE_MIRRORS ?= "file://.* https://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
|
SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH"
|
||||||
|
BB_HASHSERVE = "auto"
|
||||||
|
BB_SIGNATURE_HANDLER = "OEEquivHash"
|
||||||
|
|
||||||
#. **Start the Build:** Continue with the following command to build an OS
|
#. **Start the Build:** Continue with the following command to build an OS
|
||||||
image for the target, which is ``core-image-sato`` in this example:
|
image for the target, which is ``core-image-sato`` in this example:
|
||||||
|
|||||||
@@ -774,20 +774,6 @@ workflow.
|
|||||||
|
|
||||||
- Two general IA platforms (``genericx86`` and ``genericx86-64``)
|
- Two general IA platforms (``genericx86`` and ``genericx86-64``)
|
||||||
|
|
||||||
- There are three core Intel BSPs in the Yocto Project
|
|
||||||
release, in the ``meta-intel`` layer:
|
|
||||||
|
|
||||||
- ``intel-core2-32``, which is a BSP optimized for the Core2
|
|
||||||
family of CPUs as well as all CPUs prior to the Silvermont
|
|
||||||
core.
|
|
||||||
|
|
||||||
- ``intel-corei7-64``, which is a BSP optimized for Nehalem
|
|
||||||
and later Core and Xeon CPUs as well as Silvermont and later
|
|
||||||
Atom CPUs, such as the Baytrail SoCs.
|
|
||||||
|
|
||||||
- ``intel-quark``, which is a BSP optimized for the Intel
|
|
||||||
Galileo gen1 & gen2 development boards.
|
|
||||||
|
|
||||||
When you set up a layer for a new BSP, you should follow a standard
|
When you set up a layer for a new BSP, you should follow a standard
|
||||||
layout. This layout is described in the ":ref:`bsp-guide/bsp:example filesystem layout`"
|
layout. This layout is described in the ":ref:`bsp-guide/bsp:example filesystem layout`"
|
||||||
section. In the standard layout, notice
|
section. In the standard layout, notice
|
||||||
@@ -893,8 +879,8 @@ Yocto Project:
|
|||||||
``recipes-*`` subdirectories specific to the recipe's function, or
|
``recipes-*`` subdirectories specific to the recipe's function, or
|
||||||
within a subdirectory containing a set of closely-related recipes.
|
within a subdirectory containing a set of closely-related recipes.
|
||||||
The recipes themselves should follow the general guidelines for
|
The recipes themselves should follow the general guidelines for
|
||||||
recipes used in the Yocto Project found in the ":oe_wiki:`OpenEmbedded
|
recipes found in the ":doc:`../contributor-guide/recipe-style-guide`"
|
||||||
Style Guide </Styleguide>`".
|
in the Yocto Project and OpenEmbedded Contributor Guide.
|
||||||
|
|
||||||
- *License File:* You must include a license file in the
|
- *License File:* You must include a license file in the
|
||||||
``meta-bsp_root_name`` directory. This license covers the BSP
|
``meta-bsp_root_name`` directory. This license covers the BSP
|
||||||
@@ -1194,7 +1180,7 @@ Use these steps to create a BSP layer:
|
|||||||
|
|
||||||
- *Create a Kernel Recipe:* Create a kernel recipe in
|
- *Create a Kernel Recipe:* Create a kernel recipe in
|
||||||
``recipes-kernel/linux`` by either using a kernel append file or a
|
``recipes-kernel/linux`` by either using a kernel append file or a
|
||||||
new custom kernel recipe file (e.g. ``yocto-linux_4.12.bb``). The BSP
|
new custom kernel recipe file (e.g. ``linux-yocto_4.12.bb``). The BSP
|
||||||
layers mentioned in the previous step also contain different kernel
|
layers mentioned in the previous step also contain different kernel
|
||||||
examples. See the ":ref:`kernel-dev/common:modifying an existing recipe`"
|
examples. See the ":ref:`kernel-dev/common:modifying an existing recipe`"
|
||||||
section in the Yocto Project Linux Kernel Development Manual for
|
section in the Yocto Project Linux Kernel Development Manual for
|
||||||
@@ -1449,39 +1435,39 @@ The kernel recipe used to build the kernel image for the BeagleBone
|
|||||||
device was established in the machine configuration::
|
device was established in the machine configuration::
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
||||||
PREFERRED_VERSION_linux-yocto ?= "5.0%"
|
PREFERRED_VERSION_linux-yocto ?= "5.15%"
|
||||||
|
|
||||||
The ``meta-yocto-bsp/recipes-kernel/linux`` directory in the layer contains
|
The ``meta-yocto-bsp/recipes-kernel/linux`` directory in the layer contains
|
||||||
metadata used to build the kernel. In this case, a kernel append file
|
metadata used to build the kernel. In this case, a kernel append file
|
||||||
(i.e. ``linux-yocto_5.0.bbappend``) is used to override an established
|
(i.e. ``linux-yocto_5.15.bbappend``) is used to override an established
|
||||||
kernel recipe (i.e. ``linux-yocto_5.0.bb``), which is located in
|
kernel recipe (i.e. ``linux-yocto_5.15.bb``), which is located in
|
||||||
:yocto_git:`/poky/tree/meta/recipes-kernel/linux`.
|
:yocto_git:`/poky/tree/meta-yocto-bsp/recipes-kernel/linux`.
|
||||||
|
|
||||||
Following is the contents of the append file::
|
Following is the contents of the append file::
|
||||||
|
|
||||||
KBRANCH:genericx86 = "v5.0/standard/base"
|
KBRANCH:genericx86 = "v5.15/standard/base"
|
||||||
KBRANCH:genericx86-64 = "v5.0/standard/base"
|
KBRANCH:genericx86-64 = "v5.15/standard/base"
|
||||||
KBRANCH:edgerouter = "v5.0/standard/edgerouter"
|
KBRANCH:edgerouter = "v5.15/standard/edgerouter"
|
||||||
KBRANCH:beaglebone-yocto = "v5.0/standard/beaglebone"
|
KBRANCH:beaglebone-yocto = "v5.15/standard/beaglebone"
|
||||||
|
|
||||||
KMACHINE:genericx86 ?= "common-pc"
|
KMACHINE:genericx86 ?= "common-pc"
|
||||||
KMACHINE:genericx86-64 ?= "common-pc-64"
|
KMACHINE:genericx86-64 ?= "common-pc-64"
|
||||||
KMACHINE:beaglebone-yocto ?= "beaglebone"
|
KMACHINE:beaglebone-yocto ?= "beaglebone"
|
||||||
|
|
||||||
SRCREV_machine:genericx86 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
|
SRCREV_machine:genericx86 ?= "0b628306d1f9ea28c0e86369ce9bb87a47893c9c"
|
||||||
SRCREV_machine:genericx86-64 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
|
SRCREV_machine:genericx86-64 ?= "0b628306d1f9ea28c0e86369ce9bb87a47893c9c"
|
||||||
SRCREV_machine:edgerouter ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
|
SRCREV_machine:edgerouter ?= "90f1ee6589264545f548d731c2480b08a007230f"
|
||||||
SRCREV_machine:beaglebone-yocto ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
|
SRCREV_machine:beaglebone-yocto ?= "9aabbaa89fcb21af7028e814c1f5b61171314d5a"
|
||||||
|
|
||||||
COMPATIBLE_MACHINE:genericx86 = "genericx86"
|
COMPATIBLE_MACHINE:genericx86 = "genericx86"
|
||||||
COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64"
|
COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64"
|
||||||
COMPATIBLE_MACHINE:edgerouter = "edgerouter"
|
COMPATIBLE_MACHINE:edgerouter = "edgerouter"
|
||||||
COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto"
|
COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto"
|
||||||
|
|
||||||
LINUX_VERSION:genericx86 = "5.0.3"
|
LINUX_VERSION:genericx86 = "5.15.72"
|
||||||
LINUX_VERSION:genericx86-64 = "5.0.3"
|
LINUX_VERSION:genericx86-64 = "5.15.72"
|
||||||
LINUX_VERSION:edgerouter = "5.0.3"
|
LINUX_VERSION:edgerouter = "5.15.54"
|
||||||
LINUX_VERSION:beaglebone-yocto = "5.0.3"
|
LINUX_VERSION:beaglebone-yocto = "5.15.54"
|
||||||
|
|
||||||
This particular append file works for all the machines that are
|
This particular append file works for all the machines that are
|
||||||
part of the ``meta-yocto-bsp`` layer. The relevant statements are
|
part of the ``meta-yocto-bsp`` layer. The relevant statements are
|
||||||
|
|||||||
@@ -7,17 +7,18 @@ Recipe Naming Conventions
|
|||||||
=========================
|
=========================
|
||||||
|
|
||||||
In general, most recipes should follow the naming convention
|
In general, most recipes should follow the naming convention
|
||||||
``recipes-category/package/packagename_version.bb``. Recipes for related
|
``recipes-category/recipename/recipename_version.bb``. Recipes for related
|
||||||
projects may share the same package directory. ``packagename``, ``category``,
|
projects may share the same recipe directory. ``recipename`` and ``category``
|
||||||
and ``package`` may contain hyphens, but hyphens are not allowed in ``version``.
|
may contain hyphens, but hyphens are not allowed in ``version``.
|
||||||
|
|
||||||
If the recipe is tracking a Git revision that does not correspond to a released
|
If the recipe is tracking a Git revision that does not correspond to a released
|
||||||
version of the software, ``version`` may be ``git`` (e.g. ``packagename_git.bb``)
|
version of the software, ``version`` may be ``git`` (e.g. ``recipename_git.bb``)
|
||||||
|
and the recipe would set :term:`PV`.
|
||||||
|
|
||||||
Version Policy
|
Version Policy
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Our versions follow the form ``<package epoch>:<package version>-<package revision>``
|
Our versions follow the form ``<epoch>:<version>-<revision>``
|
||||||
or in BitBake variable terms ${:term:`PE`}:${:term:`PV`}-${:term:`PR`}. We
|
or in BitBake variable terms ${:term:`PE`}:${:term:`PV`}-${:term:`PR`}. We
|
||||||
generally follow the `Debian <https://www.debian.org/doc/debian-policy/ch-controlfields.html#version>`__
|
generally follow the `Debian <https://www.debian.org/doc/debian-policy/ch-controlfields.html#version>`__
|
||||||
version policy which defines these terms.
|
version policy which defines these terms.
|
||||||
@@ -26,7 +27,7 @@ In most cases the version :term:`PV` will be set automatically from the recipe
|
|||||||
file name. It is recommended to use released versions of software as these are
|
file name. It is recommended to use released versions of software as these are
|
||||||
revisions that upstream are expecting people to use.
|
revisions that upstream are expecting people to use.
|
||||||
|
|
||||||
Package versions should always compare and sort correctly so that upgrades work
|
Recipe versions should always compare and sort correctly so that upgrades work
|
||||||
as expected. With conventional versions such as ``1.4`` upgrading ``to 1.5``
|
as expected. With conventional versions such as ``1.4`` upgrading ``to 1.5``
|
||||||
this happens naturally, but some versions don't sort. For example,
|
this happens naturally, but some versions don't sort. For example,
|
||||||
``1.5 Release Candidate 2`` could be written as ``1.5rc2`` but this sorts after
|
``1.5 Release Candidate 2`` could be written as ``1.5rc2`` but this sorts after
|
||||||
@@ -62,7 +63,7 @@ Version Number Changes
|
|||||||
|
|
||||||
The :term:`PR` variable is used to indicate different revisions of a recipe
|
The :term:`PR` variable is used to indicate different revisions of a recipe
|
||||||
that reference the same upstream source version. It can be used to force a
|
that reference the same upstream source version. It can be used to force a
|
||||||
new version of a package to be installed onto a device from a package feed.
|
new version of a recipe to be installed onto a device from a package feed.
|
||||||
These once had to be set manually but in most cases these can now be set and
|
These once had to be set manually but in most cases these can now be set and
|
||||||
incremented automatically by a PR Server connected with a package feed.
|
incremented automatically by a PR Server connected with a package feed.
|
||||||
|
|
||||||
@@ -249,6 +250,18 @@ Recipes need to define both the :term:`LICENSE` and
|
|||||||
correct string that you can substitute into the recipe file for a
|
correct string that you can substitute into the recipe file for a
|
||||||
subsequent build.
|
subsequent build.
|
||||||
|
|
||||||
|
License Updates
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
When you change the :term:`LICENSE` or :term:`LIC_FILES_CHKSUM` in the recipe
|
||||||
|
you need to briefly explain the reason for the change via a ``License-Update:``
|
||||||
|
tag. Often it's quite trivial, such as::
|
||||||
|
|
||||||
|
License-Update: copyright years refreshed
|
||||||
|
|
||||||
|
Less often, the actual licensing terms themselves will have changed. If so, do
|
||||||
|
try to link to upstream making/justifying that decision.
|
||||||
|
|
||||||
Tips and Guidelines for Writing Recipes
|
Tips and Guidelines for Writing Recipes
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
@@ -256,6 +269,20 @@ Tips and Guidelines for Writing Recipes
|
|||||||
and ``-nativesdk`` ones, whenever possible. This avoids having to maintain multiple
|
and ``-nativesdk`` ones, whenever possible. This avoids having to maintain multiple
|
||||||
recipe files at the same time.
|
recipe files at the same time.
|
||||||
|
|
||||||
|
- Recipes should have tasks which are idempotent, i.e. that executing a given task
|
||||||
|
multiple times shouldn't change the end result. The build environment is built upon
|
||||||
|
this assumption and breaking it can cause obscure build failures.
|
||||||
|
|
||||||
|
- For idempotence when modifying files in tasks, it is usually best to:
|
||||||
|
|
||||||
|
- copy a file ``X`` to ``X.orig`` (only if it doesn't exist already)
|
||||||
|
- then, copy ``X.orig`` back to ``X``,
|
||||||
|
- and, finally, modify ``X``.
|
||||||
|
|
||||||
|
This ensures if rerun the task always has the same end result and the
|
||||||
|
original file can be preserved to reuse. It also guards against an
|
||||||
|
interrupted build corrupting the file.
|
||||||
|
|
||||||
Patch Upstream Status
|
Patch Upstream Status
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
@@ -271,19 +298,23 @@ Then, you should also add an ``Upstream-Status:`` tag containing one of the
|
|||||||
following status strings:
|
following status strings:
|
||||||
|
|
||||||
``Pending``
|
``Pending``
|
||||||
No determination has been made yet or not yet submitted to upstream.
|
No determination has been made yet, or patch has not yet been submitted to
|
||||||
|
upstream.
|
||||||
|
|
||||||
|
Keep in mind that every patch submitted upstream reduces the maintainance
|
||||||
|
burden in OpenEmbedded and Yocto Project in the long run, so this patch
|
||||||
|
status should only be used in exceptional cases if there are genuine
|
||||||
|
obstacles to submitting a patch upstream; the reason for that should be
|
||||||
|
included in the patch.
|
||||||
|
|
||||||
``Submitted [where]``
|
``Submitted [where]``
|
||||||
Submitted to upstream, waiting for approval. Optionally include where
|
Submitted to upstream, waiting for approval. Optionally include where
|
||||||
it was submitted, such as the author, mailing list, etc.
|
it was submitted, such as the author, mailing list, etc.
|
||||||
|
|
||||||
``Accepted``
|
``Backport [version]``
|
||||||
Accepted in upstream, expect it to be removed at next update, include
|
Accepted upstream and included in the next release, or backported from newer
|
||||||
expected version info.
|
upstream version, because we are at a fixed version.
|
||||||
|
Include upstream version info (e.g. commit ID or next expected version).
|
||||||
``Backport``
|
|
||||||
Backported from new upstream version, because we are at a fixed version,
|
|
||||||
include upstream version info.
|
|
||||||
|
|
||||||
``Denied``
|
``Denied``
|
||||||
Not accepted by upstream, include reason in patch.
|
Not accepted by upstream, include reason in patch.
|
||||||
@@ -299,29 +330,30 @@ following status strings:
|
|||||||
|
|
||||||
``Inappropriate [reason]``
|
``Inappropriate [reason]``
|
||||||
The patch is not appropriate for upstream, include a brief reason on the
|
The patch is not appropriate for upstream, include a brief reason on the
|
||||||
same line enclosed with ``[]``. The reason can be:
|
same line enclosed with ``[]``. In the past, there were several different
|
||||||
|
reasons not to submit patches upstream, but we have to consider that every
|
||||||
|
non-upstreamed patch means a maintainance burden for recipe maintainers.
|
||||||
|
Currently, the only reasons to mark patches as inappropriate for upstream
|
||||||
|
submission are:
|
||||||
|
|
||||||
- ``not author`` (you are not the author and do not intend to upstream this,
|
- ``oe specific``: the issue is specific to how OpenEmbedded performs builds
|
||||||
the source must be listed in the comments)
|
or sets things up at runtime, and can be resolved only with a patch that
|
||||||
- ``native``
|
is not however relevant or appropriate for general upstream submission.
|
||||||
- ``licensing``
|
- ``upstream ticket <link>``: the issue is not specific to Open-Embedded
|
||||||
- ``configuration``
|
and should be fixed upstream, but the patch in its current form is not
|
||||||
- ``enable feature``
|
suitable for merging upstream, and the author lacks sufficient expertise
|
||||||
- ``disable feature``
|
to develop a proper patch. Instead the issue is handled via a bug report
|
||||||
- ``bugfix`` (add bug URL here)
|
(include link).
|
||||||
- ``embedded specific``
|
|
||||||
- ``other`` (give details in comments)
|
|
||||||
|
|
||||||
The various ``Inappropriate [reason]`` status items are meant to indicate that
|
|
||||||
the person responsible for adding this patch to the system does not intend to
|
|
||||||
upstream the patch for a specific reason.
|
|
||||||
|
|
||||||
Of course, if another person later takes care of submitting this patch upstream,
|
Of course, if another person later takes care of submitting this patch upstream,
|
||||||
the status should be changed to ``Submitted [where]``, and an additional
|
the status should be changed to ``Submitted [where]``, and an additional
|
||||||
``Signed-off-by:`` line should be added to the patch by the person claiming
|
``Signed-off-by:`` line should be added to the patch by the person claiming
|
||||||
responsibility for upstreaming.
|
responsibility for upstreaming.
|
||||||
|
|
||||||
For example, if the patch has been submitted upstream::
|
Examples
|
||||||
|
--------
|
||||||
|
|
||||||
|
Here's an example of a patch that has been submitted upstream::
|
||||||
|
|
||||||
rpm: Adjusted the foo setting in bar
|
rpm: Adjusted the foo setting in bar
|
||||||
|
|
||||||
@@ -334,5 +366,46 @@ For example, if the patch has been submitted upstream::
|
|||||||
|
|
||||||
Signed-off-by: Joe Developer <joe.developer@example.com>
|
Signed-off-by: Joe Developer <joe.developer@example.com>
|
||||||
|
|
||||||
A future update can change the value to ``Accepted`` or ``Denied`` as
|
A future update can change the value to ``Backport`` or ``Denied`` as
|
||||||
appropriate.
|
appropriate.
|
||||||
|
|
||||||
|
Another example of a patch that is specific to OpenEmbedded::
|
||||||
|
|
||||||
|
Do not treat warnings as errors
|
||||||
|
|
||||||
|
There are additional warnings found with musl which are
|
||||||
|
treated as errors and fails the build, we have more combinations
|
||||||
|
than upstream supports to handle.
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate [oe specific]
|
||||||
|
|
||||||
|
Here's a patch that has been backported from an upstream commit::
|
||||||
|
|
||||||
|
include missing sys/file.h for LOCK_EX
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/systemd/systemd/commit/ac8db36cbc26694ee94beecc8dca208ec4b5fd45]
|
||||||
|
|
||||||
|
CVE patches
|
||||||
|
===========
|
||||||
|
|
||||||
|
In order to have a better control of vulnerabilities, patches that fix CVEs must
|
||||||
|
contain a ``CVE:`` tag. This tag list all CVEs fixed by the patch. If more than
|
||||||
|
one CVE is fixed, separate them using spaces.
|
||||||
|
|
||||||
|
CVE Examples
|
||||||
|
------------
|
||||||
|
|
||||||
|
This should be the header of patch that fixes :cve:`2015-8370` in GRUB2::
|
||||||
|
|
||||||
|
grub2: Fix CVE-2015-8370
|
||||||
|
|
||||||
|
[No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=1286966
|
||||||
|
|
||||||
|
Back to 28; Grub2 Authentication
|
||||||
|
|
||||||
|
Two functions suffer from integer underflow fault; the grub_username_get() and grub_password_get()located in
|
||||||
|
grub-core/normal/auth.c and lib/crypto.c respectively. This can be exploited to obtain a Grub rescue shell.
|
||||||
|
|
||||||
|
Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432e109771bb8febafca7a5f1f2]
|
||||||
|
CVE: CVE-2015-8370
|
||||||
|
Signed-off-by: Joe Developer <joe.developer@example.com>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ Set up Git
|
|||||||
The first thing to do is to install Git packages. Here is an example
|
The first thing to do is to install Git packages. Here is an example
|
||||||
on Debian and Ubuntu::
|
on Debian and Ubuntu::
|
||||||
|
|
||||||
sudo aptitude install git-core git-email
|
sudo apt install git-core git-email
|
||||||
|
|
||||||
Then, you need to set a name and e-mail address that Git will
|
Then, you need to set a name and e-mail address that Git will
|
||||||
use to identify your commits::
|
use to identify your commits::
|
||||||
@@ -420,7 +420,7 @@ or any layer other than :oe_git:`openembedded-core </openembedded-core/>`,
|
|||||||
please add the appropriate prefix so that it is clear which layer the patch is intended
|
please add the appropriate prefix so that it is clear which layer the patch is intended
|
||||||
to be applied to::
|
to be applied to::
|
||||||
|
|
||||||
git send-email --subject-prefix="meta-oe][PATCH" ...
|
git format-patch --subject-prefix="meta-oe][PATCH" ...
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ build host running Linux.
|
|||||||
OpenEmbedded build system, see the
|
OpenEmbedded build system, see the
|
||||||
:doc:`/brief-yoctoprojectqs/index` document.
|
:doc:`/brief-yoctoprojectqs/index` document.
|
||||||
|
|
||||||
|
- You can also use the `Yocto Project BitBake
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||||
|
extension for Visual Studio Code to build images.
|
||||||
|
|
||||||
The build process creates an entire Linux distribution from source and
|
The build process creates an entire Linux distribution from source and
|
||||||
places it in your :term:`Build Directory` under ``tmp/deploy/images``. For
|
places it in your :term:`Build Directory` under ``tmp/deploy/images``. For
|
||||||
detailed information on the build process using BitBake, see the
|
detailed information on the build process using BitBake, see the
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ BitBake has determined by doing the following:
|
|||||||
the task. This list also includes indirect dependencies from
|
the task. This list also includes indirect dependencies from
|
||||||
variables depending on other variables, recursively::
|
variables depending on other variables, recursively::
|
||||||
|
|
||||||
Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
|
Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[sha256sum]', 'base_do_fetch']
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ Yocto Project Development Tasks Manual
|
|||||||
runtime-testing
|
runtime-testing
|
||||||
debugging
|
debugging
|
||||||
licenses
|
licenses
|
||||||
|
security-subjects
|
||||||
vulnerabilities
|
vulnerabilities
|
||||||
sbom
|
sbom
|
||||||
error-reporting-tool
|
error-reporting-tool
|
||||||
|
|||||||
@@ -128,6 +128,20 @@ Follow these general steps to create your layer without using tools:
|
|||||||
variable is a good way to indicate if your particular layer is
|
variable is a good way to indicate if your particular layer is
|
||||||
current.
|
current.
|
||||||
|
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
A layer does not have to contain only recipes ``.bb`` or append files
|
||||||
|
``.bbappend``. Generally, developers create layers using
|
||||||
|
``bitbake-layers create-layer``.
|
||||||
|
See ":ref:`dev-manual/layers:creating a general layer using the \`\`bitbake-layers\`\` script`",
|
||||||
|
explaining how the ``layer.conf`` file is created from a template located in
|
||||||
|
``meta/lib/bblayers/templates/layer.conf``.
|
||||||
|
In fact, none of the variables set in ``layer.conf`` are mandatory,
|
||||||
|
except when :term:`BBFILE_COLLECTIONS` is present. In this case
|
||||||
|
:term:`LAYERSERIES_COMPAT` and :term:`BBFILE_PATTERN` have to be
|
||||||
|
defined too.
|
||||||
|
|
||||||
#. *Add Content:* Depending on the type of layer, add the content. If
|
#. *Add Content:* Depending on the type of layer, add the content. If
|
||||||
the layer adds support for a machine, add the machine configuration
|
the layer adds support for a machine, add the machine configuration
|
||||||
in a ``conf/machine/`` file within the layer. If the layer adds
|
in a ``conf/machine/`` file within the layer. If the layer adds
|
||||||
@@ -299,7 +313,7 @@ Logo for your layer and application. The process consists of two parts:
|
|||||||
successful compatibility registration.
|
successful compatibility registration.
|
||||||
|
|
||||||
#. Completion of an application acceptance form, which you can find at
|
#. Completion of an application acceptance form, which you can find at
|
||||||
:yocto_home:`/webform/yocto-project-compatible-registration`.
|
:yocto_home:`/compatible-registration/`.
|
||||||
|
|
||||||
To be granted permission to use the logo, you need to satisfy the
|
To be granted permission to use the logo, you need to satisfy the
|
||||||
following:
|
following:
|
||||||
@@ -323,7 +337,7 @@ application, you can use the Yocto Project Compatibility Logo with your
|
|||||||
layer and the application that uses your layer.
|
layer and the application that uses your layer.
|
||||||
|
|
||||||
To access the form, use this link:
|
To access the form, use this link:
|
||||||
:yocto_home:`/webform/yocto-project-compatible-registration`.
|
:yocto_home:`/compatible-registration`.
|
||||||
Follow the instructions on the form to complete your application.
|
Follow the instructions on the form to complete your application.
|
||||||
|
|
||||||
The application consists of the following sections:
|
The application consists of the following sections:
|
||||||
|
|||||||
@@ -303,28 +303,33 @@ If your :term:`SRC_URI` statement includes URLs pointing to individual files
|
|||||||
fetched from a remote server other than a version control system,
|
fetched from a remote server other than a version control system,
|
||||||
BitBake attempts to verify the files against checksums defined in your
|
BitBake attempts to verify the files against checksums defined in your
|
||||||
recipe to ensure they have not been tampered with or otherwise modified
|
recipe to ensure they have not been tampered with or otherwise modified
|
||||||
since the recipe was written. Two checksums are used:
|
since the recipe was written. Multiple checksums are supported:
|
||||||
``SRC_URI[md5sum]`` and ``SRC_URI[sha256sum]``.
|
``SRC_URI[md5sum]``, ``SRC_URI[sha1sum]``, ``SRC_URI[sha256sum]``.
|
||||||
|
``SRC_URI[sha384sum]`` and ``SRC_URI[sha512sum]``, but only
|
||||||
|
``SRC_URI[sha256sum]`` is commonly used.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
``SRC_URI[md5sum]`` used to also be commonly used, but it is deprecated
|
||||||
|
and should be replaced by ``SRC_URI[sha256sum]`` when updating existing
|
||||||
|
recipes.
|
||||||
|
|
||||||
If your :term:`SRC_URI` variable points to more than a single URL (excluding
|
If your :term:`SRC_URI` variable points to more than a single URL (excluding
|
||||||
SCM URLs), you need to provide the ``md5`` and ``sha256`` checksums for
|
SCM URLs), you need to provide the ``sha256`` checksum for each URL. For these
|
||||||
each URL. For these cases, you provide a name for each URL as part of
|
cases, you provide a name for each URL as part of the :term:`SRC_URI` and then
|
||||||
the :term:`SRC_URI` and then reference that name in the subsequent checksum
|
reference that name in the subsequent checksum statements. Here is an example
|
||||||
statements. Here is an example combining lines from the files
|
combining lines from the files ``git.inc`` and ``git_2.24.1.bb``::
|
||||||
``git.inc`` and ``git_2.24.1.bb``::
|
|
||||||
|
|
||||||
SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
|
SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
|
||||||
${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages"
|
${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages"
|
||||||
|
|
||||||
SRC_URI[tarball.md5sum] = "166bde96adbbc11c8843d4f8f4f9811b"
|
|
||||||
SRC_URI[tarball.sha256sum] = "ad5334956301c86841eb1e5b1bb20884a6bad89a10a6762c958220c7cf64da02"
|
SRC_URI[tarball.sha256sum] = "ad5334956301c86841eb1e5b1bb20884a6bad89a10a6762c958220c7cf64da02"
|
||||||
SRC_URI[manpages.md5sum] = "31c2272a8979022497ba3d4202df145d"
|
|
||||||
SRC_URI[manpages.sha256sum] = "9a7ae3a093bea39770eb96ca3e5b40bff7af0b9f6123f089d7821d0e5b8e1230"
|
SRC_URI[manpages.sha256sum] = "9a7ae3a093bea39770eb96ca3e5b40bff7af0b9f6123f089d7821d0e5b8e1230"
|
||||||
|
|
||||||
Proper values for ``md5`` and ``sha256`` checksums might be available
|
The proper value for the ``sha256`` checksum might be available together
|
||||||
with other signatures on the download page for the upstream source (e.g.
|
with other signatures on the download page for the upstream source (e.g.
|
||||||
``md5``, ``sha1``, ``sha256``, ``GPG``, and so forth). Because the
|
``md5``, ``sha1``, ``sha256``, ``GPG``, and so forth). Because the
|
||||||
OpenEmbedded build system only deals with ``sha256sum`` and ``md5sum``,
|
OpenEmbedded build system typically only deals with ``sha256sum``,
|
||||||
you should verify all the signatures you find by hand.
|
you should verify all the signatures you find by hand.
|
||||||
|
|
||||||
If no :term:`SRC_URI` checksums are specified when you attempt to build the
|
If no :term:`SRC_URI` checksums are specified when you attempt to build the
|
||||||
@@ -409,8 +414,8 @@ Patching Code
|
|||||||
|
|
||||||
Sometimes it is necessary to patch code after it has been fetched. Any
|
Sometimes it is necessary to patch code after it has been fetched. Any
|
||||||
files mentioned in :term:`SRC_URI` whose names end in ``.patch`` or
|
files mentioned in :term:`SRC_URI` whose names end in ``.patch`` or
|
||||||
``.diff`` or compressed versions of these suffixes (e.g. ``diff.gz`` are
|
``.diff`` or compressed versions of these suffixes (e.g. ``diff.gz``,
|
||||||
treated as patches. The
|
``patch.bz2``, etc.) are treated as patches. The
|
||||||
:ref:`ref-tasks-patch` task
|
:ref:`ref-tasks-patch` task
|
||||||
automatically applies these patches.
|
automatically applies these patches.
|
||||||
|
|
||||||
@@ -1396,9 +1401,9 @@ doing the following:
|
|||||||
Following Recipe Style Guidelines
|
Following Recipe Style Guidelines
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
When writing recipes, it is good to conform to existing style
|
When writing recipes, it is good to conform to existing style guidelines.
|
||||||
guidelines. The :oe_wiki:`OpenEmbedded Styleguide </Styleguide>` wiki page
|
See the ":doc:`../contributor-guide/recipe-style-guide`" in the Yocto Project
|
||||||
provides rough guidelines for preferred recipe style.
|
and OpenEmbedded Contributor Guide for reference.
|
||||||
|
|
||||||
It is common for existing recipes to deviate a bit from this style.
|
It is common for existing recipes to deviate a bit from this style.
|
||||||
However, aiming for at least a consistent style is a good idea. Some
|
However, aiming for at least a consistent style is a good idea. Some
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ The final thing you need to do when setting :term:`TEST_TARGET` to
|
|||||||
statements in your ``local.conf`` file::
|
statements in your ``local.conf`` file::
|
||||||
|
|
||||||
IMAGE_FSTYPES += "tar.gz"
|
IMAGE_FSTYPES += "tar.gz"
|
||||||
INHERIT += "testimage"
|
IMAGE_CLASSES += "testimage"
|
||||||
TEST_TARGET = "SystemdbootTarget"
|
TEST_TARGET = "SystemdbootTarget"
|
||||||
TEST_TARGET_IP = "192.168.2.3"
|
TEST_TARGET_IP = "192.168.2.3"
|
||||||
|
|
||||||
@@ -332,10 +332,10 @@ You can start the tests automatically or manually:
|
|||||||
bitbake core-image-sato
|
bitbake core-image-sato
|
||||||
|
|
||||||
- *Manually running tests:* To manually run the tests, first globally
|
- *Manually running tests:* To manually run the tests, first globally
|
||||||
inherit the :ref:`ref-classes-testimage*` class by editing your
|
inherit the :ref:`ref-classes-testimage` class by editing your
|
||||||
``local.conf`` file::
|
``local.conf`` file::
|
||||||
|
|
||||||
INHERIT += "testimage"
|
IMAGE_CLASSES += "testimage"
|
||||||
|
|
||||||
Next, use BitBake to run the tests::
|
Next, use BitBake to run the tests::
|
||||||
|
|
||||||
@@ -459,7 +459,7 @@ layer's ``layer.conf`` file as normal). Just remember the following:
|
|||||||
directory.
|
directory.
|
||||||
|
|
||||||
To create a new test, start by copying an existing module (e.g.
|
To create a new test, start by copying an existing module (e.g.
|
||||||
``syslog.py`` or ``gcc.py`` are good ones to use). Test modules can use
|
``oe_syslog.py`` or ``gcc.py`` are good ones to use). Test modules can use
|
||||||
code from ``meta/lib/oeqa/utils``, which are helper classes.
|
code from ``meta/lib/oeqa/utils``, which are helper classes.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|||||||
189
documentation/dev-manual/security-subjects.rst
Normal file
189
documentation/dev-manual/security-subjects.rst
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||||
|
|
||||||
|
Dealing with Vulnerability Reports
|
||||||
|
**********************************
|
||||||
|
|
||||||
|
The Yocto Project and OpenEmbedded are open-source, community-based projects
|
||||||
|
used in numerous products. They assemble multiple other open-source projects,
|
||||||
|
and need to handle security issues and practices both internal (in the code
|
||||||
|
maintained by both projects), and external (maintained by other projects and
|
||||||
|
organizations).
|
||||||
|
|
||||||
|
This manual assembles security-related information concerning the whole
|
||||||
|
ecosystem. It includes information on reporting a potential security issue,
|
||||||
|
the operation of the YP Security team and how to contribute in the
|
||||||
|
related code. It is written to be useful for both security researchers and
|
||||||
|
YP developers.
|
||||||
|
|
||||||
|
How to report a potential security vulnerability?
|
||||||
|
=================================================
|
||||||
|
|
||||||
|
If you would like to report a public issue (for example, one with a released
|
||||||
|
CVE number), please report it using the
|
||||||
|
:yocto_bugs:`Security Bugzilla </enter_bug.cgi?product=Security>`.
|
||||||
|
|
||||||
|
If you are dealing with a not-yet-released issue, or an urgent one, please send
|
||||||
|
a message to security AT yoctoproject DOT org, including as many details as
|
||||||
|
possible: the layer or software module affected, the recipe and its version,
|
||||||
|
and any example code, if available. This mailing list is monitored by the
|
||||||
|
Yocto Project Security team.
|
||||||
|
|
||||||
|
For each layer, you might also look for specific instructions (if any) for
|
||||||
|
reporting potential security issues in the specific ``SECURITY.md`` file at the
|
||||||
|
root of the repository. Instructions on how and where submit a patch are
|
||||||
|
usually available in ``README.md``. If this is your first patch to the
|
||||||
|
Yocto Project/OpenEmbedded, you might want to have a look into the
|
||||||
|
Contributor's Manual section
|
||||||
|
":ref:`contributor-guide/submit-changes:preparing changes for submission`".
|
||||||
|
|
||||||
|
Branches maintained with security fixes
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
See the
|
||||||
|
:ref:`Release process <ref-manual/release-process:Stable Release Process>`
|
||||||
|
documentation for details regarding the policies and maintenance of stable
|
||||||
|
branches.
|
||||||
|
|
||||||
|
The :yocto_wiki:`Releases page </Releases>` contains a list
|
||||||
|
of all releases of the Yocto Project. Versions in gray are no longer actively
|
||||||
|
maintained with security patches, but well-tested patches may still be accepted
|
||||||
|
for them for significant issues.
|
||||||
|
|
||||||
|
Security-related discussions at the Yocto Project
|
||||||
|
-------------------------------------------------
|
||||||
|
|
||||||
|
We have set up two security-related mailing lists:
|
||||||
|
|
||||||
|
- Public List: yocto [dash] security [at] yoctoproject[dot] org
|
||||||
|
|
||||||
|
This is a public mailing list for anyone to subscribe to. This list is an
|
||||||
|
open list to discuss public security issues/patches and security-related
|
||||||
|
initiatives. For more information, including subscription information,
|
||||||
|
please see the :yocto_lists:`yocto-security mailing list info page </g/yocto-security>`.
|
||||||
|
|
||||||
|
- Private List: security [at] yoctoproject [dot] org
|
||||||
|
|
||||||
|
This is a private mailing list for reporting non-published potential
|
||||||
|
vulnerabilities. The list is monitored by the Yocto Project Security team.
|
||||||
|
|
||||||
|
|
||||||
|
What you should do if you find a security vulnerability
|
||||||
|
-------------------------------------------------------
|
||||||
|
|
||||||
|
If you find a security flaw: a crash, an information leakage, or anything that
|
||||||
|
can have a security impact if exploited in any Open Source software built or
|
||||||
|
used by the Yocto Project, please report this to the Yocto Project Security
|
||||||
|
Team. If you prefer to contact the upstream project directly, please send a
|
||||||
|
copy to the security team at the Yocto Project as well. If you believe this is
|
||||||
|
highly sensitive information, please report the vulnerability in a secure way,
|
||||||
|
i.e. encrypt the email and send it to the private list. This ensures that
|
||||||
|
the exploit is not leaked and exploited before a response/fix has been generated.
|
||||||
|
|
||||||
|
Security team
|
||||||
|
=============
|
||||||
|
|
||||||
|
The Yocto Project/OpenEmbedded security team coordinates the work on security
|
||||||
|
subjects in the project. All general discussion takes place publicly. The
|
||||||
|
Security Team only uses confidential communication tools to deal with private
|
||||||
|
vulnerability reports before they are released.
|
||||||
|
|
||||||
|
Security team appointment
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
The Yocto Project Security Team consists of at least three members. When new
|
||||||
|
members are needed, the Yocto Project Technical Steering Committee (YP TSC)
|
||||||
|
asks for nominations by public channels including a nomination deadline.
|
||||||
|
Self-nominations are possible. When the limit time is
|
||||||
|
reached, the YP TSC posts the list of candidates for the comments of project
|
||||||
|
participants and developers. Comments may be sent publicly or privately to the
|
||||||
|
YP and OE TSCs. The candidates are approved by both YP TSC and OpenEmbedded
|
||||||
|
Technical Steering Committee (OE TSC) and the final list of the team members
|
||||||
|
is announced publicly. The aim is to have people representing technical
|
||||||
|
leadership, security knowledge and infrastructure present with enough people
|
||||||
|
to provide backup/coverage but keep the notification list small enough to
|
||||||
|
minimize information risk and maintain trust.
|
||||||
|
|
||||||
|
YP Security Team members may resign at any time.
|
||||||
|
|
||||||
|
Security Team Operations
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
The work of the Security Team might require high confidentiality. Team members
|
||||||
|
are individuals selected by merit and do not represent the companies they work
|
||||||
|
for. They do not share information about confidential issues outside of the team
|
||||||
|
and do not hint about ongoing embargoes.
|
||||||
|
|
||||||
|
Team members can bring in domain experts as needed. Those people should be
|
||||||
|
added to individual issues only and adhere to the same standards as the YP
|
||||||
|
Security Team.
|
||||||
|
|
||||||
|
The YP security team organizes its meetings and communication as needed.
|
||||||
|
|
||||||
|
When the YP Security team receives a report about a potential security
|
||||||
|
vulnerability, they quickly analyze and notify the reporter of the result.
|
||||||
|
They might also request more information.
|
||||||
|
|
||||||
|
If the issue is confirmed and affects the code maintained by the YP, they
|
||||||
|
confidentially notify maintainers of that code and work with them to prepare
|
||||||
|
a fix.
|
||||||
|
|
||||||
|
If the issue is confirmed and affects an upstream project, the YP security team
|
||||||
|
notifies the project. Usually, the upstream project analyzes the problem again.
|
||||||
|
If they deem it a real security problem in their software, they develop and
|
||||||
|
release a fix following their security policy. They may want to include the
|
||||||
|
original reporter in the loop. There is also sometimes some coordination for
|
||||||
|
handling patches, backporting patches etc, or just understanding the problem
|
||||||
|
or what caused it.
|
||||||
|
|
||||||
|
When the fix is publicly available, the YP security team member or the
|
||||||
|
package maintainer sends patches against the YP code base, following usual
|
||||||
|
procedures, including public code review.
|
||||||
|
|
||||||
|
What Yocto Security Team does when it receives a security vulnerability
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
The YP Security Team team performs a quick analysis and would usually report
|
||||||
|
the flaw to the upstream project. Normally the upstream project analyzes the
|
||||||
|
problem. If they deem it a real security problem in their software, they
|
||||||
|
develop and release a fix following their own security policy. They may want
|
||||||
|
to include the original reporter in the loop. There is also sometimes some
|
||||||
|
coordination for handling patches, backporting patches etc, or just
|
||||||
|
understanding the problem or what caused it.
|
||||||
|
|
||||||
|
The security policy of the upstream project might include a notification to
|
||||||
|
Linux distributions or other important downstream projects in advance to
|
||||||
|
discuss coordinated disclosure. These mailing lists are normally non-public.
|
||||||
|
|
||||||
|
When the upstream project releases a version with the fix, they are responsible
|
||||||
|
for contacting `Mitre <https://www.cve.org/>`__ to get a CVE number assigned and
|
||||||
|
the CVE record published.
|
||||||
|
|
||||||
|
If an upstream project does not respond quickly
|
||||||
|
-----------------------------------------------
|
||||||
|
|
||||||
|
If an upstream project does not fix the problem in a reasonable time,
|
||||||
|
the Yocto's Security Team will contact other interested parties (usually
|
||||||
|
other distributions) in the community and together try to solve the
|
||||||
|
vulnerability as quickly as possible.
|
||||||
|
|
||||||
|
The Yocto Project Security team adheres to the 90 days disclosure policy
|
||||||
|
by default. An increase of the embargo time is possible when necessary.
|
||||||
|
|
||||||
|
Current Security Team members
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
For secure communications, please send your messages encrypted using the GPG
|
||||||
|
keys. Remember, message headers are not encrypted so do not include sensitive
|
||||||
|
information in the subject line.
|
||||||
|
|
||||||
|
- Ross Burton: <ross@burtonini.com> `Public key <https://keys.openpgp.org/search?q=ross%40burtonini.com>`__
|
||||||
|
|
||||||
|
- Michael Halstead: <mhalstead [at] linuxfoundation [dot] org>
|
||||||
|
`Public key <https://pgp.mit.edu/pks/lookup?op=vindex&search=0x3373170601861969>`__
|
||||||
|
or `Public key <https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xd1f2407285e571ed12a407a73373170601861969>`__
|
||||||
|
|
||||||
|
- Richard Purdie: <richard.purdie@linuxfoundation.org> `Public key <https://keys.openpgp.org/search?q=richard.purdie%40linuxfoundation.org>`__
|
||||||
|
|
||||||
|
- Marta Rybczynska: <marta DOT rybczynska [at] syslinbit [dot] com> `Public key <https://keys.openpgp.org/search?q=marta.rybczynska@syslinbit.com>`__
|
||||||
|
|
||||||
|
- Steve Sakoman: <steve [at] sakoman [dot] com> `Public key <https://keys.openpgp.org/search?q=steve%40sakoman.com>`__
|
||||||
@@ -88,27 +88,15 @@ particular working environment and set of practices.
|
|||||||
For information about BitBake, see the
|
For information about BitBake, see the
|
||||||
:doc:`bitbake:index`.
|
:doc:`bitbake:index`.
|
||||||
|
|
||||||
It is relatively easy to set up Git services and create
|
It is relatively easy to set up Git services and create infrastructure like
|
||||||
infrastructure like :yocto_git:`/`, which is based on
|
:yocto_git:`/`, which is based on server software called
|
||||||
server software called ``gitolite`` with ``cgit`` being used to
|
`Gitolite <https://gitolite.com>`__
|
||||||
generate the web interface that lets you view the repositories. The
|
with `cgit <https://git.zx2c4.com/cgit/about/>`__ being used to
|
||||||
``gitolite`` software identifies users using SSH keys and allows
|
generate the web interface that lets you view the repositories.
|
||||||
|
``gitolite`` identifies users using SSH keys and allows
|
||||||
branch-based access controls to repositories that you can control as
|
branch-based access controls to repositories that you can control as
|
||||||
little or as much as necessary.
|
little or as much as necessary.
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The setup of these services is beyond the scope of this manual.
|
|
||||||
However, here are sites describing how to perform setup:
|
|
||||||
|
|
||||||
- `Gitolite <https://gitolite.com>`__: Information for
|
|
||||||
``gitolite``.
|
|
||||||
|
|
||||||
- `Interfaces, frontends, and
|
|
||||||
tools <https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools>`__:
|
|
||||||
Documentation on how to create interfaces and frontends for
|
|
||||||
Git.
|
|
||||||
|
|
||||||
5. *Set up the Application Development Machines:* As mentioned earlier,
|
5. *Set up the Application Development Machines:* As mentioned earlier,
|
||||||
application developers are creating applications on top of existing
|
application developers are creating applications on top of existing
|
||||||
software stacks. Following are some best practices for setting up
|
software stacks. Following are some best practices for setting up
|
||||||
@@ -344,7 +332,10 @@ to use the Extensible SDK, see the ":doc:`/sdk-manual/extensible`" Chapter in th
|
|||||||
Project Application Development and the Extensible Software Development
|
Project Application Development and the Extensible Software Development
|
||||||
Kit (eSDK) manual. If you want to work on the kernel, see the :doc:`/kernel-dev/index`. If you are going to use
|
Kit (eSDK) manual. If you want to work on the kernel, see the :doc:`/kernel-dev/index`. If you are going to use
|
||||||
Toaster, see the ":doc:`/toaster-manual/setup-and-use`"
|
Toaster, see the ":doc:`/toaster-manual/setup-and-use`"
|
||||||
section in the Toaster User Manual.
|
section in the Toaster User Manual. If you are a VSCode user, you can configure
|
||||||
|
the `Yocto Project BitBake
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||||
|
extension accordingly.
|
||||||
|
|
||||||
Setting Up to Use CROss PlatformS (CROPS)
|
Setting Up to Use CROss PlatformS (CROPS)
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@@ -436,7 +427,10 @@ section. If you are going to use the Extensible SDK container, see the
|
|||||||
Project Application Development and the Extensible Software Development
|
Project Application Development and the Extensible Software Development
|
||||||
Kit (eSDK) manual. If you are going to use the Toaster container, see
|
Kit (eSDK) manual. If you are going to use the Toaster container, see
|
||||||
the ":doc:`/toaster-manual/setup-and-use`"
|
the ":doc:`/toaster-manual/setup-and-use`"
|
||||||
section in the Toaster User Manual.
|
section in the Toaster User Manual. If you are a VSCode user, you can configure
|
||||||
|
the `Yocto Project BitBake
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||||
|
extension accordingly.
|
||||||
|
|
||||||
Setting Up to Use Windows Subsystem For Linux (WSLv2)
|
Setting Up to Use Windows Subsystem For Linux (WSLv2)
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
@@ -566,7 +560,10 @@ Extensible SDK container, see the ":doc:`/sdk-manual/extensible`" Chapter in the
|
|||||||
Project Application Development and the Extensible Software Development
|
Project Application Development and the Extensible Software Development
|
||||||
Kit (eSDK) manual. If you are going to use the Toaster container, see
|
Kit (eSDK) manual. If you are going to use the Toaster container, see
|
||||||
the ":doc:`/toaster-manual/setup-and-use`"
|
the ":doc:`/toaster-manual/setup-and-use`"
|
||||||
section in the Toaster User Manual.
|
section in the Toaster User Manual. If you are a VSCode user, you can configure
|
||||||
|
the `Yocto Project BitBake
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||||
|
extension accordingly.
|
||||||
|
|
||||||
Locating Yocto Project Source Files
|
Locating Yocto Project Source Files
|
||||||
===================================
|
===================================
|
||||||
@@ -654,7 +651,7 @@ Follow these steps to locate and download a particular tarball:
|
|||||||
Using the Downloads Page
|
Using the Downloads Page
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
The :yocto_home:`Yocto Project Website <>` uses a "DOWNLOADS" page
|
The :yocto_home:`Yocto Project Website <>` uses a "RELEASES" page
|
||||||
from which you can locate and download tarballs of any Yocto Project
|
from which you can locate and download tarballs of any Yocto Project
|
||||||
release. Rather than Git repositories, these files represent snapshot
|
release. Rather than Git repositories, these files represent snapshot
|
||||||
tarballs similar to the tarballs located in the Index of Releases
|
tarballs similar to the tarballs located in the Index of Releases
|
||||||
@@ -663,11 +660,13 @@ described in the ":ref:`dev-manual/start:accessing index of releases`" section.
|
|||||||
1. *Go to the Yocto Project Website:* Open The
|
1. *Go to the Yocto Project Website:* Open The
|
||||||
:yocto_home:`Yocto Project Website <>` in your browser.
|
:yocto_home:`Yocto Project Website <>` in your browser.
|
||||||
|
|
||||||
2. *Get to the Downloads Area:* Select the "DOWNLOADS" item from the
|
#. *Get to the Downloads Area:* Select the "RELEASES" item from the
|
||||||
pull-down "SOFTWARE" tab menu near the top of the page.
|
pull-down "DEVELOPMENT" tab menu near the top of the page.
|
||||||
|
|
||||||
3. *Select a Yocto Project Release:* Use the menu next to "RELEASE" to
|
#. *Select a Yocto Project Release:* On the top of the "RELEASE" page currently
|
||||||
display and choose a recent or past supported Yocto Project release
|
supported releases are displayed, further down past supported Yocto Project
|
||||||
|
releases are visible. The "Download" links in the rows of the table there
|
||||||
|
will lead to the download tarballs for the release
|
||||||
(e.g. &DISTRO_NAME_NO_CAP;, &DISTRO_NAME_NO_CAP_MINUS_ONE;, and so forth).
|
(e.g. &DISTRO_NAME_NO_CAP;, &DISTRO_NAME_NO_CAP_MINUS_ONE;, and so forth).
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
@@ -678,9 +677,9 @@ described in the ":ref:`dev-manual/start:accessing index of releases`" section.
|
|||||||
You can use the "RELEASE ARCHIVE" link to reveal a menu of all Yocto
|
You can use the "RELEASE ARCHIVE" link to reveal a menu of all Yocto
|
||||||
Project releases.
|
Project releases.
|
||||||
|
|
||||||
4. *Download Tools or Board Support Packages (BSPs):* From the
|
#. *Download Tools or Board Support Packages (BSPs):* Next to the tarballs you
|
||||||
"DOWNLOADS" page, you can download tools or BSPs as well. Just scroll
|
will find download tools or BSPs as well. Just select a Yocto Project
|
||||||
down the page and look for what you need.
|
release and look for what you need.
|
||||||
|
|
||||||
Cloning and Checking Out Branches
|
Cloning and Checking Out Branches
|
||||||
=================================
|
=================================
|
||||||
|
|||||||
@@ -113,11 +113,11 @@ The following steps describe how to set up the AUH utility:
|
|||||||
``upgrade-helper/work/recipe/buildhistory-diff.txt`` file found in
|
``upgrade-helper/work/recipe/buildhistory-diff.txt`` file found in
|
||||||
your :term:`Build Directory`.
|
your :term:`Build Directory`.
|
||||||
|
|
||||||
- If you want to enable testing through the :ref:`ref-classes-testimage*`
|
- If you want to enable testing through the :ref:`ref-classes-testimage`
|
||||||
class, which is optional, you need to have the following set in
|
class, which is optional, you need to have the following set in
|
||||||
your ``conf/local.conf`` file::
|
your ``conf/local.conf`` file::
|
||||||
|
|
||||||
INHERIT += "testimage"
|
IMAGE_CLASSES += "testimage"
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@@ -142,17 +142,18 @@ command to return the available Wic images as follows::
|
|||||||
genericx86 Create an EFI disk image for genericx86*
|
genericx86 Create an EFI disk image for genericx86*
|
||||||
edgerouter Create SD card image for Edgerouter
|
edgerouter Create SD card image for Edgerouter
|
||||||
beaglebone-yocto Create SD card image for Beaglebone
|
beaglebone-yocto Create SD card image for Beaglebone
|
||||||
qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
|
qemuriscv Create qcow2 image for RISC-V QEMU machines
|
||||||
systemd-bootdisk Create an EFI disk image with systemd-boot
|
|
||||||
mkhybridiso Create a hybrid ISO image
|
|
||||||
mkefidisk Create an EFI disk image
|
mkefidisk Create an EFI disk image
|
||||||
sdimage-bootpart Create SD card image with a boot partition
|
|
||||||
directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
|
directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
|
||||||
directdisk Create a 'pcbios' direct disk image
|
directdisk Create a 'pcbios' direct disk image
|
||||||
directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
|
|
||||||
qemuriscv Create qcow2 image for RISC-V QEMU machines
|
|
||||||
directdisk-gpt Create a 'pcbios' direct disk image
|
|
||||||
efi-bootdisk
|
efi-bootdisk
|
||||||
|
mkhybridiso Create a hybrid ISO image
|
||||||
|
directdisk-gpt Create a 'pcbios' direct disk image
|
||||||
|
systemd-bootdisk Create an EFI disk image with systemd-boot
|
||||||
|
sdimage-bootpart Create SD card image with a boot partition
|
||||||
|
qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
|
||||||
|
directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
|
||||||
|
|
||||||
|
|
||||||
Once you know the list of available
|
Once you know the list of available
|
||||||
Wic images, you can use ``help`` with the command to get help on a
|
Wic images, you can use ``help`` with the command to get help on a
|
||||||
@@ -283,16 +284,18 @@ Use the following command to list the available kickstart files::
|
|||||||
|
|
||||||
$ wic list images
|
$ wic list images
|
||||||
genericx86 Create an EFI disk image for genericx86*
|
genericx86 Create an EFI disk image for genericx86*
|
||||||
beaglebone-yocto Create SD card image for Beaglebone
|
|
||||||
edgerouter Create SD card image for Edgerouter
|
edgerouter Create SD card image for Edgerouter
|
||||||
qemux86-directdisk Create a QEMU machine 'pcbios' direct disk image
|
beaglebone-yocto Create SD card image for Beaglebone
|
||||||
directdisk-gpt Create a 'pcbios' direct disk image
|
qemuriscv Create qcow2 image for RISC-V QEMU machines
|
||||||
mkefidisk Create an EFI disk image
|
mkefidisk Create an EFI disk image
|
||||||
directdisk Create a 'pcbios' direct disk image
|
|
||||||
systemd-bootdisk Create an EFI disk image with systemd-boot
|
|
||||||
mkhybridiso Create a hybrid ISO image
|
|
||||||
sdimage-bootpart Create SD card image with a boot partition
|
|
||||||
directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
|
directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
|
||||||
|
directdisk Create a 'pcbios' direct disk image
|
||||||
|
efi-bootdisk
|
||||||
|
mkhybridiso Create a hybrid ISO image
|
||||||
|
directdisk-gpt Create a 'pcbios' direct disk image
|
||||||
|
systemd-bootdisk Create an EFI disk image with systemd-boot
|
||||||
|
sdimage-bootpart Create SD card image with a boot partition
|
||||||
|
qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
|
||||||
directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
|
directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
|
||||||
|
|
||||||
When you use an existing file, you
|
When you use an existing file, you
|
||||||
|
|||||||
@@ -69,8 +69,7 @@ to indicate the branch.
|
|||||||
You can use the :term:`KBRANCH` value to define an alternate branch typically
|
You can use the :term:`KBRANCH` value to define an alternate branch typically
|
||||||
with a machine override as shown here from the ``meta-yocto-bsp`` layer::
|
with a machine override as shown here from the ``meta-yocto-bsp`` layer::
|
||||||
|
|
||||||
KBRANCH:edgerouter = "standard/edgerouter"
|
KBRANCH:beaglebone-yocto = "standard/beaglebone"
|
||||||
|
|
||||||
|
|
||||||
The linux-yocto style recipes can optionally define the following
|
The linux-yocto style recipes can optionally define the following
|
||||||
variables:
|
variables:
|
||||||
|
|||||||
@@ -455,13 +455,13 @@ Creating the Append File
|
|||||||
|
|
||||||
You create this file in your custom layer. You also name it accordingly
|
You create this file in your custom layer. You also name it accordingly
|
||||||
based on the linux-yocto recipe you are using. For example, if you are
|
based on the linux-yocto recipe you are using. For example, if you are
|
||||||
modifying the ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` recipe,
|
modifying the ``meta/recipes-kernel/linux/linux-yocto_5.15.bb`` recipe,
|
||||||
the append file will typically be located as follows within your custom
|
the append file will typically be located as follows within your custom
|
||||||
layer:
|
layer:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
your-layer/recipes-kernel/linux/linux-yocto_4.12.bbappend
|
your-layer/recipes-kernel/linux/linux-yocto_5.15.bbappend
|
||||||
|
|
||||||
The append file should initially extend the
|
The append file should initially extend the
|
||||||
:term:`FILESPATH` search path by
|
:term:`FILESPATH` search path by
|
||||||
@@ -489,36 +489,36 @@ As an example, consider the following append file used by the BSPs in
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend
|
meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.15.bbappend
|
||||||
|
|
||||||
Here are the contents of this file. Be aware that the actual commit ID
|
Here are the contents of this file. Be aware that the actual commit ID
|
||||||
strings in this example listing might be different than the actual
|
strings in this example listing might be different than the actual
|
||||||
strings in the file from the ``meta-yocto-bsp`` layer upstream.
|
strings in the file from the ``meta-yocto-bsp`` layer upstream.
|
||||||
::
|
::
|
||||||
|
|
||||||
KBRANCH:genericx86 = "standard/base"
|
KBRANCH:genericx86 = "v5.15/standard/base"
|
||||||
KBRANCH:genericx86-64 = "standard/base"
|
KBRANCH:genericx86-64 = "v5.15/standard/base"
|
||||||
|
KBRANCH:edgerouter = "v5.15/standard/edgerouter"
|
||||||
|
KBRANCH:beaglebone-yocto = "v5.15/standard/beaglebone"
|
||||||
|
|
||||||
KMACHINE:genericx86 ?= "common-pc"
|
KMACHINE:genericx86 ?= "common-pc"
|
||||||
KMACHINE:genericx86-64 ?= "common-pc-64"
|
KMACHINE:genericx86-64 ?= "common-pc-64"
|
||||||
KBRANCH:edgerouter = "standard/edgerouter"
|
KMACHINE:beaglebone-yocto ?= "beaglebone"
|
||||||
KBRANCH:beaglebone = "standard/beaglebone"
|
|
||||||
|
|
||||||
SRCREV_machine:genericx86 ?= "d09f2ce584d60ecb7890550c22a80c48b83c2e19"
|
|
||||||
SRCREV_machine:genericx86-64 ?= "d09f2ce584d60ecb7890550c22a80c48b83c2e19"
|
|
||||||
SRCREV_machine:edgerouter ?= "b5c8cfda2dfe296410d51e131289fb09c69e1e7d"
|
|
||||||
SRCREV_machine:beaglebone ?= "b5c8cfda2dfe296410d51e131289fb09c69e1e7d"
|
|
||||||
|
|
||||||
|
SRCREV_machine:genericx86 ?= "0b628306d1f9ea28c0e86369ce9bb87a47893c9c"
|
||||||
|
SRCREV_machine:genericx86-64 ?= "0b628306d1f9ea28c0e86369ce9bb87a47893c9c"
|
||||||
|
SRCREV_machine:edgerouter ?= "90f1ee6589264545f548d731c2480b08a007230f"
|
||||||
|
SRCREV_machine:beaglebone-yocto ?= "9aabbaa89fcb21af7028e814c1f5b61171314d5a"
|
||||||
|
|
||||||
COMPATIBLE_MACHINE:genericx86 = "genericx86"
|
COMPATIBLE_MACHINE:genericx86 = "genericx86"
|
||||||
COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64"
|
COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64"
|
||||||
COMPATIBLE_MACHINE:edgerouter = "edgerouter"
|
COMPATIBLE_MACHINE:edgerouter = "edgerouter"
|
||||||
COMPATIBLE_MACHINE:beaglebone = "beaglebone"
|
COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto"
|
||||||
|
|
||||||
LINUX_VERSION:genericx86 = "4.12.7"
|
LINUX_VERSION:genericx86 = "5.15.72"
|
||||||
LINUX_VERSION:genericx86-64 = "4.12.7"
|
LINUX_VERSION:genericx86-64 = "5.15.72"
|
||||||
LINUX_VERSION:edgerouter = "4.12.10"
|
LINUX_VERSION:edgerouter = "5.15.54"
|
||||||
LINUX_VERSION:beaglebone = "4.12.10"
|
LINUX_VERSION:beaglebone-yocto = "5.15.54"
|
||||||
|
|
||||||
This append file
|
This append file
|
||||||
contains statements used to support several BSPs that ship with the
|
contains statements used to support several BSPs that ship with the
|
||||||
@@ -1081,7 +1081,7 @@ Section.
|
|||||||
the following sequence of commands::
|
the following sequence of commands::
|
||||||
|
|
||||||
$ cd poky/build
|
$ cd poky/build
|
||||||
$ bitbake -c cleanall yocto-linux
|
$ bitbake -c cleanall linux-yocto
|
||||||
$ bitbake core-image-minimal -c cleanall
|
$ bitbake core-image-minimal -c cleanall
|
||||||
$ bitbake core-image-minimal
|
$ bitbake core-image-minimal
|
||||||
$ runqemu qemux86
|
$ runqemu qemux86
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ Automated Image Testing
|
|||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
A new automated image testing framework has been added through the
|
A new automated image testing framework has been added through the
|
||||||
:ref:`ref-classes-testimage*` classes. This
|
:ref:`ref-classes-testimage` classes. This
|
||||||
framework replaces the older ``imagetest-qemu`` framework.
|
framework replaces the older ``imagetest-qemu`` framework.
|
||||||
|
|
||||||
You can learn more about performing automated image tests in the
|
You can learn more about performing automated image tests in the
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Staging Directories in Sysroot Has Been Simplified
|
|||||||
The way directories are staged in sysroot has been simplified and
|
The way directories are staged in sysroot has been simplified and
|
||||||
introduces the new :term:`SYSROOT_DIRS`,
|
introduces the new :term:`SYSROOT_DIRS`,
|
||||||
:term:`SYSROOT_DIRS_NATIVE`, and ``SYSROOT_DIRS_BLACKLIST``
|
:term:`SYSROOT_DIRS_NATIVE`, and ``SYSROOT_DIRS_BLACKLIST``
|
||||||
(replaced by :term:`SYSROOT_DIRS_IGNORE` in version 3.5). See the
|
(replaced by :term:`SYSROOT_DIRS_IGNORE` in version 4.0). See the
|
||||||
:oe_lists:`v2 patch series on the OE-Core Mailing List
|
:oe_lists:`v2 patch series on the OE-Core Mailing List
|
||||||
</pipermail/openembedded-core/2016-May/121365.html>`
|
</pipermail/openembedded-core/2016-May/121365.html>`
|
||||||
for additional information.
|
for additional information.
|
||||||
@@ -442,7 +442,7 @@ The following miscellaneous changes have occurred:
|
|||||||
- :ref:`ref-classes-image`: Renamed COMPRESS(ION) to CONVERSION. This change
|
- :ref:`ref-classes-image`: Renamed COMPRESS(ION) to CONVERSION. This change
|
||||||
means that ``COMPRESSIONTYPES``, ``COMPRESS_DEPENDS`` and
|
means that ``COMPRESSIONTYPES``, ``COMPRESS_DEPENDS`` and
|
||||||
``COMPRESS_CMD`` are deprecated in favor of ``CONVERSIONTYPES``,
|
``COMPRESS_CMD`` are deprecated in favor of ``CONVERSIONTYPES``,
|
||||||
``CONVERSION_DEPENDS`` and ``CONVERSION_CMD``. The ``COMPRESS*``
|
``CONVERSION_DEPENDS`` and :term:`CONVERSION_CMD`. The ``COMPRESS*``
|
||||||
variable names will still work in the 2.2 release but metadata that
|
variable names will still work in the 2.2 release but metadata that
|
||||||
does not need to be backwards-compatible should be changed to use the
|
does not need to be backwards-compatible should be changed to use the
|
||||||
new names as the ``COMPRESS*`` ones will be removed in a future
|
new names as the ``COMPRESS*`` ones will be removed in a future
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ The following are additional changes:
|
|||||||
likely be removed in the next Yocto Project release.
|
likely be removed in the next Yocto Project release.
|
||||||
|
|
||||||
- The ``vmdk``, ``vdi``, and ``qcow2`` image file types are now used in
|
- The ``vmdk``, ``vdi``, and ``qcow2`` image file types are now used in
|
||||||
conjunction with the "wic" image type through ``CONVERSION_CMD``.
|
conjunction with the "wic" image type through :term:`CONVERSION_CMD`.
|
||||||
Consequently, the equivalent image types are now ``wic.vmdk``,
|
Consequently, the equivalent image types are now ``wic.vmdk``,
|
||||||
``wic.vdi``, and ``wic.qcow2``, respectively.
|
``wic.vdi``, and ``wic.qcow2``, respectively.
|
||||||
|
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ This section provides information about automatic testing changes:
|
|||||||
practices now dictate that you use the
|
practices now dictate that you use the
|
||||||
:term:`IMAGE_CLASSES` variable rather than the
|
:term:`IMAGE_CLASSES` variable rather than the
|
||||||
:term:`INHERIT` variable when you inherit the
|
:term:`INHERIT` variable when you inherit the
|
||||||
:ref:`testimage <ref-classes-testimage*>` and
|
:ref:`testimage <ref-classes-testimage>` and
|
||||||
:ref:`testsdk <ref-classes-testsdk>` classes used for automatic
|
:ref:`testsdk <ref-classes-testsdk>` classes used for automatic
|
||||||
testing.
|
testing.
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ XML feeds that ``cve-check-tool`` was using, supports CVSSv3 scoring,
|
|||||||
and makes other improvements.
|
and makes other improvements.
|
||||||
|
|
||||||
Additionally, the ``CVE_CHECK_CVE_WHITELIST`` variable has been replaced
|
Additionally, the ``CVE_CHECK_CVE_WHITELIST`` variable has been replaced
|
||||||
by ``CVE_CHECK_WHITELIST`` (replaced by :term:`CVE_CHECK_IGNORE` in version 3.5).
|
by ``CVE_CHECK_WHITELIST`` (replaced by :term:`CVE_CHECK_IGNORE` in version 4.0).
|
||||||
|
|
||||||
.. _migration-3.0-bitbake-changes:
|
.. _migration-3.0-bitbake-changes:
|
||||||
|
|
||||||
|
|||||||
@@ -252,8 +252,8 @@ Miscellaneous
|
|||||||
|
|
||||||
- The previously deprecated ``COMPRESS_CMD`` and
|
- The previously deprecated ``COMPRESS_CMD`` and
|
||||||
``CVE_CHECK_CVE_WHITELIST`` variables have been removed. Use
|
``CVE_CHECK_CVE_WHITELIST`` variables have been removed. Use
|
||||||
``CONVERSION_CMD`` and ``CVE_CHECK_WHITELIST`` (replaced by
|
:term:`CONVERSION_CMD` and ``CVE_CHECK_WHITELIST`` (replaced by
|
||||||
:term:`CVE_CHECK_IGNORE` in version 3.5) respectively
|
:term:`CVE_CHECK_IGNORE` in version 4.0) respectively
|
||||||
instead.
|
instead.
|
||||||
|
|
||||||
- The obsolete ``oe_machinstall`` function previously provided in the
|
- The obsolete ``oe_machinstall`` function previously provided in the
|
||||||
|
|||||||
@@ -19,3 +19,6 @@ Release 4.0 (kirkstone)
|
|||||||
release-notes-4.0.10
|
release-notes-4.0.10
|
||||||
release-notes-4.0.11
|
release-notes-4.0.11
|
||||||
release-notes-4.0.12
|
release-notes-4.0.12
|
||||||
|
release-notes-4.0.13
|
||||||
|
release-notes-4.0.14
|
||||||
|
release-notes-4.0.15
|
||||||
|
|||||||
271
documentation/migration-guides/release-notes-4.0.13.rst
Normal file
271
documentation/migration-guides/release-notes-4.0.13.rst
Normal file
File diff suppressed because one or more lines are too long
227
documentation/migration-guides/release-notes-4.0.14.rst
Normal file
227
documentation/migration-guides/release-notes-4.0.14.rst
Normal file
File diff suppressed because one or more lines are too long
189
documentation/migration-guides/release-notes-4.0.15.rst
Normal file
189
documentation/migration-guides/release-notes-4.0.15.rst
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||||
|
|
||||||
|
Release notes for Yocto-4.0.15 (Kirkstone)
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
Security Fixes in Yocto-4.0.15
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- avahi: Fix :cve:`2023-1981`, :cve:`2023-38469`, :cve:`2023-38470`, :cve:`2023-38471`, :cve:`2023-38472` and :cve:`2023-38473`
|
||||||
|
- binutils: Fix :cve:`2022-47007`, :cve:`2022-47010` and :cve:`2022-48064`
|
||||||
|
- bluez5: Fix :cve:`2023-45866`
|
||||||
|
- ghostscript: Ignore GhostPCL :cve:`2023-38560`
|
||||||
|
- gnutls: Fix :cve:`2023-5981`
|
||||||
|
- go: Ignore :cve:`2023-45283` and :cve:`2023-45284`
|
||||||
|
- grub: Fix :cve:`2023-4692` and :cve:`2023-4693`
|
||||||
|
- gstreamer1.0-plugins-bad: Fix :cve_mitre:`2023-44429`
|
||||||
|
- libsndfile: Fix :cve:`2022-33065`
|
||||||
|
- libwebp: Fix :cve:`2023-4863`
|
||||||
|
- openssl: Fix :cve:`2023-5678`
|
||||||
|
- python3-cryptography: Fix :cve:`2023-49083`
|
||||||
|
- qemu: Fix :cve:`2023-1544`
|
||||||
|
- sudo: :cve:`2023-42456` and :cve_mitre:`2023-42465`
|
||||||
|
- tiff: Fix :cve:`2023-41175`
|
||||||
|
- vim: Fix :cve:`2023-46246`, :cve:`2023-48231`, :cve:`2023-48232`, :cve:`2023-48233`, :cve:`2023-48234`, :cve:`2023-48235`, :cve:`2023-48236`, :cve:`2023-48237` and :cve:`2023-48706`
|
||||||
|
- xserver-xorg: Fix :cve:`2023-5367` and :cve:`2023-5380`
|
||||||
|
- xwayland: Fix :cve:`2023-5367`
|
||||||
|
|
||||||
|
|
||||||
|
Fixes in Yocto-4.0.15
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- bash: changes to SIGINT handler while waiting for a child
|
||||||
|
- bitbake: Fix disk space monitoring on cephfs
|
||||||
|
- bitbake: bitbake-getvar: Make --quiet work with --recipe
|
||||||
|
- bitbake: runqueue.py: fix PSI check logic
|
||||||
|
- bitbake: runqueue: Add pressure change logging
|
||||||
|
- bitbake: runqueue: convert deferral messages from bb.note to bb.debug
|
||||||
|
- bitbake: runqueue: fix PSI check calculation
|
||||||
|
- bitbake: runqueue: show more pressure data
|
||||||
|
- bitbake: runqueue: show number of currently running bitbake threads when pressure changes
|
||||||
|
- bitbake: tinfoil: Do not fail when logging is disabled and full config is used
|
||||||
|
- build-appliance-image: Update to kirkstone head revision
|
||||||
|
- cve-check: don't warn if a patch is remote
|
||||||
|
- cve-check: slightly more verbose warning when adding the same package twice
|
||||||
|
- cve-check: sort the package list in the JSON report
|
||||||
|
- cve-exclusion_5.10.inc: update for 5.10.202
|
||||||
|
- go: Fix issue in DNS resolver
|
||||||
|
- goarch: Move Go architecture mapping to a library
|
||||||
|
- gstreamer1.0-plugins-base: enable glx/opengl support
|
||||||
|
- linux-yocto/5.10: update to v5.10.202
|
||||||
|
- manuals: update class references
|
||||||
|
- migration-guide: add release notes for 4.0.14
|
||||||
|
- native: Clear TUNE_FEATURES/ABIEXTENSION
|
||||||
|
- openssh: drop sudo from ptest dependencies
|
||||||
|
- overview-manual: concepts: Add Bitbake Tasks Map
|
||||||
|
- poky.conf: bump version for 4.0.15
|
||||||
|
- python3-jinja2: Fixed ptest result output as per the standard
|
||||||
|
- ref-manual: classes: explain cml1 class name
|
||||||
|
- ref-manual: update :term:`SDK_NAME` variable documentation
|
||||||
|
- ref-manual: variables: add :term:`RECIPE_MAINTAINER`
|
||||||
|
- ref-manual: variables: document OEQA_REPRODUCIBLE_* variables
|
||||||
|
- ref-manual: variables: mention new CDN for :term:`SSTATE_MIRRORS`
|
||||||
|
- rust-common: Set llvm-target correctly for cross SDK targets
|
||||||
|
- rust-cross-canadian: Fix ordering of target json config generation
|
||||||
|
- rust-cross/rust-common: Merge arm target handling code to fix cross-canadian
|
||||||
|
- rust-cross: Simplfy the rust_gen_target calls
|
||||||
|
- rust-llvm: Allow overriding LLVM target archs
|
||||||
|
- sdk-manual: extensible.rst: remove instructions for using SDK functionality directly in a yocto build
|
||||||
|
- sudo: upgrade to 1.9.15p2
|
||||||
|
- systemtap_git: fix used uninitialized error
|
||||||
|
- vim: Improve locale handling
|
||||||
|
- vim: Upgrade to 9.0.2130
|
||||||
|
- vim: use upstream generated .po files
|
||||||
|
|
||||||
|
|
||||||
|
Known Issues in Yocto-4.0.15
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- N/A
|
||||||
|
|
||||||
|
|
||||||
|
Contributors to Yocto-4.0.15
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- Alexander Kanavin
|
||||||
|
- Archana Polampalli
|
||||||
|
- BELHADJ SALEM Talel
|
||||||
|
- Bruce Ashfield
|
||||||
|
- Chaitanya Vadrevu
|
||||||
|
- Chen Qi
|
||||||
|
- Deepthi Hemraj
|
||||||
|
- Denys Dmytriyenko
|
||||||
|
- Hitendra Prajapati
|
||||||
|
- Lee Chee Yang
|
||||||
|
- Li Wang
|
||||||
|
- Martin Jansa
|
||||||
|
- Meenali Gupta
|
||||||
|
- Michael Opdenacker
|
||||||
|
- Mikko Rapeli
|
||||||
|
- Narpat Mali
|
||||||
|
- Niko Mauno
|
||||||
|
- Ninad Palsule
|
||||||
|
- Niranjan Pradhan
|
||||||
|
- Paul Eggleton
|
||||||
|
- Peter Kjellerstedt
|
||||||
|
- Peter Marko
|
||||||
|
- Richard Purdie
|
||||||
|
- Ross Burton
|
||||||
|
- Samantha Jalabert
|
||||||
|
- Sanjana
|
||||||
|
- Soumya Sambu
|
||||||
|
- Steve Sakoman
|
||||||
|
- Tim Orling
|
||||||
|
- Vijay Anusuri
|
||||||
|
- Vivek Kumbhar
|
||||||
|
- Wenlin Kang
|
||||||
|
- Yogita Urade
|
||||||
|
|
||||||
|
|
||||||
|
Repositories / Downloads for Yocto-4.0.15
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
poky
|
||||||
|
|
||||||
|
- Repository Location: :yocto_git:`/poky`
|
||||||
|
- Branch: :yocto_git:`kirkstone </poky/log/?h=kirkstone>`
|
||||||
|
- Tag: :yocto_git:`yocto-4.0.15 </poky/log/?h=yocto-4.0.15>`
|
||||||
|
- Git Revision: :yocto_git:`755632c2fcab43aa05cdcfa529727064b045073c </poky/commit/?id=755632c2fcab43aa05cdcfa529727064b045073c>`
|
||||||
|
- Release Artefact: poky-755632c2fcab43aa05cdcfa529727064b045073c
|
||||||
|
- sha: b40b43bd270d21a420c399981f9cfe0eb999f15e051fc2c89d124f249cdc0bd5
|
||||||
|
- Download Locations:
|
||||||
|
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/poky-755632c2fcab43aa05cdcfa529727064b045073c.tar.bz2
|
||||||
|
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/poky-755632c2fcab43aa05cdcfa529727064b045073c.tar.bz2
|
||||||
|
|
||||||
|
openembedded-core
|
||||||
|
|
||||||
|
- Repository Location: :oe_git:`/openembedded-core`
|
||||||
|
- Branch: :oe_git:`kirkstone </openembedded-core/log/?h=kirkstone>`
|
||||||
|
- Tag: :oe_git:`yocto-4.0.15 </openembedded-core/log/?h=yocto-4.0.15>`
|
||||||
|
- Git Revision: :oe_git:`eea685e1caafd8e8121006d3f8b5d0b8a4f2a933 </openembedded-core/commit/?id=eea685e1caafd8e8121006d3f8b5d0b8a4f2a933>`
|
||||||
|
- Release Artefact: oecore-eea685e1caafd8e8121006d3f8b5d0b8a4f2a933
|
||||||
|
- sha: ddc3d4a2c8a097f2aa7132ae716affacc44b119c616a1eeffb7db56caa7fc79e
|
||||||
|
- Download Locations:
|
||||||
|
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/oecore-eea685e1caafd8e8121006d3f8b5d0b8a4f2a933.tar.bz2
|
||||||
|
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/oecore-eea685e1caafd8e8121006d3f8b5d0b8a4f2a933.tar.bz2
|
||||||
|
|
||||||
|
meta-mingw
|
||||||
|
|
||||||
|
- Repository Location: :yocto_git:`/meta-mingw`
|
||||||
|
- Branch: :yocto_git:`kirkstone </meta-mingw/log/?h=kirkstone>`
|
||||||
|
- Tag: :yocto_git:`yocto-4.0.15 </meta-mingw/log/?h=yocto-4.0.15>`
|
||||||
|
- Git Revision: :yocto_git:`f6b38ce3c90e1600d41c2ebb41e152936a0357d7 </meta-mingw/commit/?id=f6b38ce3c90e1600d41c2ebb41e152936a0357d7>`
|
||||||
|
- Release Artefact: meta-mingw-f6b38ce3c90e1600d41c2ebb41e152936a0357d7
|
||||||
|
- sha: 7d57167c19077f4ab95623d55a24c2267a3a3fb5ed83688659b4c03586373b25
|
||||||
|
- Download Locations:
|
||||||
|
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/meta-mingw-f6b38ce3c90e1600d41c2ebb41e152936a0357d7.tar.bz2
|
||||||
|
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/meta-mingw-f6b38ce3c90e1600d41c2ebb41e152936a0357d7.tar.bz2
|
||||||
|
|
||||||
|
meta-gplv2
|
||||||
|
|
||||||
|
- Repository Location: :yocto_git:`/meta-gplv2`
|
||||||
|
- Branch: :yocto_git:`kirkstone </meta-gplv2/log/?h=kirkstone>`
|
||||||
|
- Tag: :yocto_git:`yocto-4.0.15 </meta-gplv2/log/?h=yocto-4.0.15>`
|
||||||
|
- Git Revision: :yocto_git:`d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a </meta-gplv2/commit/?id=d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a>`
|
||||||
|
- Release Artefact: meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a
|
||||||
|
- sha: c386f59f8a672747dc3d0be1d4234b6039273d0e57933eb87caa20f56b9cca6d
|
||||||
|
- Download Locations:
|
||||||
|
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
|
||||||
|
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
|
||||||
|
|
||||||
|
bitbake
|
||||||
|
|
||||||
|
- Repository Location: :oe_git:`/bitbake`
|
||||||
|
- Branch: :oe_git:`2.0 </bitbake/log/?h=2.0>`
|
||||||
|
- Tag: :oe_git:`yocto-4.0.15 </bitbake/log/?h=yocto-4.0.15>`
|
||||||
|
- Git Revision: :oe_git:`42a1c9fe698a03feb34c5bba223c6e6e0350925b </bitbake/commit/?id=42a1c9fe698a03feb34c5bba223c6e6e0350925b>`
|
||||||
|
- Release Artefact: bitbake-42a1c9fe698a03feb34c5bba223c6e6e0350925b
|
||||||
|
- sha: 64c684ccd661fa13e25c859dfc68d66bec79281da0f4f81b0d6a9995acb659b5
|
||||||
|
- Download Locations:
|
||||||
|
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/bitbake-42a1c9fe698a03feb34c5bba223c6e6e0350925b.tar.bz2
|
||||||
|
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/bitbake-42a1c9fe698a03feb34c5bba223c6e6e0350925b.tar.bz2
|
||||||
|
|
||||||
|
yocto-docs
|
||||||
|
|
||||||
|
- Repository Location: :yocto_git:`/yocto-docs`
|
||||||
|
- Branch: :yocto_git:`kirkstone </yocto-docs/log/?h=kirkstone>`
|
||||||
|
- Tag: :yocto_git:`yocto-4.0.15 </yocto-docs/log/?h=yocto-4.0.15>`
|
||||||
|
- Git Revision: :yocto_git:`08fda7a5601393617b1ecfe89229459e14a90b1d </yocto-docs/commit/?id=08fda7a5601393617b1ecfe89229459e14a90b1d>`
|
||||||
|
|
||||||
@@ -1026,7 +1026,7 @@ processing includes creation of a manifest file and optimizations.
|
|||||||
The manifest file (``.manifest``) resides in the same directory as the
|
The manifest file (``.manifest``) resides in the same directory as the
|
||||||
root filesystem image. This file lists out, line-by-line, the installed
|
root filesystem image. This file lists out, line-by-line, the installed
|
||||||
packages. The manifest file is useful for the
|
packages. The manifest file is useful for the
|
||||||
:ref:`testimage <ref-classes-testimage*>` class,
|
:ref:`testimage <ref-classes-testimage>` class,
|
||||||
for example, to determine whether or not to run specific tests. See the
|
for example, to determine whether or not to run specific tests. See the
|
||||||
:term:`IMAGE_MANIFEST`
|
:term:`IMAGE_MANIFEST`
|
||||||
variable for additional information.
|
variable for additional information.
|
||||||
@@ -2004,6 +2004,15 @@ task output from the Shared State cache.
|
|||||||
the stability of the task's output hash. Therefore, the effectiveness
|
the stability of the task's output hash. Therefore, the effectiveness
|
||||||
of Hash Equivalence strongly depends on it.
|
of Hash Equivalence strongly depends on it.
|
||||||
|
|
||||||
|
Recipes that are not reproducible may have undesired behavior if hash
|
||||||
|
equivalence is enabled, since the non-reproducible diverging output maybe be
|
||||||
|
remapped to an older sstate object in the cache by the server. If a recipe
|
||||||
|
is non-reproducible in trivial ways, such as different timestamps, this is
|
||||||
|
likely not a problem. However recipes that have more dramatic changes (such
|
||||||
|
as completely different file names) will likely outright fail since the
|
||||||
|
downstream sstate objects are not actually equivalent to what was just
|
||||||
|
built.
|
||||||
|
|
||||||
This applies to multiple scenarios:
|
This applies to multiple scenarios:
|
||||||
|
|
||||||
- A "trivial" change to a recipe that doesn't impact its generated output,
|
- A "trivial" change to a recipe that doesn't impact its generated output,
|
||||||
@@ -2221,3 +2230,173 @@ For more information, see the
|
|||||||
BitBake User Manual. You can also reference the "`Why Not
|
BitBake User Manual. You can also reference the "`Why Not
|
||||||
Fakeroot? <https://github.com/wrpseudo/pseudo/wiki/WhyNotFakeroot>`__"
|
Fakeroot? <https://github.com/wrpseudo/pseudo/wiki/WhyNotFakeroot>`__"
|
||||||
article for background information on Fakeroot and Pseudo.
|
article for background information on Fakeroot and Pseudo.
|
||||||
|
|
||||||
|
BitBake Tasks Map
|
||||||
|
=================
|
||||||
|
|
||||||
|
To understand how BitBake operates in the build directory and environment
|
||||||
|
we can consider the following recipes and diagram, to have full picture
|
||||||
|
about the tasks that BitBake runs to generate the final package file
|
||||||
|
for the recipe.
|
||||||
|
|
||||||
|
We will have two recipes as an example:
|
||||||
|
|
||||||
|
- ``libhello``: A recipe that provides a shared library
|
||||||
|
- ``sayhello``: A recipe that uses ``libhello`` library to do its job
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
``sayhello`` depends on ``libhello`` at compile time as it needs the shared
|
||||||
|
library to do the dynamic linking process. It also depends on it at runtime
|
||||||
|
as the shared library loader needs to find the library.
|
||||||
|
For more details about dependencies check :ref:`ref-varlocality-recipe-dependencies`.
|
||||||
|
|
||||||
|
``libhello`` sources are as follows:
|
||||||
|
|
||||||
|
- ``LICENSE``: This is the license associated with this library
|
||||||
|
- ``Makefile``: The file used by ``make`` to build the library
|
||||||
|
- ``hellolib.c``: The implementation of the library
|
||||||
|
- ``hellolib.h``: The C header of the library
|
||||||
|
|
||||||
|
``sayhello`` sources are as follows:
|
||||||
|
|
||||||
|
- ``LICENSE``: This is the license associated with this project
|
||||||
|
- ``Makefile``: The file used by ``make`` to build the project
|
||||||
|
- ``sayhello.c``: The source file of the project
|
||||||
|
|
||||||
|
Before presenting the contents of each file, here are the steps
|
||||||
|
that we need to follow to accomplish what we want in the first place,
|
||||||
|
which is integrating ``sayhello`` in our root file system:
|
||||||
|
|
||||||
|
#. Create a Git repository for each project with the corresponding files
|
||||||
|
|
||||||
|
#. Create a recipe for each project
|
||||||
|
|
||||||
|
#. Make sure that ``sayhello`` recipe :term:`DEPENDS` on ``libhello``
|
||||||
|
|
||||||
|
#. Make sure that ``sayhello`` recipe :term:`RDEPENDS` on ``libhello``
|
||||||
|
|
||||||
|
#. Add ``sayhello`` to :term:`IMAGE_INSTALL` to integrate it into
|
||||||
|
the root file system
|
||||||
|
|
||||||
|
The following are the contents of ``libhello/Makefile``::
|
||||||
|
|
||||||
|
LIB=libhello.so
|
||||||
|
|
||||||
|
all: $(LIB)
|
||||||
|
|
||||||
|
$(LIB): hellolib.o
|
||||||
|
$(CC) $< -Wl,-soname,$(LIB).1 -fPIC $(LDFLAGS) -shared -o $(LIB).1.0
|
||||||
|
|
||||||
|
%.o: %.c
|
||||||
|
$(CC) -c $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf *.o *.so*
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
When creating shared libraries, it is strongly recommended to follow the Linux
|
||||||
|
conventions and guidelines (see `this article
|
||||||
|
<https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html>`__
|
||||||
|
for some background).
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
When creating ``Makefile`` files, it is strongly recommended to use ``CC``, ``LDFLAGS``
|
||||||
|
and ``CFLAGS`` as BitBake will set them as environment variables according
|
||||||
|
to your build configuration.
|
||||||
|
|
||||||
|
The following are the contents of ``libhello/hellolib.h``::
|
||||||
|
|
||||||
|
#ifndef HELLOLIB_H
|
||||||
|
#define HELLOLIB_H
|
||||||
|
|
||||||
|
void Hello();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
The following are the contents of ``libhello/hellolib.c``::
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void Hello(){
|
||||||
|
puts("Hello from a Yocto demo \n");
|
||||||
|
}
|
||||||
|
|
||||||
|
The following are the contents of ``sayhello/Makefile``::
|
||||||
|
|
||||||
|
EXEC=sayhello
|
||||||
|
LDFLAGS += -lhello
|
||||||
|
|
||||||
|
all: $(EXEC)
|
||||||
|
|
||||||
|
$(EXEC): sayhello.c
|
||||||
|
$(CC) $< $(LDFLAGS) $(CFLAGS) -o $(EXEC)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(EXEC) *.o
|
||||||
|
|
||||||
|
The following are the contents of ``sayhello/sayhello.c``::
|
||||||
|
|
||||||
|
#include <hellolib.h>
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
Hello();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
The following are the contents of ``libhello_0.1.bb``::
|
||||||
|
|
||||||
|
SUMMARY = "Hello demo library"
|
||||||
|
DESCRIPTION = "Hello shared library used in Yocto demo"
|
||||||
|
|
||||||
|
# NOTE: Set the License according to the LICENSE file of your project
|
||||||
|
# and then add LIC_FILES_CHKSUM accordingly
|
||||||
|
LICENSE = "CLOSED"
|
||||||
|
|
||||||
|
# Assuming the branch is main
|
||||||
|
# Change <username> accordingly
|
||||||
|
SRC_URI = "git://github.com/<username>/libhello;branch=main;protocol=https"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
do_install(){
|
||||||
|
install -d ${D}${includedir}
|
||||||
|
install -d ${D}${libdir}
|
||||||
|
|
||||||
|
install hellolib.h ${D}${includedir}
|
||||||
|
oe_soinstall ${PN}.so.${PV} ${D}${libdir}
|
||||||
|
}
|
||||||
|
|
||||||
|
The following are the contents of ``sayhello_0.1.bb``::
|
||||||
|
|
||||||
|
SUMMARY = "SayHello demo"
|
||||||
|
DESCRIPTION = "SayHello project used in Yocto demo"
|
||||||
|
|
||||||
|
# NOTE: Set the License according to the LICENSE file of your project
|
||||||
|
# and then add LIC_FILES_CHKSUM accordingly
|
||||||
|
LICENSE = "CLOSED"
|
||||||
|
|
||||||
|
# Assuming the branch is main
|
||||||
|
# Change <username> accordingly
|
||||||
|
SRC_URI = "git://github.com/<username>/sayhello;branch=main;protocol=https"
|
||||||
|
|
||||||
|
DEPENDS += "libhello"
|
||||||
|
RDEPENDS:${PN} += "libhello"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
do_install(){
|
||||||
|
install -d ${D}/usr/bin
|
||||||
|
install -m 0700 sayhello ${D}/usr/bin
|
||||||
|
}
|
||||||
|
|
||||||
|
After placing the recipes in a custom layer we can run ``bitbake sayhello``
|
||||||
|
to build the recipe.
|
||||||
|
|
||||||
|
The following diagram shows the sequences of tasks that BitBake
|
||||||
|
executes to accomplish that.
|
||||||
|
|
||||||
|
.. image:: svg/bitbake_tasks_map.*
|
||||||
|
:width: 100%
|
||||||
|
|||||||
@@ -132,6 +132,14 @@ are several ways of working in the Yocto Project environment:
|
|||||||
Toaster and on how to use Toaster in general, see the
|
Toaster and on how to use Toaster in general, see the
|
||||||
:doc:`/toaster-manual/index`.
|
:doc:`/toaster-manual/index`.
|
||||||
|
|
||||||
|
- *Using the VSCode Extension:* You can use the `Yocto Project BitBake
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||||
|
extension for Visual Studio Code to start your BitBake builds through a
|
||||||
|
graphical user interface.
|
||||||
|
|
||||||
|
Learn more about the VSCode Extension on the `extension's marketplace page
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__.
|
||||||
|
|
||||||
Yocto Project Source Repositories
|
Yocto Project Source Repositories
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
|
|||||||
4
documentation/overview-manual/svg/bitbake_tasks_map.svg
Normal file
4
documentation/overview-manual/svg/bitbake_tasks_map.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 197 KiB |
@@ -340,6 +340,18 @@ the Yocto Project:
|
|||||||
view information about builds. For information on Toaster, see the
|
view information about builds. For information on Toaster, see the
|
||||||
:doc:`/toaster-manual/index`.
|
:doc:`/toaster-manual/index`.
|
||||||
|
|
||||||
|
- *VSCode IDE Extension:* The `Yocto Project BitBake
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||||
|
extension for Visual Studio Code provides a rich set of features for working
|
||||||
|
with BitBake recipes. The extension provides syntax highlighting,
|
||||||
|
hover tips, and completion for BitBake files as well as embedded Python and
|
||||||
|
Bash languages. Additional views and commands allow you to efficiently
|
||||||
|
browse, build and edit recipes. It also provides SDK integration for
|
||||||
|
cross-compiling and debugging through ``devtool``.
|
||||||
|
|
||||||
|
Learn more about the VSCode Extension on the `extension's frontpage
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__.
|
||||||
|
|
||||||
Production Tools
|
Production Tools
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
@@ -610,6 +622,14 @@ Build Host runs, you have several choices.
|
|||||||
For information about and how to use Toaster, see the
|
For information about and how to use Toaster, see the
|
||||||
:doc:`/toaster-manual/index`.
|
:doc:`/toaster-manual/index`.
|
||||||
|
|
||||||
|
- *Using the VSCode Extension:* You can use the `Yocto Project BitBake
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||||
|
extension for Visual Studio Code to start your BitBake builds through a
|
||||||
|
graphical user interface.
|
||||||
|
|
||||||
|
Learn more about the VSCode Extension on the `extension's marketplace page
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||||
|
|
||||||
Reference Embedded Distribution (Poky)
|
Reference Embedded Distribution (Poky)
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
|
|||||||
@@ -7,43 +7,45 @@ Yocto Project Profiling and Tracing Manual
|
|||||||
Introduction
|
Introduction
|
||||||
============
|
============
|
||||||
|
|
||||||
Yocto bundles a number of tracing and profiling tools - this 'HOWTO'
|
Yocto Project bundles a number of tracing and profiling tools --- this manual
|
||||||
describes their basic usage and shows by example how to make use of them
|
describes their basic usage and shows by example how to make use of them
|
||||||
to examine application and system behavior.
|
to analyze application and system behavior.
|
||||||
|
|
||||||
The tools presented are for the most part completely open-ended and have
|
The tools presented are, for the most part, completely open-ended and have
|
||||||
quite good and/or extensive documentation of their own which can be used
|
quite good and/or extensive documentation of their own which can be used
|
||||||
to solve just about any problem you might come across in Linux. Each
|
to solve just about any problem you might come across in Linux. Each
|
||||||
section that describes a particular tool has links to that tool's
|
section that describes a particular tool has links to that tool's
|
||||||
documentation and website.
|
documentation and website.
|
||||||
|
|
||||||
The purpose of this 'HOWTO' is to present a set of common and generally
|
The purpose of this manual is to present a set of common and generally
|
||||||
useful tracing and profiling idioms along with their application (as
|
useful tracing and profiling idioms along with their application (as
|
||||||
appropriate) to each tool, in the context of a general-purpose
|
appropriate) to each tool, in the context of a general-purpose
|
||||||
'drill-down' methodology that can be applied to solving a large number
|
'drill-down' methodology that can be applied to solving a large number
|
||||||
(90%?) of problems. For help with more advanced usages and problems,
|
of problems. For help with more advanced usages and problems,
|
||||||
please see the documentation and/or websites listed for each tool.
|
refer to the documentation and/or websites provided for each tool.
|
||||||
|
|
||||||
The final section of this 'HOWTO' is a collection of real-world examples
|
The final section of this manual is a collection of real-world examples
|
||||||
which we'll be continually adding to as we solve more problems using the
|
which we'll be continually updating as we solve more problems using the
|
||||||
tools - feel free to add your own examples to the list!
|
tools --- feel free to suggest additions to what you read here.
|
||||||
|
|
||||||
General Setup
|
General Setup
|
||||||
=============
|
=============
|
||||||
|
|
||||||
Most of the tools are available only in 'sdk' images or in images built
|
Most of the tools are available only in ``sdk`` images or in images built
|
||||||
after adding 'tools-profile' to your local.conf. So, in order to be able
|
after adding ``tools-profile`` to your ``local.conf`` file. So, in order to be able
|
||||||
to access all of the tools described here, please first build and boot
|
to access all of the tools described here, you can build and boot
|
||||||
an 'sdk' image e.g. ::
|
an ``sdk`` image, perhaps one of::
|
||||||
|
|
||||||
$ bitbake core-image-sato-sdk
|
$ bitbake core-image-sato-sdk
|
||||||
|
$ bitbake core-image-weston-sdk
|
||||||
|
$ bitbake core-image-rt-sdk
|
||||||
|
|
||||||
or alternatively by adding 'tools-profile' to the EXTRA_IMAGE_FEATURES line in
|
Alternatively, you can add ``tools-profile`` to the :term:`EXTRA_IMAGE_FEATURES` line in
|
||||||
your local.conf::
|
your ``local.conf`` file::
|
||||||
|
|
||||||
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile"
|
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile"
|
||||||
|
|
||||||
If you use the 'tools-profile' method, you don't need to build an sdk image -
|
If you use the ``tools-profile`` method, you don't need to build an sdk image ---
|
||||||
the tracing and profiling tools will be included in non-sdk images as well e.g.::
|
the tracing and profiling tools will be included in non-sdk images as well e.g.::
|
||||||
|
|
||||||
$ bitbake core-image-sato
|
$ bitbake core-image-sato
|
||||||
@@ -64,12 +66,12 @@ the tracing and profiling tools will be included in non-sdk images as well e.g.:
|
|||||||
If you've already built a stripped image, you can generate debug
|
If you've already built a stripped image, you can generate debug
|
||||||
packages (xxx-dbg) which you can manually install as needed.
|
packages (xxx-dbg) which you can manually install as needed.
|
||||||
|
|
||||||
To generate debug info for packages, you can add dbg-pkgs to
|
To generate debug info for packages, you can add ``dbg-pkgs`` to
|
||||||
EXTRA_IMAGE_FEATURES in local.conf. For example::
|
:term:`EXTRA_IMAGE_FEATURES` in ``local.conf``. For example::
|
||||||
|
|
||||||
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
|
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
|
||||||
|
|
||||||
Additionally, in order to generate the right type of debuginfo, we also need to
|
Additionally, in order to generate the right type of debug info, we also need to
|
||||||
set :term:`PACKAGE_DEBUG_SPLIT_STYLE` in the ``local.conf`` file::
|
set :term:`PACKAGE_DEBUG_SPLIT_STYLE` in the ``local.conf`` file::
|
||||||
|
|
||||||
PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
|
PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -163,7 +163,7 @@ consists of the following pieces:
|
|||||||
an ARM target, did the build produce ARM binaries. If, for example,
|
an ARM target, did the build produce ARM binaries. If, for example,
|
||||||
the build produced PPC binaries then there is a problem.
|
the build produced PPC binaries then there is a problem.
|
||||||
|
|
||||||
- :ref:`ref-classes-testimage*`: This class
|
- :ref:`ref-classes-testimage`: This class
|
||||||
performs runtime testing of images after they are built. The tests
|
performs runtime testing of images after they are built. The tests
|
||||||
are usually used with :doc:`QEMU </dev-manual/qemu>`
|
are usually used with :doc:`QEMU </dev-manual/qemu>`
|
||||||
to boot the images and check the combined runtime result boot
|
to boot the images and check the combined runtime result boot
|
||||||
|
|||||||
@@ -63,26 +63,28 @@ and announcements. To subscribe to one of the following mailing lists,
|
|||||||
click on the appropriate URL in the following list and follow the
|
click on the appropriate URL in the following list and follow the
|
||||||
instructions:
|
instructions:
|
||||||
|
|
||||||
- :yocto_lists:`/g/yocto` - General Yocto Project
|
- :yocto_lists:`/g/yocto` --- general Yocto Project
|
||||||
discussion mailing list.
|
discussion mailing list.
|
||||||
|
|
||||||
- :oe_lists:`/g/openembedded-core` - Discussion mailing
|
- :oe_lists:`/g/openembedded-core` --- discussion mailing
|
||||||
list about OpenEmbedded-Core (the core metadata).
|
list about OpenEmbedded-Core (the core metadata).
|
||||||
|
|
||||||
- :oe_lists:`/g/openembedded-devel` - Discussion
|
- :oe_lists:`/g/openembedded-devel` --- discussion
|
||||||
mailing list about OpenEmbedded.
|
mailing list about OpenEmbedded.
|
||||||
|
|
||||||
- :oe_lists:`/g/bitbake-devel` - Discussion mailing
|
- :oe_lists:`/g/bitbake-devel` --- discussion mailing
|
||||||
list about the :term:`BitBake` build tool.
|
list about the :term:`BitBake` build tool.
|
||||||
|
|
||||||
- :yocto_lists:`/g/poky` - Discussion mailing list
|
- :yocto_lists:`/g/poky` --- discussion mailing list
|
||||||
about :term:`Poky`.
|
about :term:`Poky`.
|
||||||
|
|
||||||
- :yocto_lists:`/g/yocto-announce` - Mailing list to
|
- :yocto_lists:`/g/yocto-announce` --- mailing list to
|
||||||
receive official Yocto Project release and milestone announcements.
|
receive official Yocto Project release and milestone announcements.
|
||||||
|
|
||||||
For more Yocto Project-related mailing lists, see the
|
- :yocto_lists:`/g/docs` --- discussion mailing list about the Yocto Project
|
||||||
:yocto_home:`Yocto Project Website <>`.
|
documentation.
|
||||||
|
|
||||||
|
See also :yocto_home:`the description of all mailing lists </community/mailing-lists/>`.
|
||||||
|
|
||||||
.. _resources-irc:
|
.. _resources-irc:
|
||||||
|
|
||||||
@@ -103,93 +105,96 @@ Links and Related Documentation
|
|||||||
|
|
||||||
Here is a list of resources you might find helpful:
|
Here is a list of resources you might find helpful:
|
||||||
|
|
||||||
- :yocto_home:`The Yocto Project Website <>`\ *:* The home site
|
- :yocto_home:`The Yocto Project Website <>`: The home site
|
||||||
for the Yocto Project.
|
for the Yocto Project.
|
||||||
|
|
||||||
- :yocto_wiki:`The Yocto Project Main Wiki Page <>`\ *:* The main wiki page for
|
- :yocto_wiki:`The Yocto Project Main Wiki Page <>`: The main wiki page for
|
||||||
the Yocto Project. This page contains information about project
|
the Yocto Project. This page contains information about project
|
||||||
planning, release engineering, QA & automation, a reference site map,
|
planning, release engineering, QA & automation, a reference site map,
|
||||||
and other resources related to the Yocto Project.
|
and other resources related to the Yocto Project.
|
||||||
|
|
||||||
- :oe_home:`OpenEmbedded <>`\ *:* The build system used by the
|
- :oe_home:`OpenEmbedded <>`: The build system used by the
|
||||||
Yocto Project. This project is the upstream, generic, embedded
|
Yocto Project. This project is the upstream, generic, embedded
|
||||||
distribution from which the Yocto Project derives its build system
|
distribution from which the Yocto Project derives its build system
|
||||||
(Poky) and to which it contributes.
|
(Poky) and to which it contributes.
|
||||||
|
|
||||||
- :oe_wiki:`BitBake </BitBake>`\ *:* The tool used to process metadata.
|
- :oe_wiki:`BitBake </BitBake>`: The tool used to process metadata.
|
||||||
|
|
||||||
- :doc:`BitBake User Manual <bitbake:index>`\ *:* A comprehensive
|
- :doc:`BitBake User Manual <bitbake:index>`: A comprehensive
|
||||||
guide to the BitBake tool. If you want information on BitBake, see
|
guide to the BitBake tool. If you want information on BitBake, see
|
||||||
this manual.
|
this manual.
|
||||||
|
|
||||||
- :doc:`/brief-yoctoprojectqs/index` *:* This
|
- :doc:`/brief-yoctoprojectqs/index`: This
|
||||||
short document lets you experience building an image using the Yocto
|
short document lets you experience building an image using the Yocto
|
||||||
Project without having to understand any concepts or details.
|
Project without having to understand any concepts or details.
|
||||||
|
|
||||||
- :doc:`/overview-manual/index` *:* This manual provides overview
|
- :doc:`/overview-manual/index`: This manual provides overview
|
||||||
and conceptual information about the Yocto Project.
|
and conceptual information about the Yocto Project.
|
||||||
|
|
||||||
- :doc:`/dev-manual/index` *:* This manual is a "how-to" guide
|
- :doc:`/dev-manual/index`: This manual is a "how-to" guide
|
||||||
that presents procedures useful to both application and system
|
that presents procedures useful to both application and system
|
||||||
developers who use the Yocto Project.
|
developers who use the Yocto Project.
|
||||||
|
|
||||||
- :doc:`/sdk-manual/index` *manual :* This
|
- :doc:`/sdk-manual/index` manual: This
|
||||||
guide provides information that lets you get going with the standard
|
guide provides information that lets you get going with the standard
|
||||||
or extensible SDK. An SDK, with its cross-development toolchains,
|
or extensible SDK. An SDK, with its cross-development toolchains,
|
||||||
allows you to develop projects inside or outside of the Yocto Project
|
allows you to develop projects inside or outside of the Yocto Project
|
||||||
environment.
|
environment.
|
||||||
|
|
||||||
- :doc:`/bsp-guide/bsp` *:* This guide defines the structure
|
- :doc:`/bsp-guide/bsp`: This guide defines the structure
|
||||||
for BSP components. Having a commonly understood structure encourages
|
for BSP components. Having a commonly understood structure encourages
|
||||||
standardization.
|
standardization.
|
||||||
|
|
||||||
- :doc:`/kernel-dev/index` *:* This manual describes
|
- :doc:`/kernel-dev/index`: This manual describes
|
||||||
how to work with Linux Yocto kernels as well as provides a bit of
|
how to work with Linux Yocto kernels as well as provides a bit of
|
||||||
conceptual information on the construction of the Yocto Linux kernel
|
conceptual information on the construction of the Yocto Linux kernel
|
||||||
tree.
|
tree.
|
||||||
|
|
||||||
- :doc:`/ref-manual/index` *:* This
|
- :doc:`/ref-manual/index`: This
|
||||||
manual provides reference material such as variable, task, and class
|
manual provides reference material such as variable, task, and class
|
||||||
descriptions.
|
descriptions.
|
||||||
|
|
||||||
- :yocto_docs:`Yocto Project Mega-Manual </singleindex.html>`\ *:* This manual
|
- :yocto_docs:`Yocto Project Mega-Manual </singleindex.html>`: This manual
|
||||||
is simply a single HTML file comprised of the bulk of the Yocto
|
is simply a single HTML file comprised of the bulk of the Yocto
|
||||||
Project manuals. It makes it easy to search for phrases and terms used
|
Project manuals. It makes it easy to search for phrases and terms used
|
||||||
in the Yocto Project documentation set.
|
in the Yocto Project documentation set.
|
||||||
|
|
||||||
- :doc:`/profile-manual/index` *:* This manual presents a set of
|
- :doc:`/profile-manual/index`: This manual presents a set of
|
||||||
common and generally useful tracing and profiling schemes along with
|
common and generally useful tracing and profiling schemes along with
|
||||||
their applications (as appropriate) to each tool.
|
their applications (as appropriate) to each tool.
|
||||||
|
|
||||||
- :doc:`/toaster-manual/index` *:* This manual
|
- :doc:`/toaster-manual/index`: This manual
|
||||||
introduces and describes how to set up and use Toaster. Toaster is an
|
introduces and describes how to set up and use Toaster. Toaster is an
|
||||||
Application Programming Interface (API) and web-based interface to
|
Application Programming Interface (API) and web-based interface to
|
||||||
the :term:`OpenEmbedded Build System`, which uses
|
the :term:`OpenEmbedded Build System`, which uses
|
||||||
BitBake, that reports build information.
|
BitBake, that reports build information.
|
||||||
|
|
||||||
- :yocto_wiki:`FAQ </FAQ>`\ *:* A list of commonly asked
|
- `Yocto Project BitBake extension for VSCode
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__:
|
||||||
|
This extension provides a rich feature set when working with BitBake recipes
|
||||||
|
within the Visual Studio Code IDE.
|
||||||
|
|
||||||
|
- :yocto_wiki:`FAQ </FAQ>`: A list of commonly asked
|
||||||
questions and their answers.
|
questions and their answers.
|
||||||
|
|
||||||
- *Release Notes:* Features, updates and known issues for the current
|
- :doc:`Release Information </migration-guides/index>`:
|
||||||
release of the Yocto Project. To access the Release Notes, go to the
|
Migration guides, release notes, new features, updates and known issues
|
||||||
:yocto_home:`Downloads </software-overview/downloads>` page on
|
for the current and past releases of the Yocto Project.
|
||||||
the Yocto Project website and click on the "RELEASE INFORMATION" link
|
|
||||||
for the appropriate release.
|
|
||||||
|
|
||||||
- :yocto_bugs:`Bugzilla <>`\ *:* The bug tracking application
|
- :yocto_bugs:`Bugzilla <>`: The bug tracking application
|
||||||
the Yocto Project uses. If you find problems with the Yocto Project,
|
the Yocto Project uses. If you find problems with the Yocto Project,
|
||||||
you should report them using this application.
|
you should report them using this application.
|
||||||
|
|
||||||
- :yocto_wiki:`Bugzilla Configuration and Bug Tracking Wiki Page
|
- :yocto_wiki:`Bugzilla Configuration and Bug Tracking Wiki Page
|
||||||
</Bugzilla_Configuration_and_Bug_Tracking>`\ *:*
|
</Bugzilla_Configuration_and_Bug_Tracking>`:
|
||||||
Information on how to get set up and use the Yocto Project
|
Information on how to get set up and use the Yocto Project
|
||||||
implementation of Bugzilla for logging and tracking Yocto Project
|
implementation of Bugzilla for logging and tracking Yocto Project
|
||||||
defects.
|
defects.
|
||||||
|
|
||||||
- *Internet Relay Chat (IRC):* Two IRC channels on
|
- Internet Relay Chat (IRC): Two IRC channels on
|
||||||
`Libera Chat <https://libera.chat/>`__ are
|
`Libera Chat <https://libera.chat/>`__ are
|
||||||
available for Yocto Project and OpenEmbeddded discussions: ``#yocto`` and
|
available for Yocto Project and OpenEmbeddded discussions: ``#yocto`` and
|
||||||
``#oe``, respectively.
|
``#oe``, respectively.
|
||||||
|
|
||||||
- `Quick EMUlator (QEMU) <https://wiki.qemu.org/Index.html>`__\ *:* An
|
- `Quick EMUlator (QEMU) <https://wiki.qemu.org/Index.html>`__: An
|
||||||
open-source machine emulator and virtualizer.
|
open-source machine emulator and virtualizer.
|
||||||
|
|||||||
@@ -404,15 +404,15 @@
|
|||||||
guidetolerance="10"
|
guidetolerance="10"
|
||||||
inkscape:pageopacity="0"
|
inkscape:pageopacity="0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:window-width="1846"
|
inkscape:window-width="1920"
|
||||||
inkscape:window-height="1016"
|
inkscape:window-height="1043"
|
||||||
id="namedview4"
|
id="namedview4"
|
||||||
showgrid="true"
|
showgrid="true"
|
||||||
inkscape:zoom="0.51166405"
|
inkscape:zoom="1.4472045"
|
||||||
inkscape:cx="-43.974166"
|
inkscape:cx="736.24703"
|
||||||
inkscape:cy="311.72798"
|
inkscape:cy="312.32629"
|
||||||
inkscape:window-x="1994"
|
inkscape:window-x="1728"
|
||||||
inkscape:window-y="27"
|
inkscape:window-y="0"
|
||||||
inkscape:window-maximized="1"
|
inkscape:window-maximized="1"
|
||||||
inkscape:current-layer="g10"
|
inkscape:current-layer="g10"
|
||||||
inkscape:document-rotation="0"
|
inkscape:document-rotation="0"
|
||||||
@@ -669,28 +669,28 @@
|
|||||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||||
id="tspan10317-2-9-1-4">4.2</tspan></text>
|
id="tspan10317-2-9-1-4">4.2</tspan></text>
|
||||||
<g
|
<g
|
||||||
id="g32107">
|
id="g1379">
|
||||||
<rect
|
<rect
|
||||||
style="opacity:0.75;fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||||
id="rect917-0-0-4-4-9-4-5-3"
|
id="rect917-0-0-4-4-9-4-5-38"
|
||||||
width="140.00014"
|
width="140.00003"
|
||||||
height="45.000004"
|
height="45.000004"
|
||||||
x="1199.9999"
|
x="1220"
|
||||||
y="-229.99998"
|
y="-230.00005"
|
||||||
ry="2.2558987" />
|
ry="2.2558987" />
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="font-weight:bold;font-size:13.3333px;line-height:125%;font-family:'Nimbus Roman';-inkscape-font-specification:'Nimbus Roman, Bold';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#fffefe;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
style="font-weight:bold;font-size:13.3333px;line-height:125%;font-family:'Nimbus Roman';-inkscape-font-specification:'Nimbus Roman, Bold';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#fffefe;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
x="1247.2329"
|
x="1269.2329"
|
||||||
y="-210.32925"
|
y="-210.32925"
|
||||||
id="text1185-3-55-4-0-0-0-1-1"><tspan
|
id="text1185-3-55-4-0-0-0-1-1"><tspan
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="1247.2329"
|
x="1269.2329"
|
||||||
y="-210.32925"
|
y="-210.32925"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||||
id="tspan957-2-8-6-3-9-7-4">Nanbield</tspan><tspan
|
id="tspan957-2-8-6-3-9-7-4">Nanbield</tspan><tspan
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="1247.2329"
|
x="1269.2329"
|
||||||
y="-192.33258"
|
y="-192.33258"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||||
id="tspan10317-2-9-1-4-6">4.3</tspan></text>
|
id="tspan10317-2-9-1-4-6">4.3</tspan></text>
|
||||||
@@ -718,7 +718,7 @@
|
|||||||
x="1373.233"
|
x="1373.233"
|
||||||
y="-247.33261"
|
y="-247.33261"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||||
id="tspan10317-2-9-1-4-6-5">4.4</tspan></text>
|
id="tspan10317-2-9-1-4-6-5">5.0</tspan></text>
|
||||||
<rect
|
<rect
|
||||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||||
id="rect917-0-0-4-4-9-9"
|
id="rect917-0-0-4-4-9-9"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
@@ -41,20 +41,17 @@ supported on the following distributions:
|
|||||||
|
|
||||||
- Ubuntu 22.04 (LTS)
|
- Ubuntu 22.04 (LTS)
|
||||||
|
|
||||||
- Fedora 37
|
- Fedora 38
|
||||||
|
|
||||||
- Debian GNU/Linux 11.x (Bullseye)
|
- Debian GNU/Linux 11.x (Bullseye)
|
||||||
|
|
||||||
- AlmaLinux 8.8
|
- AlmaLinux 8
|
||||||
|
|
||||||
The following distribution versions are still tested (being listed
|
The following distribution versions are still tested, even though the
|
||||||
in :term:`SANITY_TESTED_DISTROS`), even though the organizations
|
organizations publishing them no longer make updates publicly available:
|
||||||
publishing them no longer make updates publicly available:
|
|
||||||
|
|
||||||
- Ubuntu 18.04 (LTS)
|
- Ubuntu 18.04 (LTS)
|
||||||
|
|
||||||
- OpenSUSE Leap 15.3
|
|
||||||
|
|
||||||
Note that the Yocto Project doesn't have access to private updates
|
Note that the Yocto Project doesn't have access to private updates
|
||||||
that some of these versions may have. Therefore, our testing has
|
that some of these versions may have. Therefore, our testing has
|
||||||
limited value if you have access to such updates.
|
limited value if you have access to such updates.
|
||||||
@@ -72,18 +69,18 @@ tested on former revisions of "&DISTRO_NAME;", but no longer are:
|
|||||||
|
|
||||||
- Fedora 36
|
- Fedora 36
|
||||||
|
|
||||||
|
- Fedora 37
|
||||||
|
|
||||||
- CentOS 7.x
|
- CentOS 7.x
|
||||||
|
|
||||||
- CentOS 8.x
|
- CentOS 8.x
|
||||||
|
|
||||||
- AlmaLinux 8.5
|
|
||||||
|
|
||||||
- AlmaLinux 8.7
|
|
||||||
|
|
||||||
- Debian GNU/Linux 9.x (Stretch)
|
- Debian GNU/Linux 9.x (Stretch)
|
||||||
|
|
||||||
- Debian GNU/Linux 10.x (Buster)
|
- Debian GNU/Linux 10.x (Buster)
|
||||||
|
|
||||||
|
- OpenSUSE Leap 15.3
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
- While the Yocto Project Team attempts to ensure all Yocto Project
|
- While the Yocto Project Team attempts to ensure all Yocto Project
|
||||||
|
|||||||
@@ -1202,6 +1202,32 @@ system and gives an overview of their function and contents.
|
|||||||
speed since the build system skips parsing recipes not compatible
|
speed since the build system skips parsing recipes not compatible
|
||||||
with the current machine.
|
with the current machine.
|
||||||
|
|
||||||
|
If one wants to have a recipe only available for some architectures
|
||||||
|
(here ``aarch64`` and ``mips64``), the following can be used::
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE = "^$"
|
||||||
|
COMPATIBLE_MACHINE:arch64 = "^(aarch64)$"
|
||||||
|
COMPATIBLE_MACHINE:mips64 = "^(mips64)$"
|
||||||
|
|
||||||
|
The first line means "match all machines whose :term:`MACHINEOVERRIDES`
|
||||||
|
contains the empty string", which will always be none.
|
||||||
|
|
||||||
|
The second is for matching all machines whose :term:`MACHINEOVERRIDES`
|
||||||
|
contains one override which is exactly ``aarch64``.
|
||||||
|
|
||||||
|
The third is for matching all machines whose :term:`MACHINEOVERRIDES`
|
||||||
|
contains one override which is exactly ``mips64``.
|
||||||
|
|
||||||
|
The same could be achieved with::
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE = "^(aarch64|mips64)$"
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
When :term:`COMPATIBLE_MACHINE` is set in a recipe inherits from
|
||||||
|
native, the recipe is always skipped. All native recipes must be
|
||||||
|
entirely target independent and should not rely on :term:`MACHINE`.
|
||||||
|
|
||||||
:term:`COMPLEMENTARY_GLOB`
|
:term:`COMPLEMENTARY_GLOB`
|
||||||
Defines wildcards to match when installing a list of complementary
|
Defines wildcards to match when installing a list of complementary
|
||||||
packages for all the packages explicitly (or implicitly) installed in
|
packages for all the packages explicitly (or implicitly) installed in
|
||||||
@@ -1316,6 +1342,19 @@ system and gives an overview of their function and contents.
|
|||||||
the recipe will be skipped, and if the build system attempts to build
|
the recipe will be skipped, and if the build system attempts to build
|
||||||
the recipe then an error will be triggered.
|
the recipe then an error will be triggered.
|
||||||
|
|
||||||
|
:term:`CONVERSION_CMD`
|
||||||
|
This variable is used for storing image conversion commands.
|
||||||
|
Image conversion can convert an image into different objects like:
|
||||||
|
|
||||||
|
- Compressed version of the image
|
||||||
|
|
||||||
|
- Checksums for the image
|
||||||
|
|
||||||
|
An example of :term:`CONVERSION_CMD` from :ref:`image-types
|
||||||
|
<ref-classes-image_types>` class is::
|
||||||
|
|
||||||
|
CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
|
||||||
|
|
||||||
:term:`COPY_LIC_DIRS`
|
:term:`COPY_LIC_DIRS`
|
||||||
If set to "1" along with the
|
If set to "1" along with the
|
||||||
:term:`COPY_LIC_MANIFEST` variable, the
|
:term:`COPY_LIC_MANIFEST` variable, the
|
||||||
@@ -2075,6 +2114,18 @@ system and gives an overview of their function and contents.
|
|||||||
For information on policies and on how to use this variable, see the
|
For information on policies and on how to use this variable, see the
|
||||||
comments in the ``meta/classes/compress_doc.bbclass`` file.
|
comments in the ``meta/classes/compress_doc.bbclass`` file.
|
||||||
|
|
||||||
|
:term:`DT_FILES_PATH`
|
||||||
|
When compiling out-of-tree device tree sources using a recipe that
|
||||||
|
inherits the :ref:`ref-classes-devicetree` class, this variable specifies
|
||||||
|
the path to the directory containing dts files to build.
|
||||||
|
|
||||||
|
Defaults to the :term:`S` directory.
|
||||||
|
|
||||||
|
:term:`DT_PADDING_SIZE`
|
||||||
|
When inheriting the :ref:`ref-classes-devicetree` class, this variable
|
||||||
|
specifies the size of padding appended to the device tree blob, used as
|
||||||
|
extra space typically for additional properties during boot.
|
||||||
|
|
||||||
:term:`EFI_PROVIDER`
|
:term:`EFI_PROVIDER`
|
||||||
When building bootable images (i.e. where ``hddimg``, ``iso``, or
|
When building bootable images (i.e. where ``hddimg``, ``iso``, or
|
||||||
``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
|
``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
|
||||||
@@ -2834,6 +2885,73 @@ system and gives an overview of their function and contents.
|
|||||||
|
|
||||||
GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
|
GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
|
||||||
|
|
||||||
|
:term:`GO_IMPORT`
|
||||||
|
When inheriting the :ref:`ref-classes-go` class, this mandatory variable
|
||||||
|
sets the import path for the Go package that will be created for the code
|
||||||
|
to build. If you have a ``go.mod`` file in the source directory, this
|
||||||
|
typically matches the path in the ``module`` line in this file.
|
||||||
|
|
||||||
|
Other Go programs importing this package will use this path.
|
||||||
|
|
||||||
|
Here is an example setting from the
|
||||||
|
:yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>`
|
||||||
|
recipe::
|
||||||
|
|
||||||
|
GO_IMPORT = "golang.org/x/example"
|
||||||
|
|
||||||
|
:term:`GO_INSTALL`
|
||||||
|
When inheriting the :ref:`ref-classes-go` class, this optional variable
|
||||||
|
specifies which packages in the sources should be compiled and
|
||||||
|
installed in the Go build space by the
|
||||||
|
`go install <https://go.dev/ref/mod#go-install>`__ command.
|
||||||
|
|
||||||
|
Here is an example setting from the
|
||||||
|
:oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>`
|
||||||
|
recipe::
|
||||||
|
|
||||||
|
GO_INSTALL = "\
|
||||||
|
${GO_IMPORT}/cmd/crucible \
|
||||||
|
${GO_IMPORT}/cmd/habtool \
|
||||||
|
"
|
||||||
|
|
||||||
|
By default, :term:`GO_INSTALL` is defined as::
|
||||||
|
|
||||||
|
GO_INSTALL ?= "${GO_IMPORT}/..."
|
||||||
|
|
||||||
|
The ``...`` wildcard means that it will catch all
|
||||||
|
packages found in the sources.
|
||||||
|
|
||||||
|
See the :term:`GO_INSTALL_FILTEROUT` variable for
|
||||||
|
filtering out unwanted packages from the ones
|
||||||
|
found from the :term:`GO_INSTALL` value.
|
||||||
|
|
||||||
|
:term:`GO_INSTALL_FILTEROUT`
|
||||||
|
When using the Go "vendor" mechanism to bring in dependencies for a Go
|
||||||
|
package, the default :term:`GO_INSTALL` setting, which uses the ``...``
|
||||||
|
wildcard, will include the vendored packages in the build, which produces
|
||||||
|
incorrect results.
|
||||||
|
|
||||||
|
There are also some Go packages that are structured poorly, so that the
|
||||||
|
``...`` wildcard results in building example or test code that should not
|
||||||
|
be included in the build, or could fail to build.
|
||||||
|
|
||||||
|
This optional variable allows for filtering out a subset of the sources.
|
||||||
|
It defaults to excluding everything under the ``vendor`` subdirectory
|
||||||
|
under package's main directory. This is the normal location for vendored
|
||||||
|
packages, but it can be overridden by a recipe to filter out other
|
||||||
|
subdirectories if needed.
|
||||||
|
|
||||||
|
:term:`GO_WORKDIR`
|
||||||
|
When using Go Modules, the current working directory must be the directory
|
||||||
|
containing the ``go.mod`` file, or one of its subdirectories. When the
|
||||||
|
``go`` tool is used, it will automatically look for the ``go.mod`` file
|
||||||
|
in the Go working directory or in any parent directory, but not in
|
||||||
|
subdirectories.
|
||||||
|
|
||||||
|
When using the :ref:`ref-classes-go-mod` class to use Go modules,
|
||||||
|
the optional :term:`GO_WORKDIR` variable, defaulting to the value
|
||||||
|
of :term:`GO_IMPORT`, allows to specify a different Go working directory.
|
||||||
|
|
||||||
:term:`GROUPADD_PARAM`
|
:term:`GROUPADD_PARAM`
|
||||||
When inheriting the :ref:`useradd <ref-classes-useradd>` class,
|
When inheriting the :ref:`useradd <ref-classes-useradd>` class,
|
||||||
this variable specifies for a package what parameters should be
|
this variable specifies for a package what parameters should be
|
||||||
@@ -3102,17 +3220,23 @@ system and gives an overview of their function and contents.
|
|||||||
material for Wic is located in the
|
material for Wic is located in the
|
||||||
":doc:`/ref-manual/kickstart`" chapter.
|
":doc:`/ref-manual/kickstart`" chapter.
|
||||||
|
|
||||||
|
:term:`IMAGE_BUILDINFO_FILE`
|
||||||
|
When using the :ref:`ref-classes-image-buildinfo` class,
|
||||||
|
specifies the file in the image to write the build information into. The
|
||||||
|
default value is "``${sysconfdir}/buildinfo``".
|
||||||
|
|
||||||
|
:term:`IMAGE_BUILDINFO_VARS`
|
||||||
|
When using the :ref:`ref-classes-image-buildinfo` class,
|
||||||
|
specifies the list of variables to include in the `Build Configuration`
|
||||||
|
section of the output file (as a space-separated list). Defaults to
|
||||||
|
":term:`DISTRO` :term:`DISTRO_VERSION`".
|
||||||
|
|
||||||
:term:`IMAGE_CLASSES`
|
:term:`IMAGE_CLASSES`
|
||||||
A list of classes that all images should inherit. You typically use
|
A list of classes that all images should inherit. This is typically used
|
||||||
this variable to specify the list of classes that register the
|
to enable functionality across all image recipes.
|
||||||
different types of images the OpenEmbedded build system creates.
|
|
||||||
|
|
||||||
The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
|
Classes specified in :term:`IMAGE_CLASSES` must be located in the
|
||||||
set this variable in your ``local.conf`` or in a distribution
|
``classes-recipe/`` or ``classes/`` subdirectories.
|
||||||
configuration file.
|
|
||||||
|
|
||||||
For more information, see ``meta/classes/image_types.bbclass`` in the
|
|
||||||
:term:`Source Directory`.
|
|
||||||
|
|
||||||
:term:`IMAGE_CMD`
|
:term:`IMAGE_CMD`
|
||||||
Specifies the command to create the image file for a specific image
|
Specifies the command to create the image file for a specific image
|
||||||
@@ -3694,6 +3818,21 @@ system and gives an overview of their function and contents.
|
|||||||
even if the toolchain's binaries are strippable, there are other files
|
even if the toolchain's binaries are strippable, there are other files
|
||||||
needed for the build that are not strippable.
|
needed for the build that are not strippable.
|
||||||
|
|
||||||
|
:term:`INIT_MANAGER`
|
||||||
|
Specifies the system init manager to use. Available options are:
|
||||||
|
|
||||||
|
- ``sysvinit`` - System V init (default for poky)
|
||||||
|
- ``systemd`` - systemd
|
||||||
|
- ``mdev-busybox`` - mdev provided by busybox
|
||||||
|
- ``none`` - no init manager
|
||||||
|
|
||||||
|
More concretely, this is used to include
|
||||||
|
``conf/distro/include/init-manager-${INIT_MANAGER}.inc`` into the global
|
||||||
|
configuration. You can have a look at the ``conf/distro/include/init-manager-*.inc``
|
||||||
|
files for more information, and also the
|
||||||
|
":ref:`dev-manual/init-manager:selecting an initialization manager`"
|
||||||
|
section in the Yocto Project Development Tasks Manual.
|
||||||
|
|
||||||
:term:`INITRAMFS_DEPLOY_DIR_IMAGE`
|
:term:`INITRAMFS_DEPLOY_DIR_IMAGE`
|
||||||
Indicates the deploy directory used by ``do_bundle_initramfs`` where the
|
Indicates the deploy directory used by ``do_bundle_initramfs`` where the
|
||||||
:term:`INITRAMFS_IMAGE` will be fetched from.
|
:term:`INITRAMFS_IMAGE` will be fetched from.
|
||||||
@@ -3936,7 +4075,7 @@ system and gives an overview of their function and contents.
|
|||||||
|
|
||||||
Values for this variable are set in the kernel's recipe file and the
|
Values for this variable are set in the kernel's recipe file and the
|
||||||
kernel's append file. For example, if you are using the
|
kernel's append file. For example, if you are using the
|
||||||
``linux-yocto_4.12`` kernel, the kernel recipe file is the
|
``linux-yocto_5.15`` kernel, the kernel recipe file is the
|
||||||
``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
|
``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
|
||||||
is set as follows in that kernel recipe file::
|
is set as follows in that kernel recipe file::
|
||||||
|
|
||||||
@@ -3949,13 +4088,13 @@ system and gives an overview of their function and contents.
|
|||||||
BSP layer for a given machine. For example, the append file for the
|
BSP layer for a given machine. For example, the append file for the
|
||||||
Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
|
Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
|
||||||
machines (``meta-yocto-bsp``) is named
|
machines (``meta-yocto-bsp``) is named
|
||||||
``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
|
``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.15.bbappend``.
|
||||||
Here are the related statements from that append file::
|
Here are the related statements from that append file::
|
||||||
|
|
||||||
KBRANCH:genericx86 = "standard/base"
|
KBRANCH:genericx86 = "v5.15/standard/base"
|
||||||
KBRANCH:genericx86-64 = "standard/base"
|
KBRANCH:genericx86-64 = "v5.15/standard/base"
|
||||||
KBRANCH:edgerouter = "standard/edgerouter"
|
KBRANCH:edgerouter = "v5.15/standard/edgerouter"
|
||||||
KBRANCH:beaglebone = "standard/beaglebone"
|
KBRANCH:beaglebone-yocto = "v5.15/standard/beaglebone"
|
||||||
|
|
||||||
The :term:`KBRANCH` statements
|
The :term:`KBRANCH` statements
|
||||||
identify the kernel branch to use when building for each supported
|
identify the kernel branch to use when building for each supported
|
||||||
@@ -4074,9 +4213,18 @@ system and gives an overview of their function and contents.
|
|||||||
There is legacy support for specifying the full path to the device
|
There is legacy support for specifying the full path to the device
|
||||||
tree. However, providing just the ``.dtb`` file is preferred.
|
tree. However, providing just the ``.dtb`` file is preferred.
|
||||||
|
|
||||||
In order to use this variable, the
|
In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
|
||||||
:ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
|
class must be inherited.
|
||||||
be inherited.
|
|
||||||
|
:term:`KERNEL_DEVICETREE_BUNDLE`
|
||||||
|
When set to "1", this variable allows to bundle the Linux kernel
|
||||||
|
and the Device Tree Binary together in a single file.
|
||||||
|
|
||||||
|
This feature is currently only supported on the "arm" (32 bit)
|
||||||
|
architecture.
|
||||||
|
|
||||||
|
This variable is set to "0" by default by the
|
||||||
|
:ref:`ref-classes-kernel-devicetree` class.
|
||||||
|
|
||||||
:term:`KERNEL_DTB_LINK_NAME`
|
:term:`KERNEL_DTB_LINK_NAME`
|
||||||
The link name of the kernel device tree binary (DTB). This variable
|
The link name of the kernel device tree binary (DTB). This variable
|
||||||
@@ -4101,10 +4249,25 @@ system and gives an overview of their function and contents.
|
|||||||
|
|
||||||
KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
|
KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
|
||||||
|
|
||||||
The value of the :term:`KERNEL_ARTIFACT_NAME`
|
See :term:`KERNEL_ARTIFACT_NAME` for additional information.
|
||||||
variable, which is set in the same file, has the following value::
|
|
||||||
|
|
||||||
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
|
|
||||||
|
:term:`KERNEL_DTBDEST`
|
||||||
|
This variable, used by the :ref:`ref-classes-kernel-devicetree`
|
||||||
|
class, allows to change the installation directory of the DTB
|
||||||
|
(Device Tree Binary) files.
|
||||||
|
|
||||||
|
It is set by default to "${KERNEL_IMAGEDEST}" by the
|
||||||
|
:ref:`ref-classes-kernel` class.
|
||||||
|
|
||||||
|
:term:`KERNEL_DTBVENDORED`
|
||||||
|
This variable, used by the :ref:`ref-classes-kernel-devicetree`,
|
||||||
|
allows to ignore vendor subdirectories when installing DTB
|
||||||
|
(Device Tree Binary) files, when it is set to "false".
|
||||||
|
|
||||||
|
To keep vendor subdirectories, set this variable to "true".
|
||||||
|
|
||||||
|
It is set by default to "false" by the :ref:`ref-classes-kernel` class.
|
||||||
|
|
||||||
:term:`KERNEL_DTC_FLAGS`
|
:term:`KERNEL_DTC_FLAGS`
|
||||||
Specifies the ``dtc`` flags that are passed to the Linux kernel build
|
Specifies the ``dtc`` flags that are passed to the Linux kernel build
|
||||||
@@ -4219,9 +4382,12 @@ system and gives an overview of their function and contents.
|
|||||||
when building the kernel and is passed to ``make`` as the target to
|
when building the kernel and is passed to ``make`` as the target to
|
||||||
build.
|
build.
|
||||||
|
|
||||||
If you want to build an alternate kernel image type in addition to that
|
To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`.
|
||||||
specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE`
|
|
||||||
variable.
|
:term:`KERNEL_IMAGETYPES`
|
||||||
|
Lists additional types of kernel images to build for a device in addition
|
||||||
|
to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the
|
||||||
|
machine configuration files.
|
||||||
|
|
||||||
:term:`KERNEL_MODULE_AUTOLOAD`
|
:term:`KERNEL_MODULE_AUTOLOAD`
|
||||||
Lists kernel modules that need to be auto-loaded during boot.
|
Lists kernel modules that need to be auto-loaded during boot.
|
||||||
@@ -4259,6 +4425,14 @@ system and gives an overview of their function and contents.
|
|||||||
provide those module configurations, see the
|
provide those module configurations, see the
|
||||||
:term:`module_conf_* <module_conf>` variable.
|
:term:`module_conf_* <module_conf>` variable.
|
||||||
|
|
||||||
|
:term:`KERNEL_PACKAGE_NAME`
|
||||||
|
Specifies the base name of the kernel packages, such as "kernel"
|
||||||
|
in the kernel packages such as "kernel-modules", "kernel-image" and
|
||||||
|
"kernel-dbg".
|
||||||
|
|
||||||
|
The default value for this variable is set to "kernel" by the
|
||||||
|
:ref:`ref-classes-kernel` class.
|
||||||
|
|
||||||
:term:`KERNEL_PATH`
|
:term:`KERNEL_PATH`
|
||||||
The location of the kernel sources. This variable is set to the value
|
The location of the kernel sources. This variable is set to the value
|
||||||
of the :term:`STAGING_KERNEL_DIR` within
|
of the :term:`STAGING_KERNEL_DIR` within
|
||||||
@@ -4867,9 +5041,8 @@ system and gives an overview of their function and contents.
|
|||||||
:term:`PREMIRRORS`, the upstream source, and then
|
:term:`PREMIRRORS`, the upstream source, and then
|
||||||
locations specified by :term:`MIRRORS` in that order.
|
locations specified by :term:`MIRRORS` in that order.
|
||||||
|
|
||||||
Assuming your distribution (:term:`DISTRO`) is "poky",
|
The default value for :term:`MIRRORS` is defined in the
|
||||||
the default value for :term:`MIRRORS` is defined in the
|
``meta/classes-global/mirrors.bbclass`` file in the core metadata layer.
|
||||||
``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
|
|
||||||
|
|
||||||
:term:`MLPREFIX`
|
:term:`MLPREFIX`
|
||||||
Specifies a prefix has been added to :term:`PN` to create a
|
Specifies a prefix has been added to :term:`PN` to create a
|
||||||
@@ -5101,6 +5274,16 @@ system and gives an overview of their function and contents.
|
|||||||
:term:`Source Directory` for details on how this class
|
:term:`Source Directory` for details on how this class
|
||||||
applies these additional sed command arguments.
|
applies these additional sed command arguments.
|
||||||
|
|
||||||
|
:term:`OECMAKE_GENERATOR`
|
||||||
|
A variable for the :ref:`ref-classes-cmake` class, allowing to choose
|
||||||
|
which back-end will be generated by CMake to build an application.
|
||||||
|
|
||||||
|
By default, this variable is set to ``Ninja``, which is faster than GNU
|
||||||
|
make, but if building is broken with Ninja, a recipe can use this
|
||||||
|
variable to use GNU make instead::
|
||||||
|
|
||||||
|
OECMAKE_GENERATOR = "Unix Makefiles"
|
||||||
|
|
||||||
:term:`OE_IMPORTS`
|
:term:`OE_IMPORTS`
|
||||||
An internal variable used to tell the OpenEmbedded build system what
|
An internal variable used to tell the OpenEmbedded build system what
|
||||||
Python modules to import for every Python function run by the system.
|
Python modules to import for every Python function run by the system.
|
||||||
@@ -5144,6 +5327,20 @@ system and gives an overview of their function and contents.
|
|||||||
For additional information on how this variable is used, see the
|
For additional information on how this variable is used, see the
|
||||||
initialization script.
|
initialization script.
|
||||||
|
|
||||||
|
:term:`OEQA_REPRODUCIBLE_TEST_PACKAGE`
|
||||||
|
Set the package manager(s) for build reproducibility testing.
|
||||||
|
See :yocto_git:`reproducible.py </poky/tree/meta/lib/oeqa/selftest/cases/reproducible.py>`
|
||||||
|
and :doc:`/test-manual/reproducible-builds`.
|
||||||
|
|
||||||
|
:term:`OEQA_REPRODUCIBLE_TEST_TARGET`
|
||||||
|
Set build target for build reproducibility testing. By default
|
||||||
|
all available recipes are compiled with "bitbake world", see also :term:`EXCLUDE_FROM_WORLD`
|
||||||
|
and :doc:`/test-manual/reproducible-builds`.
|
||||||
|
|
||||||
|
:term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS`
|
||||||
|
Set build targets which can be rebuilt using :ref:`shared state <overview-manual/concepts:shared state cache>`
|
||||||
|
when running build reproducibility tests. See :doc:`/test-manual/reproducible-builds`.
|
||||||
|
|
||||||
:term:`OLDEST_KERNEL`
|
:term:`OLDEST_KERNEL`
|
||||||
Declares the oldest version of the Linux kernel that the produced
|
Declares the oldest version of the Linux kernel that the produced
|
||||||
binaries must support. This variable is passed into the build of the
|
binaries must support. This variable is passed into the build of the
|
||||||
@@ -5526,25 +5723,23 @@ system and gives an overview of their function and contents.
|
|||||||
omit any argument you like but must retain the separating commas. The
|
omit any argument you like but must retain the separating commas. The
|
||||||
order is important and specifies the following:
|
order is important and specifies the following:
|
||||||
|
|
||||||
1. Extra arguments that should be added to the configure script
|
#. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS`
|
||||||
argument list (:term:`EXTRA_OECONF` or
|
if the feature is enabled.
|
||||||
:term:`PACKAGECONFIG_CONFARGS`) if
|
|
||||||
the feature is enabled.
|
|
||||||
|
|
||||||
2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
|
#. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS`
|
||||||
:term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
|
if the feature is disabled.
|
||||||
|
|
||||||
3. Additional build dependencies (:term:`DEPENDS`)
|
#. Additional build dependencies (:term:`DEPENDS`)
|
||||||
that should be added if the feature is enabled.
|
that should be added if the feature is enabled.
|
||||||
|
|
||||||
4. Additional runtime dependencies (:term:`RDEPENDS`)
|
#. Additional runtime dependencies (:term:`RDEPENDS`)
|
||||||
that should be added if the feature is enabled.
|
that should be added if the feature is enabled.
|
||||||
|
|
||||||
5. Additional runtime recommendations
|
#. Additional runtime recommendations
|
||||||
(:term:`RRECOMMENDS`) that should be added if
|
(:term:`RRECOMMENDS`) that should be added if
|
||||||
the feature is enabled.
|
the feature is enabled.
|
||||||
|
|
||||||
6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
|
#. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
|
||||||
settings for this feature.
|
settings for this feature.
|
||||||
|
|
||||||
Consider the following :term:`PACKAGECONFIG` block taken from the
|
Consider the following :term:`PACKAGECONFIG` block taken from the
|
||||||
@@ -5591,6 +5786,38 @@ system and gives an overview of their function and contents.
|
|||||||
|
|
||||||
PACKAGECONFIG:append:pn-recipename = " f4"
|
PACKAGECONFIG:append:pn-recipename = " f4"
|
||||||
|
|
||||||
|
Consider the following example of a :ref:`ref-classes-cmake` recipe with a systemd service
|
||||||
|
in which :term:`PACKAGECONFIG` is used to transform the systemd service
|
||||||
|
into a feature that can be easily enabled or disabled via :term:`PACKAGECONFIG`::
|
||||||
|
|
||||||
|
example.c
|
||||||
|
example.service
|
||||||
|
CMakeLists.txt
|
||||||
|
|
||||||
|
The ``CMakeLists.txt`` file contains::
|
||||||
|
|
||||||
|
if(WITH_SYSTEMD)
|
||||||
|
install(FILES ${PROJECT_SOURCE_DIR}/example.service DESTINATION /etc/systemd/systemd)
|
||||||
|
endif(WITH_SYSTEMD)
|
||||||
|
|
||||||
|
In order to enable the installation of ``example.service`` we need to
|
||||||
|
ensure that ``-DWITH_SYSTEMD=ON`` is passed to the ``cmake`` command
|
||||||
|
execution. Recipes that have ``CMakeLists.txt`` generally inherit the
|
||||||
|
:ref:`ref-classes-cmake` class, that runs ``cmake`` with
|
||||||
|
:term:`EXTRA_OECMAKE`, which :term:`PACKAGECONFIG_CONFARGS` will be
|
||||||
|
appended to. Now, knowing that :term:`PACKAGECONFIG_CONFARGS` is
|
||||||
|
automatically filled with either the first or second element of
|
||||||
|
:term:`PACKAGECONFIG` flag value, the recipe would be like::
|
||||||
|
|
||||||
|
inherit cmake
|
||||||
|
PACKAGECONFIG = "systemd"
|
||||||
|
PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF"
|
||||||
|
|
||||||
|
A side note to this recipe is to check if ``systemd`` is in fact the used :term:`INIT_MANAGER`
|
||||||
|
or not::
|
||||||
|
|
||||||
|
PACKAGECONFIG = "${@'systemd' if d.getVar('INIT_MANAGER') == 'systemd' else ''}"
|
||||||
|
|
||||||
:term:`PACKAGECONFIG_CONFARGS`
|
:term:`PACKAGECONFIG_CONFARGS`
|
||||||
A space-separated list of configuration options generated from the
|
A space-separated list of configuration options generated from the
|
||||||
:term:`PACKAGECONFIG` setting.
|
:term:`PACKAGECONFIG` setting.
|
||||||
@@ -6033,9 +6260,8 @@ system and gives an overview of their function and contents.
|
|||||||
source, and then locations specified by
|
source, and then locations specified by
|
||||||
:term:`MIRRORS` in that order.
|
:term:`MIRRORS` in that order.
|
||||||
|
|
||||||
Assuming your distribution (:term:`DISTRO`) is "poky",
|
The default value for :term:`PREMIRRORS` is defined in the
|
||||||
the default value for :term:`PREMIRRORS` is defined in the
|
``meta/classes-global/mirrors.bbclass`` file in the core metadata layer.
|
||||||
``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
|
|
||||||
|
|
||||||
Typically, you could add a specific server for the build system to
|
Typically, you could add a specific server for the build system to
|
||||||
attempt before any others by adding something like the following to
|
attempt before any others by adding something like the following to
|
||||||
@@ -6378,6 +6604,22 @@ system and gives an overview of their function and contents.
|
|||||||
BitBake User Manual for additional information on tasks and
|
BitBake User Manual for additional information on tasks and
|
||||||
dependencies.
|
dependencies.
|
||||||
|
|
||||||
|
:term:`RECIPE_MAINTAINER`
|
||||||
|
This variable defines the name and e-mail address of the maintainer of a
|
||||||
|
recipe. Such information can be used by human users submitted changes,
|
||||||
|
and by automated tools to send notifications, for example about
|
||||||
|
vulnerabilities or source updates.
|
||||||
|
|
||||||
|
The variable can be defined in a global distribution :oe_git:`maintainers.inc
|
||||||
|
</openembedded-core/tree/meta/conf/distro/include/maintainers.inc>` file::
|
||||||
|
|
||||||
|
meta/conf/distro/include/maintainers.inc:RECIPE_MAINTAINER:pn-sysvinit = "Ross Burton <ross.burton@arm.com>"
|
||||||
|
|
||||||
|
It can also be directly defined in a recipe,
|
||||||
|
for example in the ``libgpiod`` one::
|
||||||
|
|
||||||
|
RECIPE_MAINTAINER = "Bartosz Golaszewski <brgl@bgdev.pl>"
|
||||||
|
|
||||||
:term:`RECIPE_NO_UPDATE_REASON`
|
:term:`RECIPE_NO_UPDATE_REASON`
|
||||||
If a recipe should not be replaced by a more recent upstream version,
|
If a recipe should not be replaced by a more recent upstream version,
|
||||||
putting the reason why in this variable in a recipe allows
|
putting the reason why in this variable in a recipe allows
|
||||||
@@ -6385,6 +6627,39 @@ system and gives an overview of their function and contents.
|
|||||||
in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
|
in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
|
||||||
section.
|
section.
|
||||||
|
|
||||||
|
:term:`RECIPE_SYSROOT`
|
||||||
|
This variable points to the directory that holds all files populated from
|
||||||
|
recipes specified in :term:`DEPENDS`. As the name indicates,
|
||||||
|
think of this variable as a custom root (``/``) for the recipe that will be
|
||||||
|
used by the compiler in order to find headers and other files needed to complete
|
||||||
|
its job.
|
||||||
|
|
||||||
|
This variable is related to :term:`STAGING_DIR_HOST` or :term:`STAGING_DIR_TARGET`
|
||||||
|
according to the type of the recipe and the build target.
|
||||||
|
|
||||||
|
To better understand this variable, consider the following examples:
|
||||||
|
|
||||||
|
- For ``#include <header.h>``, ``header.h`` should be in ``"${RECIPE_SYSROOT}/usr/include"``
|
||||||
|
|
||||||
|
- For ``-lexample``, ``libexample.so`` should be in ``"${RECIPE_SYSROOT}/lib"``
|
||||||
|
or other library sysroot directories.
|
||||||
|
|
||||||
|
The default value is ``"${WORKDIR}/recipe-sysroot"``.
|
||||||
|
Do not modify it.
|
||||||
|
|
||||||
|
:term:`RECIPE_SYSROOT_NATIVE`
|
||||||
|
This is similar to :term:`RECIPE_SYSROOT` but the populated files are from
|
||||||
|
``-native`` recipes. This allows a recipe built for the target machine to
|
||||||
|
use ``native`` tools.
|
||||||
|
|
||||||
|
This variable is related to :term:`STAGING_DIR_NATIVE`.
|
||||||
|
|
||||||
|
The default value is ``"${WORKDIR}/recipe-sysroot-native"``.
|
||||||
|
Do not modify it.
|
||||||
|
|
||||||
|
:term:`REPODIR`
|
||||||
|
See :term:`bitbake:REPODIR` in the BitBake manual.
|
||||||
|
|
||||||
:term:`REQUIRED_DISTRO_FEATURES`
|
:term:`REQUIRED_DISTRO_FEATURES`
|
||||||
When inheriting the
|
When inheriting the
|
||||||
:ref:`features_check <ref-classes-features_check>`
|
:ref:`features_check <ref-classes-features_check>`
|
||||||
@@ -6746,13 +7021,16 @@ system and gives an overview of their function and contents.
|
|||||||
:term:`SDK_EXT_TYPE` is set to "full".
|
:term:`SDK_EXT_TYPE` is set to "full".
|
||||||
|
|
||||||
:term:`SDK_NAME`
|
:term:`SDK_NAME`
|
||||||
The base name for SDK output files. The name is derived from the
|
The base name for SDK output files. The default value (as set in
|
||||||
:term:`DISTRO`, :term:`TCLIBC`,
|
``meta-poky/conf/distro/poky.conf``) is derived from the
|
||||||
:term:`SDK_ARCH`,
|
:term:`DISTRO`,
|
||||||
:term:`IMAGE_BASENAME`, and
|
:term:`TCLIBC`,
|
||||||
:term:`TUNE_PKGARCH` variables::
|
:term:`SDKMACHINE`,
|
||||||
|
:term:`IMAGE_BASENAME`,
|
||||||
|
:term:`TUNE_PKGARCH`, and
|
||||||
|
:term:`MACHINE` variables::
|
||||||
|
|
||||||
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
|
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
|
||||||
|
|
||||||
:term:`SDK_OS`
|
:term:`SDK_OS`
|
||||||
Specifies the operating system for which the SDK will be built. The
|
Specifies the operating system for which the SDK will be built. The
|
||||||
@@ -7283,6 +7561,38 @@ system and gives an overview of their function and contents.
|
|||||||
section in the Yocto Project Board Support Package Developer's Guide
|
section in the Yocto Project Board Support Package Developer's Guide
|
||||||
for additional information.
|
for additional information.
|
||||||
|
|
||||||
|
:term:`SPL_MKIMAGE_DTCOPTS`
|
||||||
|
Options for the device tree compiler passed to ``mkimage -D`` feature
|
||||||
|
while creating a FIT image with the :ref:`ref-classes-uboot-sign`
|
||||||
|
class. If :term:`SPL_MKIMAGE_DTCOPTS` is not set then the
|
||||||
|
:ref:`ref-classes-uboot-sign` class will not pass the ``-D`` option
|
||||||
|
to ``mkimage``.
|
||||||
|
|
||||||
|
The default value is set to "" by the :ref:`ref-classes-uboot-config`
|
||||||
|
class.
|
||||||
|
|
||||||
|
:term:`SPL_SIGN_ENABLE`
|
||||||
|
Enable signing of the U-Boot FIT image. The default value is "0".
|
||||||
|
This variable is used by the :ref:`ref-classes-uboot-sign` class.
|
||||||
|
|
||||||
|
:term:`SPL_SIGN_KEYDIR`
|
||||||
|
Location of the directory containing the RSA key and certificate used for
|
||||||
|
signing the U-Boot FIT image, used by the :ref:`ref-classes-uboot-sign`
|
||||||
|
class.
|
||||||
|
|
||||||
|
:term:`SPL_SIGN_KEYNAME`
|
||||||
|
The name of keys used by the :ref:`ref-classes-kernel-fitimage` class
|
||||||
|
for signing U-Boot FIT image stored in the :term:`SPL_SIGN_KEYDIR`
|
||||||
|
directory. If we have for example a ``dev.key`` key and a ``dev.crt``
|
||||||
|
certificate stored in the :term:`SPL_SIGN_KEYDIR` directory, you will
|
||||||
|
have to set :term:`SPL_SIGN_KEYNAME` to ``dev``.
|
||||||
|
|
||||||
|
:term:`SPLASH`
|
||||||
|
This variable, used by the :ref:`ref-classes-image` class, allows
|
||||||
|
to choose splashscreen applications. Set it to the names of packages
|
||||||
|
for such applications to use. This variable is set by default to
|
||||||
|
``psplash``.
|
||||||
|
|
||||||
:term:`SPLASH_IMAGES`
|
:term:`SPLASH_IMAGES`
|
||||||
This variable, used by the ``psplash`` recipe, allows to customize
|
This variable, used by the ``psplash`` recipe, allows to customize
|
||||||
the default splashscreen image.
|
the default splashscreen image.
|
||||||
@@ -7501,6 +7811,16 @@ system and gives an overview of their function and contents.
|
|||||||
file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
|
file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
|
||||||
file://.* file:///some-local-dir/sstate/PATH"
|
file://.* file:///some-local-dir/sstate/PATH"
|
||||||
|
|
||||||
|
The Yocto Project actually shares the cache data objects built by its
|
||||||
|
autobuilder::
|
||||||
|
|
||||||
|
SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH"
|
||||||
|
|
||||||
|
As such binary artifacts are built for the generic QEMU machines
|
||||||
|
supported by the various Poky releases, they are less likely to be
|
||||||
|
reusable in real projects building binaries optimized for a specific
|
||||||
|
CPU family.
|
||||||
|
|
||||||
:term:`SSTATE_SCAN_FILES`
|
:term:`SSTATE_SCAN_FILES`
|
||||||
Controls the list of files the OpenEmbedded build system scans for
|
Controls the list of files the OpenEmbedded build system scans for
|
||||||
hardcoded installation paths. The variable uses a space-separated
|
hardcoded installation paths. The variable uses a space-separated
|
||||||
@@ -7619,10 +7939,15 @@ system and gives an overview of their function and contents.
|
|||||||
for ``-native`` recipes, as they make use of host headers and
|
for ``-native`` recipes, as they make use of host headers and
|
||||||
libraries.
|
libraries.
|
||||||
|
|
||||||
|
Check :term:`RECIPE_SYSROOT` and :term:`RECIPE_SYSROOT_NATIVE`.
|
||||||
|
|
||||||
:term:`STAGING_DIR_NATIVE`
|
:term:`STAGING_DIR_NATIVE`
|
||||||
Specifies the path to the sysroot directory used when building
|
Specifies the path to the sysroot directory used when building
|
||||||
components that run on the build host itself.
|
components that run on the build host itself.
|
||||||
|
|
||||||
|
The default value is ``"${RECIPE_SYSROOT_NATIVE}"``,
|
||||||
|
check :term:`RECIPE_SYSROOT_NATIVE`.
|
||||||
|
|
||||||
:term:`STAGING_DIR_TARGET`
|
:term:`STAGING_DIR_TARGET`
|
||||||
Specifies the path to the sysroot used for the system for which the
|
Specifies the path to the sysroot used for the system for which the
|
||||||
component generates code. For components that do not generate code,
|
component generates code. For components that do not generate code,
|
||||||
@@ -7804,6 +8129,35 @@ system and gives an overview of their function and contents.
|
|||||||
${libdir}/${BPN}/ptest \
|
${libdir}/${BPN}/ptest \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
Consider the following example in which you need to manipulate this variable.
|
||||||
|
Assume you have a recipe ``A`` that provides a shared library ``.so.*`` that is
|
||||||
|
installed into a custom folder other than "``${libdir}``"
|
||||||
|
or "``${base_libdir}``", let's say "``/opt/lib``".
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This is not a recommended way to deal with shared libraries, but this
|
||||||
|
is just to show the usefulness of setting :term:`SYSROOT_DIRS`.
|
||||||
|
|
||||||
|
When a recipe ``B`` :term:`DEPENDS` on ``A``, it means what is in
|
||||||
|
:term:`SYSROOT_DIRS` will be copied from :term:`D` of the recipe ``B``
|
||||||
|
into ``B``'s :term:`SYSROOT_DESTDIR` that is "``${WORKDIR}/sysroot-destdir``".
|
||||||
|
|
||||||
|
Now, since ``/opt/lib`` is not in :term:`SYSROOT_DIRS`, it will never be copied to
|
||||||
|
``A``'s :term:`RECIPE_SYSROOT`, which is "``${WORKDIR}/recipe-sysroot``". So,
|
||||||
|
the linking process will fail.
|
||||||
|
|
||||||
|
To fix this, you need to add ``/opt/lib`` to :term:`SYSROOT_DIRS`::
|
||||||
|
|
||||||
|
SYSROOT_DIRS:append = " /opt/lib"
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
Even after setting ``/opt/lib`` to :term:`SYSROOT_DIRS`, the linking process will still fail
|
||||||
|
because the linker does not know that location, since :term:`TARGET_LDFLAGS`
|
||||||
|
doesn't contain it (if your recipe is for the target). Therefore, so you should add::
|
||||||
|
|
||||||
|
TARGET_LDFLAGS:append = " -L${RECIPE_SYSROOT}/opt/lib"
|
||||||
|
|
||||||
:term:`SYSROOT_DIRS_NATIVE`
|
:term:`SYSROOT_DIRS_NATIVE`
|
||||||
Extra directories staged into the sysroot by the
|
Extra directories staged into the sysroot by the
|
||||||
:ref:`ref-tasks-populate_sysroot` task for
|
:ref:`ref-tasks-populate_sysroot` task for
|
||||||
@@ -8334,7 +8688,7 @@ system and gives an overview of their function and contents.
|
|||||||
on enabling, running, and writing these tests, see the
|
on enabling, running, and writing these tests, see the
|
||||||
":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
|
":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
|
||||||
section in the Yocto Project Development Tasks Manual and the
|
section in the Yocto Project Development Tasks Manual and the
|
||||||
":ref:`ref-classes-testimage*`" section.
|
":ref:`ref-classes-testimage`" section.
|
||||||
|
|
||||||
:term:`THISDIR`
|
:term:`THISDIR`
|
||||||
The directory in which the file BitBake is currently parsing is
|
The directory in which the file BitBake is currently parsing is
|
||||||
@@ -8399,6 +8753,16 @@ system and gives an overview of their function and contents.
|
|||||||
portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
|
portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
|
||||||
applying to SDKs.
|
applying to SDKs.
|
||||||
|
|
||||||
|
:term:`TOOLCHAIN_OPTIONS`
|
||||||
|
This variable holds extra options passed to the compiler and the linker
|
||||||
|
for non ``-native`` recipes as they have to point to their custom
|
||||||
|
``sysroot`` folder pointed to by :term:`RECIPE_SYSROOT`::
|
||||||
|
|
||||||
|
TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}"
|
||||||
|
|
||||||
|
Native recipes don't need this variable to be set, as they are
|
||||||
|
built for the host machine with the native compiler.
|
||||||
|
|
||||||
:term:`TOOLCHAIN_OUTPUTNAME`
|
:term:`TOOLCHAIN_OUTPUTNAME`
|
||||||
This variable defines the name used for the toolchain output. The
|
This variable defines the name used for the toolchain output. The
|
||||||
:ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
|
:ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
|
||||||
@@ -8568,23 +8932,30 @@ system and gives an overview of their function and contents.
|
|||||||
See the machine include files in the :term:`Source Directory`
|
See the machine include files in the :term:`Source Directory`
|
||||||
for these features.
|
for these features.
|
||||||
|
|
||||||
|
:term:`UBOOT_BINARY`
|
||||||
|
Specifies the name of the binary build by U-Boot.
|
||||||
|
|
||||||
:term:`UBOOT_CONFIG`
|
:term:`UBOOT_CONFIG`
|
||||||
Configures the :term:`UBOOT_MACHINE` and can
|
Configures one or more U-Boot configurations to build. Each
|
||||||
also define :term:`IMAGE_FSTYPES` for individual
|
configuration can define the :term:`UBOOT_MACHINE` and optionally the
|
||||||
cases.
|
:term:`IMAGE_FSTYPES` and the :term:`UBOOT_BINARY`.
|
||||||
|
|
||||||
Following is an example from the ``meta-fsl-arm`` layer. ::
|
Following is an example from the ``meta-freescale`` layer. ::
|
||||||
|
|
||||||
UBOOT_CONFIG ??= "sd"
|
UBOOT_CONFIG ??= "sdcard-ifc-secure-boot sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor"
|
||||||
UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
|
UBOOT_CONFIG[nor] = "ls1021atwr_nor_defconfig"
|
||||||
UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
|
UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_defconfig,,u-boot-with-spl-pbl.bin"
|
||||||
UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
|
UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_defconfig,,u-boot-with-spl-pbl.bin"
|
||||||
UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
|
UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_defconfig"
|
||||||
|
UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_defconfig"
|
||||||
|
UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_defconfig"
|
||||||
|
UBOOT_CONFIG[sdcard-ifc-secure-boot] = "ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig,,u-boot-with-spl-pbl.bin"
|
||||||
|
|
||||||
In this example, "sd" is selected as the configuration of the possible four for the
|
In this example, all possible seven configurations are selected. Each
|
||||||
:term:`UBOOT_MACHINE`. The "sd" configuration defines
|
configuration specifies "..._defconfig" as :term:`UBOOT_MACHINE`, and
|
||||||
"mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
|
the "sd..." configurations define an individual name for
|
||||||
"sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
|
:term:`UBOOT_BINARY`. No configuration defines a second parameter for
|
||||||
|
:term:`IMAGE_FSTYPES` to use for the U-Boot image.
|
||||||
|
|
||||||
For more information on how the :term:`UBOOT_CONFIG` is handled, see the
|
For more information on how the :term:`UBOOT_CONFIG` is handled, see the
|
||||||
:ref:`uboot-config <ref-classes-uboot-config>`
|
:ref:`uboot-config <ref-classes-uboot-config>`
|
||||||
@@ -8608,6 +8979,64 @@ system and gives an overview of their function and contents.
|
|||||||
creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
|
creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
|
||||||
command-line parameter to the ``uboot-mkimage`` utility.
|
command-line parameter to the ``uboot-mkimage`` utility.
|
||||||
|
|
||||||
|
:term:`UBOOT_FIT_DESC`
|
||||||
|
Specifies the description string encoded into a U-Boot fitImage. The default
|
||||||
|
value is set by the :ref:`ref-classes-uboot-sign` class as follows::
|
||||||
|
|
||||||
|
UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
|
||||||
|
|
||||||
|
:term:`UBOOT_FIT_GENERATE_KEYS`
|
||||||
|
Decides whether to generate the keys for signing the U-Boot fitImage if
|
||||||
|
they don't already exist. The keys are created in :term:`SPL_SIGN_KEYDIR`.
|
||||||
|
The default value is "0".
|
||||||
|
|
||||||
|
Enable this as follows::
|
||||||
|
|
||||||
|
UBOOT_FIT_GENERATE_KEYS = "1"
|
||||||
|
|
||||||
|
This variable is used in the :ref:`ref-classes-uboot-sign` class.
|
||||||
|
|
||||||
|
:term:`UBOOT_FIT_HASH_ALG`
|
||||||
|
Specifies the hash algorithm used in creating the U-Boot FIT Image.
|
||||||
|
It is set by default to ``sha256`` by the :ref:`ref-classes-uboot-sign`
|
||||||
|
class.
|
||||||
|
|
||||||
|
:term:`UBOOT_FIT_KEY_GENRSA_ARGS`
|
||||||
|
Arguments to ``openssl genrsa`` for generating a RSA private key for
|
||||||
|
signing the U-Boot FIT image. The default value of this variable
|
||||||
|
is set to "-F4" by the :ref:`ref-classes-uboot-sign` class.
|
||||||
|
|
||||||
|
:term:`UBOOT_FIT_KEY_REQ_ARGS`
|
||||||
|
Arguments to ``openssl req`` for generating a certificate for signing
|
||||||
|
the U-Boot FIT image. The default value is "-batch -new" by the
|
||||||
|
:ref:`ref-classes-uboot-sign` class, "batch" for
|
||||||
|
non interactive mode and "new" for generating new keys.
|
||||||
|
|
||||||
|
:term:`UBOOT_FIT_KEY_SIGN_PKCS`
|
||||||
|
Format for the public key certificate used for signing the U-Boot FIT
|
||||||
|
image. The default value is set to "x509" by the
|
||||||
|
:ref:`ref-classes-uboot-sign` class.
|
||||||
|
|
||||||
|
:term:`UBOOT_FIT_SIGN_ALG`
|
||||||
|
Specifies the signature algorithm used in creating the U-Boot FIT Image.
|
||||||
|
This variable is set by default to "rsa2048" by the
|
||||||
|
:ref:`ref-classes-uboot-sign` class.
|
||||||
|
|
||||||
|
:term:`UBOOT_FIT_SIGN_NUMBITS`
|
||||||
|
Size of the private key used in signing the U-Boot FIT image, in number
|
||||||
|
of bits. The default value for this variable is set to "2048"
|
||||||
|
by the :ref:`ref-classes-uboot-sign` class.
|
||||||
|
|
||||||
|
:term:`UBOOT_FITIMAGE_ENABLE`
|
||||||
|
This variable allows to generate a FIT image for U-Boot, which is one
|
||||||
|
of the ways to implement a verified boot process.
|
||||||
|
|
||||||
|
Its default value is "0", so set it to "1" to enable this functionality::
|
||||||
|
|
||||||
|
UBOOT_FITIMAGE_ENABLE = "1"
|
||||||
|
|
||||||
|
See the :ref:`ref-classes-uboot-sign` class for details.
|
||||||
|
|
||||||
:term:`UBOOT_LOADADDRESS`
|
:term:`UBOOT_LOADADDRESS`
|
||||||
Specifies the load address for the U-Boot image. During U-Boot image
|
Specifies the load address for the U-Boot image. During U-Boot image
|
||||||
creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
|
creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
|
||||||
|
|||||||
@@ -25,44 +25,37 @@ Follow these steps to locate and hand-install the toolchain:
|
|||||||
download the installer appropriate for your build host, target
|
download the installer appropriate for your build host, target
|
||||||
hardware, and image type.
|
hardware, and image type.
|
||||||
|
|
||||||
The installer files (``*.sh``) follow this naming convention::
|
The installer files (``*.sh``) follow this naming convention:
|
||||||
|
``poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh``:
|
||||||
|
|
||||||
poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh
|
- ``host_system``: string representing your development system: ``i686`` or ``x86_64``
|
||||||
|
|
||||||
Where:
|
- ``type``: string representing the image: ``sato`` or ``minimal``
|
||||||
host_system is a string representing your development system:
|
|
||||||
"i686" or "x86_64"
|
|
||||||
|
|
||||||
type is a string representing the image:
|
- ``arch``: string representing the target architecture such as ``cortexa57-qemuarm64``
|
||||||
"sato" or "minimal"
|
|
||||||
|
|
||||||
arch is a string representing the target architecture:
|
- ``release``: version of the Yocto Project.
|
||||||
"aarch64", "armv5e", "core2-64", "cortexa8hf-neon", "i586", "mips32r2",
|
|
||||||
"mips64", or "ppc7400"
|
|
||||||
|
|
||||||
release is the version of Yocto Project.
|
.. note::
|
||||||
|
The standard SDK installer does not have the ``-ext`` string as
|
||||||
NOTE:
|
|
||||||
The standard SDK installer does not have the "-ext" string as
|
|
||||||
part of the filename.
|
part of the filename.
|
||||||
|
|
||||||
|
|
||||||
The toolchains provided by the Yocto
|
The toolchains provided by the Yocto
|
||||||
Project are based off of the ``core-image-sato`` and
|
Project are based off of the ``core-image-sato`` and
|
||||||
``core-image-minimal`` images and contain libraries appropriate for
|
``core-image-minimal`` images and contain libraries appropriate for
|
||||||
developing against those images.
|
developing against those images.
|
||||||
|
|
||||||
For example, if your build host is a 64-bit x86 system and you need
|
For example, if your build host is a 64-bit x86 system and you need
|
||||||
an extended SDK for a 64-bit core2 target, go into the ``x86_64``
|
an extended SDK for a 64-bit core2 QEMU target, go into the ``x86_64``
|
||||||
folder and download the following installer::
|
folder and download the following installer::
|
||||||
|
|
||||||
poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
|
poky-glibc-x86_64-core-image-sato-core2-64-qemux86-64-toolchain-&DISTRO;.sh
|
||||||
|
|
||||||
4. *Run the Installer:* Be sure you have execution privileges and run
|
4. *Run the Installer:* Be sure you have execution privileges and run
|
||||||
the installer. Following is an example from the ``Downloads``
|
the installer. Following is an example from the ``Downloads``
|
||||||
directory::
|
directory::
|
||||||
|
|
||||||
$ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
|
$ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-qemux86-64-toolchain-&DISTRO;.sh
|
||||||
|
|
||||||
During execution of the script, you choose the root location for the
|
During execution of the script, you choose the root location for the
|
||||||
toolchain. See the
|
toolchain. See the
|
||||||
@@ -206,21 +199,14 @@ Follow these steps to extract the root filesystem:
|
|||||||
also contain flattened root filesystem image files (``*.ext4``),
|
also contain flattened root filesystem image files (``*.ext4``),
|
||||||
which you can use with QEMU directly.
|
which you can use with QEMU directly.
|
||||||
|
|
||||||
The pre-built root filesystem image files follow these naming
|
The pre-built root filesystem image files follow the
|
||||||
conventions::
|
``core-image-profile-machine.tar.bz2`` naming convention:
|
||||||
|
|
||||||
core-image-profile-arch.tar.bz2
|
- ``profile``: filesystem image's profile, such as ``minimal``,
|
||||||
|
``minimal-dev`` or ``sato``. For information on these types of image
|
||||||
|
profiles, see the "Images" chapter in the Yocto Project Reference Manual.
|
||||||
|
|
||||||
Where:
|
- ``machine``: same string as the name of the parent download directory.
|
||||||
profile is the filesystem image's profile:
|
|
||||||
lsb, lsb-dev, lsb-sdk, minimal, minimal-dev, minimal-initramfs,
|
|
||||||
sato, sato-dev, sato-sdk, sato-sdk-ptest. For information on
|
|
||||||
these types of image profiles, see the "Images" chapter in
|
|
||||||
the Yocto Project Reference Manual.
|
|
||||||
|
|
||||||
arch is a string representing the target architecture:
|
|
||||||
beaglebone-yocto, beaglebone-yocto-lsb, edgerouter, edgerouter-lsb,
|
|
||||||
genericx86, genericx86-64, genericx86-64-lsb, genericx86-lsb and qemu*.
|
|
||||||
|
|
||||||
The root filesystems
|
The root filesystems
|
||||||
provided by the Yocto Project are based off of the
|
provided by the Yocto Project are based off of the
|
||||||
|
|||||||
@@ -41,44 +41,6 @@ functionality.
|
|||||||
Installing the Extensible SDK
|
Installing the Extensible SDK
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
Two ways to install the Extensible SDK
|
|
||||||
--------------------------------------
|
|
||||||
|
|
||||||
Extensible SDK can be installed in two different ways, and both have
|
|
||||||
their own pros and cons:
|
|
||||||
|
|
||||||
#. *Setting up the Extensible SDK environment directly in a Yocto build*. This
|
|
||||||
avoids having to produce, test, distribute and maintain separate SDK
|
|
||||||
installer archives, which can get very large. There is only one environment
|
|
||||||
for the regular Yocto build and the SDK and less code paths where things can
|
|
||||||
go not according to plan. It's easier to update the SDK: it simply means
|
|
||||||
updating the Yocto layers with git fetch or layer management tooling. The
|
|
||||||
SDK extensibility is better than in the second option: just run ``bitbake``
|
|
||||||
again to add more things to the sysroot, or add layers if even more things
|
|
||||||
are required.
|
|
||||||
|
|
||||||
#. *Setting up the Extensible SDK from a standalone installer*. This has the
|
|
||||||
benefit of having a single, self-contained archive that includes all the
|
|
||||||
needed binary artifacts. So nothing needs to be rebuilt, and there is no
|
|
||||||
need to provide a well-functioning binary artefact cache over the network
|
|
||||||
for developers with underpowered laptops.
|
|
||||||
|
|
||||||
Setting up the Extensible SDK environment directly in a Yocto build
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
|
|
||||||
#. Set up all the needed layers and a Yocto :term:`Build Directory`, e.g. a regular Yocto
|
|
||||||
build where ``bitbake`` can be executed.
|
|
||||||
|
|
||||||
#. Run::
|
|
||||||
|
|
||||||
$ bitbake meta-ide-support
|
|
||||||
$ bitbake -c populate_sysroot gtk+3
|
|
||||||
# or any other target or native item that the application developer would need
|
|
||||||
$ bitbake build-sysroots
|
|
||||||
|
|
||||||
Setting up the Extensible SDK from a standalone installer
|
|
||||||
---------------------------------------------------------
|
|
||||||
|
|
||||||
The first thing you need to do is install the SDK on your :term:`Build
|
The first thing you need to do is install the SDK on your :term:`Build
|
||||||
Host` by running the ``*.sh`` installation script.
|
Host` by running the ``*.sh`` installation script.
|
||||||
|
|
||||||
@@ -172,12 +134,7 @@ Running the Extensible SDK Environment Setup Script
|
|||||||
===================================================
|
===================================================
|
||||||
|
|
||||||
Once you have the SDK installed, you must run the SDK environment setup
|
Once you have the SDK installed, you must run the SDK environment setup
|
||||||
script before you can actually use the SDK.
|
script before you can actually use the SDK. This setup script resides in
|
||||||
|
|
||||||
When using a SDK directly in a Yocto build, you will find the script in
|
|
||||||
``tmp/deploy/images/qemux86-64/`` in your :term:`Build Directory`.
|
|
||||||
|
|
||||||
When using a standalone SDK installer, this setup script resides in
|
|
||||||
the directory you chose when you installed the SDK, which is either the
|
the directory you chose when you installed the SDK, which is either the
|
||||||
default ``poky_sdk`` directory or the directory you chose during
|
default ``poky_sdk`` directory or the directory you chose during
|
||||||
installation.
|
installation.
|
||||||
@@ -195,11 +152,6 @@ script is for an IA-based target machine using i586 tuning::
|
|||||||
SDK environment now set up; additionally you may now run devtool to perform development tasks.
|
SDK environment now set up; additionally you may now run devtool to perform development tasks.
|
||||||
Run devtool --help for further details.
|
Run devtool --help for further details.
|
||||||
|
|
||||||
When using the environment script directly in a Yocto build, it can
|
|
||||||
be run similarly::
|
|
||||||
|
|
||||||
$ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux
|
|
||||||
|
|
||||||
Running the setup script defines many environment variables needed in order to
|
Running the setup script defines many environment variables needed in order to
|
||||||
use the SDK (e.g. ``PATH``, :term:`CC`, :term:`LD`, and so forth). If you want
|
use the SDK (e.g. ``PATH``, :term:`CC`, :term:`LD`, and so forth). If you want
|
||||||
to see all the environment variables the script exports, examine the
|
to see all the environment variables the script exports, examine the
|
||||||
@@ -1219,19 +1171,6 @@ You can use the following command to find out::
|
|||||||
Once you know the recipe
|
Once you know the recipe
|
||||||
(i.e. ``mesa`` in this example), you can install it.
|
(i.e. ``mesa`` in this example), you can install it.
|
||||||
|
|
||||||
When using the extensible SDK directly in a Yocto build
|
|
||||||
-------------------------------------------------------
|
|
||||||
|
|
||||||
In this scenario, the Yocto build tooling, e.g. ``bitbake``
|
|
||||||
is directly accessible to build additional items, and it
|
|
||||||
can simply be executed directly::
|
|
||||||
|
|
||||||
$ bitbake mesa
|
|
||||||
$ bitbake build-sysroots
|
|
||||||
|
|
||||||
When using a standalone installer for the Extensible SDK
|
|
||||||
--------------------------------------------------------
|
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
$ devtool sdk-install mesa
|
$ devtool sdk-install mesa
|
||||||
|
|||||||
@@ -14,15 +14,13 @@ release works as intended. All the project's testing infrastructure and
|
|||||||
processes are publicly visible and available so that the community can
|
processes are publicly visible and available so that the community can
|
||||||
see what testing is being performed, how it's being done and the current
|
see what testing is being performed, how it's being done and the current
|
||||||
status of the tests and the project at any given time. It is intended
|
status of the tests and the project at any given time. It is intended
|
||||||
that Other organizations can leverage off the process and testing
|
that other organizations can leverage off the process and testing
|
||||||
environment used by the Yocto Project to create their own automated,
|
environment used by the Yocto Project to create their own automated,
|
||||||
production test environment, building upon the foundations from the
|
production test environment, building upon the foundations from the
|
||||||
project core.
|
project core.
|
||||||
|
|
||||||
Currently, the Yocto Project Test Environment Manual has no projected
|
This manual is a work-in-progress and is being initially loaded with
|
||||||
release date. This manual is a work-in-progress and is being initially
|
information from the README files and notes from key engineers:
|
||||||
loaded with information from the README files and notes from key
|
|
||||||
engineers:
|
|
||||||
|
|
||||||
- *yocto-autobuilder2:* This
|
- *yocto-autobuilder2:* This
|
||||||
:yocto_git:`README.md </yocto-autobuilder2/tree/README.md>`
|
:yocto_git:`README.md </yocto-autobuilder2/tree/README.md>`
|
||||||
@@ -39,7 +37,7 @@ engineers:
|
|||||||
As a result, it can be used by any Continuous Improvement (CI) system
|
As a result, it can be used by any Continuous Improvement (CI) system
|
||||||
to run builds, support getting the correct code revisions, configure
|
to run builds, support getting the correct code revisions, configure
|
||||||
builds and layers, run builds, and collect results. The code is
|
builds and layers, run builds, and collect results. The code is
|
||||||
independent of any CI system, which means the code can work `Buildbot <https://docs.buildbot.net/0.9.15.post1/>`__,
|
independent of any CI system, which means the code can work `Buildbot <https://docs.buildbot.net/current/>`__,
|
||||||
Jenkins, or others. This repository has a branch per release of the
|
Jenkins, or others. This repository has a branch per release of the
|
||||||
project defining the tests to run on a per release basis.
|
project defining the tests to run on a per release basis.
|
||||||
|
|
||||||
@@ -54,8 +52,8 @@ the Autobuilder tests if things work. The Autobuilder builds all test
|
|||||||
targets and runs all the tests.
|
targets and runs all the tests.
|
||||||
|
|
||||||
The Yocto Project uses now uses standard upstream
|
The Yocto Project uses now uses standard upstream
|
||||||
`Buildbot <https://docs.buildbot.net/0.9.15.post1/>`__ (version 9) to
|
Buildbot (`version 3.8 <https://docs.buildbot.net/3.8.0/>`__) to
|
||||||
drive its integration and testing. Buildbot Nine has a plug-in interface
|
drive its integration and testing. Buildbot has a plug-in interface
|
||||||
that the Yocto Project customizes using code from the
|
that the Yocto Project customizes using code from the
|
||||||
``yocto-autobuilder2`` repository, adding its own console UI plugin. The
|
``yocto-autobuilder2`` repository, adding its own console UI plugin. The
|
||||||
resulting UI plug-in allows you to visualize builds in a way suited to
|
resulting UI plug-in allows you to visualize builds in a way suited to
|
||||||
@@ -93,8 +91,8 @@ the following types of tests:
|
|||||||
- *Build Testing:* Tests whether specific configurations build by
|
- *Build Testing:* Tests whether specific configurations build by
|
||||||
varying :term:`MACHINE`,
|
varying :term:`MACHINE`,
|
||||||
:term:`DISTRO`, other configuration
|
:term:`DISTRO`, other configuration
|
||||||
options, and the specific target images being built (or world). Used
|
options, and the specific target images being built (or ``world``). This is
|
||||||
to trigger builds of all the different test configurations on the
|
used to trigger builds of all the different test configurations on the
|
||||||
Autobuilder. Builds usually cover many different targets for
|
Autobuilder. Builds usually cover many different targets for
|
||||||
different architectures, machines, and distributions, as well as
|
different architectures, machines, and distributions, as well as
|
||||||
different configurations, such as different init systems. The
|
different configurations, such as different init systems. The
|
||||||
@@ -121,7 +119,8 @@ the following types of tests:
|
|||||||
|
|
||||||
$ bitbake image -c testsdkext
|
$ bitbake image -c testsdkext
|
||||||
|
|
||||||
The tests utilize the :ref:`testsdkext <ref-classes-testsdk>` class and the ``do_testsdkext`` task.
|
The tests use the :ref:`ref-classes-testsdk` class and the
|
||||||
|
``do_testsdkext`` task.
|
||||||
|
|
||||||
- *Feature Testing:* Various scenario-based tests are run through the
|
- *Feature Testing:* Various scenario-based tests are run through the
|
||||||
:ref:`OpenEmbedded Self test (oe-selftest) <ref-manual/release-process:Testing and Quality Assurance>`. We test oe-selftest on each of the main distributions
|
:ref:`OpenEmbedded Self test (oe-selftest) <ref-manual/release-process:Testing and Quality Assurance>`. We test oe-selftest on each of the main distributions
|
||||||
@@ -131,8 +130,8 @@ the following types of tests:
|
|||||||
|
|
||||||
$ bitbake image -c testimage
|
$ bitbake image -c testimage
|
||||||
|
|
||||||
The tests utilize the :ref:`testimage* <ref-classes-testimage*>`
|
The tests use the :ref:`ref-classes-testimage`
|
||||||
classes and the :ref:`ref-tasks-testimage` task.
|
class and the :ref:`ref-tasks-testimage` task.
|
||||||
|
|
||||||
- *Layer Testing:* The Autobuilder has the possibility to test whether
|
- *Layer Testing:* The Autobuilder has the possibility to test whether
|
||||||
specific layers work with the test of the system. The layers tested
|
specific layers work with the test of the system. The layers tested
|
||||||
@@ -151,7 +150,7 @@ the following types of tests:
|
|||||||
|
|
||||||
$ bitbake image -c testsdk
|
$ bitbake image -c testsdk
|
||||||
|
|
||||||
The tests utilize the :ref:`testsdk <ref-classes-testsdk>` class and
|
The tests use the :ref:`ref-classes-testsdk` class and
|
||||||
the ``do_testsdk`` task.
|
the ``do_testsdk`` task.
|
||||||
|
|
||||||
- *Unit Testing:* Unit tests on various components of the system run
|
- *Unit Testing:* Unit tests on various components of the system run
|
||||||
@@ -179,7 +178,7 @@ Tests map into the codebase as follows:
|
|||||||
$ bitbake-selftest
|
$ bitbake-selftest
|
||||||
|
|
||||||
To skip tests that access the Internet, use the ``BB_SKIP_NETTESTS``
|
To skip tests that access the Internet, use the ``BB_SKIP_NETTESTS``
|
||||||
variable when running "bitbake-selftest" as follows::
|
variable when running ``bitbake-selftest`` as follows::
|
||||||
|
|
||||||
$ BB_SKIP_NETTESTS=yes bitbake-selftest
|
$ BB_SKIP_NETTESTS=yes bitbake-selftest
|
||||||
|
|
||||||
@@ -191,31 +190,32 @@ Tests map into the codebase as follows:
|
|||||||
Use this option when you wish to skip tests that access the network,
|
Use this option when you wish to skip tests that access the network,
|
||||||
which are mostly necessary to test the fetcher modules. To specify
|
which are mostly necessary to test the fetcher modules. To specify
|
||||||
individual test modules to run, append the test module name to the
|
individual test modules to run, append the test module name to the
|
||||||
"bitbake-selftest" command. For example, to specify the tests for the
|
``bitbake-selftest`` command. For example, to specify the tests for
|
||||||
bb.data.module, run::
|
``bb.tests.data.DataExpansions``, run::
|
||||||
|
|
||||||
$ bitbake-selftest bb.test.data.module
|
$ bitbake-selftest bb.tests.data.DataExpansions
|
||||||
|
|
||||||
You can also specify individual tests by defining the full name and module
|
You can also specify individual tests by defining the full name and module
|
||||||
plus the class path of the test, for example::
|
plus the class path of the test, for example::
|
||||||
|
|
||||||
$ bitbake-selftest bb.tests.data.TestOverrides.test_one_override
|
$ bitbake-selftest bb.tests.data.DataExpansions.test_one_var
|
||||||
|
|
||||||
The tests are based on `Python
|
The tests are based on
|
||||||
unittest <https://docs.python.org/3/library/unittest.html>`__.
|
`Python unittest <https://docs.python.org/3/library/unittest.html>`__.
|
||||||
|
|
||||||
- *oe-selftest:*
|
- *oe-selftest:*
|
||||||
|
|
||||||
- These tests use OE to test the workflows, which include testing
|
- These tests use OE to test the workflows, which include testing
|
||||||
specific features, behaviors of tasks, and API unit tests.
|
specific features, behaviors of tasks, and API unit tests.
|
||||||
|
|
||||||
- The tests can take advantage of parallelism through the "-j"
|
- The tests can take advantage of parallelism through the ``-j``
|
||||||
option, which can specify a number of threads to spread the tests
|
option, which can specify a number of threads to spread the tests
|
||||||
across. Note that all tests from a given class of tests will run
|
across. Note that all tests from a given class of tests will run
|
||||||
in the same thread. To parallelize large numbers of tests you can
|
in the same thread. To parallelize large numbers of tests you can
|
||||||
split the class into multiple units.
|
split the class into multiple units.
|
||||||
|
|
||||||
- The tests are based on Python unittest.
|
- The tests are based on
|
||||||
|
`Python unittest <https://docs.python.org/3/library/unittest.html>`__.
|
||||||
|
|
||||||
- The code for the tests resides in
|
- The code for the tests resides in
|
||||||
``meta/lib/oeqa/selftest/cases/``.
|
``meta/lib/oeqa/selftest/cases/``.
|
||||||
@@ -225,18 +225,18 @@ Tests map into the codebase as follows:
|
|||||||
$ oe-selftest -a
|
$ oe-selftest -a
|
||||||
|
|
||||||
- To run a specific test, use the following command form where
|
- To run a specific test, use the following command form where
|
||||||
testname is the name of the specific test::
|
``testname`` is the name of the specific test::
|
||||||
|
|
||||||
$ oe-selftest -r <testname>
|
$ oe-selftest -r <testname>
|
||||||
|
|
||||||
For example, the following command would run the tinfoil
|
For example, the following command would run the ``tinfoil``
|
||||||
getVar API test::
|
``getVar`` API test::
|
||||||
|
|
||||||
$ oe-selftest -r tinfoil.TinfoilTests.test_getvar
|
$ oe-selftest -r tinfoil.TinfoilTests.test_getvar
|
||||||
|
|
||||||
It is also possible to run a set
|
It is also possible to run a set
|
||||||
of tests. For example the following command will run all of the
|
of tests. For example the following command will run all of the
|
||||||
tinfoil tests::
|
``tinfoil`` tests::
|
||||||
|
|
||||||
$ oe-selftest -r tinfoil
|
$ oe-selftest -r tinfoil
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ Tests map into the codebase as follows:
|
|||||||
- These tests build an extended SDK (eSDK), install that eSDK, and
|
- These tests build an extended SDK (eSDK), install that eSDK, and
|
||||||
run tests against the eSDK.
|
run tests against the eSDK.
|
||||||
|
|
||||||
- The code for these tests resides in ``meta/lib/oeqa/esdk``.
|
- The code for these tests resides in ``meta/lib/oeqa/sdkext/cases/``.
|
||||||
|
|
||||||
- To run the tests, use the following command form::
|
- To run the tests, use the following command form::
|
||||||
|
|
||||||
@@ -298,13 +298,13 @@ Tests map into the codebase as follows:
|
|||||||
Git repository.
|
Git repository.
|
||||||
|
|
||||||
Use the ``oe-build-perf-report`` command to generate text reports
|
Use the ``oe-build-perf-report`` command to generate text reports
|
||||||
and HTML reports with graphs of the performance data. For
|
and HTML reports with graphs of the performance data. See
|
||||||
examples, see
|
:yocto_dl:`html </releases/yocto/yocto-4.3/testresults/buildperf-debian11/perf-debian11_nanbield_20231019191258_15b576c410.html>`
|
||||||
:yocto_dl:`/releases/yocto/yocto-2.7/testresults/buildperf-centos7/perf-centos7.yoctoproject.org_warrior_20190414204758_0e39202.html`
|
|
||||||
and
|
and
|
||||||
:yocto_dl:`/releases/yocto/yocto-2.7/testresults/buildperf-centos7/perf-centos7.yoctoproject.org_warrior_20190414204758_0e39202.txt`.
|
:yocto_dl:`txt </releases/yocto/yocto-4.3/testresults/buildperf-debian11/perf-debian11_nanbield_20231019191258_15b576c410.txt>`
|
||||||
|
examples.
|
||||||
|
|
||||||
- The tests are contained in ``lib/oeqa/buildperf/test_basic.py``.
|
- The tests are contained in ``meta/lib/oeqa/buildperf/test_basic.py``.
|
||||||
|
|
||||||
Test Examples
|
Test Examples
|
||||||
=============
|
=============
|
||||||
@@ -312,16 +312,14 @@ Test Examples
|
|||||||
This section provides example tests for each of the tests listed in the
|
This section provides example tests for each of the tests listed in the
|
||||||
:ref:`test-manual/intro:How Tests Map to Areas of Code` section.
|
:ref:`test-manual/intro:How Tests Map to Areas of Code` section.
|
||||||
|
|
||||||
For oeqa tests, testcases for each area reside in the main test
|
- ``oe-selftest`` testcases reside in the ``meta/lib/oeqa/selftest/cases`` directory.
|
||||||
directory at ``meta/lib/oeqa/selftest/cases`` directory.
|
|
||||||
|
|
||||||
For oe-selftest. bitbake testcases reside in the ``lib/bb/tests/``
|
- ``bitbake-selftest`` testcases reside in the ``bitbake/lib/bb/tests/`` directory.
|
||||||
directory.
|
|
||||||
|
|
||||||
``bitbake-selftest``
|
``bitbake-selftest``
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
A simple test example from ``lib/bb/tests/data.py`` is::
|
A simple test example from ``bitbake/lib/bb/tests/data.py`` is::
|
||||||
|
|
||||||
class DataExpansions(unittest.TestCase):
|
class DataExpansions(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@@ -334,21 +332,24 @@ A simple test example from ``lib/bb/tests/data.py`` is::
|
|||||||
val = self.d.expand("${foo}")
|
val = self.d.expand("${foo}")
|
||||||
self.assertEqual(str(val), "value_of_foo")
|
self.assertEqual(str(val), "value_of_foo")
|
||||||
|
|
||||||
In this example, a ``DataExpansions`` class of tests is created,
|
In this example, a ``DataExpansions`` class of tests is created, derived from
|
||||||
derived from standard python unittest. The class has a common ``setUp``
|
standard `Python unittest <https://docs.python.org/3/library/unittest.html>`__.
|
||||||
function which is shared by all the tests in the class. A simple test is
|
The class has a common ``setUp`` function which is shared by all the tests in
|
||||||
then added to test that when a variable is expanded, the correct value
|
the class. A simple test is then added to test that when a variable is
|
||||||
is found.
|
expanded, the correct value is found.
|
||||||
|
|
||||||
Bitbake selftests are straightforward python unittest. Refer to the
|
BitBake selftests are straightforward
|
||||||
Python unittest documentation for additional information on writing
|
`Python unittest <https://docs.python.org/3/library/unittest.html>`__.
|
||||||
these tests at: https://docs.python.org/3/library/unittest.html.
|
Refer to the `Python unittest documentation
|
||||||
|
<https://docs.python.org/3/library/unittest.html>`__ for additional information
|
||||||
|
on writing such tests.
|
||||||
|
|
||||||
``oe-selftest``
|
``oe-selftest``
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
These tests are more complex due to the setup required behind the scenes
|
These tests are more complex due to the setup required behind the scenes
|
||||||
for full builds. Rather than directly using Python's unittest, the code
|
for full builds. Rather than directly using `Python unittest
|
||||||
|
<https://docs.python.org/3/library/unittest.html>`__, the code
|
||||||
wraps most of the standard objects. The tests can be simple, such as
|
wraps most of the standard objects. The tests can be simple, such as
|
||||||
testing a command from within the OE build environment using the
|
testing a command from within the OE build environment using the
|
||||||
following example::
|
following example::
|
||||||
@@ -385,14 +386,14 @@ so tests within a given test class should always run in the same build,
|
|||||||
while tests in different classes or modules may be split into different
|
while tests in different classes or modules may be split into different
|
||||||
builds. There is no data store available for these tests since the tests
|
builds. There is no data store available for these tests since the tests
|
||||||
launch the ``bitbake`` command and exist outside of its context. As a
|
launch the ``bitbake`` command and exist outside of its context. As a
|
||||||
result, common bitbake library functions (bb.\*) are also unavailable.
|
result, common BitBake library functions (``bb.\*``) are also unavailable.
|
||||||
|
|
||||||
``testimage``
|
``testimage``
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
These tests are run once an image is up and running, either on target
|
These tests are run once an image is up and running, either on target
|
||||||
hardware or under QEMU. As a result, they are assumed to be running in a
|
hardware or under QEMU. As a result, they are assumed to be running in a
|
||||||
target image environment, as opposed to a host build environment. A
|
target image environment, as opposed to in a host build environment. A
|
||||||
simple example from ``meta/lib/oeqa/runtime/cases/python.py`` contains
|
simple example from ``meta/lib/oeqa/runtime/cases/python.py`` contains
|
||||||
the following::
|
the following::
|
||||||
|
|
||||||
@@ -407,19 +408,19 @@ the following::
|
|||||||
|
|
||||||
In this example, the ``OERuntimeTestCase`` class wraps
|
In this example, the ``OERuntimeTestCase`` class wraps
|
||||||
``unittest.TestCase``. Within the test, ``self.target`` represents the
|
``unittest.TestCase``. Within the test, ``self.target`` represents the
|
||||||
target system, where commands can be run on it using the ``run()``
|
target system, where commands can be run using the ``run()``
|
||||||
method.
|
method.
|
||||||
|
|
||||||
To ensure certain test or package dependencies are met, you can use the
|
To ensure certain tests or package dependencies are met, you can use the
|
||||||
``OETestDepends`` and ``OEHasPackage`` decorators. For example, the test
|
``OETestDepends`` and ``OEHasPackage`` decorators. For example, the test
|
||||||
in this example would only make sense if python3-core is installed in
|
in this example would only make sense if ``python3-core`` is installed in
|
||||||
the image.
|
the image.
|
||||||
|
|
||||||
``testsdk_ext``
|
``testsdk_ext``
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
These tests are run against built extensible SDKs (eSDKs). The tests can
|
These tests are run against built extensible SDKs (eSDKs). The tests can
|
||||||
assume that the eSDK environment has already been setup. An example from
|
assume that the eSDK environment has already been set up. An example from
|
||||||
``meta/lib/oeqa/sdk/cases/devtool.py`` contains the following::
|
``meta/lib/oeqa/sdk/cases/devtool.py`` contains the following::
|
||||||
|
|
||||||
class DevtoolTest(OESDKExtTestCase):
|
class DevtoolTest(OESDKExtTestCase):
|
||||||
@@ -466,9 +467,9 @@ following::
|
|||||||
output = self._run(cmd)
|
output = self._run(cmd)
|
||||||
self.assertEqual(output, "Hello, world\n")
|
self.assertEqual(output, "Hello, world\n")
|
||||||
|
|
||||||
In this example, if nativesdk-python3-core has been installed into the SDK, the code runs
|
In this example, if ``nativesdk-python3-core`` has been installed into the SDK,
|
||||||
the python3 interpreter with a basic command to check it is working
|
the code runs the ``python3`` interpreter with a basic command to check it is
|
||||||
correctly. The test would only run if python3 is installed in the SDK.
|
working correctly. The test would only run if Python3 is installed in the SDK.
|
||||||
|
|
||||||
``oe-build-perf-test``
|
``oe-build-perf-test``
|
||||||
----------------------
|
----------------------
|
||||||
@@ -512,9 +513,9 @@ an isolated directory.
|
|||||||
|
|
||||||
**Running "cleansstate" is not permitted.**
|
**Running "cleansstate" is not permitted.**
|
||||||
|
|
||||||
This can delete files from SSTATE_DIR which would potentially break
|
This can delete files from :term:`SSTATE_DIR` which would potentially break
|
||||||
other builds running in parallel. If this is required, SSTATE_DIR must
|
other builds running in parallel. If this is required, :term:`SSTATE_DIR` must
|
||||||
be set to an isolated directory. Alternatively, you can use the "-f"
|
be set to an isolated directory. Alternatively, you can use the ``-f``
|
||||||
option with the ``bitbake`` command to "taint" tasks by changing the
|
option with the ``bitbake`` command to "taint" tasks by changing the
|
||||||
sstate checksums to ensure sstate cache items will not be reused.
|
sstate checksums to ensure sstate cache items will not be reused.
|
||||||
|
|
||||||
|
|||||||
@@ -68,17 +68,6 @@ things we do within the build system to ensure reproducibility include:
|
|||||||
- Filtering the tools available from the host's ``PATH`` to only a specific set
|
- Filtering the tools available from the host's ``PATH`` to only a specific set
|
||||||
of tools, set using the :term:`HOSTTOOLS` variable.
|
of tools, set using the :term:`HOSTTOOLS` variable.
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Because of an open bug in GCC, using ``DISTRO_FEATURES:append = " lto"`` or
|
|
||||||
adding ``-flto`` (Link Time Optimization) to ``CFLAGS`` makes the resulting
|
|
||||||
binary non-reproducible, in that it depends on the full absolute build path
|
|
||||||
to ``recipe-sysroot-native``, so installing the Yocto Project in a different
|
|
||||||
directory results in a different binary.
|
|
||||||
|
|
||||||
This issue is addressed by
|
|
||||||
:yocto_bugs:`bug 14481 - Programs built with -flto are not reproducible</show_bug.cgi?id=14481>`.
|
|
||||||
|
|
||||||
=========================================
|
=========================================
|
||||||
Can we prove the project is reproducible?
|
Can we prove the project is reproducible?
|
||||||
=========================================
|
=========================================
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ helps review and test patches and this is his testing tree).
|
|||||||
We have two broad categories of test builds, including "full" and
|
We have two broad categories of test builds, including "full" and
|
||||||
"quick". On the Autobuilder, these can be seen as "a-quick" and
|
"quick". On the Autobuilder, these can be seen as "a-quick" and
|
||||||
"a-full", simply for ease of sorting in the UI. Use our Autobuilder
|
"a-full", simply for ease of sorting in the UI. Use our Autobuilder
|
||||||
console view to see where me manage most test-related items, available
|
:yocto_ab:`console view </typhoon/#/console>` to see where we manage most
|
||||||
at: :yocto_ab:`/typhoon/#/console`.
|
test-related items.
|
||||||
|
|
||||||
Builds are triggered manually when the test branches are ready. The
|
Builds are triggered manually when the test branches are ready. The
|
||||||
builds are monitored by the SWAT team. For additional information, see
|
builds are monitored by the SWAT team. For additional information, see
|
||||||
@@ -34,24 +34,21 @@ which the result was required.
|
|||||||
|
|
||||||
The Autobuilder does build the ``master`` branch once daily for several
|
The Autobuilder does build the ``master`` branch once daily for several
|
||||||
reasons, in particular, to ensure the current ``master`` branch does
|
reasons, in particular, to ensure the current ``master`` branch does
|
||||||
build, but also to keep ``yocto-testresults``
|
build, but also to keep (:yocto_git:`yocto-testresults </yocto-testresults/>`),
|
||||||
(:yocto_git:`/yocto-testresults/`),
|
(:yocto_git:`buildhistory </poky-buildhistory/>`), and
|
||||||
buildhistory
|
our sstate up to date. On the weekend, there is a ``master-next`` build
|
||||||
(:yocto_git:`/poky-buildhistory/`), and
|
|
||||||
our sstate up to date. On the weekend, there is a master-next build
|
|
||||||
instead to ensure the test results are updated for the less frequently
|
instead to ensure the test results are updated for the less frequently
|
||||||
run targets.
|
run targets.
|
||||||
|
|
||||||
Performance builds (buildperf-\* targets in the console) are triggered
|
Performance builds (``buildperf-\*`` targets in the console) are triggered
|
||||||
separately every six hours and automatically push their results to the
|
separately every six hours and automatically push their results to the
|
||||||
buildstats repository at:
|
:yocto_git:`buildstats </yocto-buildstats/>` repository.
|
||||||
:yocto_git:`/yocto-buildstats/`.
|
|
||||||
|
|
||||||
The 'quick' targets have been selected to be the ones which catch the
|
The "quick" targets have been selected to be the ones which catch the
|
||||||
most failures or give the most valuable data. We run 'fast' ptests in
|
most failures or give the most valuable data. We run "fast" ptests in
|
||||||
this case for example but not the ones which take a long time. The quick
|
this case for example but not the ones which take a long time. The quick
|
||||||
target doesn't include \*-lsb builds for all architectures, some world
|
target doesn't include ``\*-lsb`` builds for all architectures, some ``world``
|
||||||
builds and doesn't trigger performance tests or ltp testing. The full
|
builds and doesn't trigger performance tests or ``ltp`` testing. The full
|
||||||
build includes all these things and is slower but more comprehensive.
|
build includes all these things and is slower but more comprehensive.
|
||||||
|
|
||||||
Release Builds
|
Release Builds
|
||||||
@@ -67,12 +64,12 @@ that in :ref:`test-manual/test-process:day to day development`, in that the
|
|||||||
a-full target of the Autobuilder is used but in addition the form is
|
a-full target of the Autobuilder is used but in addition the form is
|
||||||
configured to generate and publish artifacts and the milestone number,
|
configured to generate and publish artifacts and the milestone number,
|
||||||
version, release candidate number and other information is entered. The
|
version, release candidate number and other information is entered. The
|
||||||
box to "generate an email to QA"is also checked.
|
box to "generate an email to QA" is also checked.
|
||||||
|
|
||||||
When the build completes, an email is sent out using the send-qa-email
|
When the build completes, an email is sent out using the ``send-qa-email``
|
||||||
script in the ``yocto-autobuilder-helper`` repository to the list of
|
script in the :yocto_git:`yocto-autobuilder-helper </yocto-autobuilder-helper>`
|
||||||
people configured for that release. Release builds are placed into a
|
repository to the list of people configured for that release. Release builds
|
||||||
directory in https://autobuilder.yocto.io/pub/releases on the
|
are placed into a directory in https://autobuilder.yocto.io/pub/releases on the
|
||||||
Autobuilder which is included in the email. The process from here is
|
Autobuilder which is included in the email. The process from here is
|
||||||
more manual and control is effectively passed to release engineering.
|
more manual and control is effectively passed to release engineering.
|
||||||
The next steps include:
|
The next steps include:
|
||||||
@@ -80,14 +77,15 @@ The next steps include:
|
|||||||
- QA teams respond to the email saying which tests they plan to run and
|
- QA teams respond to the email saying which tests they plan to run and
|
||||||
when the results will be available.
|
when the results will be available.
|
||||||
|
|
||||||
- QA teams run their tests and share their results in the yocto-
|
- QA teams run their tests and share their results in the
|
||||||
testresults-contrib repository, along with a summary of their
|
:yocto_git:`yocto-testresults-contrib </yocto-testresults-contrib>`
|
||||||
findings.
|
repository, along with a summary of their findings.
|
||||||
|
|
||||||
- Release engineering prepare the release as per their process.
|
- Release engineering prepare the release as per their process.
|
||||||
|
|
||||||
- Test results from the QA teams are included into the release in
|
- Test results from the QA teams are included into the release in
|
||||||
separate directories and also uploaded to the yocto-testresults
|
separate directories and also uploaded to the
|
||||||
|
:yocto_git:`yocto-testresults </yocto-testresults>`
|
||||||
repository alongside the other test results for the given revision.
|
repository alongside the other test results for the given revision.
|
||||||
|
|
||||||
- The QA report in the final release is regenerated using resulttool to
|
- The QA report in the final release is regenerated using resulttool to
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ Execution Flow within the Autobuilder
|
|||||||
|
|
||||||
The "a-full" and "a-quick" targets are the usual entry points into the
|
The "a-full" and "a-quick" targets are the usual entry points into the
|
||||||
Autobuilder and it makes sense to follow the process through the system
|
Autobuilder and it makes sense to follow the process through the system
|
||||||
starting there. This is best visualized from the Autobuilder Console
|
starting there. This is best visualized from the :yocto_ab:`Autobuilder
|
||||||
view (:yocto_ab:`/typhoon/#/console`).
|
Console view </typhoon/#/console>`.
|
||||||
|
|
||||||
Each item along the top of that view represents some "target build" and
|
Each item along the top of that view represents some "target build" and
|
||||||
these targets are all run in parallel. The 'full' build will trigger the
|
these targets are all run in parallel. The 'full' build will trigger the
|
||||||
@@ -18,9 +18,9 @@ majority of them, the "quick" build will trigger some subset of them.
|
|||||||
The Autobuilder effectively runs whichever configuration is defined for
|
The Autobuilder effectively runs whichever configuration is defined for
|
||||||
each of those targets on a separate buildbot worker. To understand the
|
each of those targets on a separate buildbot worker. To understand the
|
||||||
configuration, you need to look at the entry on ``config.json`` file
|
configuration, you need to look at the entry on ``config.json`` file
|
||||||
within the ``yocto-autobuilder-helper`` repository. The targets are
|
within the :yocto_git:`yocto-autobuilder-helper </yocto-autobuilder-helper>`
|
||||||
defined in the ‘overrides' section, a quick example could be qemux86-64
|
repository. The targets are defined in the ``overrides`` section, a quick
|
||||||
which looks like::
|
example could be ``qemux86-64`` which looks like::
|
||||||
|
|
||||||
"qemux86-64" : {
|
"qemux86-64" : {
|
||||||
"MACHINE" : "qemux86-64",
|
"MACHINE" : "qemux86-64",
|
||||||
@@ -32,8 +32,8 @@ which looks like::
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
And to expand that, you need the "arch-qemu" entry from
|
And to expand that, you need the ``arch-qemu`` entry from
|
||||||
the "templates" section, which looks like::
|
the ``templates`` section, which looks like::
|
||||||
|
|
||||||
"arch-qemu" : {
|
"arch-qemu" : {
|
||||||
"BUILDINFO" : true,
|
"BUILDINFO" : true,
|
||||||
@@ -54,11 +54,11 @@ the "templates" section, which looks like::
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
Combining these two entries you can see that "qemux86-64" is a three step build where the
|
Combining these two entries you can see that ``qemux86-64`` is a three step
|
||||||
``bitbake BBTARGETS`` would be run, then ``bitbake SANITYTARGETS`` for each step; all for
|
build where ``bitbake BBTARGETS`` would be run, then ``bitbake SANITYTARGETS``
|
||||||
``MACHINE="qemx86-64"`` but with differing SDKMACHINE settings. In step
|
for each step; all for ``MACHINE="qemux86-64"`` but with differing
|
||||||
1 an extra variable is added to the ``auto.conf`` file to enable wic
|
:term:`SDKMACHINE` settings. In step 1, an extra variable is added to the
|
||||||
image generation.
|
``auto.conf`` file to enable wic image generation.
|
||||||
|
|
||||||
While not every detail of this is covered here, you can see how the
|
While not every detail of this is covered here, you can see how the
|
||||||
template mechanism allows quite complex configurations to be built up
|
template mechanism allows quite complex configurations to be built up
|
||||||
@@ -88,9 +88,9 @@ roughly consist of:
|
|||||||
|
|
||||||
#. *Obtain yocto-autobuilder-helper*
|
#. *Obtain yocto-autobuilder-helper*
|
||||||
|
|
||||||
This step clones the ``yocto-autobuilder-helper`` git repository.
|
This step clones the :yocto_git:`yocto-autobuilder-helper </yocto-autobuilder-helper>`
|
||||||
This is necessary to prevent the requirement to maintain all the
|
git repository. This is necessary to avoid the requirement to maintain all
|
||||||
release or project-specific code within Buildbot. The branch chosen
|
the release or project-specific code within Buildbot. The branch chosen
|
||||||
matches the release being built so we can support older releases and
|
matches the release being built so we can support older releases and
|
||||||
still make changes in newer ones.
|
still make changes in newer ones.
|
||||||
|
|
||||||
@@ -163,8 +163,9 @@ Autobuilder Worker Janitor
|
|||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
This is a process running on each Worker that performs two basic
|
This is a process running on each Worker that performs two basic
|
||||||
operations, including background file deletion at IO idle (see :ref:`test-manual/understand-autobuilder:Autobuilder Target Execution Overview`: Run clobberdir) and
|
operations, including background file deletion at IO idle (see
|
||||||
maintenance of a cache of cloned repositories to improve the speed
|
"Run clobberdir" in :ref:`test-manual/understand-autobuilder:Autobuilder Target Execution Overview`)
|
||||||
|
and maintenance of a cache of cloned repositories to improve the speed
|
||||||
the system can checkout repositories.
|
the system can checkout repositories.
|
||||||
|
|
||||||
Shared DL_DIR
|
Shared DL_DIR
|
||||||
@@ -172,7 +173,7 @@ Shared DL_DIR
|
|||||||
|
|
||||||
The Workers are all connected over NFS which allows DL_DIR to be shared
|
The Workers are all connected over NFS which allows DL_DIR to be shared
|
||||||
between them. This reduces network accesses from the system and allows
|
between them. This reduces network accesses from the system and allows
|
||||||
the build to be sped up. Usage of the directory within the build system
|
the build to be sped up. The usage of the directory within the build system
|
||||||
is designed to be able to be shared over NFS.
|
is designed to be able to be shared over NFS.
|
||||||
|
|
||||||
Shared SSTATE_DIR
|
Shared SSTATE_DIR
|
||||||
@@ -180,8 +181,8 @@ Shared SSTATE_DIR
|
|||||||
|
|
||||||
The Workers are all connected over NFS which allows the ``sstate``
|
The Workers are all connected over NFS which allows the ``sstate``
|
||||||
directory to be shared between them. This means once a Worker has built
|
directory to be shared between them. This means once a Worker has built
|
||||||
an artifact, all the others can benefit from it. Usage of the directory
|
an artifact, all the others can benefit from it. The usage of the directory
|
||||||
within the directory is designed for sharing over NFS.
|
within the build system is designed for sharing over NFS.
|
||||||
|
|
||||||
Resulttool
|
Resulttool
|
||||||
----------
|
----------
|
||||||
@@ -192,7 +193,7 @@ in a given build and their status. Additional information, such as
|
|||||||
failure logs or the time taken to run the tests, may also be included.
|
failure logs or the time taken to run the tests, may also be included.
|
||||||
|
|
||||||
Resulttool is part of OpenEmbedded-Core and is used to manipulate these
|
Resulttool is part of OpenEmbedded-Core and is used to manipulate these
|
||||||
json results files. It has the ability to merge files together, display
|
JSON results files. It has the ability to merge files together, display
|
||||||
reports of the test results and compare different result files.
|
reports of the test results and compare different result files.
|
||||||
|
|
||||||
For details, see :yocto_wiki:`/Resulttool`.
|
For details, see :yocto_wiki:`/Resulttool`.
|
||||||
@@ -206,7 +207,11 @@ are general setup steps that are run once and include:
|
|||||||
|
|
||||||
#. Set up any ``buildtools-tarball`` if configured.
|
#. Set up any ``buildtools-tarball`` if configured.
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
#. Call "buildhistory-init" if buildhistory is configured.
|
#. Call "buildhistory-init" if buildhistory is configured.
|
||||||
|
=======
|
||||||
|
#. Call ``buildhistory-init`` if :ref:`ref-classes-buildhistory` is configured.
|
||||||
|
>>>>>>> 7c4f616f77 (test-manual: text and formatting fixes)
|
||||||
|
|
||||||
For each step that is configured in ``config.json``, it will perform the
|
For each step that is configured in ``config.json``, it will perform the
|
||||||
following:
|
following:
|
||||||
@@ -250,15 +255,16 @@ Deploying Yocto Autobuilder
|
|||||||
===========================
|
===========================
|
||||||
|
|
||||||
The most up to date information about how to setup and deploy your own
|
The most up to date information about how to setup and deploy your own
|
||||||
Autobuilder can be found in README.md in the ``yocto-autobuilder2``
|
Autobuilder can be found in :yocto_git:`README.md </yocto-autobuilder2/tree/README.md>`
|
||||||
repository.
|
in the :yocto_git:`yocto-autobuilder2 </yocto-autobuilder2>` repository.
|
||||||
|
|
||||||
We hope that people can use the ``yocto-autobuilder2`` code directly but
|
We hope that people can use the :yocto_git:`yocto-autobuilder2 </yocto-autobuilder2>`
|
||||||
it is inevitable that users will end up needing to heavily customise the
|
code directly but it is inevitable that users will end up needing to heavily
|
||||||
``yocto-autobuilder-helper`` repository, particularly the
|
customize the :yocto_git:`yocto-autobuilder-helper </yocto-autobuilder-helper>`
|
||||||
``config.json`` file as they will want to define their own test matrix.
|
repository, particularly the ``config.json`` file as they will want to define
|
||||||
|
their own test matrix.
|
||||||
|
|
||||||
The Autobuilder supports wo customization options:
|
The Autobuilder supports two customization options:
|
||||||
|
|
||||||
- variable substitution
|
- variable substitution
|
||||||
|
|
||||||
@@ -278,7 +284,7 @@ environment::
|
|||||||
$ ABHELPER_JSON="config.json /some/location/local.json"
|
$ ABHELPER_JSON="config.json /some/location/local.json"
|
||||||
|
|
||||||
One issue users often run into is validation of the ``config.json`` files. A
|
One issue users often run into is validation of the ``config.json`` files. A
|
||||||
tip for minimizing issues from invalid json files is to use a Git
|
tip for minimizing issues from invalid JSON files is to use a Git
|
||||||
``pre-commit-hook.sh`` script to verify the JSON file before committing
|
``pre-commit-hook.sh`` script to verify the JSON file before committing
|
||||||
it. Create a symbolic link as follows::
|
it. Create a symbolic link as follows::
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,9 @@ contact us with other suggestions.
|
|||||||
#. **Get to know the layer index:**
|
#. **Get to know the layer index:**
|
||||||
All layers can be found in the :oe_layerindex:`layer index <>`. Layers which
|
All layers can be found in the :oe_layerindex:`layer index <>`. Layers which
|
||||||
have applied for Yocto Project Compatible status (structure continuity
|
have applied for Yocto Project Compatible status (structure continuity
|
||||||
assurance and testing) can be found in the :yocto_home:`Yocto Project Compatible index
|
assurance and testing) can be found in the :yocto_home:`Yocto Project
|
||||||
</software-over/layer/>`. Generally check the Compatible layer index first,
|
Compatible Layers </development/yocto-project-compatible-layers/>` page.
|
||||||
|
Generally check the Compatible layer index first,
|
||||||
and if you don't find the necessary layer check the general layer index. The
|
and if you don't find the necessary layer check the general layer index. The
|
||||||
layer index is an original artifact from the Open Embedded Project. As such,
|
layer index is an original artifact from the Open Embedded Project. As such,
|
||||||
that index doesn't have the curating and testing that the Yocto Project
|
that index doesn't have the curating and testing that the Yocto Project
|
||||||
@@ -212,6 +213,13 @@ contact us with other suggestions.
|
|||||||
OpenEmbedded build system. If you are interested in using this type of
|
OpenEmbedded build system. If you are interested in using this type of
|
||||||
interface to create images, see the :doc:`/toaster-manual/index`.
|
interface to create images, see the :doc:`/toaster-manual/index`.
|
||||||
|
|
||||||
|
* **Discover the VSCode extension**: The `Yocto Project BitBake
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||||
|
extension for the Visual Studio Code IDE provides language features and
|
||||||
|
commands for working with the Yocto Project. If you are interested in using
|
||||||
|
this extension, visit its `marketplace page
|
||||||
|
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__.
|
||||||
|
|
||||||
* **Have Available the Yocto Project Reference Manual**: Unlike the rest of
|
* **Have Available the Yocto Project Reference Manual**: Unlike the rest of
|
||||||
the Yocto Project manual set, this manual is comprised of material suited
|
the Yocto Project manual set, this manual is comprised of material suited
|
||||||
for reference rather than procedures. You can get build details, a closer
|
for reference rather than procedures. You can get build details, a closer
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
DISTRO = "poky"
|
DISTRO = "poky"
|
||||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||||
#DISTRO_VERSION = "3.4+snapshot-${METADATA_REVISION}"
|
#DISTRO_VERSION = "3.4+snapshot-${METADATA_REVISION}"
|
||||||
DISTRO_VERSION = "4.0.13"
|
DISTRO_VERSION = "4.0.16"
|
||||||
DISTRO_CODENAME = "kirkstone"
|
DISTRO_CODENAME = "kirkstone"
|
||||||
SDK_VENDOR = "-pokysdk"
|
SDK_VENDOR = "-pokysdk"
|
||||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ inherit logging
|
|||||||
|
|
||||||
OE_EXTRA_IMPORTS ?= ""
|
OE_EXTRA_IMPORTS ?= ""
|
||||||
|
|
||||||
OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license oe.qa oe.reproducible oe.rust ${OE_EXTRA_IMPORTS}"
|
OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license oe.qa oe.reproducible oe.rust oe.go ${OE_EXTRA_IMPORTS}"
|
||||||
OE_IMPORTS[type] = "list"
|
OE_IMPORTS[type] = "list"
|
||||||
|
|
||||||
PACKAGECONFIG_CONFARGS ??= ""
|
PACKAGECONFIG_CONFARGS ??= ""
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ python do_menuconfig() {
|
|||||||
# ensure that environment variables are overwritten with this tasks 'd' values
|
# ensure that environment variables are overwritten with this tasks 'd' values
|
||||||
d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
|
d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
|
||||||
|
|
||||||
oe_terminal("sh -c \"make %s; if [ \\$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
|
oe_terminal("sh -c 'make %s; if [ \\$? -ne 0 ]; then echo \"Command failed.\"; printf \"Press any key to continue... \"; read r; fi'" % d.getVar('KCONFIG_CONFIG_COMMAND'),
|
||||||
d.getVar('PN') + ' Configuration', d)
|
d.getVar('PN') + ' Configuration', d)
|
||||||
|
|
||||||
# FIXME this check can be removed when the minimum bitbake version has been bumped
|
# FIXME this check can be removed when the minimum bitbake version has been bumped
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ def generate_json_report(d, out_path, link_path):
|
|||||||
cve_check_merge_jsons(summary, data)
|
cve_check_merge_jsons(summary, data)
|
||||||
filename = f.readline()
|
filename = f.readline()
|
||||||
|
|
||||||
|
summary["package"].sort(key=lambda d: d['name'])
|
||||||
|
|
||||||
with open(out_path, "w") as f:
|
with open(out_path, "w") as f:
|
||||||
json.dump(summary, f, indent=2)
|
json.dump(summary, f, indent=2)
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ python () {
|
|||||||
else:
|
else:
|
||||||
d.setVar('B', '${WORKDIR}/${BPN}-${PV}')
|
d.setVar('B', '${WORKDIR}/${BPN}-${PV}')
|
||||||
|
|
||||||
|
if d.getVar('SRCREV', "INVALID") != "INVALID":
|
||||||
|
# Ensure SRCREV has been processed before accessing SRC_URI
|
||||||
|
bb.fetch.get_srcrev(d)
|
||||||
|
|
||||||
local_srcuri = []
|
local_srcuri = []
|
||||||
fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d)
|
fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d)
|
||||||
for url in fetch.urls:
|
for url in fetch.urls:
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ PACKAGE_WRITE_DEPS += "qemu-native"
|
|||||||
inherit qemu
|
inherit qemu
|
||||||
|
|
||||||
FONT_PACKAGES ??= "${PN}"
|
FONT_PACKAGES ??= "${PN}"
|
||||||
|
FONT_PACKAGES:class-native = ""
|
||||||
FONT_EXTRA_RDEPENDS ?= "${MLPREFIX}fontconfig-utils"
|
FONT_EXTRA_RDEPENDS ?= "${MLPREFIX}fontconfig-utils"
|
||||||
FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
|
FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
|
||||||
FONTCONFIG_CACHE_PARAMS ?= "-v"
|
FONTCONFIG_CACHE_PARAMS ?= "-v"
|
||||||
|
|||||||
@@ -61,31 +61,10 @@ SECURITY_NOPIE_CFLAGS ??= ""
|
|||||||
CCACHE_DISABLE ?= "1"
|
CCACHE_DISABLE ?= "1"
|
||||||
|
|
||||||
def go_map_arch(a, d):
|
def go_map_arch(a, d):
|
||||||
import re
|
arch = oe.go.map_arch(a)
|
||||||
if re.match('i.86', a):
|
if not arch:
|
||||||
return '386'
|
|
||||||
elif a == 'x86_64':
|
|
||||||
return 'amd64'
|
|
||||||
elif re.match('arm.*', a):
|
|
||||||
return 'arm'
|
|
||||||
elif re.match('aarch64.*', a):
|
|
||||||
return 'arm64'
|
|
||||||
elif re.match('mips64el.*', a):
|
|
||||||
return 'mips64le'
|
|
||||||
elif re.match('mips64.*', a):
|
|
||||||
return 'mips64'
|
|
||||||
elif a == 'mips':
|
|
||||||
return 'mips'
|
|
||||||
elif a == 'mipsel':
|
|
||||||
return 'mipsle'
|
|
||||||
elif re.match('p(pc|owerpc)(64le)', a):
|
|
||||||
return 'ppc64le'
|
|
||||||
elif re.match('p(pc|owerpc)(64)', a):
|
|
||||||
return 'ppc64'
|
|
||||||
elif a == 'riscv64':
|
|
||||||
return 'riscv64'
|
|
||||||
else:
|
|
||||||
raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a)
|
raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a)
|
||||||
|
return arch
|
||||||
|
|
||||||
def go_map_arm(a, d):
|
def go_map_arm(a, d):
|
||||||
if a.startswith("arm"):
|
if a.startswith("arm"):
|
||||||
|
|||||||
@@ -442,8 +442,8 @@ kernel_do_install() {
|
|||||||
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
|
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
|
||||||
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
|
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
|
||||||
oe_runmake DEPMOD=echo MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install
|
oe_runmake DEPMOD=echo MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install
|
||||||
rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
|
rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
|
||||||
rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
|
rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
|
||||||
# Remove empty module directories to prevent QA issues
|
# Remove empty module directories to prevent QA issues
|
||||||
find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete
|
find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ TARGET_CFLAGS = "${BUILD_CFLAGS}"
|
|||||||
TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
|
TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
|
||||||
TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
|
TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
|
||||||
TARGET_FPU = ""
|
TARGET_FPU = ""
|
||||||
|
TUNE_FEATURES = ""
|
||||||
|
ABIEXTENSION = ""
|
||||||
|
|
||||||
HOST_ARCH = "${BUILD_ARCH}"
|
HOST_ARCH = "${BUILD_ARCH}"
|
||||||
HOST_OS = "${BUILD_OS}"
|
HOST_OS = "${BUILD_OS}"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ IMAGE_PKGTYPE ?= "rpm"
|
|||||||
|
|
||||||
RPM="rpm"
|
RPM="rpm"
|
||||||
RPMBUILD="rpmbuild"
|
RPMBUILD="rpmbuild"
|
||||||
|
RPMBUILD_COMPMODE ?= "${@'w19T%d.zstdio' % int(d.getVar('ZSTD_THREADS'))}"
|
||||||
|
|
||||||
PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
|
PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
|
||||||
|
|
||||||
@@ -652,6 +653,7 @@ python do_package_rpm () {
|
|||||||
|
|
||||||
# Setup the rpmbuild arguments...
|
# Setup the rpmbuild arguments...
|
||||||
rpmbuild = d.getVar('RPMBUILD')
|
rpmbuild = d.getVar('RPMBUILD')
|
||||||
|
rpmbuild_compmode = d.getVar('RPMBUILD_COMPMODE')
|
||||||
targetsys = d.getVar('TARGET_SYS')
|
targetsys = d.getVar('TARGET_SYS')
|
||||||
targetvendor = d.getVar('HOST_VENDOR')
|
targetvendor = d.getVar('HOST_VENDOR')
|
||||||
|
|
||||||
@@ -678,8 +680,8 @@ python do_package_rpm () {
|
|||||||
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
|
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
|
||||||
cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
|
cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
|
||||||
cmd = cmd + " --define '_build_id_links none'"
|
cmd = cmd + " --define '_build_id_links none'"
|
||||||
cmd = cmd + " --define '_binary_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
|
cmd = cmd + " --define '_source_payload %s'" % rpmbuild_compmode
|
||||||
cmd = cmd + " --define '_source_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
|
cmd = cmd + " --define '_binary_payload %s'" % rpmbuild_compmode
|
||||||
cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
|
cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
|
||||||
cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
|
cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
|
||||||
cmd = cmd + " --define '_buildhost reproducible'"
|
cmd = cmd + " --define '_buildhost reproducible'"
|
||||||
|
|||||||
@@ -101,36 +101,12 @@ TESTIMAGE_DUMP_DIR ?= "${LOG_DIR}/runtime-hostdump/"
|
|||||||
TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR"
|
TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR"
|
||||||
|
|
||||||
testimage_dump_target () {
|
testimage_dump_target () {
|
||||||
top -bn1
|
|
||||||
ps
|
|
||||||
free
|
|
||||||
df
|
|
||||||
# The next command will export the default gateway IP
|
|
||||||
export DEFAULT_GATEWAY=$(ip route | awk '/default/ { print $3}')
|
|
||||||
ping -c3 $DEFAULT_GATEWAY
|
|
||||||
dmesg
|
|
||||||
netstat -an
|
|
||||||
ip address
|
|
||||||
# Next command will dump logs from /var/log/
|
|
||||||
find /var/log/ -type f 2>/dev/null -exec echo "====================" \; -exec echo {} \; -exec echo "====================" \; -exec cat {} \; -exec echo "" \;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
testimage_dump_host () {
|
testimage_dump_host () {
|
||||||
top -bn1
|
|
||||||
iostat -x -z -N -d -p ALL 20 2
|
|
||||||
ps -ef
|
|
||||||
free
|
|
||||||
df
|
|
||||||
memstat
|
|
||||||
dmesg
|
|
||||||
ip -s link
|
|
||||||
netstat -an
|
|
||||||
}
|
}
|
||||||
|
|
||||||
testimage_dump_monitor () {
|
testimage_dump_monitor () {
|
||||||
query-status
|
|
||||||
query-block
|
|
||||||
dump-guest-memory {"paging":false,"protocol":"file:%s.img"}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
python do_testimage() {
|
python do_testimage() {
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ python do_create_extlinux_config() {
|
|||||||
bb.fatal('Unable to open %s' % (cfile))
|
bb.fatal('Unable to open %s' % (cfile))
|
||||||
}
|
}
|
||||||
UBOOT_EXTLINUX_VARS = "CONSOLE MENU_DESCRIPTION ROOT KERNEL_IMAGE FDTDIR FDT KERNEL_ARGS INITRD"
|
UBOOT_EXTLINUX_VARS = "CONSOLE MENU_DESCRIPTION ROOT KERNEL_IMAGE FDTDIR FDT KERNEL_ARGS INITRD"
|
||||||
do_create_extlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s_%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS').split()])}"
|
do_create_extlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s:%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS').split()])}"
|
||||||
do_create_extlinux_config[vardepsexclude] += "OVERRIDES"
|
do_create_extlinux_config[vardepsexclude] += "OVERRIDES"
|
||||||
|
|
||||||
addtask create_extlinux_config before do_install do_deploy after do_compile
|
addtask create_extlinux_config before do_install do_deploy after do_compile
|
||||||
|
|||||||
@@ -89,11 +89,6 @@ def get_patched_cves(d):
|
|||||||
for url in oe.patch.src_patches(d):
|
for url in oe.patch.src_patches(d):
|
||||||
patch_file = bb.fetch.decodeurl(url)[2]
|
patch_file = bb.fetch.decodeurl(url)[2]
|
||||||
|
|
||||||
# Remote compressed patches may not be unpacked, so silently ignore them
|
|
||||||
if not os.path.isfile(patch_file):
|
|
||||||
bb.warn("%s does not exist, cannot extract CVE list" % patch_file)
|
|
||||||
continue
|
|
||||||
|
|
||||||
# Check patch file name for CVE ID
|
# Check patch file name for CVE ID
|
||||||
fname_match = cve_file_name_match.search(patch_file)
|
fname_match = cve_file_name_match.search(patch_file)
|
||||||
if fname_match:
|
if fname_match:
|
||||||
@@ -101,6 +96,12 @@ def get_patched_cves(d):
|
|||||||
patched_cves.add(cve)
|
patched_cves.add(cve)
|
||||||
bb.debug(2, "Found CVE %s from patch file name %s" % (cve, patch_file))
|
bb.debug(2, "Found CVE %s from patch file name %s" % (cve, patch_file))
|
||||||
|
|
||||||
|
# Remote patches won't be present and compressed patches won't be
|
||||||
|
# unpacked, so say we're not scanning them
|
||||||
|
if not os.path.isfile(patch_file):
|
||||||
|
bb.note("%s is remote or compressed, not scanning content" % patch_file)
|
||||||
|
continue
|
||||||
|
|
||||||
with open(patch_file, "r", encoding="utf-8") as f:
|
with open(patch_file, "r", encoding="utf-8") as f:
|
||||||
try:
|
try:
|
||||||
patch_text = f.read()
|
patch_text = f.read()
|
||||||
@@ -159,7 +160,7 @@ def cve_check_merge_jsons(output, data):
|
|||||||
|
|
||||||
for product in output["package"]:
|
for product in output["package"]:
|
||||||
if product["name"] == data["package"][0]["name"]:
|
if product["name"] == data["package"][0]["name"]:
|
||||||
bb.error("Error adding the same package twice")
|
bb.error("Error adding the same package %s twice" % product["name"])
|
||||||
return
|
return
|
||||||
|
|
||||||
output["package"].append(data["package"][0])
|
output["package"].append(data["package"][0])
|
||||||
|
|||||||
32
meta/lib/oe/go.py
Normal file
32
meta/lib/oe/go.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#
|
||||||
|
# Copyright OpenEmbedded Contributors
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
#
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
def map_arch(a):
|
||||||
|
if re.match('i.86', a):
|
||||||
|
return '386'
|
||||||
|
elif a == 'x86_64':
|
||||||
|
return 'amd64'
|
||||||
|
elif re.match('arm.*', a):
|
||||||
|
return 'arm'
|
||||||
|
elif re.match('aarch64.*', a):
|
||||||
|
return 'arm64'
|
||||||
|
elif re.match('mips64el.*', a):
|
||||||
|
return 'mips64le'
|
||||||
|
elif re.match('mips64.*', a):
|
||||||
|
return 'mips64'
|
||||||
|
elif a == 'mips':
|
||||||
|
return 'mips'
|
||||||
|
elif a == 'mipsel':
|
||||||
|
return 'mipsle'
|
||||||
|
elif re.match('p(pc|owerpc)(64le)', a):
|
||||||
|
return 'ppc64le'
|
||||||
|
elif re.match('p(pc|owerpc)(64)', a):
|
||||||
|
return 'ppc64'
|
||||||
|
elif a == 'riscv64':
|
||||||
|
return 'riscv64'
|
||||||
|
return ''
|
||||||
97
meta/recipes-bsp/grub/files/CVE-2023-4692.patch
Normal file
97
meta/recipes-bsp/grub/files/CVE-2023-4692.patch
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
From 43651027d24e62a7a463254165e1e46e42aecdea Mon Sep 17 00:00:00 2001
|
||||||
|
From: Maxim Suhanov <dfirblog@gmail.com>
|
||||||
|
Date: Thu, 16 Nov 2023 07:21:50 +0000
|
||||||
|
Subject: [PATCH] fs/ntfs: Fix an OOB write when parsing the $ATTRIBUTE_LIST
|
||||||
|
attribute for the $MFT file
|
||||||
|
|
||||||
|
When parsing an extremely fragmented $MFT file, i.e., the file described
|
||||||
|
using the $ATTRIBUTE_LIST attribute, current NTFS code will reuse a buffer
|
||||||
|
containing bytes read from the underlying drive to store sector numbers,
|
||||||
|
which are consumed later to read data from these sectors into another buffer.
|
||||||
|
|
||||||
|
These sectors numbers, two 32-bit integers, are always stored at predefined
|
||||||
|
offsets, 0x10 and 0x14, relative to first byte of the selected entry within
|
||||||
|
the $ATTRIBUTE_LIST attribute. Usually, this won't cause any problem.
|
||||||
|
|
||||||
|
However, when parsing a specially-crafted file system image, this may cause
|
||||||
|
the NTFS code to write these integers beyond the buffer boundary, likely
|
||||||
|
causing the GRUB memory allocator to misbehave or fail. These integers contain
|
||||||
|
values which are controlled by on-disk structures of the NTFS file system.
|
||||||
|
|
||||||
|
Such modification and resulting misbehavior may touch a memory range not
|
||||||
|
assigned to the GRUB and owned by firmware or another EFI application/driver.
|
||||||
|
|
||||||
|
This fix introduces checks to ensure that these sector numbers are never
|
||||||
|
written beyond the boundary.
|
||||||
|
|
||||||
|
Fixes: CVE-2023-4692
|
||||||
|
|
||||||
|
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||||
|
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||||
|
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||||
|
|
||||||
|
CVE: CVE-2023-4692
|
||||||
|
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=43651027d24e62a7a463254165e1e46e42aecdea]
|
||||||
|
|
||||||
|
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||||
|
---
|
||||||
|
grub-core/fs/ntfs.c | 18 +++++++++++++++++-
|
||||||
|
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
|
||||||
|
index 2f34f76..6009e49 100644
|
||||||
|
--- a/grub-core/fs/ntfs.c
|
||||||
|
+++ b/grub-core/fs/ntfs.c
|
||||||
|
@@ -184,7 +184,7 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||||
|
}
|
||||||
|
if (at->attr_end)
|
||||||
|
{
|
||||||
|
- grub_uint8_t *pa;
|
||||||
|
+ grub_uint8_t *pa, *pa_end;
|
||||||
|
|
||||||
|
at->emft_buf = grub_malloc (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
|
||||||
|
if (at->emft_buf == NULL)
|
||||||
|
@@ -209,11 +209,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||||
|
}
|
||||||
|
at->attr_nxt = at->edat_buf;
|
||||||
|
at->attr_end = at->edat_buf + u32at (pa, 0x30);
|
||||||
|
+ pa_end = at->edat_buf + n;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
at->attr_nxt = at->attr_end + u16at (pa, 0x14);
|
||||||
|
at->attr_end = at->attr_end + u32at (pa, 4);
|
||||||
|
+ pa_end = at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
|
||||||
|
}
|
||||||
|
at->flags |= GRUB_NTFS_AF_ALST;
|
||||||
|
while (at->attr_nxt < at->attr_end)
|
||||||
|
@@ -230,6 +232,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||||
|
at->flags |= GRUB_NTFS_AF_GPOS;
|
||||||
|
at->attr_cur = at->attr_nxt;
|
||||||
|
pa = at->attr_cur;
|
||||||
|
+
|
||||||
|
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
|
||||||
|
+ {
|
||||||
|
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
grub_set_unaligned32 ((char *) pa + 0x10,
|
||||||
|
grub_cpu_to_le32 (at->mft->data->mft_start));
|
||||||
|
grub_set_unaligned32 ((char *) pa + 0x14,
|
||||||
|
@@ -240,6 +249,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||||
|
{
|
||||||
|
if (*pa != attr)
|
||||||
|
break;
|
||||||
|
+
|
||||||
|
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
|
||||||
|
+ {
|
||||||
|
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (read_attr
|
||||||
|
(at, pa + 0x10,
|
||||||
|
u32at (pa, 0x10) * (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR),
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
62
meta/recipes-bsp/grub/files/CVE-2023-4693.patch
Normal file
62
meta/recipes-bsp/grub/files/CVE-2023-4693.patch
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
From 0ed2458cc4eff6d9a9199527e2a0b6d445802f94 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Maxim Suhanov <dfirblog@gmail.com>
|
||||||
|
Date: Mon, 28 Aug 2023 16:32:33 +0300
|
||||||
|
Subject: [PATCH] fs/ntfs: Fix an OOB read when reading data from the resident
|
||||||
|
$DATA attribute
|
||||||
|
|
||||||
|
When reading a file containing resident data, i.e., the file data is stored in
|
||||||
|
the $DATA attribute within the NTFS file record, not in external clusters,
|
||||||
|
there are no checks that this resident data actually fits the corresponding
|
||||||
|
file record segment.
|
||||||
|
|
||||||
|
When parsing a specially-crafted file system image, the current NTFS code will
|
||||||
|
read the file data from an arbitrary, attacker-chosen memory offset and of
|
||||||
|
arbitrary, attacker-chosen length.
|
||||||
|
|
||||||
|
This allows an attacker to display arbitrary chunks of memory, which could
|
||||||
|
contain sensitive information like password hashes or even plain-text,
|
||||||
|
obfuscated passwords from BS EFI variables.
|
||||||
|
|
||||||
|
This fix implements a check to ensure that resident data is read from the
|
||||||
|
corresponding file record segment only.
|
||||||
|
|
||||||
|
Fixes: CVE-2023-4693
|
||||||
|
|
||||||
|
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||||
|
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||||
|
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=0ed2458cc4eff6d9a9199527e2a0b6d445802f94]
|
||||||
|
CVE: CVE-2023-4693
|
||||||
|
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||||
|
---
|
||||||
|
grub-core/fs/ntfs.c | 13 ++++++++++++-
|
||||||
|
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
|
||||||
|
index 7e43fd6..8f63c83 100644
|
||||||
|
--- a/grub-core/fs/ntfs.c
|
||||||
|
+++ b/grub-core/fs/ntfs.c
|
||||||
|
@@ -401,7 +401,18 @@ read_data (struct grub_ntfs_attr *at, grub_uint8_t *pa, grub_uint8_t *dest,
|
||||||
|
{
|
||||||
|
if (ofs + len > u32at (pa, 0x10))
|
||||||
|
return grub_error (GRUB_ERR_BAD_FS, "read out of range");
|
||||||
|
- grub_memcpy (dest, pa + u32at (pa, 0x14) + ofs, len);
|
||||||
|
+
|
||||||
|
+ if (u32at (pa, 0x10) > (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
|
||||||
|
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute too large");
|
||||||
|
+
|
||||||
|
+ if (pa >= at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
|
||||||
|
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
|
||||||
|
+
|
||||||
|
+ if (u16at (pa, 0x14) + u32at (pa, 0x10) >
|
||||||
|
+ (grub_addr_t) at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR) - (grub_addr_t) pa)
|
||||||
|
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
|
||||||
|
+
|
||||||
|
+ grub_memcpy (dest, pa + u16at (pa, 0x14) + ofs, len);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
@@ -38,6 +38,8 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
|
|||||||
file://loader-efi-chainloader-Simplify-the-loader-state.patch \
|
file://loader-efi-chainloader-Simplify-the-loader-state.patch \
|
||||||
file://commands-boot-Add-API-to-pass-context-to-loader.patch \
|
file://commands-boot-Add-API-to-pass-context-to-loader.patch \
|
||||||
file://CVE-2022-28736-loader-efi-chainloader-Use-grub_loader_set_ex.patch \
|
file://CVE-2022-28736-loader-efi-chainloader-Use-grub_loader_set_ex.patch \
|
||||||
|
file://CVE-2023-4692.patch \
|
||||||
|
file://CVE-2023-4693.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
|
SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
|
||||||
|
|||||||
@@ -26,6 +26,15 @@ SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}
|
|||||||
file://0001-Fix-opening-etc-resolv.conf-error.patch \
|
file://0001-Fix-opening-etc-resolv.conf-error.patch \
|
||||||
file://handle-hup.patch \
|
file://handle-hup.patch \
|
||||||
file://local-ping.patch \
|
file://local-ping.patch \
|
||||||
|
file://CVE-2023-1981.patch \
|
||||||
|
file://CVE-2023-38469-1.patch \
|
||||||
|
file://CVE-2023-38469-2.patch \
|
||||||
|
file://CVE-2023-38470-1.patch \
|
||||||
|
file://CVE-2023-38470-2.patch \
|
||||||
|
file://CVE-2023-38471-1.patch \
|
||||||
|
file://CVE-2023-38471-2.patch \
|
||||||
|
file://CVE-2023-38472.patch \
|
||||||
|
file://CVE-2023-38473.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
|
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
|
||||||
|
|||||||
58
meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch
Normal file
58
meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||||
|
Date: Thu, 17 Nov 2022 01:51:53 +0100
|
||||||
|
Subject: [PATCH] Emit error if requested service is not found
|
||||||
|
|
||||||
|
It currently just crashes instead of replying with error. Check return
|
||||||
|
value and emit error instead of passing NULL pointer to reply.
|
||||||
|
|
||||||
|
Fixes #375
|
||||||
|
|
||||||
|
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-1981.patch?h=ubuntu/jammy-security
|
||||||
|
Upstream commit https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f]
|
||||||
|
CVE: CVE-2023-1981
|
||||||
|
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||||
|
---
|
||||||
|
avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------
|
||||||
|
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c
|
||||||
|
index 70d7687bc..406d0b441 100644
|
||||||
|
--- a/avahi-daemon/dbus-protocol.c
|
||||||
|
+++ b/avahi-daemon/dbus-protocol.c
|
||||||
|
@@ -375,10 +375,14 @@ static DBusHandlerResult dbus_get_alternative_host_name(DBusConnection *c, DBusM
|
||||||
|
}
|
||||||
|
|
||||||
|
t = avahi_alternative_host_name(n);
|
||||||
|
- avahi_dbus_respond_string(c, m, t);
|
||||||
|
- avahi_free(t);
|
||||||
|
+ if (t) {
|
||||||
|
+ avahi_dbus_respond_string(c, m, t);
|
||||||
|
+ avahi_free(t);
|
||||||
|
|
||||||
|
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||||
|
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||||
|
+ } else {
|
||||||
|
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DBusMessage *m, DBusError *error) {
|
||||||
|
@@ -389,10 +393,14 @@ static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DB
|
||||||
|
}
|
||||||
|
|
||||||
|
t = avahi_alternative_service_name(n);
|
||||||
|
- avahi_dbus_respond_string(c, m, t);
|
||||||
|
- avahi_free(t);
|
||||||
|
+ if (t) {
|
||||||
|
+ avahi_dbus_respond_string(c, m, t);
|
||||||
|
+ avahi_free(t);
|
||||||
|
|
||||||
|
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||||
|
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||||
|
+ } else {
|
||||||
|
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
static DBusHandlerResult dbus_create_new_entry_group(DBusConnection *c, DBusMessage *m, DBusError *error) {
|
||||||
47
meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch
Normal file
47
meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
From a337a1ba7d15853fb56deef1f464529af6e3a1cf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||||
|
Date: Mon, 23 Oct 2023 20:29:31 +0000
|
||||||
|
Subject: [PATCH]core: reject overly long TXT resource records
|
||||||
|
Closes https://github.com/lathiat/avahi/issues/455
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/lathiat/avahi/pull/500/commits/a337a1ba7d15853fb56deef1f464529af6e3a1cf]
|
||||||
|
CVE: CVE-2023-38469
|
||||||
|
|
||||||
|
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||||
|
---
|
||||||
|
avahi-core/rr.c | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/avahi-core/rr.c b/avahi-core/rr.c
|
||||||
|
index 7fa0bee..b03a24c 100644
|
||||||
|
--- a/avahi-core/rr.c
|
||||||
|
+++ b/avahi-core/rr.c
|
||||||
|
@@ -32,6 +32,7 @@
|
||||||
|
#include <avahi-common/malloc.h>
|
||||||
|
#include <avahi-common/defs.h>
|
||||||
|
|
||||||
|
+#include "dns.h"
|
||||||
|
#include "rr.h"
|
||||||
|
#include "log.h"
|
||||||
|
#include "util.h"
|
||||||
|
@@ -688,11 +689,17 @@ int avahi_record_is_valid(AvahiRecord *r) {
|
||||||
|
case AVAHI_DNS_TYPE_TXT: {
|
||||||
|
|
||||||
|
AvahiStringList *strlst;
|
||||||
|
+ size_t used = 0;
|
||||||
|
|
||||||
|
- for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next)
|
||||||
|
+ for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) {
|
||||||
|
if (strlst->size > 255 || strlst->size <= 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
+ used += 1+strlst->size;
|
||||||
|
+ if (used > AVAHI_DNS_RDATA_MAX)
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
65
meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch
Normal file
65
meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
From c6cab87df290448a63323c8ca759baa516166237 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||||
|
Date: Wed, 25 Oct 2023 18:15:42 +0000
|
||||||
|
Subject: [PATCH] tests: pass overly long TXT resource records
|
||||||
|
|
||||||
|
to make sure they don't crash avahi any more.
|
||||||
|
It reproduces https://github.com/lathiat/avahi/issues/455
|
||||||
|
|
||||||
|
Canonical notes:
|
||||||
|
nickgalanis> removed first hunk since there is no .github dir in this release
|
||||||
|
|
||||||
|
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38469-2.patch?h=ubuntu/jammy-security
|
||||||
|
Upstream commit https://github.com/lathiat/avahi/commit/c6cab87df290448a63323c8ca759baa516166237]
|
||||||
|
CVE: CVE-2023-38469
|
||||||
|
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||||
|
---
|
||||||
|
avahi-client/client-test.c | 14 ++++++++++++++
|
||||||
|
1 files changed, 14 insertions(+)
|
||||||
|
|
||||||
|
Index: avahi-0.8/avahi-client/client-test.c
|
||||||
|
===================================================================
|
||||||
|
--- avahi-0.8.orig/avahi-client/client-test.c
|
||||||
|
+++ avahi-0.8/avahi-client/client-test.c
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include <avahi-client/client.h>
|
||||||
|
@@ -33,6 +34,8 @@
|
||||||
|
#include <avahi-common/malloc.h>
|
||||||
|
#include <avahi-common/timeval.h>
|
||||||
|
|
||||||
|
+#include <avahi-core/dns.h>
|
||||||
|
+
|
||||||
|
static const AvahiPoll *poll_api = NULL;
|
||||||
|
static AvahiSimplePoll *simple_poll = NULL;
|
||||||
|
|
||||||
|
@@ -222,6 +225,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||||
|
uint32_t cookie;
|
||||||
|
struct timeval tv;
|
||||||
|
AvahiAddress a;
|
||||||
|
+ uint8_t rdata[AVAHI_DNS_RDATA_MAX+1];
|
||||||
|
+ AvahiStringList *txt = NULL;
|
||||||
|
+ int r;
|
||||||
|
|
||||||
|
simple_poll = avahi_simple_poll_new();
|
||||||
|
poll_api = avahi_simple_poll_get(simple_poll);
|
||||||
|
@@ -258,6 +264,14 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||||
|
printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL)));
|
||||||
|
printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6));
|
||||||
|
|
||||||
|
+ memset(rdata, 1, sizeof(rdata));
|
||||||
|
+ r = avahi_string_list_parse(rdata, sizeof(rdata), &txt);
|
||||||
|
+ assert(r >= 0);
|
||||||
|
+ assert(avahi_string_list_serialize(txt, NULL, 0) == sizeof(rdata));
|
||||||
|
+ error = avahi_entry_group_add_service_strlst(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", "_qotd._tcp", NULL, NULL, 123, txt);
|
||||||
|
+ assert(error == AVAHI_ERR_INVALID_RECORD);
|
||||||
|
+ avahi_string_list_free(txt);
|
||||||
|
+
|
||||||
|
avahi_entry_group_commit (group);
|
||||||
|
|
||||||
|
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
|
||||||
59
meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch
Normal file
59
meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
From 26806dbde54c5b40a2bf108d334ba59ec9d242d6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||||
|
Date: Tue, 11 Apr 2023 15:29:59 +0200
|
||||||
|
Subject: [PATCH]Ensure each label is at least one byte long
|
||||||
|
|
||||||
|
The only allowed exception is single dot, where it should return empty
|
||||||
|
string.
|
||||||
|
|
||||||
|
Fixes #454.
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/94cb6489114636940ac683515417990b55b5d66c]
|
||||||
|
CVE: CVE-2023-38470
|
||||||
|
|
||||||
|
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||||
|
---
|
||||||
|
avahi-common/domain-test.c | 14 ++++++++++++++
|
||||||
|
avahi-common/domain.c | 2 +-
|
||||||
|
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c
|
||||||
|
index cf763ec..3acc1c1 100644
|
||||||
|
--- a/avahi-common/domain-test.c
|
||||||
|
+++ b/avahi-common/domain-test.c
|
||||||
|
@@ -45,6 +45,20 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
|
||||||
|
printf("%s\n", s = avahi_normalize_name_strdup("fo\\\\o\\..f oo."));
|
||||||
|
avahi_free(s);
|
||||||
|
|
||||||
|
+ printf("%s\n", s = avahi_normalize_name_strdup("."));
|
||||||
|
+ avahi_free(s);
|
||||||
|
+
|
||||||
|
+ s = avahi_normalize_name_strdup(",.=.}.=.?-.}.=.?.?.}.}.?.?.?.z.?.?.}.}."
|
||||||
|
+ "}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.}.}.}"
|
||||||
|
+ ".?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.?.zM.?`"
|
||||||
|
+ "?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}??.}.}.?.?."
|
||||||
|
+ "?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.?`?.}.}.}."
|
||||||
|
+ "??.?.zM.?`?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}?"
|
||||||
|
+ "?.}.}.?.?.?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM."
|
||||||
|
+ "?`?.}.}.}.?.?.?.r.=.=.?.?`.?.?}.}.}.?.?.?.r.=.?.}.=.?.?."
|
||||||
|
+ "}.?.?.?.}.=.?.?.}");
|
||||||
|
+ assert(s == NULL);
|
||||||
|
+
|
||||||
|
printf("%i\n", avahi_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff"));
|
||||||
|
printf("%i\n", avahi_domain_equal("A", "a"));
|
||||||
|
|
||||||
|
diff --git a/avahi-common/domain.c b/avahi-common/domain.c
|
||||||
|
index 3b1ab68..e66d241 100644
|
||||||
|
--- a/avahi-common/domain.c
|
||||||
|
+++ b/avahi-common/domain.c
|
||||||
|
@@ -201,7 +201,7 @@ char *avahi_normalize_name(const char *s, char *ret_s, size_t size) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty) {
|
||||||
|
- if (size < 1)
|
||||||
|
+ if (size < 2)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
*(r++) = '.';
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
52
meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch
Normal file
52
meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
From 20dec84b2480821704258bc908e7b2bd2e883b24 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||||
|
Date: Tue, 19 Sep 2023 03:21:25 +0000
|
||||||
|
Subject: [PATCH] [common] bail out when escaped labels can't fit into ret
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
```
|
||||||
|
==93410==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f9e76f14c16 at pc 0x00000047208d bp 0x7ffee90a6a00 sp 0x7ffee90a61c8
|
||||||
|
READ of size 1110 at 0x7f9e76f14c16 thread T0
|
||||||
|
#0 0x47208c in __interceptor_strlen (out/fuzz-domain+0x47208c) (BuildId: 731b20c1eef22c2104e75a6496a399b10cfc7cba)
|
||||||
|
#1 0x534eb0 in avahi_strdup avahi/avahi-common/malloc.c:167:12
|
||||||
|
#2 0x53862c in avahi_normalize_name_strdup avahi/avahi-common/domain.c:226:12
|
||||||
|
```
|
||||||
|
and
|
||||||
|
```
|
||||||
|
fuzz-domain: fuzz/fuzz-domain.c:38: int LLVMFuzzerTestOneInput(const uint8_t *, size_t): Assertion `avahi_domain_equal(s, t)' failed.
|
||||||
|
==101571== ERROR: libFuzzer: deadly signal
|
||||||
|
#0 0x501175 in __sanitizer_print_stack_trace (/home/vagrant/avahi/out/fuzz-domain+0x501175) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||||
|
#1 0x45ad2c in fuzzer::PrintStackTrace() (/home/vagrant/avahi/out/fuzz-domain+0x45ad2c) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||||
|
#2 0x43fc07 in fuzzer::Fuzzer::CrashCallback() (/home/vagrant/avahi/out/fuzz-domain+0x43fc07) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||||
|
#3 0x7f1581d7ebaf (/lib64/libc.so.6+0x3dbaf) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||||
|
#4 0x7f1581dcf883 in __pthread_kill_implementation (/lib64/libc.so.6+0x8e883) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||||
|
#5 0x7f1581d7eafd in gsignal (/lib64/libc.so.6+0x3dafd) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||||
|
#6 0x7f1581d6787e in abort (/lib64/libc.so.6+0x2687e) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||||
|
#7 0x7f1581d6779a in __assert_fail_base.cold (/lib64/libc.so.6+0x2679a) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||||
|
#8 0x7f1581d77186 in __assert_fail (/lib64/libc.so.6+0x36186) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||||
|
#9 0x5344a4 in LLVMFuzzerTestOneInput /home/vagrant/avahi/fuzz/fuzz-domain.c:38:9
|
||||||
|
```
|
||||||
|
|
||||||
|
It's a follow-up to 94cb6489114636940ac683515417990b55b5d66c
|
||||||
|
|
||||||
|
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38470-2.patch?h=ubuntu/jammy-security
|
||||||
|
CVE: CVE-2023-38470 #Follow-up patch
|
||||||
|
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||||
|
---
|
||||||
|
avahi-common/domain.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: avahi-0.8/avahi-common/domain.c
|
||||||
|
===================================================================
|
||||||
|
--- avahi-0.8.orig/avahi-common/domain.c
|
||||||
|
+++ avahi-0.8/avahi-common/domain.c
|
||||||
|
@@ -210,7 +210,8 @@ char *avahi_normalize_name(const char *s
|
||||||
|
} else
|
||||||
|
empty = 0;
|
||||||
|
|
||||||
|
- avahi_escape_label(label, strlen(label), &r, &size);
|
||||||
|
+ if (!(avahi_escape_label(label, strlen(label), &r, &size)))
|
||||||
|
+ return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret_s;
|
||||||
73
meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch
Normal file
73
meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
From 9cd4ea89b3ac89b7bb0196fda1aa88cd51b106b6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Sekletar <msekleta@redhat.com>
|
||||||
|
Date: Mon, 23 Oct 2023 13:38:35 +0200
|
||||||
|
Subject: [PATCH] core: extract host name using avahi_unescape_label()
|
||||||
|
|
||||||
|
Previously we could create invalid escape sequence when we split the
|
||||||
|
string on dot. For example, from valid host name "foo\\.bar" we have
|
||||||
|
created invalid name "foo\\" and tried to set that as the host name
|
||||||
|
which crashed the daemon.
|
||||||
|
|
||||||
|
Fixes #453
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/894f085f402e023a98cbb6f5a3d117bd88d93b09]
|
||||||
|
CVE: CVE-2023-38471
|
||||||
|
|
||||||
|
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||||
|
---
|
||||||
|
avahi-core/server.c | 27 +++++++++++++++++++++------
|
||||||
|
1 file changed, 21 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/avahi-core/server.c b/avahi-core/server.c
|
||||||
|
index e507750..40f1d68 100644
|
||||||
|
--- a/avahi-core/server.c
|
||||||
|
+++ b/avahi-core/server.c
|
||||||
|
@@ -1295,7 +1295,11 @@ static void update_fqdn(AvahiServer *s) {
|
||||||
|
}
|
||||||
|
|
||||||
|
int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
|
||||||
|
- char *hn = NULL;
|
||||||
|
+ char label_escaped[AVAHI_LABEL_MAX*4+1];
|
||||||
|
+ char label[AVAHI_LABEL_MAX];
|
||||||
|
+ char *hn = NULL, *h;
|
||||||
|
+ size_t len;
|
||||||
|
+
|
||||||
|
assert(s);
|
||||||
|
|
||||||
|
AVAHI_CHECK_VALIDITY(s, !host_name || avahi_is_valid_host_name(host_name), AVAHI_ERR_INVALID_HOST_NAME);
|
||||||
|
@@ -1305,17 +1309,28 @@ int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
|
||||||
|
else
|
||||||
|
hn = avahi_normalize_name_strdup(host_name);
|
||||||
|
|
||||||
|
- hn[strcspn(hn, ".")] = 0;
|
||||||
|
+ h = hn;
|
||||||
|
+ if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
|
||||||
|
+ avahi_free(h);
|
||||||
|
+ return AVAHI_ERR_INVALID_HOST_NAME;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ avahi_free(h);
|
||||||
|
+
|
||||||
|
+ h = label_escaped;
|
||||||
|
+ len = sizeof(label_escaped);
|
||||||
|
+ if (!avahi_escape_label(label, strlen(label), &h, &len))
|
||||||
|
+ return AVAHI_ERR_INVALID_HOST_NAME;
|
||||||
|
|
||||||
|
- if (avahi_domain_equal(s->host_name, hn) && s->state != AVAHI_SERVER_COLLISION) {
|
||||||
|
- avahi_free(hn);
|
||||||
|
+ if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
|
||||||
|
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
|
||||||
|
- }
|
||||||
|
|
||||||
|
withdraw_host_rrs(s);
|
||||||
|
|
||||||
|
avahi_free(s->host_name);
|
||||||
|
- s->host_name = hn;
|
||||||
|
+ s->host_name = avahi_strdup(label_escaped);
|
||||||
|
+ if (!s->host_name)
|
||||||
|
+ return AVAHI_ERR_NO_MEMORY;
|
||||||
|
|
||||||
|
update_fqdn(s);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
52
meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch
Normal file
52
meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
From b675f70739f404342f7f78635d6e2dcd85a13460 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||||
|
Date: Tue, 24 Oct 2023 22:04:51 +0000
|
||||||
|
Subject: [PATCH] core: return errors from avahi_server_set_host_name properly
|
||||||
|
|
||||||
|
It's a follow-up to 894f085f402e023a98cbb6f5a3d117bd88d93b09
|
||||||
|
|
||||||
|
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-2.patch?h=ubuntu/jammy-security
|
||||||
|
Upstream commit https://github.com/lathiat/avahi/commit/b675f70739f404342f7f78635d6e2dcd85a13460]
|
||||||
|
CVE: CVE-2023-38471 #Follow-up Patch
|
||||||
|
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||||
|
---
|
||||||
|
avahi-core/server.c | 9 ++++++---
|
||||||
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
Index: avahi-0.8/avahi-core/server.c
|
||||||
|
===================================================================
|
||||||
|
--- avahi-0.8.orig/avahi-core/server.c
|
||||||
|
+++ avahi-0.8/avahi-core/server.c
|
||||||
|
@@ -1309,10 +1309,13 @@ int avahi_server_set_host_name(AvahiServ
|
||||||
|
else
|
||||||
|
hn = avahi_normalize_name_strdup(host_name);
|
||||||
|
|
||||||
|
+ if (!hn)
|
||||||
|
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
|
||||||
|
+
|
||||||
|
h = hn;
|
||||||
|
if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
|
||||||
|
avahi_free(h);
|
||||||
|
- return AVAHI_ERR_INVALID_HOST_NAME;
|
||||||
|
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
avahi_free(h);
|
||||||
|
@@ -1320,7 +1323,7 @@ int avahi_server_set_host_name(AvahiServ
|
||||||
|
h = label_escaped;
|
||||||
|
len = sizeof(label_escaped);
|
||||||
|
if (!avahi_escape_label(label, strlen(label), &h, &len))
|
||||||
|
- return AVAHI_ERR_INVALID_HOST_NAME;
|
||||||
|
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
|
||||||
|
|
||||||
|
if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
|
||||||
|
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
|
||||||
|
@@ -1330,7 +1333,7 @@ int avahi_server_set_host_name(AvahiServ
|
||||||
|
avahi_free(s->host_name);
|
||||||
|
s->host_name = avahi_strdup(label_escaped);
|
||||||
|
if (!s->host_name)
|
||||||
|
- return AVAHI_ERR_NO_MEMORY;
|
||||||
|
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
|
||||||
|
|
||||||
|
update_fqdn(s);
|
||||||
|
|
||||||
46
meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch
Normal file
46
meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
From b024ae5749f4aeba03478e6391687c3c9c8dee40 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Sekletar <msekleta@redhat.com>
|
||||||
|
Date: Thu, 19 Oct 2023 17:36:44 +0200
|
||||||
|
Subject: [PATCH] core: make sure there is rdata to process before parsing it
|
||||||
|
|
||||||
|
Fixes #452
|
||||||
|
|
||||||
|
CVE-2023-38472
|
||||||
|
|
||||||
|
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38472.patch?h=ubuntu/jammy-security
|
||||||
|
Upstream commit https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40]
|
||||||
|
CVE: CVE-2023-38472
|
||||||
|
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||||
|
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||||
|
---
|
||||||
|
avahi-client/client-test.c | 3 +++
|
||||||
|
avahi-daemon/dbus-entry-group.c | 2 +-
|
||||||
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: avahi-0.8/avahi-client/client-test.c
|
||||||
|
===================================================================
|
||||||
|
--- avahi-0.8.orig/avahi-client/client-test.c
|
||||||
|
+++ avahi-0.8/avahi-client/client-test.c
|
||||||
|
@@ -272,6 +272,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||||
|
assert(error == AVAHI_ERR_INVALID_RECORD);
|
||||||
|
avahi_string_list_free(txt);
|
||||||
|
|
||||||
|
+ error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0);
|
||||||
|
+ assert(error != AVAHI_OK);
|
||||||
|
+
|
||||||
|
avahi_entry_group_commit (group);
|
||||||
|
|
||||||
|
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
|
||||||
|
Index: avahi-0.8/avahi-daemon/dbus-entry-group.c
|
||||||
|
===================================================================
|
||||||
|
--- avahi-0.8.orig/avahi-daemon/dbus-entry-group.c
|
||||||
|
+++ avahi-0.8/avahi-daemon/dbus-entry-group.c
|
||||||
|
@@ -340,7 +340,7 @@ DBusHandlerResult avahi_dbus_msg_entry_g
|
||||||
|
if (!(r = avahi_record_new_full (name, clazz, type, ttl)))
|
||||||
|
return avahi_dbus_respond_error(c, m, AVAHI_ERR_NO_MEMORY, NULL);
|
||||||
|
|
||||||
|
- if (avahi_rdata_parse (r, rdata, size) < 0) {
|
||||||
|
+ if (!rdata || avahi_rdata_parse (r, rdata, size) < 0) {
|
||||||
|
avahi_record_unref (r);
|
||||||
|
return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_RDATA, NULL);
|
||||||
|
}
|
||||||
108
meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch
Normal file
108
meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
From b448c9f771bada14ae8de175695a9729f8646797 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Sekletar <msekleta@redhat.com>
|
||||||
|
Date: Wed, 11 Oct 2023 17:45:44 +0200
|
||||||
|
Subject: [PATCH]common: derive alternative host name from its
|
||||||
|
unescaped version
|
||||||
|
|
||||||
|
Normalization of input makes sure we don't have to deal with special
|
||||||
|
cases like unescaped dot at the end of label.
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/b448c9f771bada14ae8de175695a9729f8646797]
|
||||||
|
CVE: CVE-2023-38473
|
||||||
|
|
||||||
|
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||||
|
---
|
||||||
|
avahi-common/alternative-test.c | 3 +++
|
||||||
|
avahi-common/alternative.c | 27 +++++++++++++++++++--------
|
||||||
|
2 files changed, 22 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/avahi-common/alternative-test.c b/avahi-common/alternative-test.c
|
||||||
|
index 9255435..681fc15 100644
|
||||||
|
--- a/avahi-common/alternative-test.c
|
||||||
|
+++ b/avahi-common/alternative-test.c
|
||||||
|
@@ -31,6 +31,9 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
|
||||||
|
const char* const test_strings[] = {
|
||||||
|
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||||
|
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXüüüüüüü",
|
||||||
|
+ ").",
|
||||||
|
+ "\\.",
|
||||||
|
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\",
|
||||||
|
"gurke",
|
||||||
|
"-",
|
||||||
|
" #",
|
||||||
|
diff --git a/avahi-common/alternative.c b/avahi-common/alternative.c
|
||||||
|
index b3d39f0..a094e6d 100644
|
||||||
|
--- a/avahi-common/alternative.c
|
||||||
|
+++ b/avahi-common/alternative.c
|
||||||
|
@@ -49,15 +49,20 @@ static void drop_incomplete_utf8(char *c) {
|
||||||
|
}
|
||||||
|
|
||||||
|
char *avahi_alternative_host_name(const char *s) {
|
||||||
|
+ char label[AVAHI_LABEL_MAX], alternative[AVAHI_LABEL_MAX*4+1];
|
||||||
|
+ char *alt, *r, *ret;
|
||||||
|
const char *e;
|
||||||
|
- char *r;
|
||||||
|
+ size_t len;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
|
||||||
|
if (!avahi_is_valid_host_name(s))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
- if ((e = strrchr(s, '-'))) {
|
||||||
|
+ if (!avahi_unescape_label(&s, label, sizeof(label)))
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
+ if ((e = strrchr(label, '-'))) {
|
||||||
|
const char *p;
|
||||||
|
|
||||||
|
e++;
|
||||||
|
@@ -74,19 +79,18 @@ char *avahi_alternative_host_name(const char *s) {
|
||||||
|
|
||||||
|
if (e) {
|
||||||
|
char *c, *m;
|
||||||
|
- size_t l;
|
||||||
|
int n;
|
||||||
|
|
||||||
|
n = atoi(e)+1;
|
||||||
|
if (!(m = avahi_strdup_printf("%i", n)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
- l = e-s-1;
|
||||||
|
+ len = e-label-1;
|
||||||
|
|
||||||
|
- if (l >= AVAHI_LABEL_MAX-1-strlen(m)-1)
|
||||||
|
- l = AVAHI_LABEL_MAX-1-strlen(m)-1;
|
||||||
|
+ if (len >= AVAHI_LABEL_MAX-1-strlen(m)-1)
|
||||||
|
+ len = AVAHI_LABEL_MAX-1-strlen(m)-1;
|
||||||
|
|
||||||
|
- if (!(c = avahi_strndup(s, l))) {
|
||||||
|
+ if (!(c = avahi_strndup(label, len))) {
|
||||||
|
avahi_free(m);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
@@ -100,7 +104,7 @@ char *avahi_alternative_host_name(const char *s) {
|
||||||
|
} else {
|
||||||
|
char *c;
|
||||||
|
|
||||||
|
- if (!(c = avahi_strndup(s, AVAHI_LABEL_MAX-1-2)))
|
||||||
|
+ if (!(c = avahi_strndup(label, AVAHI_LABEL_MAX-1-2)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
drop_incomplete_utf8(c);
|
||||||
|
@@ -109,6 +113,13 @@ char *avahi_alternative_host_name(const char *s) {
|
||||||
|
avahi_free(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ alt = alternative;
|
||||||
|
+ len = sizeof(alternative);
|
||||||
|
+ ret = avahi_escape_label(r, strlen(r), &alt, &len);
|
||||||
|
+
|
||||||
|
+ avahi_free(r);
|
||||||
|
+ r = avahi_strdup(ret);
|
||||||
|
+
|
||||||
|
assert(avahi_is_valid_host_name(r));
|
||||||
|
|
||||||
|
return r;
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
@@ -20,7 +20,7 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
|
|||||||
file://0001-avoid-start-failure-with-bind-user.patch \
|
file://0001-avoid-start-failure-with-bind-user.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[sha256sum] = "bde1c5017b81d1d79c69eb8f537f2e5032fd3623acdd5ee830d4f74bc2483458"
|
SRC_URI[sha256sum] = "115e09c05439bebade1d272eda08fa88eb3b60129edef690588c87a4d27612cc"
|
||||||
|
|
||||||
UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
|
UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
|
||||||
# follow the ESV versions divisible by 2
|
# follow the ESV versions divisible by 2
|
||||||
@@ -54,6 +54,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
|
|||||||
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
|
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
|
||||||
file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
|
file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
|
||||||
file://0001-test-gatt-Fix-hung-issue.patch \
|
file://0001-test-gatt-Fix-hung-issue.patch \
|
||||||
|
file://CVE-2023-45866.patch \
|
||||||
"
|
"
|
||||||
S = "${WORKDIR}/bluez-${PV}"
|
S = "${WORKDIR}/bluez-${PV}"
|
||||||
|
|
||||||
|
|||||||
56
meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch
Normal file
56
meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
From 25a471a83e02e1effb15d5a488b3f0085eaeb675 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||||
|
Date: Tue, 10 Oct 2023 13:03:12 -0700
|
||||||
|
Subject: [PATCH] input.conf: Change default of ClassicBondedOnly
|
||||||
|
|
||||||
|
This changes the default of ClassicBondedOnly since defaulting to false
|
||||||
|
is not inline with HID specification which mandates the of Security Mode
|
||||||
|
4:
|
||||||
|
|
||||||
|
BLUETOOTH SPECIFICATION Page 84 of 123
|
||||||
|
Human Interface Device (HID) Profile:
|
||||||
|
|
||||||
|
5.4.3.4.2 Security Modes
|
||||||
|
Bluetooth HID Hosts shall use Security Mode 4 when interoperating with
|
||||||
|
Bluetooth HID devices that are compliant to the Bluetooth Core
|
||||||
|
Specification v2.1+EDR[6].
|
||||||
|
|
||||||
|
Upstream-Status: Backport
|
||||||
|
[https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/profiles/input?id=25a471a83e02e1effb15d5a488b3f0085eaeb675]
|
||||||
|
|
||||||
|
CVE: CVE-2023-45866
|
||||||
|
|
||||||
|
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||||
|
---
|
||||||
|
profiles/input/device.c | 2 +-
|
||||||
|
profiles/input/input.conf | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/profiles/input/device.c b/profiles/input/device.c
|
||||||
|
index 4a50ea9..4310dd1 100644
|
||||||
|
--- a/profiles/input/device.c
|
||||||
|
+++ b/profiles/input/device.c
|
||||||
|
@@ -81,7 +81,7 @@ struct input_device {
|
||||||
|
|
||||||
|
static int idle_timeout = 0;
|
||||||
|
static bool uhid_enabled = false;
|
||||||
|
-static bool classic_bonded_only = false;
|
||||||
|
+static bool classic_bonded_only = true;
|
||||||
|
|
||||||
|
void input_set_idle_timeout(int timeout)
|
||||||
|
{
|
||||||
|
diff --git a/profiles/input/input.conf b/profiles/input/input.conf
|
||||||
|
index 4c70bc5..d8645f3 100644
|
||||||
|
--- a/profiles/input/input.conf
|
||||||
|
+++ b/profiles/input/input.conf
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
# platforms may want to make sure that input connections only come from bonded
|
||||||
|
# device connections. Several older mice have been known for not supporting
|
||||||
|
# pairing/encryption.
|
||||||
|
-# Defaults to false to maximize device compatibility.
|
||||||
|
+# Defaults to true for security.
|
||||||
|
#ClassicBondedOnly=true
|
||||||
|
|
||||||
|
# LE upgrade security
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
476
meta/recipes-connectivity/openssh/openssh/CVE-2023-48795.patch
Normal file
476
meta/recipes-connectivity/openssh/openssh/CVE-2023-48795.patch
Normal file
@@ -0,0 +1,476 @@
|
|||||||
|
(modified to not remove ssh_packet_read_expect() and to add to
|
||||||
|
KexAlgorithms in sshd.c and sshconnect2.c as this version pre-dates
|
||||||
|
kex_proposal_populate_entries())
|
||||||
|
|
||||||
|
Backport of:
|
||||||
|
|
||||||
|
From 1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "djm@openbsd.org" <djm@openbsd.org>
|
||||||
|
Date: Mon, 18 Dec 2023 14:45:17 +0000
|
||||||
|
Subject: [PATCH] upstream: implement "strict key exchange" in ssh and sshd
|
||||||
|
|
||||||
|
This adds a protocol extension to improve the integrity of the SSH
|
||||||
|
transport protocol, particular in and around the initial key exchange
|
||||||
|
(KEX) phase.
|
||||||
|
|
||||||
|
Full details of the extension are in the PROTOCOL file.
|
||||||
|
|
||||||
|
with markus@
|
||||||
|
|
||||||
|
OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14
|
||||||
|
|
||||||
|
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/openssh/tree/debian/patches/CVE-2023-48795.patch?h=ubuntu/jammy-security
|
||||||
|
Upstream commit https://github.com/openssh/openssh-portable/commit/1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5]
|
||||||
|
CVE: CVE-2023-48795
|
||||||
|
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||||
|
---
|
||||||
|
PROTOCOL | 26 +++++++++++++++++
|
||||||
|
kex.c | 72 +++++++++++++++++++++++++++++++----------------
|
||||||
|
kex.h | 1 +
|
||||||
|
packet.c | 78 ++++++++++++++++++++++++++++++++++++++-------------
|
||||||
|
sshconnect2.c | 14 +++------
|
||||||
|
sshd.c | 7 +++--
|
||||||
|
6 files changed, 142 insertions(+), 56 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/PROTOCOL b/PROTOCOL
|
||||||
|
index e6a7d60..971f01e 100644
|
||||||
|
--- a/PROTOCOL
|
||||||
|
+++ b/PROTOCOL
|
||||||
|
@@ -102,6 +102,32 @@ OpenSSH supports the use of ECDH in Curve25519 for key exchange as
|
||||||
|
described at:
|
||||||
|
http://git.libssh.org/users/aris/libssh.git/plain/doc/curve25519-sha256@libssh.org.txt?h=curve25519
|
||||||
|
|
||||||
|
+1.9 transport: strict key exchange extension
|
||||||
|
+
|
||||||
|
+OpenSSH supports a number of transport-layer hardening measures under
|
||||||
|
+a "strict KEX" feature. This feature is signalled similarly to the
|
||||||
|
+RFC8308 ext-info feature: by including a additional algorithm in the
|
||||||
|
+initiial SSH2_MSG_KEXINIT kex_algorithms field. The client may append
|
||||||
|
+"kex-strict-c-v00@openssh.com" to its kex_algorithms and the server
|
||||||
|
+may append "kex-strict-s-v00@openssh.com". These pseudo-algorithms
|
||||||
|
+are only valid in the initial SSH2_MSG_KEXINIT and MUST be ignored
|
||||||
|
+if they are present in subsequent SSH2_MSG_KEXINIT packets.
|
||||||
|
+
|
||||||
|
+When an endpoint that supports this extension observes this algorithm
|
||||||
|
+name in a peer's KEXINIT packet, it MUST make the following changes to
|
||||||
|
+the the protocol:
|
||||||
|
+
|
||||||
|
+a) During initial KEX, terminate the connection if any unexpected or
|
||||||
|
+ out-of-sequence packet is received. This includes terminating the
|
||||||
|
+ connection if the first packet received is not SSH2_MSG_KEXINIT.
|
||||||
|
+ Unexpected packets for the purpose of strict KEX include messages
|
||||||
|
+ that are otherwise valid at any time during the connection such as
|
||||||
|
+ SSH2_MSG_DEBUG and SSH2_MSG_IGNORE.
|
||||||
|
+b) After sending or receiving a SSH2_MSG_NEWKEYS message, reset the
|
||||||
|
+ packet sequence number to zero. This behaviour persists for the
|
||||||
|
+ duration of the connection (i.e. not just the first
|
||||||
|
+ SSH2_MSG_NEWKEYS).
|
||||||
|
+
|
||||||
|
2. Connection protocol changes
|
||||||
|
|
||||||
|
2.1. connection: Channel write close extension "eow@openssh.com"
|
||||||
|
diff --git a/kex.c b/kex.c
|
||||||
|
index 0bcd27d..e7b2d4d 100644
|
||||||
|
--- a/kex.c
|
||||||
|
+++ b/kex.c
|
||||||
|
@@ -63,7 +63,7 @@
|
||||||
|
#include "digest.h"
|
||||||
|
|
||||||
|
/* prototype */
|
||||||
|
-static int kex_choose_conf(struct ssh *);
|
||||||
|
+static int kex_choose_conf(struct ssh *, uint32_t seq);
|
||||||
|
static int kex_input_newkeys(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
|
static const char * const proposal_names[PROPOSAL_MAX] = {
|
||||||
|
@@ -175,6 +175,18 @@ kex_names_valid(const char *names)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* returns non-zero if proposal contains any algorithm from algs */
|
||||||
|
+static int
|
||||||
|
+has_any_alg(const char *proposal, const char *algs)
|
||||||
|
+{
|
||||||
|
+ char *cp;
|
||||||
|
+
|
||||||
|
+ if ((cp = match_list(proposal, algs, NULL)) == NULL)
|
||||||
|
+ return 0;
|
||||||
|
+ free(cp);
|
||||||
|
+ return 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Concatenate algorithm names, avoiding duplicates in the process.
|
||||||
|
* Caller must free returned string.
|
||||||
|
@@ -182,7 +194,7 @@ kex_names_valid(const char *names)
|
||||||
|
char *
|
||||||
|
kex_names_cat(const char *a, const char *b)
|
||||||
|
{
|
||||||
|
- char *ret = NULL, *tmp = NULL, *cp, *p, *m;
|
||||||
|
+ char *ret = NULL, *tmp = NULL, *cp, *p;
|
||||||
|
size_t len;
|
||||||
|
|
||||||
|
if (a == NULL || *a == '\0')
|
||||||
|
@@ -199,10 +211,8 @@ kex_names_cat(const char *a, const char *b)
|
||||||
|
}
|
||||||
|
strlcpy(ret, a, len);
|
||||||
|
for ((p = strsep(&cp, ",")); p && *p != '\0'; (p = strsep(&cp, ","))) {
|
||||||
|
- if ((m = match_list(ret, p, NULL)) != NULL) {
|
||||||
|
- free(m);
|
||||||
|
+ if (has_any_alg(ret, p))
|
||||||
|
continue; /* Algorithm already present */
|
||||||
|
- }
|
||||||
|
if (strlcat(ret, ",", len) >= len ||
|
||||||
|
strlcat(ret, p, len) >= len) {
|
||||||
|
free(tmp);
|
||||||
|
@@ -410,7 +420,12 @@ kex_protocol_error(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
|
||||||
|
- error("kex protocol error: type %d seq %u", type, seq);
|
||||||
|
+ /* If in strict mode, any unexpected message is an error */
|
||||||
|
+ if ((ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict) {
|
||||||
|
+ ssh_packet_disconnect(ssh, "strict KEX violation: "
|
||||||
|
+ "unexpected packet type %u (seqnr %u)", type, seq);
|
||||||
|
+ }
|
||||||
|
+ error_f("type %u seq %u", type, seq);
|
||||||
|
if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 ||
|
||||||
|
(r = sshpkt_put_u32(ssh, seq)) != 0 ||
|
||||||
|
(r = sshpkt_send(ssh)) != 0)
|
||||||
|
@@ -485,6 +500,11 @@ kex_input_ext_info(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
|
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_protocol_error);
|
||||||
|
if ((r = sshpkt_get_u32(ssh, &ninfo)) != 0)
|
||||||
|
return r;
|
||||||
|
+ if (ninfo >= 1024) {
|
||||||
|
+ error("SSH2_MSG_EXT_INFO with too many entries, expected "
|
||||||
|
+ "<=1024, received %u", ninfo);
|
||||||
|
+ return dispatch_protocol_error(type, seq, ssh);
|
||||||
|
+ }
|
||||||
|
for (i = 0; i < ninfo; i++) {
|
||||||
|
if ((r = sshpkt_get_cstring(ssh, &name, NULL)) != 0)
|
||||||
|
return r;
|
||||||
|
@@ -600,7 +620,7 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
|
error_f("no kex");
|
||||||
|
return SSH_ERR_INTERNAL_ERROR;
|
||||||
|
}
|
||||||
|
- ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL);
|
||||||
|
+ ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, &kex_protocol_error);
|
||||||
|
ptr = sshpkt_ptr(ssh, &dlen);
|
||||||
|
if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
|
||||||
|
return r;
|
||||||
|
@@ -636,7 +656,7 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
|
if (!(kex->flags & KEX_INIT_SENT))
|
||||||
|
if ((r = kex_send_kexinit(ssh)) != 0)
|
||||||
|
return r;
|
||||||
|
- if ((r = kex_choose_conf(ssh)) != 0)
|
||||||
|
+ if ((r = kex_choose_conf(ssh, seq)) != 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
if (kex->kex_type < KEX_MAX && kex->kex[kex->kex_type] != NULL)
|
||||||
|
@@ -900,20 +920,14 @@ proposals_match(char *my[PROPOSAL_MAX], char *peer[PROPOSAL_MAX])
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* returns non-zero if proposal contains any algorithm from algs */
|
||||||
|
static int
|
||||||
|
-has_any_alg(const char *proposal, const char *algs)
|
||||||
|
+kexalgs_contains(char **peer, const char *ext)
|
||||||
|
{
|
||||||
|
- char *cp;
|
||||||
|
-
|
||||||
|
- if ((cp = match_list(proposal, algs, NULL)) == NULL)
|
||||||
|
- return 0;
|
||||||
|
- free(cp);
|
||||||
|
- return 1;
|
||||||
|
+ return has_any_alg(peer[PROPOSAL_KEX_ALGS], ext);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
-kex_choose_conf(struct ssh *ssh)
|
||||||
|
+kex_choose_conf(struct ssh *ssh, uint32_t seq)
|
||||||
|
{
|
||||||
|
struct kex *kex = ssh->kex;
|
||||||
|
struct newkeys *newkeys;
|
||||||
|
@@ -938,13 +952,23 @@ kex_choose_conf(struct ssh *ssh)
|
||||||
|
sprop=peer;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Check whether client supports ext_info_c */
|
||||||
|
- if (kex->server && (kex->flags & KEX_INITIAL)) {
|
||||||
|
- char *ext;
|
||||||
|
-
|
||||||
|
- ext = match_list("ext-info-c", peer[PROPOSAL_KEX_ALGS], NULL);
|
||||||
|
- kex->ext_info_c = (ext != NULL);
|
||||||
|
- free(ext);
|
||||||
|
+ /* Check whether peer supports ext_info/kex_strict */
|
||||||
|
+ if ((kex->flags & KEX_INITIAL) != 0) {
|
||||||
|
+ if (kex->server) {
|
||||||
|
+ kex->ext_info_c = kexalgs_contains(peer, "ext-info-c");
|
||||||
|
+ kex->kex_strict = kexalgs_contains(peer,
|
||||||
|
+ "kex-strict-c-v00@openssh.com");
|
||||||
|
+ } else {
|
||||||
|
+ kex->kex_strict = kexalgs_contains(peer,
|
||||||
|
+ "kex-strict-s-v00@openssh.com");
|
||||||
|
+ }
|
||||||
|
+ if (kex->kex_strict) {
|
||||||
|
+ debug3_f("will use strict KEX ordering");
|
||||||
|
+ if (seq != 0)
|
||||||
|
+ ssh_packet_disconnect(ssh,
|
||||||
|
+ "strict KEX violation: "
|
||||||
|
+ "KEXINIT was not the first packet");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check whether client supports rsa-sha2 algorithms */
|
||||||
|
diff --git a/kex.h b/kex.h
|
||||||
|
index c353295..d97323e 100644
|
||||||
|
--- a/kex.h
|
||||||
|
+++ b/kex.h
|
||||||
|
@@ -148,6 +148,7 @@ struct kex {
|
||||||
|
u_int kex_type;
|
||||||
|
char *server_sig_algs;
|
||||||
|
int ext_info_c;
|
||||||
|
+ int kex_strict;
|
||||||
|
struct sshbuf *my;
|
||||||
|
struct sshbuf *peer;
|
||||||
|
struct sshbuf *client_version;
|
||||||
|
diff --git a/packet.c b/packet.c
|
||||||
|
index bde6c10..28f3729 100644
|
||||||
|
--- a/packet.c
|
||||||
|
+++ b/packet.c
|
||||||
|
@@ -1205,8 +1205,13 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
|
||||||
|
sshbuf_dump(state->output, stderr);
|
||||||
|
#endif
|
||||||
|
/* increment sequence number for outgoing packets */
|
||||||
|
- if (++state->p_send.seqnr == 0)
|
||||||
|
+ if (++state->p_send.seqnr == 0) {
|
||||||
|
+ if ((ssh->kex->flags & KEX_INITIAL) != 0) {
|
||||||
|
+ ssh_packet_disconnect(ssh, "outgoing sequence number "
|
||||||
|
+ "wrapped during initial key exchange");
|
||||||
|
+ }
|
||||||
|
logit("outgoing seqnr wraps around");
|
||||||
|
+ }
|
||||||
|
if (++state->p_send.packets == 0)
|
||||||
|
if (!(ssh->compat & SSH_BUG_NOREKEY))
|
||||||
|
return SSH_ERR_NEED_REKEY;
|
||||||
|
@@ -1214,6 +1219,11 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
|
||||||
|
state->p_send.bytes += len;
|
||||||
|
sshbuf_reset(state->outgoing_packet);
|
||||||
|
|
||||||
|
+ if (type == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
|
||||||
|
+ debug_f("resetting send seqnr %u", state->p_send.seqnr);
|
||||||
|
+ state->p_send.seqnr = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (type == SSH2_MSG_NEWKEYS)
|
||||||
|
r = ssh_set_newkeys(ssh, MODE_OUT);
|
||||||
|
else if (type == SSH2_MSG_USERAUTH_SUCCESS && state->server_side)
|
||||||
|
@@ -1342,8 +1352,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||||
|
/* Stay in the loop until we have received a complete packet. */
|
||||||
|
for (;;) {
|
||||||
|
/* Try to read a packet from the buffer. */
|
||||||
|
- r = ssh_packet_read_poll_seqnr(ssh, typep, seqnr_p);
|
||||||
|
- if (r != 0)
|
||||||
|
+ if ((r = ssh_packet_read_poll_seqnr(ssh, typep, seqnr_p)) != 0)
|
||||||
|
break;
|
||||||
|
/* If we got a packet, return it. */
|
||||||
|
if (*typep != SSH_MSG_NONE)
|
||||||
|
@@ -1627,10 +1636,16 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||||
|
if ((r = sshbuf_consume(state->input, mac->mac_len)) != 0)
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
if (seqnr_p != NULL)
|
||||||
|
*seqnr_p = state->p_read.seqnr;
|
||||||
|
- if (++state->p_read.seqnr == 0)
|
||||||
|
+ if (++state->p_read.seqnr == 0) {
|
||||||
|
+ if ((ssh->kex->flags & KEX_INITIAL) != 0) {
|
||||||
|
+ ssh_packet_disconnect(ssh, "incoming sequence number "
|
||||||
|
+ "wrapped during initial key exchange");
|
||||||
|
+ }
|
||||||
|
logit("incoming seqnr wraps around");
|
||||||
|
+ }
|
||||||
|
if (++state->p_read.packets == 0)
|
||||||
|
if (!(ssh->compat & SSH_BUG_NOREKEY))
|
||||||
|
return SSH_ERR_NEED_REKEY;
|
||||||
|
@@ -1696,6 +1711,10 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||||
|
#endif
|
||||||
|
/* reset for next packet */
|
||||||
|
state->packlen = 0;
|
||||||
|
+ if (*typep == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
|
||||||
|
+ debug_f("resetting read seqnr %u", state->p_read.seqnr);
|
||||||
|
+ state->p_read.seqnr = 0;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if ((r = ssh_packet_check_rekey(ssh)) != 0)
|
||||||
|
return r;
|
||||||
|
@@ -1716,10 +1735,39 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||||
|
r = ssh_packet_read_poll2(ssh, typep, seqnr_p);
|
||||||
|
if (r != 0)
|
||||||
|
return r;
|
||||||
|
- if (*typep) {
|
||||||
|
- state->keep_alive_timeouts = 0;
|
||||||
|
- DBG(debug("received packet type %d", *typep));
|
||||||
|
+ if (*typep == 0) {
|
||||||
|
+ /* no message ready */
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ state->keep_alive_timeouts = 0;
|
||||||
|
+ DBG(debug("received packet type %d", *typep));
|
||||||
|
+
|
||||||
|
+ /* Always process disconnect messages */
|
||||||
|
+ if (*typep == SSH2_MSG_DISCONNECT) {
|
||||||
|
+ if ((r = sshpkt_get_u32(ssh, &reason)) != 0 ||
|
||||||
|
+ (r = sshpkt_get_string(ssh, &msg, NULL)) != 0)
|
||||||
|
+ return r;
|
||||||
|
+ /* Ignore normal client exit notifications */
|
||||||
|
+ do_log2(ssh->state->server_side &&
|
||||||
|
+ reason == SSH2_DISCONNECT_BY_APPLICATION ?
|
||||||
|
+ SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
|
||||||
|
+ "Received disconnect from %s port %d:"
|
||||||
|
+ "%u: %.400s", ssh_remote_ipaddr(ssh),
|
||||||
|
+ ssh_remote_port(ssh), reason, msg);
|
||||||
|
+ free(msg);
|
||||||
|
+ return SSH_ERR_DISCONNECTED;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Do not implicitly handle any messages here during initial
|
||||||
|
+ * KEX when in strict mode. They will be need to be allowed
|
||||||
|
+ * explicitly by the KEX dispatch table or they will generate
|
||||||
|
+ * protocol errors.
|
||||||
|
+ */
|
||||||
|
+ if (ssh->kex != NULL &&
|
||||||
|
+ (ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict)
|
||||||
|
+ return 0;
|
||||||
|
+ /* Implicitly handle transport-level messages */
|
||||||
|
switch (*typep) {
|
||||||
|
case SSH2_MSG_IGNORE:
|
||||||
|
debug3("Received SSH2_MSG_IGNORE");
|
||||||
|
@@ -1734,19 +1782,6 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||||
|
debug("Remote: %.900s", msg);
|
||||||
|
free(msg);
|
||||||
|
break;
|
||||||
|
- case SSH2_MSG_DISCONNECT:
|
||||||
|
- if ((r = sshpkt_get_u32(ssh, &reason)) != 0 ||
|
||||||
|
- (r = sshpkt_get_string(ssh, &msg, NULL)) != 0)
|
||||||
|
- return r;
|
||||||
|
- /* Ignore normal client exit notifications */
|
||||||
|
- do_log2(ssh->state->server_side &&
|
||||||
|
- reason == SSH2_DISCONNECT_BY_APPLICATION ?
|
||||||
|
- SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
|
||||||
|
- "Received disconnect from %s port %d:"
|
||||||
|
- "%u: %.400s", ssh_remote_ipaddr(ssh),
|
||||||
|
- ssh_remote_port(ssh), reason, msg);
|
||||||
|
- free(msg);
|
||||||
|
- return SSH_ERR_DISCONNECTED;
|
||||||
|
case SSH2_MSG_UNIMPLEMENTED:
|
||||||
|
if ((r = sshpkt_get_u32(ssh, &seqnr)) != 0)
|
||||||
|
return r;
|
||||||
|
@@ -2211,6 +2246,7 @@ kex_to_blob(struct sshbuf *m, struct kex *kex)
|
||||||
|
(r = sshbuf_put_u32(m, kex->hostkey_type)) != 0 ||
|
||||||
|
(r = sshbuf_put_u32(m, kex->hostkey_nid)) != 0 ||
|
||||||
|
(r = sshbuf_put_u32(m, kex->kex_type)) != 0 ||
|
||||||
|
+ (r = sshbuf_put_u32(m, kex->kex_strict)) != 0 ||
|
||||||
|
(r = sshbuf_put_stringb(m, kex->my)) != 0 ||
|
||||||
|
(r = sshbuf_put_stringb(m, kex->peer)) != 0 ||
|
||||||
|
(r = sshbuf_put_stringb(m, kex->client_version)) != 0 ||
|
||||||
|
@@ -2373,6 +2409,7 @@ kex_from_blob(struct sshbuf *m, struct kex **kexp)
|
||||||
|
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_type)) != 0 ||
|
||||||
|
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_nid)) != 0 ||
|
||||||
|
(r = sshbuf_get_u32(m, &kex->kex_type)) != 0 ||
|
||||||
|
+ (r = sshbuf_get_u32(m, &kex->kex_strict)) != 0 ||
|
||||||
|
(r = sshbuf_get_stringb(m, kex->my)) != 0 ||
|
||||||
|
(r = sshbuf_get_stringb(m, kex->peer)) != 0 ||
|
||||||
|
(r = sshbuf_get_stringb(m, kex->client_version)) != 0 ||
|
||||||
|
@@ -2701,6 +2738,7 @@ sshpkt_disconnect(struct ssh *ssh, const char *fmt,...)
|
||||||
|
vsnprintf(buf, sizeof(buf), fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
+ debug2_f("sending SSH2_MSG_DISCONNECT: %s", buf);
|
||||||
|
if ((r = sshpkt_start(ssh, SSH2_MSG_DISCONNECT)) != 0 ||
|
||||||
|
(r = sshpkt_put_u32(ssh, SSH2_DISCONNECT_PROTOCOL_ERROR)) != 0 ||
|
||||||
|
(r = sshpkt_put_cstring(ssh, buf)) != 0 ||
|
||||||
|
diff --git a/sshconnect2.c b/sshconnect2.c
|
||||||
|
index b25225e..83ae4a4 100644
|
||||||
|
--- a/sshconnect2.c
|
||||||
|
+++ b/sshconnect2.c
|
||||||
|
@@ -241,7 +241,8 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port,
|
||||||
|
fatal_fr(r, "kex_assemble_namelist");
|
||||||
|
free(all_key);
|
||||||
|
|
||||||
|
- if ((s = kex_names_cat(options.kex_algorithms, "ext-info-c")) == NULL)
|
||||||
|
+ if ((s = kex_names_cat(options.kex_algorithms,
|
||||||
|
+ "ext-info-c,kex-strict-c-v00@openssh.com")) == NULL)
|
||||||
|
fatal_f("kex_names_cat");
|
||||||
|
myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(ssh, s);
|
||||||
|
myproposal[PROPOSAL_ENC_ALGS_CTOS] =
|
||||||
|
@@ -363,7 +364,6 @@ struct cauthmethod {
|
||||||
|
};
|
||||||
|
|
||||||
|
static int input_userauth_service_accept(int, u_int32_t, struct ssh *);
|
||||||
|
-static int input_userauth_ext_info(int, u_int32_t, struct ssh *);
|
||||||
|
static int input_userauth_success(int, u_int32_t, struct ssh *);
|
||||||
|
static int input_userauth_failure(int, u_int32_t, struct ssh *);
|
||||||
|
static int input_userauth_banner(int, u_int32_t, struct ssh *);
|
||||||
|
@@ -477,7 +477,7 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
|
||||||
|
|
||||||
|
ssh->authctxt = &authctxt;
|
||||||
|
ssh_dispatch_init(ssh, &input_userauth_error);
|
||||||
|
- ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_ext_info);
|
||||||
|
+ ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, kex_input_ext_info);
|
||||||
|
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept);
|
||||||
|
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */
|
||||||
|
pubkey_cleanup(ssh);
|
||||||
|
@@ -529,13 +529,6 @@ input_userauth_service_accept(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* ARGSUSED */
|
||||||
|
-static int
|
||||||
|
-input_userauth_ext_info(int type, u_int32_t seqnr, struct ssh *ssh)
|
||||||
|
-{
|
||||||
|
- return kex_input_ext_info(type, seqnr, ssh);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
void
|
||||||
|
userauth(struct ssh *ssh, char *authlist)
|
||||||
|
{
|
||||||
|
@@ -617,6 +610,7 @@ input_userauth_success(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
|
free(authctxt->methoddata);
|
||||||
|
authctxt->methoddata = NULL;
|
||||||
|
authctxt->success = 1; /* break out */
|
||||||
|
+ ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, dispatch_protocol_error);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/sshd.c b/sshd.c
|
||||||
|
index ef18ba4..652bdc3 100644
|
||||||
|
--- a/sshd.c
|
||||||
|
+++ b/sshd.c
|
||||||
|
@@ -2354,11 +2354,13 @@ static void
|
||||||
|
do_ssh2_kex(struct ssh *ssh)
|
||||||
|
{
|
||||||
|
char *myproposal[PROPOSAL_MAX] = { KEX_SERVER };
|
||||||
|
+ char *s;
|
||||||
|
struct kex *kex;
|
||||||
|
int r;
|
||||||
|
|
||||||
|
- myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(ssh,
|
||||||
|
- options.kex_algorithms);
|
||||||
|
+ if ((s = kex_names_cat(options.kex_algorithms, "kex-strict-s-v00@openssh.com")) == NULL)
|
||||||
|
+ fatal_f("kex_names_cat");
|
||||||
|
+ myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(ssh, s);
|
||||||
|
myproposal[PROPOSAL_ENC_ALGS_CTOS] = compat_cipher_proposal(ssh,
|
||||||
|
options.ciphers);
|
||||||
|
myproposal[PROPOSAL_ENC_ALGS_STOC] = compat_cipher_proposal(ssh,
|
||||||
|
@@ -2411,6 +2413,7 @@ do_ssh2_kex(struct ssh *ssh)
|
||||||
|
(r = ssh_packet_write_wait(ssh)) != 0)
|
||||||
|
fatal_fr(r, "send test");
|
||||||
|
#endif
|
||||||
|
+ free(s);
|
||||||
|
debug("KEX done");
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
171
meta/recipes-connectivity/openssh/openssh/CVE-2023-51384.patch
Normal file
171
meta/recipes-connectivity/openssh/openssh/CVE-2023-51384.patch
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
From 881d9c6af9da4257c69c327c4e2f1508b2fa754b Mon Sep 17 00:00:00 2001
|
||||||
|
From: "djm@openbsd.org" <djm@openbsd.org>
|
||||||
|
Date: Mon, 18 Dec 2023 14:46:12 +0000
|
||||||
|
Subject: [PATCH] upstream: apply destination constraints to all p11 keys
|
||||||
|
|
||||||
|
Previously applied only to the first key returned from each token.
|
||||||
|
|
||||||
|
ok markus@
|
||||||
|
|
||||||
|
OpenBSD-Commit-ID: 36df3afb8eb94eec6b2541f063d0d164ef8b488d
|
||||||
|
|
||||||
|
CVE: CVE-2023-51384
|
||||||
|
|
||||||
|
Upstream-Status: Backport
|
||||||
|
https://github.com/openssh/openssh-portable/commit/881d9c6af9da4257c69c327c4e2f1508b2fa754b
|
||||||
|
|
||||||
|
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||||
|
---
|
||||||
|
ssh-agent.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||||
|
1 file changed, 98 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ssh-agent.c b/ssh-agent.c
|
||||||
|
index 19eeaae..4dbb4f3 100644
|
||||||
|
--- a/ssh-agent.c
|
||||||
|
+++ b/ssh-agent.c
|
||||||
|
@@ -249,6 +249,90 @@ free_dest_constraints(struct dest_constraint *dcs, size_t ndcs)
|
||||||
|
free(dcs);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+dup_dest_constraint_hop(const struct dest_constraint_hop *dch,
|
||||||
|
+ struct dest_constraint_hop *out)
|
||||||
|
+{
|
||||||
|
+ u_int i;
|
||||||
|
+ int r;
|
||||||
|
+
|
||||||
|
+ out->user = dch->user == NULL ? NULL : xstrdup(dch->user);
|
||||||
|
+ out->hostname = dch->hostname == NULL ? NULL : xstrdup(dch->hostname);
|
||||||
|
+ out->is_ca = dch->is_ca;
|
||||||
|
+ out->nkeys = dch->nkeys;
|
||||||
|
+ out->keys = out->nkeys == 0 ? NULL :
|
||||||
|
+ xcalloc(out->nkeys, sizeof(*out->keys));
|
||||||
|
+ out->key_is_ca = out->nkeys == 0 ? NULL :
|
||||||
|
+ xcalloc(out->nkeys, sizeof(*out->key_is_ca));
|
||||||
|
+ for (i = 0; i < dch->nkeys; i++) {
|
||||||
|
+ if (dch->keys[i] != NULL &&
|
||||||
|
+ (r = sshkey_from_private(dch->keys[i],
|
||||||
|
+ &(out->keys[i]))) != 0)
|
||||||
|
+ fatal_fr(r, "copy key");
|
||||||
|
+ out->key_is_ca[i] = dch->key_is_ca[i];
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static struct dest_constraint *
|
||||||
|
+dup_dest_constraints(const struct dest_constraint *dcs, size_t ndcs)
|
||||||
|
+{
|
||||||
|
+ size_t i;
|
||||||
|
+ struct dest_constraint *ret;
|
||||||
|
+
|
||||||
|
+ if (ndcs == 0)
|
||||||
|
+ return NULL;
|
||||||
|
+ ret = xcalloc(ndcs, sizeof(*ret));
|
||||||
|
+ for (i = 0; i < ndcs; i++) {
|
||||||
|
+ dup_dest_constraint_hop(&dcs[i].from, &ret[i].from);
|
||||||
|
+ dup_dest_constraint_hop(&dcs[i].to, &ret[i].to);
|
||||||
|
+ }
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#ifdef DEBUG_CONSTRAINTS
|
||||||
|
+static void
|
||||||
|
+dump_dest_constraint_hop(const struct dest_constraint_hop *dch)
|
||||||
|
+{
|
||||||
|
+ u_int i;
|
||||||
|
+ char *fp;
|
||||||
|
+
|
||||||
|
+ debug_f("user %s hostname %s is_ca %d nkeys %u",
|
||||||
|
+ dch->user == NULL ? "(null)" : dch->user,
|
||||||
|
+ dch->hostname == NULL ? "(null)" : dch->hostname,
|
||||||
|
+ dch->is_ca, dch->nkeys);
|
||||||
|
+ for (i = 0; i < dch->nkeys; i++) {
|
||||||
|
+ fp = NULL;
|
||||||
|
+ if (dch->keys[i] != NULL &&
|
||||||
|
+ (fp = sshkey_fingerprint(dch->keys[i],
|
||||||
|
+ SSH_FP_HASH_DEFAULT, SSH_FP_DEFAULT)) == NULL)
|
||||||
|
+ fatal_f("fingerprint failed");
|
||||||
|
+ debug_f("key %u/%u: %s%s%s key_is_ca %d", i, dch->nkeys,
|
||||||
|
+ dch->keys[i] == NULL ? "" : sshkey_ssh_name(dch->keys[i]),
|
||||||
|
+ dch->keys[i] == NULL ? "" : " ",
|
||||||
|
+ dch->keys[i] == NULL ? "none" : fp,
|
||||||
|
+ dch->key_is_ca[i]);
|
||||||
|
+ free(fp);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+#endif /* DEBUG_CONSTRAINTS */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+dump_dest_constraints(const char *context,
|
||||||
|
+ const struct dest_constraint *dcs, size_t ndcs)
|
||||||
|
+{
|
||||||
|
+#ifdef DEBUG_CONSTRAINTS
|
||||||
|
+ size_t i;
|
||||||
|
+
|
||||||
|
+ debug_f("%s: %zu constraints", context, ndcs);
|
||||||
|
+ for (i = 0; i < ndcs; i++) {
|
||||||
|
+ debug_f("constraint %zu / %zu: from: ", i, ndcs);
|
||||||
|
+ dump_dest_constraint_hop(&dcs[i].from);
|
||||||
|
+ debug_f("constraint %zu / %zu: to: ", i, ndcs);
|
||||||
|
+ dump_dest_constraint_hop(&dcs[i].to);
|
||||||
|
+ }
|
||||||
|
+ debug_f("done for %s", context);
|
||||||
|
+#endif /* DEBUG_CONSTRAINTS */
|
||||||
|
+}
|
||||||
|
static void
|
||||||
|
free_identity(Identity *id)
|
||||||
|
{
|
||||||
|
@@ -520,13 +604,22 @@ process_request_identities(SocketEntry *e)
|
||||||
|
Identity *id;
|
||||||
|
struct sshbuf *msg, *keys;
|
||||||
|
int r;
|
||||||
|
- u_int nentries = 0;
|
||||||
|
+ u_int i = 0, nentries = 0;
|
||||||
|
+ char *fp;
|
||||||
|
|
||||||
|
debug2_f("entering");
|
||||||
|
|
||||||
|
if ((msg = sshbuf_new()) == NULL || (keys = sshbuf_new()) == NULL)
|
||||||
|
fatal_f("sshbuf_new failed");
|
||||||
|
TAILQ_FOREACH(id, &idtab->idlist, next) {
|
||||||
|
+ if ((fp = sshkey_fingerprint(id->key, SSH_FP_HASH_DEFAULT,
|
||||||
|
+ SSH_FP_DEFAULT)) == NULL)
|
||||||
|
+ fatal_f("fingerprint failed");
|
||||||
|
+ debug_f("key %u / %u: %s %s", i++, idtab->nentries,
|
||||||
|
+ sshkey_ssh_name(id->key), fp);
|
||||||
|
+ dump_dest_constraints(__func__,
|
||||||
|
+ id->dest_constraints, id->ndest_constraints);
|
||||||
|
+ free(fp);
|
||||||
|
/* identity not visible, don't include in response */
|
||||||
|
if (identity_permitted(id, e, NULL, NULL, NULL) != 0)
|
||||||
|
continue;
|
||||||
|
@@ -1235,6 +1328,7 @@ process_add_identity(SocketEntry *e)
|
||||||
|
sshbuf_reset(e->request);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
+ dump_dest_constraints(__func__, dest_constraints, ndest_constraints);
|
||||||
|
|
||||||
|
if (sk_provider != NULL) {
|
||||||
|
if (!sshkey_is_sk(k)) {
|
||||||
|
@@ -1414,6 +1508,7 @@ process_add_smartcard_key(SocketEntry *e)
|
||||||
|
error_f("failed to parse constraints");
|
||||||
|
goto send;
|
||||||
|
}
|
||||||
|
+ dump_dest_constraints(__func__, dest_constraints, ndest_constraints);
|
||||||
|
if (e->nsession_ids != 0 && !remote_add_provider) {
|
||||||
|
verbose("failed PKCS#11 add of \"%.100s\": remote addition of "
|
||||||
|
"providers is disabled", provider);
|
||||||
|
@@ -1449,10 +1544,9 @@ process_add_smartcard_key(SocketEntry *e)
|
||||||
|
}
|
||||||
|
id->death = death;
|
||||||
|
id->confirm = confirm;
|
||||||
|
- id->dest_constraints = dest_constraints;
|
||||||
|
+ id->dest_constraints = dup_dest_constraints(
|
||||||
|
+ dest_constraints, ndest_constraints);
|
||||||
|
id->ndest_constraints = ndest_constraints;
|
||||||
|
- dest_constraints = NULL; /* transferred */
|
||||||
|
- ndest_constraints = 0;
|
||||||
|
TAILQ_INSERT_TAIL(&idtab->idlist, id, next);
|
||||||
|
idtab->nentries++;
|
||||||
|
success = 1;
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
From 7ef3787c84b6b524501211b11a26c742f829af1a Mon Sep 17 00:00:00 2001
|
||||||
|
From: "djm@openbsd.org" <djm@openbsd.org>
|
||||||
|
Date: Mon, 18 Dec 2023 14:47:44 +0000
|
||||||
|
Subject: [PATCH] upstream: ban user/hostnames with most shell metacharacters
|
||||||
|
This makes ssh(1) refuse user or host names provided on the commandline that
|
||||||
|
contain most shell metacharacters.
|
||||||
|
|
||||||
|
Some programs that invoke ssh(1) using untrusted data do not filter
|
||||||
|
metacharacters in arguments they supply. This could create
|
||||||
|
interactions with user-specified ProxyCommand and other directives
|
||||||
|
that allow shell injection attacks to occur.
|
||||||
|
|
||||||
|
It's a mistake to invoke ssh(1) with arbitrary untrusted arguments,
|
||||||
|
but getting this stuff right can be tricky, so this should prevent
|
||||||
|
most obvious ways of creating risky situations. It however is not
|
||||||
|
and cannot be perfect: ssh(1) has no practical way of interpreting
|
||||||
|
what shell quoting rules are in use and how they interact with the
|
||||||
|
user's specified ProxyCommand.
|
||||||
|
|
||||||
|
To allow configurations that use strange user or hostnames to
|
||||||
|
continue to work, this strictness is applied only to names coming
|
||||||
|
from the commandline. Names specified using User or Hostname
|
||||||
|
directives in ssh_config(5) are not affected.
|
||||||
|
|
||||||
|
feedback/ok millert@ markus@ dtucker@ deraadt@
|
||||||
|
|
||||||
|
OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9
|
||||||
|
|
||||||
|
CVE: CVE-2023-51385
|
||||||
|
|
||||||
|
Upstream-Status: Backport
|
||||||
|
[https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a]
|
||||||
|
|
||||||
|
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||||
|
---
|
||||||
|
ssh.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 39 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/ssh.c b/ssh.c
|
||||||
|
index 8ff9788..82ed15f 100644
|
||||||
|
--- a/ssh.c
|
||||||
|
+++ b/ssh.c
|
||||||
|
@@ -611,6 +611,41 @@ ssh_conn_info_free(struct ssh_conn_info *cinfo)
|
||||||
|
free(cinfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int
|
||||||
|
+valid_hostname(const char *s)
|
||||||
|
+{
|
||||||
|
+ size_t i;
|
||||||
|
+
|
||||||
|
+ if (*s == '-')
|
||||||
|
+ return 0;
|
||||||
|
+ for (i = 0; s[i] != 0; i++) {
|
||||||
|
+ if (strchr("'`\"$\\;&<>|(){}", s[i]) != NULL ||
|
||||||
|
+ isspace((u_char)s[i]) || iscntrl((u_char)s[i]))
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ return 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+valid_ruser(const char *s)
|
||||||
|
+{
|
||||||
|
+ size_t i;
|
||||||
|
+
|
||||||
|
+ if (*s == '-')
|
||||||
|
+ return 0;
|
||||||
|
+ for (i = 0; s[i] != 0; i++) {
|
||||||
|
+ if (strchr("'`\";&<>|(){}", s[i]) != NULL)
|
||||||
|
+ return 0;
|
||||||
|
+ /* Disallow '-' after whitespace */
|
||||||
|
+ if (isspace((u_char)s[i]) && s[i + 1] == '-')
|
||||||
|
+ return 0;
|
||||||
|
+ /* Disallow \ in last position */
|
||||||
|
+ if (s[i] == '\\' && s[i + 1] == '\0')
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ return 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Main program for the ssh client.
|
||||||
|
*/
|
||||||
|
@@ -1097,6 +1132,10 @@ main(int ac, char **av)
|
||||||
|
if (!host)
|
||||||
|
usage();
|
||||||
|
|
||||||
|
+ if (!valid_hostname(host))
|
||||||
|
+ fatal("hostname contains invalid characters");
|
||||||
|
+ if (options.user != NULL && !valid_ruser(options.user))
|
||||||
|
+ fatal("remote username contains invalid characters");
|
||||||
|
host_arg = xstrdup(host);
|
||||||
|
|
||||||
|
/* Initialize the command to execute on remote host. */
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user