diff options
| author | Andrea Adami <andrea.adami@gmail.com> | 2014-03-22 18:12:21 +0100 |
|---|---|---|
| committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-04-06 13:36:20 +0100 |
| commit | 477ccd867cc71f8277f2670b7be34b3b15300052 (patch) | |
| tree | 531fed00dfbdaab2271dcf7f965c1cc590903d34 /meta-initramfs | |
| parent | f24daddfa090335c7887e41b3ab2ba91cef24af8 (diff) | |
| download | meta-openembedded-477ccd867cc71f8277f2670b7be34b3b15300052.tar.gz | |
klibc: restylize a bit the recipes
No runtime changes.
Reorder and fix some typos in the comments.
Remove unneeded empty do_install from utils.
Fix bogus PACKAGES_${PN} = "${PN}".
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Diffstat (limited to 'meta-initramfs')
6 files changed, 51 insertions, 72 deletions
diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb index 068b3d54f7..7ff9c2e1af 100644 --- a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb +++ b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb | |||
| @@ -1,25 +1,29 @@ | |||
| 1 | require klibc.inc | ||
| 2 | SUMMARY = "The klcc crosscompiler for klibc" | 1 | SUMMARY = "The klcc crosscompiler for klibc" |
| 3 | 2 | ||
| 4 | SRC_URI += "file://use-env-for-perl.patch" | 3 | require klibc.inc |
| 5 | |||
| 6 | DEPENDS = "klibc" | 4 | DEPENDS = "klibc" |
| 7 | 5 | ||
| 8 | FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" | 6 | FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" |
| 9 | 7 | ||
| 8 | SRC_URI += "file://use-env-for-perl.patch" | ||
| 9 | |||
| 10 | inherit cross | 10 | inherit cross |
| 11 | 11 | ||
| 12 | # disable task already run in klibc recipe | ||
| 13 | do_configure[noexec] = "1" | ||
| 12 | do_compile() { | 14 | do_compile() { |
| 13 | oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${target_libdir}/klibc' klcc | 15 | oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${target_libdir}/klibc' klcc |
| 14 | } | 16 | } |
| 15 | 17 | # The linux-libc-headers and klibc custom headers are not machine-specific | |
| 18 | # but are installed into machine sysroot. | ||
| 19 | # Klcc wrapper is hardcoding some of these paths thus, to keep the recipe | ||
| 20 | # arch-specific, we force the rebuild of klcc-cross for each machine. | ||
| 21 | do_compile[vardeps] += "MACHINE" | ||
| 16 | do_install() { | 22 | do_install() { |
| 17 | install -d ${D}${bindir} | 23 | install -d ${D}${bindir} |
| 18 | install -m 0755 klcc/klcc ${D}${bindir}/${TARGET_PREFIX}klcc | 24 | install -m 0755 klcc/klcc ${D}${bindir}/${TARGET_PREFIX}klcc |
| 19 | } | 25 | } |
| 20 | 26 | ||
| 21 | # disable task already run in klibc recipe | ||
| 22 | do_configure[noexec] = "1" | ||
| 23 | 27 | ||
| 24 | # disable unneeded tasks | 28 | # disable unneeded tasks |
| 25 | do_package[noexec] = "1" | 29 | do_package[noexec] = "1" |
| @@ -28,9 +32,3 @@ do_package_write_ipk[noexec] = "1" | |||
| 28 | do_package_write_rpm[noexec] = "1" | 32 | do_package_write_rpm[noexec] = "1" |
| 29 | do_package_write_deb[noexec] = "1" | 33 | do_package_write_deb[noexec] = "1" |
| 30 | do_package_write_tar[noexec] = "1" | 34 | do_package_write_tar[noexec] = "1" |
| 31 | |||
| 32 | # The linux-libc-headers and klibc custom headers are not machine-specific | ||
| 33 | # but are installed into machine sysroot. | ||
| 34 | # Klcc wrapper is hardcoding som eof these paths thus, to keep te recipe | ||
| 35 | # arch-specific, we force the rebuild of klcc-cross for each machine. | ||
| 36 | do_compile[vardeps] += "MACHINE" | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.3.bb b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.3.bb index 36d4f12e67..c835fd647a 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.3.bb +++ b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.3.bb | |||
| @@ -1,15 +1,12 @@ | |||
| 1 | KLIBC_UTILS_VARIANT = "static" | 1 | SUMMARY = "klibc utils for initramfs statically compiled" |
| 2 | KLIBC_UTILS_PKGNAME = "klibc-static-utils" | ||
| 3 | 2 | ||
| 4 | FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" | 3 | FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" |
| 5 | 4 | ||
| 6 | do_install() { | 5 | PACKAGES = "${PN}" |
| 7 | : | ||
| 8 | } | ||
| 9 | |||
| 10 | PACKAGES_${PN} = "${PN}" | ||
| 11 | FILES_${PN} = "" | 6 | FILES_${PN} = "" |
| 12 | 7 | ||
| 8 | KLIBC_UTILS_VARIANT = "static" | ||
| 9 | KLIBC_UTILS_PKGNAME = "klibc-static-utils" | ||
| 10 | |||
| 13 | require klibc-utils.inc | 11 | require klibc-utils.inc |
| 14 | require klibc.inc | 12 | require klibc.inc |
| 15 | SUMMARY = "klibc utils for initramfs statically compiled" | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc b/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc index a626c9696e..9014f5267f 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc +++ b/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc | |||
| @@ -1,12 +1,6 @@ | |||
| 1 | KLIBC_UTILS_VARIANT ?= "shared" | 1 | do_install() { |
| 2 | KLIBC_UTILS_PKGNAME ?= "klibc-utils" | ||
| 3 | |||
| 4 | # losetup goes in ${base_sbindir} | ||
| 5 | |||
| 6 | do_install_append() { | ||
| 7 | install -d ${D}${base_bindir} | 2 | install -d ${D}${base_bindir} |
| 8 | install -d ${D}${base_sbindir} | 3 | install -d ${D}${base_sbindir} |
| 9 | |||
| 10 | # debian packages kinit + kinit.shared but only sh.shared | 4 | # debian packages kinit + kinit.shared but only sh.shared |
| 11 | if [ "${KLIBC_UTILS_VARIANT}" = "shared" ]; then | 5 | if [ "${KLIBC_UTILS_VARIANT}" = "shared" ]; then |
| 12 | install -m 755 usr/kinit/kinit ${D}${base_bindir}/kinit | 6 | install -m 755 usr/kinit/kinit ${D}${base_bindir}/kinit |
| @@ -16,7 +10,6 @@ do_install_append() { | |||
| 16 | install -m 755 usr/dash/sh ${D}${base_bindir}/sh | 10 | install -m 755 usr/dash/sh ${D}${base_bindir}/sh |
| 17 | install -m 755 usr/kinit/kinit ${D}${base_bindir}/kinit | 11 | install -m 755 usr/kinit/kinit ${D}${base_bindir}/kinit |
| 18 | fi | 12 | fi |
| 19 | |||
| 20 | install -m 755 usr/gzip/gzip ${D}${base_bindir} | 13 | install -m 755 usr/gzip/gzip ${D}${base_bindir} |
| 21 | install -m 755 usr/kinit/fstype/${KLIBC_UTILS_VARIANT}/fstype ${D}${base_bindir} | 14 | install -m 755 usr/kinit/fstype/${KLIBC_UTILS_VARIANT}/fstype ${D}${base_bindir} |
| 22 | install -m 755 usr/kinit/ipconfig/${KLIBC_UTILS_VARIANT}/ipconfig ${D}${base_bindir} | 15 | install -m 755 usr/kinit/ipconfig/${KLIBC_UTILS_VARIANT}/ipconfig ${D}${base_bindir} |
| @@ -32,6 +25,7 @@ do_install_append() { | |||
| 32 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/halt ${D}${base_bindir} | 25 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/halt ${D}${base_bindir} |
| 33 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/kill ${D}${base_bindir} | 26 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/kill ${D}${base_bindir} |
| 34 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/ln ${D}${base_bindir} | 27 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/ln ${D}${base_bindir} |
| 28 | # losetup goes in ${base_sbindir} | ||
| 35 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/losetup ${D}${base_sbindir} | 29 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/losetup ${D}${base_sbindir} |
| 36 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/ls ${D}${base_bindir} | 30 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/ls ${D}${base_bindir} |
| 37 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/minips ${D}${base_bindir} | 31 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/minips ${D}${base_bindir} |
| @@ -54,15 +48,13 @@ do_install_append() { | |||
| 54 | ln -s gzip ${D}${base_bindir}/zcat | 48 | ln -s gzip ${D}${base_bindir}/zcat |
| 55 | } | 49 | } |
| 56 | 50 | ||
| 57 | EXTRA_KLIBC_DEPS = '${@base_conditional("KLIBC_UTILS_VARIANT", "shared", "${THIS_LIBKLIBC}", "", d)}' | 51 | EXTRA_KLIBC_DEPS = "${@base_conditional('KLIBC_UTILS_VARIANT', 'shared', '${THIS_LIBKLIBC}', '', d)}" |
| 58 | 52 | ||
| 59 | PACKAGES_DYNAMIC += "^${KLIBC_UTILS_PKGNAME}-.*" | 53 | PACKAGES_DYNAMIC += "^${KLIBC_UTILS_PKGNAME}-.*" |
| 60 | 54 | ||
| 61 | python populate_packages_prepend () { | 55 | python populate_packages_prepend () { |
| 62 | |||
| 63 | base_bin_dir = d.expand('${base_bindir}') | 56 | base_bin_dir = d.expand('${base_bindir}') |
| 64 | do_split_packages(d, base_bin_dir, '(.*)', '${KLIBC_UTILS_PKGNAME}-%s', 'Klibc util for %s', extra_depends='${EXTRA_KLIBC_DEPS}', allow_links=True, allow_dirs=True) | 57 | do_split_packages(d, base_bin_dir, '(.*)', '${KLIBC_UTILS_PKGNAME}-%s', 'Klibc util for %s', extra_depends='${EXTRA_KLIBC_DEPS}', allow_links=True, allow_dirs=True) |
| 65 | |||
| 66 | base_sbin_dir = d.expand('${base_sbindir}') | 58 | base_sbin_dir = d.expand('${base_sbindir}') |
| 67 | do_split_packages(d, base_sbin_dir, '(.*)', '${KLIBC_UTILS_PKGNAME}-%s', 'Klibc util for %s', extra_depends='${EXTRA_KLIBC_DEPS}', allow_dirs=True) | 59 | do_split_packages(d, base_sbin_dir, '(.*)', '${KLIBC_UTILS_PKGNAME}-%s', 'Klibc util for %s', extra_depends='${EXTRA_KLIBC_DEPS}', allow_dirs=True) |
| 68 | } | 60 | } |
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.3.bb b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.3.bb index d3cebadfe2..fc53bece0e 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.3.bb +++ b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.3.bb | |||
| @@ -1,15 +1,12 @@ | |||
| 1 | KLIBC_UTILS_VARIANT = "shared" | 1 | SUMMARY = "klibc utils for initramfs" |
| 2 | KLIBC_UTILS_PKGNAME = "klibc-utils" | ||
| 3 | 2 | ||
| 4 | FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" | 3 | FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" |
| 5 | 4 | ||
| 6 | do_install() { | 5 | PACKAGES = "${PN}" |
| 7 | : | ||
| 8 | } | ||
| 9 | |||
| 10 | PACKAGES_${PN} = "${PN}" | ||
| 11 | FILES_${PN} = "" | 6 | FILES_${PN} = "" |
| 12 | 7 | ||
| 8 | KLIBC_UTILS_VARIANT = "shared" | ||
| 9 | KLIBC_UTILS_PKGNAME = "klibc-utils" | ||
| 10 | |||
| 13 | require klibc-utils.inc | 11 | require klibc-utils.inc |
| 14 | require klibc.inc | 12 | require klibc.inc |
| 15 | SUMMARY = "klibc utils for initramfs" | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc index 983681a1bb..b4f0cab8c7 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc | |||
| @@ -1,44 +1,22 @@ | |||
| 1 | DEPENDS = "linux-libc-headers perl-native" | ||
| 2 | SECTION = "libs" | ||
| 3 | DESCRIPTION = "klibc is intended to be a minimalistic libc subset for \ | 1 | DESCRIPTION = "klibc is intended to be a minimalistic libc subset for \ |
| 4 | use with initramfs. It is deliberately written for small size, \ | 2 | use with initramfs. It is deliberately written for small size, \ |
| 5 | minimal entaglement, and portability, not speed." | 3 | minimal entaglement, and portability, not speed." |
| 4 | SECTION = "libs" | ||
| 6 | LICENSE = "BSD-3-Clause & GPL-2.0 & MIT & Zlib" | 5 | LICENSE = "BSD-3-Clause & GPL-2.0 & MIT & Zlib" |
| 7 | LIC_FILES_CHKSUM = "file://usr/klibc/LICENSE;md5=d75181f10e998c21eb147f6d2e43ce8b" | 6 | LIC_FILES_CHKSUM = "file://usr/klibc/LICENSE;md5=d75181f10e998c21eb147f6d2e43ce8b" |
| 8 | 7 | DEPENDS = "linux-libc-headers perl-native" | |
| 9 | # Prevents do_package failures with: | ||
| 10 | # debugsources.list: No such file or directory: | ||
| 11 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 12 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
| 13 | |||
| 14 | KLIBC_ARCH = '${TARGET_ARCH}' | ||
| 15 | KLIBC_ARCH_aarch64 = 'arm64' | ||
| 16 | KLIBC_ARCH_armeb = 'arm' | ||
| 17 | KLIBC_ARCH_mipsel = 'mips' | ||
| 18 | KLIBC_ARCH_x86 = 'i386' | ||
| 19 | KLIBC_ARCH_x86-64 = 'x86_64' | ||
| 20 | KLIBC_ARCH_i486 = 'i386' | ||
| 21 | KLIBC_ARCH_i586 = 'i386' | ||
| 22 | KLIBC_ARCH_i686 = 'i386' | ||
| 23 | KLIBC_ARCH_pentium = 'i386' | ||
| 24 | KLIBC_ARCH_powerpc = 'ppc' | ||
| 25 | KLIBC_ARCH_powerpc64 = 'ppc64' | ||
| 26 | |||
| 27 | export FIX_ARMV4_EABI_BX = "${FIX_V4BX}" | ||
| 28 | |||
| 29 | SRCREV = "f0440baf7f2dc1d9a25863c184d0a8fb73c4ee6c" | 8 | SRCREV = "f0440baf7f2dc1d9a25863c184d0a8fb73c4ee6c" |
| 30 | SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git" | ||
| 31 | 9 | ||
| 10 | SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git" | ||
| 32 | SRC_URI_append_linux-gnueabi = " file://klibc-config-eabi.patch \ | 11 | SRC_URI_append_linux-gnueabi = " file://klibc-config-eabi.patch \ |
| 33 | file://armv4-fix-v4bx.patch \ | 12 | file://armv4-fix-v4bx.patch \ |
| 34 | " | 13 | " |
| 35 | SRC_URI_append_linux-uclibceabi = " file://klibc-config-eabi.patch \ | 14 | SRC_URI_append_linux-uclibceabi = " file://klibc-config-eabi.patch \ |
| 36 | file://armv4-fix-v4bx.patch \ | 15 | file://armv4-fix-v4bx.patch \ |
| 37 | " | 16 | " |
| 38 | |||
| 39 | SRC_URI += "file://klibc-linux-libc-dev.patch \ | 17 | SRC_URI += "file://klibc-linux-libc-dev.patch \ |
| 40 | file://staging.patch \ | 18 | file://staging.patch \ |
| 41 | " | 19 | " |
| 42 | 20 | ||
| 43 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
| 44 | 22 | ||
| @@ -48,10 +26,26 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ | |||
| 48 | 'prefix=${exec_prefix}' \ | 26 | 'prefix=${exec_prefix}' \ |
| 49 | 'INSTALLROOT=${D}' \ | 27 | 'INSTALLROOT=${D}' \ |
| 50 | 'SHLIBDIR=${libdir}' \ | 28 | 'SHLIBDIR=${libdir}' \ |
| 51 | " | 29 | " |
| 30 | |||
| 31 | export FIX_ARMV4_EABI_BX = "${FIX_V4BX}" | ||
| 52 | 32 | ||
| 53 | do_configure () { | 33 | do_configure () { |
| 54 | ln -sf "${STAGING_DIR_TARGET}${exec_prefix}" linux | 34 | ln -sf "${STAGING_DIR_TARGET}${exec_prefix}" linux |
| 55 | } | 35 | } |
| 56 | 36 | ||
| 37 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 38 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
| 39 | KLIBC_ARCH = "${TARGET_ARCH}" | ||
| 40 | KLIBC_ARCH_aarch64 = "arm64" | ||
| 41 | KLIBC_ARCH_armeb = "arm" | ||
| 42 | KLIBC_ARCH_mipsel = "mips" | ||
| 43 | KLIBC_ARCH_x86 = "i386" | ||
| 44 | KLIBC_ARCH_x86-64 = "x86_64" | ||
| 45 | KLIBC_ARCH_i486 = "i386" | ||
| 46 | KLIBC_ARCH_i586 = "i386" | ||
| 47 | KLIBC_ARCH_i686 = "i386" | ||
| 48 | KLIBC_ARCH_pentium = "i386" | ||
| 49 | KLIBC_ARCH_powerpc = "ppc" | ||
| 50 | KLIBC_ARCH_powerpc64 = "ppc64" | ||
| 57 | THIS_LIBKLIBC = "libklibc (= ${PV})" | 51 | THIS_LIBKLIBC = "libklibc (= ${PV})" |
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.3.bb b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.3.bb index e97d2c751f..bc80f382fe 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.3.bb +++ b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.3.bb | |||
| @@ -1,23 +1,24 @@ | |||
| 1 | SUMMARY = "klibc, a small C library for use with initramfs" | ||
| 2 | |||
| 1 | do_install() { | 3 | do_install() { |
| 2 | oe_runmake install | 4 | oe_runmake install |
| 3 | |||
| 4 | # the crosscompiler is packaged by klcc-cross | 5 | # the crosscompiler is packaged by klcc-cross |
| 5 | # remove klcc | 6 | # remove klcc |
| 6 | rm ${D}${bindir}/klcc | 7 | rm ${D}${bindir}/klcc |
| 7 | # remove now empty dir | 8 | # remove now empty dir |
| 8 | rmdir ${D}${bindir} | 9 | rmdir ${D}${bindir} |
| 9 | |||
| 10 | install -d ${D}${libdir} | 10 | install -d ${D}${libdir} |
| 11 | install -m 755 usr/klibc/klibc-*.so ${D}${libdir} | 11 | install -m 755 usr/klibc/klibc-*.so ${D}${libdir} |
| 12 | (cd ${D}${libdir}; ln -s klibc-*.so klibc.so) | 12 | (cd ${D}${libdir}; ln -s klibc-*.so klibc.so) |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | PACKAGES = "libklibc libklibc-staticdev libklibc-dev" | 15 | PACKAGES = "libklibc libklibc-staticdev libklibc-dev" |
| 16 | |||
| 16 | FILES_libklibc = "${libdir}/klibc-*.so" | 17 | FILES_libklibc = "${libdir}/klibc-*.so" |
| 17 | FILES_libklibc-staticdev = "${libdir}/klibc/lib/libc.a" | 18 | FILES_libklibc-staticdev = "${libdir}/klibc/lib/libc.a" |
| 18 | FILES_libklibc-dev = "${libdir}/klibc.so \ | 19 | FILES_libklibc-dev = "${libdir}/klibc.so \ |
| 19 | ${libdir}/klibc/lib/* \ | 20 | ${libdir}/klibc/lib/* \ |
| 20 | ${libdir}/klibc/include/* \ | 21 | ${libdir}/klibc/include/* \ |
| 21 | " | 22 | " |
| 23 | |||
| 22 | require klibc.inc | 24 | require klibc.inc |
| 23 | SUMMARY = "klibc, a small C library for use with initramfs" | ||
