diff options
Diffstat (limited to 'documentation/dev-manual/common-tasks.rst')
-rw-r--r-- | documentation/dev-manual/common-tasks.rst | 65 |
1 files changed, 29 insertions, 36 deletions
diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst index 1caf953901..9a6416bf8e 100644 --- a/documentation/dev-manual/common-tasks.rst +++ b/documentation/dev-manual/common-tasks.rst | |||
@@ -1396,19 +1396,14 @@ another example that specifies these types of files, see the | |||
1396 | ":ref:`dev-manual/common-tasks:autotooled package`" section. | 1396 | ":ref:`dev-manual/common-tasks:autotooled package`" section. |
1397 | 1397 | ||
1398 | Another way of specifying source is from an SCM. For Git repositories, | 1398 | Another way of specifying source is from an SCM. For Git repositories, |
1399 | you must specify :term:`SRCREV` and | 1399 | you must specify :term:`SRCREV` and you should specify :term:`PV` to include |
1400 | you should specify :term:`PV` to include | 1400 | the revision with :term:`SRCPV`. Here is an example from the recipe |
1401 | the revision with :term:`SRCPV`. Here | 1401 | ``meta/recipes-core/musl/gcompat_git.bb``:: |
1402 | is an example from the recipe | ||
1403 | ``meta/recipes-kernel/blktrace/blktrace_git.bb``:: | ||
1404 | 1402 | ||
1405 | SRCREV = "d6918c8832793b4205ed3bfede78c2f915c23385" | 1403 | SRC_URI = "git://git.adelielinux.org/adelie/gcompat.git;protocol=https;branch=current" |
1406 | 1404 | ||
1407 | PR = "r6" | 1405 | PV = "1.0.0+1.1+git${SRCPV}" |
1408 | PV = "1.0.5+git${SRCPV}" | 1406 | SRCREV = "af5a49e489fdc04b9cf02547650d7aeaccd43793" |
1409 | |||
1410 | SRC_URI = "git://git.kernel.dk/blktrace.git \ | ||
1411 | file://ldflags.patch" | ||
1412 | 1407 | ||
1413 | If your :term:`SRC_URI` statement includes URLs pointing to individual files | 1408 | If your :term:`SRC_URI` statement includes URLs pointing to individual files |
1414 | fetched from a remote server other than a version control system, | 1409 | fetched from a remote server other than a version control system, |
@@ -2372,41 +2367,39 @@ following example shows this:: | |||
2372 | 2367 | ||
2373 | CFLAGS:prepend = "-I ${S}/include " | 2368 | CFLAGS:prepend = "-I ${S}/include " |
2374 | 2369 | ||
2375 | In the following example, ``mtd-utils`` is a makefile-based package:: | 2370 | In the following example, ``lz4`` is a makefile-based package:: |
2376 | 2371 | ||
2377 | SUMMARY = "Tools for managing memory technology devices" | 2372 | SUMMARY = "Extremely Fast Compression algorithm" |
2378 | SECTION = "base" | 2373 | DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems." |
2379 | DEPENDS = "zlib lzo e2fsprogs util-linux" | 2374 | HOMEPAGE = "https://github.com/lz4/lz4" |
2380 | HOMEPAGE = "http://www.linux-mtd.infradead.org/" | ||
2381 | LICENSE = "GPL-2.0-or-later" | ||
2382 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
2383 | file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" | ||
2384 | 2375 | ||
2385 | # Use the latest version at 26 Oct, 2013 | 2376 | LICENSE = "BSD-2-Clause | GPL-2.0-only" |
2386 | SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b" | 2377 | LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=ebc2ea4814a64de7708f1571904b32cc \ |
2387 | SRC_URI = "git://git.infradead.org/mtd-utils.git \ | 2378 | file://programs/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
2388 | file://add-exclusion-to-mkfs-jffs2-git-2.patch \ | 2379 | file://LICENSE;md5=d57c0d21cb917fb4e0af2454aa48b956 \ |
2389 | " | 2380 | " |
2390 | 2381 | ||
2391 | PV = "1.5.1+git${SRCPV}" | 2382 | PE = "1" |
2392 | 2383 | ||
2393 | S = "${WORKDIR}/git" | 2384 | SRCREV = "d44371841a2f1728a3f36839fd4b7e872d0927d3" |
2394 | 2385 | ||
2395 | EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'" | 2386 | SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \ |
2387 | file://CVE-2021-3520.patch \ | ||
2388 | " | ||
2389 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" | ||
2396 | 2390 | ||
2397 | do_install () { | 2391 | S = "${WORKDIR}/git" |
2398 | oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} | ||
2399 | } | ||
2400 | 2392 | ||
2401 | PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc" | 2393 | # Fixed in r118, which is larger than the current version. |
2394 | CVE_CHECK_IGNORE += "CVE-2014-4715" | ||
2402 | 2395 | ||
2403 | FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool" | 2396 | EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" |
2404 | FILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*" | ||
2405 | FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image" | ||
2406 | 2397 | ||
2407 | PARALLEL_MAKE = "" | 2398 | do_install() { |
2399 | oe_runmake install | ||
2400 | } | ||
2408 | 2401 | ||
2409 | BBCLASSEXTEND = "native" | 2402 | BBCLASSEXTEND = "native nativesdk" |
2410 | 2403 | ||
2411 | Splitting an Application into Multiple Packages | 2404 | Splitting an Application into Multiple Packages |
2412 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 2405 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |