uClibc: rename main include
PATCH 1/1 uClibc: rename main include
preparatory work, no code changes.
--- recipes/uclibc/bfin-uclibc_svn.bb | 2 +- recipes/uclibc/uclibc-old.inc | 186 +++++++++++++++++++++++++++++++++++++ recipes/uclibc/uclibc.inc | 186 ------------------------------------- recipes/uclibc/uclibc_0.9.28.bb | 2 +- recipes/uclibc/uclibc_0.9.29.bb | 2 +- recipes/uclibc/uclibc_0.9.30.1.bb | 2 +- recipes/uclibc/uclibc_0.9.30.2.bb | 2 +- recipes/uclibc/uclibc_0.9.30.bb | 2 +- recipes/uclibc/uclibc_git.bb | 2 +- recipes/uclibc/uclibc_nptl.bb | 2 +- 10 files changed, 194 insertions(+), 194 deletions(-) create mode 100644 recipes/uclibc/uclibc-old.inc delete mode 100644 recipes/uclibc/uclibc.inc
recipes/uclibc/bfin-uclibc_svn.bb +1 -1
@@ -9,7 +9,7 @@ UCLIBC_BASE ?= "0.9.29" PV = "${UCLIBC_BASE}+svnr${SRCPV}" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES_append_bfin = " virtual/${TARGET_PREFIX}libc-for-gcc "
recipes/uclibc/uclibc-old.inc new file +186 -0
186 lines not on this page · raw message
recipes/uclibc/uclibc.inc deleted +0 -186
186 lines not on this page · raw message
recipes/uclibc/uclibc_0.9.28.bb +1 -1
@@ -1,4 +1,4 @@ -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" # This is the correct KERNEL_SOURCE location, if the uClibc
recipes/uclibc/uclibc_0.9.29.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.29" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.1.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.30.1" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.4" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.2.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.30.2" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.30" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.1" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_git.bb +1 -1
@@ -13,7 +13,7 @@ DEFAULT_PREFERENCE = "-1" #DEFAULT_PREFERENCE is 0 (empty), releases have a preference of 1 so take # precedence. -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_nptl.bb +1 -1
@@ -13,7 +13,7 @@ DEFAULT_PREFERENCE = "-1" #DEFAULT_PREFERENCE is 0 (empty), releases have a preference of 1 so take # precedence. -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
Signature · 1 line
1.6.6
Quoted 1 line · Bernhard Reutner-Fischer
preparatory work, no code changes.
preparing for what ?
Quoted 506 lines
Signed-off-by Bernhard Reutner-Fischer <[email protected]>---
recipes/uclibc/bfin-uclibc_svn.bb | 2 +- recipes/uclibc/uclibc-old.inc | 186 +++++++++++++++++++++++++++++++++++++ recipes/uclibc/uclibc.inc | 186 ------------------------------------- recipes/uclibc/uclibc_0.9.28.bb | 2 +- recipes/uclibc/uclibc_0.9.29.bb | 2 +- recipes/uclibc/uclibc_0.9.30.1.bb | 2 +- recipes/uclibc/uclibc_0.9.30.2.bb | 2 +- recipes/uclibc/uclibc_0.9.30.bb | 2 +- recipes/uclibc/uclibc_git.bb | 2 +- recipes/uclibc/uclibc_nptl.bb | 2 +-10 files changed, 194 insertions(+), 194 deletions(-)create mode 100644 recipes/uclibc/uclibc-old.inc
delete mode 100644 recipes/uclibc/uclibc.increcipes/uclibc/bfin-uclibc_svn.bb +0
-0@@ -9,7 +9,7 @@UCLIBC_BASE ?= "0.9.29"
PV = "${UCLIBC_BASE}+svnr${SRCPV}"recipes/uclibc/bfin-uclibc_svn.bb +1
-1-require uclibc.inc +require uclibc-old.incPR = "${INC_PR}.0"
PROVIDES_append_bfin = " virtual/${TARGET_PREFIX}libc-for-gcc "recipes/uclibc/uclibc-old.inc new file +186
-0@@ -0,0 +1,186 @@ +DESCRIPTION = "C library for embedded systems" +LICENSE = "LGPL" +SECTION = "libs" +PRIORITY = "required" +INC_PR = "r33" +# +# For now, we will skip building of a gcc package if it is a uclibc one +# and our build is not a uclibc one, and we skip a glibc one if our build +# is a uclibc build. +# +# See the note in gcc/gcc_3.4.0.oe +# + +python __anonymous () { + import bb, re + uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None) + if not uc_os: + raise bb.parse.SkipPackage("incompatible with target %s" % + bb.data.getVar('TARGET_OS', d, 1)) +} + +PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc" +PROVIDES += "${@['virtual/libiconv', ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']}" +DEPENDS = "virtual/${TARGET_PREFIX}binutils \ + virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers ncurses-native pax-utils-native" +RDEPENDS_${PN}-dev = "linux-libc-headers-dev" + +# Blackfin needs a wrapper around ld +#DEPENDS_append_bfin = " elf2flt " + +INHIBIT_DEFAULT_DEPS = "1" +PARALLEL_MAKE = "" + +PACKAGES =+ "ldd uclibc-utils-dbg uclibc-utils uclibc-gconv uclibc-thread-db" + +LEAD_SONAME = "libc.so" + +# The last line (gdb and lib1) is for uclinux-uclibc builds +uclibc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so \ + ${base_libdir}/libintl*.so.* ${base_libdir}/libintl-*.so \ + ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so \ + ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so \ + ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so \ + ${base_libdir}/libc*.so.* ${base_libdir}/libuClibc-*.so \ + ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so \ + ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so \ + ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so \ + ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so \ + ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so \ + ${libdir}/libc.gdb ${libdir}/libc ${base_libdir}/lib1.so \ + " +FILES_${PN} = "${sysconfdir} ${uclibc_baselibs} /sbin/ldconfig \ + ${libexecdir} ${datadir}/zoneinfo ${libdir}/locale" +FILES_ldd = "${bindir}/ldd" +FILES_uclibc-dev_append = " ${libdir}/*.o ${libdir}/*_nonshared.a" +FILES_uclibc-utils = "${bindir} ${sbindir}" +FILES_uclibc-utils-dbg += "${bindir}/.debug ${sbindir}/.debug" +FILES_uclibc-gconv = "${libdir}/gconv" +FILES_uclibc-thread-db = "/lib/libthread_db*" +RPROVIDES_uclibc-dev += "libc-dev virtual-libc-dev" + +# +# This locale file gets copied into uClibc-${PV}/extra/locale/ prior to +# build, it does not need to be unpacked, but we can't inhibit the unpacking +# in the current build system. +# +UCLIBC_LOCALE_FILE = "uClibc-locale-030818.tgz" +UCLIBC_LOCALE_FILE_arm = "uClibc-locale-030818.arm.tgz" +UCLIBC_LOCALE_URI = "http://www.uclibc.org/downloads/${UCLIBC_LOCALE_FILE}" +UCLIBC_LOCALE_URI_arm = "http://wiki.openembedded.net/dl/uclibc-locale/${UCLIBC_LOCALE_FILE}" + +SRC_URI = "${@['${UCLIBC_LOCALE_URI}', ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']} \ + file://uClibc.config \ + http://www.uclibc.org/downloads/uClibc-${PV}.tar.bz2;name=uClibc-${PV} \ + " + +# do_stage barfs on a CC with whitepspace, therefore put the 'HOST_CC_ARCH' in +# the CFLAGS (for when building the utils). +OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}' \ + 'LOCALE_DATA_FILENAME=${UCLIBC_LOCALE_FILE}'" +EXTRA_OEMAKE = "${OEMAKE_NO_CC} 'CC=${CC}' \ + 'HOSTCFLAGS=-I${STAGING_INCDIR_NATIVE}' \ + ARCH=`grep TARGET_ARCH ${S}/.config|sed -e 's/TARGET_ARCH=//g'`" +EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}" + +KERNEL_SOURCE = "${STAGING_INCDIR}" +KERNEL_HEADERS = "${STAGING_INCDIR}" + +# Lets munge this via siteinfo.bbclass as well: +# ARCH_BIG_ENDIAN=y +# ARCH_WANTS_BIG_ENDIAN=y +# ARCH_WANTS_LITTLE_ENDIAN is not set + +# How to enable verbose logs: +#export VERBOSE="1" + +configmangle = 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE="${KERNEL_SOURCE}",g; \ + s,^KERNEL_HEADERS=.*,KERNEL_HEADERS="${KERNEL_HEADERS}",g; \ + s,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX="/",g; \ + s,^DEVEL_PREFIX=.*,DEVEL_PREFIX="/${prefix}",g; \ + s,^SHARED_LIB_LOADER_PATH=.*,SHARED_LIB_LOADER_PATH="/lib",; \ + s,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX="/lib",; \ + s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \ + ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][bb.data.getVar("USE_NLS", d, 1) == "yes"]} \ + ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][bb.data.getVar("TARGET_ARCH", d, 1) in ['mips', 'mipsel', 'avr32']]} \ + ' + +CFLAGS := "${@oe_filter_out('-I\S+', '${CFLAGS}', d)}" + +python () { + if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: + bb.data.setVar('configmangle_append', ' s,^HAS_FPU=y,# HAS_FPU is not set,;', d) +} + +uclibcbuild_do_patch() { + ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux + ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm + + ${@['cp %s/%s extra/locale' % (bb.data.getVar('DL_DIR', d, 1) or '', bb.data.getVar('UCLIBC_LOCALE_FILE', d, 1) or ''), ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']} +} + +python do_patch () { + bb.build.exec_func('base_do_patch', d) + bb.build.exec_func('uclibcbuild_do_patch', d) +} + +do_configure() { + rm -f ${S}/.config + + # For uClibc 0.9.29, OpenEmbedded splits the uClibc.config in two parts: + # uClibc.machine and uClibc.distro. So, if they exist use them, otherwise + # use a uClibc.config + if [ -f ${WORKDIR}/uClibc.machine -a -f ${WORKDIR}/uClibc.distro ]; then + echo "### uClibc.machine ###" >${S}/merged.config + cat ${WORKDIR}/uClibc.machine >>${S}/merged.config + echo "### uClibc.distro ###" >>${S}/merged.config + cat ${WORKDIR}/uClibc.distro >>${S}/merged.config + else + echo "### uClibc.config ###" >${S}/merged.config + cat ${WORKDIR}/uClibc.config >>${S}/merged.config + fi + cp ${S}/merged.config ${S}/.config + + # Mangle the resulting .config depending on OE variables + perl -i -p -e 's,^CROSS=.*,TARGET_ARCH=${TARGET_ARCH}\nCROSS=${TARGET_PREFIX},g' ${S}/Rules.mak + sed -i -e s:'$(CROSS)strip':true: ${S}/Rules.mak + perl -i -p -e '${configmangle}' ${S}/.config + + sed -i -e '/CONFIG_ARM_EABI/d' ${S}/.config + + if [ `echo ${TARGET_ARCH} | grep -e '^arm'` ]; then + if [ `echo ${TARGET_OS} | grep -e 'eabi$'` ]; then + echo "CONFIG_ARM_EABI=y" >> ${S}/.config + else + echo "# CONFIG_ARM_EABI is not set" >> ${S}/.config + fi + fi + yes '' | oe_runmake oldconfig +} + +do_install() { + oe_runmake PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + install_dev install_runtime + + # Need to overwrite the version from -initial + #if [ ! -e ${D}${libdir}/libc.so ]; then + # ln -s ../../lib/libc.so.0 ${D}${libdir}/libc.so + #fi + + # We don't really need this in ${includedir} + rm -f ${D}${prefix}/include/.cvsignore + + # This conflicts with the c++ version of this header + rm -f ${D}${prefix}/include/bits/atomicity.h + + oe_runmake "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" utils + oe_runmake STRIPTOOL=true PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + install_utils + + # oe_runstrip needs +x on files + chmod +x ${D}/${base_libdir}/* +} + +get_monotonic_srcrev () { + (cd ${S}; eval `git rev-list HEAD|wc -l`) +}recipes/uclibc/uclibc.inc deleted +0
-186@@ -1,186 +0,0 @@ -DESCRIPTION = "C library for embedded systems" -LICENSE = "LGPL" -SECTION = "libs" -PRIORITY = "required" -INC_PR = "r33" -# -# For now, we will skip building of a gcc package if it is a uclibc one -# and our build is not a uclibc one, and we skip a glibc one if our build -# is a uclibc build. -# -# See the note in gcc/gcc_3.4.0.oe -# - -python __anonymous () { - import bb, re - uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None) - if not uc_os: - raise bb.parse.SkipPackage("incompatible with target %s" % - bb.data.getVar('TARGET_OS', d, 1)) -} - -PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc" -PROVIDES += "${@['virtual/libiconv', ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']}" -DEPENDS = "virtual/${TARGET_PREFIX}binutils \ - virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers ncurses-native pax-utils-native" -RDEPENDS_${PN}-dev = "linux-libc-headers-dev" - -# Blackfin needs a wrapper around ld -#DEPENDS_append_bfin = " elf2flt " - -INHIBIT_DEFAULT_DEPS = "1" -PARALLEL_MAKE = "" - -PACKAGES =+ "ldd uclibc-utils-dbg uclibc-utils uclibc-gconv uclibc-thread-db" - -LEAD_SONAME = "libc.so" - -# The last line (gdb and lib1) is for uclinux-uclibc builds -uclibc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so \ - ${base_libdir}/libintl*.so.* ${base_libdir}/libintl-*.so \ - ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so \ - ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so \ - ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so \ - ${base_libdir}/libc*.so.* ${base_libdir}/libuClibc-*.so \ - ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so \ - ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so \ - ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so \ - ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so \ - ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so \ - ${libdir}/libc.gdb ${libdir}/libc ${base_libdir}/lib1.so \ - " -FILES_${PN} = "${sysconfdir} ${uclibc_baselibs} /sbin/ldconfig \ - ${libexecdir} ${datadir}/zoneinfo ${libdir}/locale" -FILES_ldd = "${bindir}/ldd" -FILES_uclibc-dev_append = " ${libdir}/*.o ${libdir}/*_nonshared.a" -FILES_uclibc-utils = "${bindir} ${sbindir}" -FILES_uclibc-utils-dbg += "${bindir}/.debug ${sbindir}/.debug" -FILES_uclibc-gconv = "${libdir}/gconv" -FILES_uclibc-thread-db = "/lib/libthread_db*" -RPROVIDES_uclibc-dev += "libc-dev virtual-libc-dev" - -# -# This locale file gets copied into uClibc-${PV}/extra/locale/ prior to -# build, it does not need to be unpacked, but we can't inhibit the unpacking -# in the current build system. -# -UCLIBC_LOCALE_FILE = "uClibc-locale-030818.tgz" -UCLIBC_LOCALE_FILE_arm = "uClibc-locale-030818.arm.tgz" -UCLIBC_LOCALE_URI = "http://www.uclibc.org/downloads/${UCLIBC_LOCALE_FILE}" -UCLIBC_LOCALE_URI_arm = "http://wiki.openembedded.net/dl/uclibc-locale/${UCLIBC_LOCALE_FILE}" - -SRC_URI = "${@['${UCLIBC_LOCALE_URI}', ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']} \ - file://uClibc.config \ - http://www.uclibc.org/downloads/uClibc-${PV}.tar.bz2;name=uClibc-${PV} \ - " - -# do_stage barfs on a CC with whitepspace, therefore put the 'HOST_CC_ARCH' in -# the CFLAGS (for when building the utils). -OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}' \ - 'LOCALE_DATA_FILENAME=${UCLIBC_LOCALE_FILE}'" -EXTRA_OEMAKE = "${OEMAKE_NO_CC} 'CC=${CC}' \ - 'HOSTCFLAGS=-I${STAGING_INCDIR_NATIVE}' \ - ARCH=`grep TARGET_ARCH ${S}/.config|sed -e 's/TARGET_ARCH=//g'`" -EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}" - -KERNEL_SOURCE = "${STAGING_INCDIR}" -KERNEL_HEADERS = "${STAGING_INCDIR}" - -# Lets munge this via siteinfo.bbclass as well: -# ARCH_BIG_ENDIAN=y -# ARCH_WANTS_BIG_ENDIAN=y -# ARCH_WANTS_LITTLE_ENDIAN is not set - -# How to enable verbose logs: -#export VERBOSE="1" - -configmangle = 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE="${KERNEL_SOURCE}",g; \ - s,^KERNEL_HEADERS=.*,KERNEL_HEADERS="${KERNEL_HEADERS}",g; \ - s,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX="/",g; \ - s,^DEVEL_PREFIX=.*,DEVEL_PREFIX="/${prefix}",g; \ - s,^SHARED_LIB_LOADER_PATH=.*,SHARED_LIB_LOADER_PATH="/lib",; \ - s,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX="/lib",; \ - s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \ - ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][bb.data.getVar("USE_NLS", d, 1) == "yes"]} \ - ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][bb.data.getVar("TARGET_ARCH", d, 1) in ['mips', 'mipsel', 'avr32']]} \ - ' - -CFLAGS := "${@oe_filter_out('-I\S+', '${CFLAGS}', d)}" - -python () { - if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: - bb.data.setVar('configmangle_append', ' s,^HAS_FPU=y,# HAS_FPU is not set,;', d) -} - -uclibcbuild_do_patch() { - ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux - ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm - - ${@['cp %s/%s extra/locale' % (bb.data.getVar('DL_DIR', d, 1) or '', bb.data.getVar('UCLIBC_LOCALE_FILE', d, 1) or ''), ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']} -} - -python do_patch () { - bb.build.exec_func('base_do_patch', d) - bb.build.exec_func('uclibcbuild_do_patch', d) -} - -do_configure() { - rm -f ${S}/.config - - # For uClibc 0.9.29, OpenEmbedded splits the uClibc.config in two parts: - # uClibc.machine and uClibc.distro. So, if they exist use them, otherwise - # use a uClibc.config - if [ -f ${WORKDIR}/uClibc.machine -a -f ${WORKDIR}/uClibc.distro ]; then - echo "### uClibc.machine ###" >${S}/merged.config - cat ${WORKDIR}/uClibc.machine >>${S}/merged.config - echo "### uClibc.distro ###" >>${S}/merged.config - cat ${WORKDIR}/uClibc.distro >>${S}/merged.config - else - echo "### uClibc.config ###" >${S}/merged.config - cat ${WORKDIR}/uClibc.config >>${S}/merged.config - fi - cp ${S}/merged.config ${S}/.config - - # Mangle the resulting .config depending on OE variables - perl -i -p -e 's,^CROSS=.*,TARGET_ARCH=${TARGET_ARCH}\nCROSS=${TARGET_PREFIX},g' ${S}/Rules.mak - sed -i -e s:'$(CROSS)strip':true: ${S}/Rules.mak - perl -i -p -e '${configmangle}' ${S}/.config - - sed -i -e '/CONFIG_ARM_EABI/d' ${S}/.config - - if [ `echo ${TARGET_ARCH} | grep -e '^arm'` ]; then - if [ `echo ${TARGET_OS} | grep -e 'eabi$'` ]; then - echo "CONFIG_ARM_EABI=y" >> ${S}/.config - else - echo "# CONFIG_ARM_EABI is not set" >> ${S}/.config - fi - fi - yes '' | oe_runmake oldconfig -} - -do_install() { - oe_runmake PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ - install_dev install_runtime - - # Need to overwrite the version from -initial - #if [ ! -e ${D}${libdir}/libc.so ]; then - # ln -s ../../lib/libc.so.0 ${D}${libdir}/libc.so - #fi - - # We don't really need this in ${includedir} - rm -f ${D}${prefix}/include/.cvsignore - - # This conflicts with the c++ version of this header - rm -f ${D}${prefix}/include/bits/atomicity.h - - oe_runmake "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" utils - oe_runmake STRIPTOOL=true PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ - install_utils - - # oe_runstrip needs +x on files - chmod +x ${D}/${base_libdir}/* -} - -get_monotonic_srcrev () { - (cd ${S}; eval `git rev-list HEAD|wc -l`) -}recipes/uclibc/uclibc_0.9.28.bb +1
-1@@ -1,4 +1,4 @@ -require uclibc.inc +require uclibc-old.incPR = "${INC_PR}.0"
# This is the correct
KERNEL_SOURCElocation, if the uClibcrecipes/uclibc/uclibc_0.9.29.bb +0
-0@@ -8,7 +8,7 @@ #UCLIBC_BASE ?= "0.9.29"
recipes/uclibc/uclibc_0.9.29.bb +1
-1-require uclibc.inc +require uclibc-old.incPR = "${INC_PR}.0"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.1.bb +0
-0@@ -8,7 +8,7 @@ #UCLIBC_BASE ?= "0.9.30.1"
recipes/uclibc/uclibc_0.9.30.1.bb +1
-1-require uclibc.inc +require uclibc-old.incPR = "${INC_PR}.4"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.2.bb +0
-0@@ -8,7 +8,7 @@ #UCLIBC_BASE ?= "0.9.30.2"
recipes/uclibc/uclibc_0.9.30.2.bb +1
-1-require uclibc.inc +require uclibc-old.incPR = "${INC_PR}.0"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.bb +0
-0@@ -8,7 +8,7 @@ #UCLIBC_BASE ?= "0.9.30"
recipes/uclibc/uclibc_0.9.30.bb +1
-1-require uclibc.inc +require uclibc-old.incPR = "${INC_PR}.1"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_git.bb +1
-1@@ -13,7 +13,7 @@ DEFAULT_PREFERENCE = "-1" #DEFAULT_PREFERENCE is 0 (empty), releases have a preference of 1 so take # precedence. -require uclibc.inc +require uclibc-old.incPR = "${INC_PR}.0"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"recipes/uclibc/uclibc_nptl.bb +1
-1@@ -13,7 +13,7 @@ DEFAULT_PREFERENCE = "-1" #DEFAULT_PREFERENCE is 0 (empty), releases have a preference of 1 so take # precedence. -require uclibc.inc +require uclibc-old.incPR = "${INC_PR}.0"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc" --
1.6.6
PATCH 1/3 uClibc: rename include file of old releases
--- recipes/uclibc/bfin-uclibc_svn.bb | 2 +- recipes/uclibc/uclibc-old.inc | 186 +++++++++++++++++++++++++++++++++++++ recipes/uclibc/uclibc.inc | 186 ------------------------------------- recipes/uclibc/uclibc_0.9.28.bb | 2 +- recipes/uclibc/uclibc_0.9.29.bb | 2 +- recipes/uclibc/uclibc_0.9.30.1.bb | 2 +- recipes/uclibc/uclibc_0.9.30.2.bb | 2 +- recipes/uclibc/uclibc_0.9.30.bb | 2 +- recipes/uclibc/uclibc_git.bb | 2 +- recipes/uclibc/uclibc_nptl.bb | 2 +- 10 files changed, 194 insertions(+), 194 deletions(-) create mode 100644 recipes/uclibc/uclibc-old.inc delete mode 100644 recipes/uclibc/uclibc.inc
recipes/uclibc/bfin-uclibc_svn.bb +1 -1
@@ -9,7 +9,7 @@ UCLIBC_BASE ?= "0.9.29" PV = "${UCLIBC_BASE}+svnr${SRCPV}" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES_append_bfin = " virtual/${TARGET_PREFIX}libc-for-gcc "
recipes/uclibc/uclibc-old.inc new file +186 -0
186 lines not on this page · raw message
recipes/uclibc/uclibc.inc deleted +0 -186
186 lines not on this page · raw message
recipes/uclibc/uclibc_0.9.28.bb +1 -1
@@ -1,4 +1,4 @@ -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" # This is the correct KERNEL_SOURCE location, if the uClibc
recipes/uclibc/uclibc_0.9.29.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.29" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.1.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.30.1" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.4" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.2.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.30.2" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.30" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.1" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_git.bb +1 -1
@@ -13,7 +13,7 @@ DEFAULT_PREFERENCE = "-1" #DEFAULT_PREFERENCE is 0 (empty), releases have a preference of 1 so take # precedence. -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_nptl.bb +1 -1
@@ -13,7 +13,7 @@ DEFAULT_PREFERENCE = "-1" #DEFAULT_PREFERENCE is 0 (empty), releases have a preference of 1 so take # precedence. -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
Signature · 1 line
1.7.0
cover uClibc recipe touchup
In reply to Khem RajHi,
This is whole series is an RFC.
I'd like to improve the recipe for uClibc a bit.
A few questions popped up, first and foremost how i can handle distro(?) features (see uclibc-arch.bbclass).
Thanks in advance for your comments && cheers,
Bernhard
Bernhard Reutner-Fischer (3):
uClibc: rename include file of old releases
sane-toolchain: add PREFERRED_UCLIBC_VERSION
uClibc: redo configuration
classes/uclibc-arch.bbclass | 109 +++++++++++ conf/distro/include/sane-toolchain-uclibc.inc | 7 + conf/distro/include/sane-toolchain.inc | 3 +- recipes/uclibc/bfin-uclibc_svn.bb | 2 +- recipes/uclibc/uclibc-initial_0.9.30.2.bb | 12 +- recipes/uclibc/uclibc-initial_git.bb | 9 +- recipes/uclibc/uclibc-initial_nptl.bb | 9 +- recipes/uclibc/uclibc-old.inc | 186 +++++++++++++++++++ recipes/uclibc/uclibc.inc | 240 ++++++++++++------------- recipes/uclibc/uclibc_0.9.28.bb | 2 +- recipes/uclibc/uclibc_0.9.29.bb | 2 +- recipes/uclibc/uclibc_0.9.30.1.bb | 2 +- recipes/uclibc/uclibc_0.9.30.bb | 2 +- recipes/uclibc/uclibc_git.bb | 1 - recipes/uclibc/uclibc_nptl.bb | 1 - 15 files changed, 437 insertions(+), 150 deletions(-) create mode 100644 classes/uclibc-arch.bbclass create mode 100644 recipes/uclibc/uclibc-old.inc
PATCH 2/3 sane-toolchain: add PREFERRED_UCLIBC_VERSION
In reply to Khem Raj--- conf/distro/include/sane-toolchain-uclibc.inc | 7 +++++++ conf/distro/include/sane-toolchain.inc | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-)
conf/distro/include/sane-toolchain-uclibc.inc +7 -0
@@ -15,6 +15,13 @@ USE_NLS_glib-2.0 = "yes" USE_NLS_glib-2.0-native = "yes" USE_NLS_gcc-cross = "no" +PREFERRED_VERSION_uclibc ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-initial ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-cross ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-cross-sdk ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-cross-initial ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-cross-intermediate ?= "${PREFERRED_UCLIBC_VERSION}" + #mess with compiler flags to use -Os instead of -O2 #Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
conf/distro/include/sane-toolchain.inc +1 -2
@@ -13,8 +13,7 @@ PREFERRED_VERSION_glibc ?= "2.10.1" PREFERRED_VERSION_glibc-initial ?= "2.10.1" PREFERRED_VERSION_eglibc ?= "2.10" PREFERRED_VERSION_eglibc-initial ?= "2.10" -PREFERRED_VERSION_uclibc ?= "0.9.30.1" -PREFERRED_VERSION_uclibc-initial ?= "0.9.30.1" +PREFERRED_UCLIBC_VERSION ?= "0.9.30.1" # Some systems need a special gcc version PREFERRED_GCC_VERSION_486sx ?= "4.3.2"
Signature · 1 line
1.7.0
Re: [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION
В сообщении от Пятница 12 марта 2010 20:46:31 автор Bernhard Reutner-Fischer написал:
Quoted 6 lines
Signed-off-by Bernhard Reutner-Fischer <[email protected]>--- conf/distro/include/sane-toolchain-uclibc.inc | 7 +++++++ conf/distro/include/sane-toolchain.inc | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-)
Signature · 3 lines
http://roman.khimov.ru mailto: [email protected] gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3
Re: [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION
Hello.
Quoted 10 lines · Roman I Khimov
В сообщении от Пятница 12 марта 2010 20:46:31 автор Bernhard Reutner-Fischer написал:
Quoted 6 lines
Signed-off-by Bernhard Reutner-Fischer <[email protected]>--- conf/distro/include/sane-toolchain-uclibc.inc | 7 +++++++ conf/distro/include/sane-toolchain.inc | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-)Acked-by Roman I Khimov <[email protected]>
Looks fine for me as well. Khem, Henning any comments from the uclibc side? (Askign because you two have ulibc as interest in the MAINTAINERS file)
regards
Stefan Schmidt
Re: [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION
Quoted 12 lines · Stefan Schmidt
Hello.
Quoted 9 lines · Roman I Khimov
В сообщении от Пятница 12 марта 2010 20:46:31 автор Bernhard Reutner-Fischer написал:
Quoted 6 lines
Signed-off-by Bernhard Reutner-Fischer <[email protected]>--- conf/distro/include/sane-toolchain-uclibc.inc | 7 +++++++ conf/distro/include/sane-toolchain.inc | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-)
Quoted 4 lines
Quoted 1 line
Acked-by Roman I Khimov <[email protected]>Looks fine for me as well. Khem, Henning any comments from the uclibc side? (Askign because you two have ulibc as interest in the
MAINTAINERSfile)
wasn't applied yet, AFAIR. Re-sending updated variant in this thread, fwiw.
PATCH 2/3 uclibc_git: keep PV at "git"
In reply to Khem RajWith this change, you can put PREFERRED_UCLIBC_VERSION="git" into your conf/local.conf once or set PREFERRED_VERSION_uclibc{*}="git" and need not adjust local.conf if the git revision was changed.
--- recipes/uclibc/uclibc_git.bb | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
recipes/uclibc/uclibc_git.bb +3 -3
@@ -7,14 +7,14 @@ # on whether the base patches apply to the selected (SRCDATE) svn release. # UCLIBC_BASE ?= "0.9.31" -SRCREV="94a99ff6131111381e7f803e10638ab547c40c2f" -PV = "${UCLIBC_BASE}+gitr${SRCREV}" +SRCREV="0ee65752ee4c023a70d134919ec7604273e46cdb" +PR_append = "+gitr${SRCPV}" DEFAULT_PREFERENCE = "-1" #DEFAULT_PREFERENCE is 0 (empty), releases have a preference of 1 so take # precedence. require uclibc.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc" #recent versions uclibc require real kernel headers
Signature · 1 line
1.7.1
PATCH 3/3 uClibc: redo configuration
In reply to Khem Raj--- classes/uclibc-arch.bbclass | 109 +++++++++++++++++ recipes/uclibc/uclibc-initial_0.9.30.2.bb | 12 +-- recipes/uclibc/uclibc-initial_git.bb | 9 +- recipes/uclibc/uclibc-initial_nptl.bb | 9 +- recipes/uclibc/uclibc.inc | 184 +++++++++++++++++++++++++++++ recipes/uclibc/uclibc_0.9.30.2.bb | 2 +- recipes/uclibc/uclibc_git.bb | 3 +- recipes/uclibc/uclibc_nptl.bb | 3 +- 8 files changed, 306 insertions(+), 25 deletions(-) create mode 100644 classes/uclibc-arch.bbclass create mode 100644 recipes/uclibc/uclibc.inc
classes/uclibc-arch.bbclass new file +109 -0
@@ -0,0 +1,109 @@ +# +# Set the ARCH environment variable for uClibc compilation. +# Return value must match one of the architectures known to uClibc: +# libc/sysdeps/*/* +# + +valid_archs = "\ +alpha \ +arm \ +avr32 \ +bfin \ +cris \ +e1 \ +frv \ +h8300 \ +hppa \ +i386 \ +i960 \ +ia64 \ +m68k \ +microblaze \ +mips \ +nios \ +nios2 \ +powerpc \ +sh \ +sh64 \ +sparc \ +v850 \ +vax \ +x86_64 \ +xtensa \ +" +def map_uclibc_arch(a, d): + """Return the uClibc architecture for the given TARGET_ARCH.""" + import re + + valid_archs = bb.data.getVar('valid_archs', d, 1).split() + + if re.match('^(arm|sa110).*', a): return 'arm' + elif re.match('^(i.86|athlon)$', a): return 'i386' + elif re.match('^mips.*', a): return 'mips' + elif re.match('^parisc.*', a): return 'hppa' + elif re.match('^ppc.*', a): return 'powerpc' + elif re.match('^s390.*', a): return 's390' + elif re.match('^sh.*', a): return 'sh' + elif re.match('^(sun|sparc).*', a): return 'sparc' + elif re.match('^xtensa.*', a): return 'xtensa' + elif a in valid_archs: return a + else: + bb.error("cannot map '%s' to a uClibc architecture" % a) + +export UCLIBC_ARCH = "${@map_uclibc_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}" + +def map_uclibc_abi(o, d): + """Return the uClibc ABI for the given TARGET_OS.""" + import re + + arch = bb.data.getVar('TARGET_ARCH', d, 1) + if map_uclibc_arch(bb.data.getVar('TARGET_ARCH', d, 1), d) == "arm": + if re.match('.*eabi$', o): return 'ARM_EABI' + else: return 'ARM_OABI' + # FIXME: This is inaccurate! Handle o32, n32, n64 + elif re.match('^mips.*64$', arch): return 'MIPS_N64_ABI' + elif re.match('^mips.*', arch): return 'MIPS_N32_ABI' + return "" + +export UCLIBC_ABI = "${@map_uclibc_abi(bb.data.getVar('TARGET_OS', d, 1), d)}" + +def map_uclibc_endian(a, d): + """Return the uClibc endianess for the given TARGET_ARCH.""" + import re + + # Always BE + if re.match('^(avr32|e1|frv|(parisc|hppa)|m68k|microblaze|powerpc.*|(sparc|sun).*)$', a): + return 'BIG' + # Possibly BE + elif re.match('^((arm|sa110|arm.*eb)|h8300.*eb|(parisc|hppa).*eb|mips|sh.*eb|xtensa.*eb)$', a): + return 'BIG' + return 'LITTLE' + +export UCLIBC_ENDIAN = "${@map_uclibc_endian(bb.data.getVar('TARGET_ARCH', d, 1), d)}" + +# internal helper +def uclibc_cfg(feature, features, tokens, cnf, rem): + if type(tokens) == type(""): + tokens = [tokens] + rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens]) + if type(features) == type([]) and feature in features: + cnf.extend([token + '=y' for token in tokens]) + else: + cnf.extend(['# ' + token + ' is not set' for token in tokens]) +# Map distro and machine features to config settings +def features_to_uclibc_settings(d): + cnf, rem = ([], []) + features = bb.data.getVar('DISTRO_FEATURES', d).split() + uclibc_cfg('ipv4', features, 'UCLIBC_HAS_IPV4', cnf, rem) + uclibc_cfg('ipv6', features, 'UCLIBC_HAS_IPV6', cnf, rem) + uclibc_cfg('nls', features, 'UCLIBC_HAS_LOCALE', cnf, rem) + uclibc_cfg('bx', features, 'USE_BX', cnf, rem) + return "\n".join(cnf), "\n".join(rem) +# X, Y = ${@features_to_uclibc_settings(d)} +# unfortunately doesn't seem to work with bitbake, workaround: +def features_to_uclibc_conf(d): + cnf, rem = features_to_uclibc_settings(d) + return cnf +def features_to_uclibc_del(d): + cnf, rem = features_to_uclibc_settings(d) + return rem
recipes/uclibc/uclibc-initial_0.9.30.2.bb +4 -8
@@ -7,19 +7,15 @@ PACKAGES = "" do_install() { # Install initial headers into the cross dir - make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ - install_headers + make PREFIX=${D} install_headers #ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include - # This conflicts with the c++ version of this header - rm -f ${D}${includedir}/bits/atomicity.h - install -d ${D}${libdir}/ - install -m 644 lib/crt[1in].o ${D}${libdir}/ - install -m 644 lib/libc.so ${D}${libdir}/ + install -d ${D}${layout_libdir}/ + install -m 644 lib/crt[1in].o lib/libc.so ${D}${layout_libdir}/ } do_compile () { - make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} \ lib/crt1.o lib/crti.o lib/crtn.o ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ -o lib/libc.so
recipes/uclibc/uclibc-initial_git.bb +3 -6
@@ -7,19 +7,16 @@ PACKAGES = "" do_install() { # Install initial headers into the cross dir - make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ install_headers #ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include - # This conflicts with the c++ version of this header - rm -f ${D}${includedir}/bits/atomicity.h install -d ${D}${libdir}/ - install -m 644 lib/crt[1in].o ${D}${libdir}/ - install -m 644 lib/libc.so ${D}${libdir}/ + install -m 644 lib/crt[1in].o lib/libc.so ${D}${libdir}/ } do_compile () { - make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ lib/crt1.o lib/crti.o lib/crtn.o ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ -o lib/libc.so
recipes/uclibc/uclibc-initial_nptl.bb +3 -6
@@ -7,19 +7,16 @@ PACKAGES = "" do_install() { # Install initial headers into the cross dir - make V=1 PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ install_headers #ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include - # This conflicts with the c++ version of this header - rm -f ${D}${includedir}/bits/atomicity.h install -d ${D}${libdir}/ - install -m 644 lib/crt[1in].o ${D}${libdir}/ - install -m 644 lib/libc.so ${D}${libdir}/ + install -m 644 lib/crt[1in].o lib/libc.so ${D}${libdir}/ } do_compile () { - make V=1 PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ lib/crt1.o lib/crti.o lib/crtn.o ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ -o lib/libc.so
recipes/uclibc/uclibc.inc new file +184 -0
184 lines not on this page · raw message
recipes/uclibc/uclibc_0.9.30.2.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.30.2" -require uclibc-old.inc +require uclibc.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_git.bb +1 -2
@@ -13,7 +13,7 @@ DEFAULT_PREFERENCE = "-1" #DEFAULT_PREFERENCE is 0 (empty), releases have a preference of 1 so take # precedence. -require uclibc-old.inc +require uclibc.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
@@ -26,7 +26,6 @@ FILESPATHPKG =. "uclibc-git:uclibc-${UCLIBC_BASE}:" KERNEL_SOURCE = "${CROSS_DIR}/${TARGET_SYS}" SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \ - ${@['${UCLIBC_LOCALE_URI}', ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']} \ file://uClibc.config \ file://uClibc.machine \ file://uClibc.distro \
recipes/uclibc/uclibc_nptl.bb +1 -2
@@ -13,7 +13,7 @@ DEFAULT_PREFERENCE = "-1" #DEFAULT_PREFERENCE is 0 (empty), releases have a preference of 1 so take # precedence. -require uclibc-old.inc +require uclibc.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
@@ -27,7 +27,6 @@ FILESPATHPKG =. "uclibc-nptl:uclibc-${UCLIBC_BASE}:" KERNEL_SOURCE = "${CROSS_DIR}/${TARGET_SYS}" SRC_URI = "git://uclibc.org/uClibc.git;protocol=git;branch=nptl \ - ${@['${UCLIBC_LOCALE_URI}', ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']} \ file://uClibc.config \ file://uClibc.machine \ file://uClibc.distro \
Signature · 1 line
1.7.0
Re: [PATCH 3/3] uClibc: redo configuration
В сообщении от Пятница 12 марта 2010 20:46:32 автор Bernhard Reutner-Fischer написал:
classes/uclibc-arch.bbclass line 101
Quoted 9 lines
classes/uclibc-arch.bbclass new file +9
-0+# Map distro and machine features to config settings +def features_to_uclibc_settings(d): + cnf, rem = ([], []) + features = bb.data.getVar('DISTRO_FEATURES', d).split() + uclibc_cfg('ipv4', features, 'UCLIBC_HAS_IPV4', cnf, rem) + uclibc_cfg('ipv6', features, 'UCLIBC_HAS_IPV6', cnf, rem) + uclibc_cfg('nls', features, 'UCLIBC_HAS_LOCALE', cnf, rem) + uclibc_cfg('bx', features, 'USE_BX', cnf, rem) + return "\n".join(cnf), "\n".join(rem)
Last time I've tried to do something similar in recipes it was considered as BAD (USE-flag like) thing. Although I'm fine with it.
But in general, I don't see how it makes life any easier. It adds logic to determine some of options, but then there are still lots of other ones. And they would still come through machine and distro config which would still be carried around and stored for each version. If this dynamic things somehow eliminated any need in those, than it would be excellent, but from what I see it's not the case and probably there is no way to sanely implement it.
What could make sense is to improve those static configs we have. From what I understand, most of machine config parts are not changing from version to version and even if they do, it should mostly be adding things, which should be harmless for old versions. So we can try to move this configs from uclibc-${PV}/ to files/ or uclibc/, so that they would be reused in all versions.
Distro configs do change between versions, but than there are not that much distros that care about uclibc and each of those could store their version of config if there is any need for that.
Quoted 15 lines
b/recipes/uclibc/uclibc-initial_git.bb index 00330e2..3a33bd8 100644
recipes/uclibc/uclibc-initial_git.bb +0
-3@@ -7,19 +7,16 @@ PACKAGES = "" do_install() { # Install initial headers into the cross dir - make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ install_headers #ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include - # This conflicts with the c++ version of this header - rm -f ${D}${includedir}/bits/atomicity.h install -d ${D}${libdir}/
.....
recipes/uclibc/uclibc-initial_git.bb
Quoted 3 lines
do_compile() {recipes/uclibc/uclibc-initial_git.bb +0
-1- make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
I guess these are things that just not needed with newer uClibc versions? If so, this would justify moving old uclibc.inc to uclibc-old.inc and adopting newer simpler uclibc.inc (with recipes clean up) IMO.
Signature · 3 lines
http://roman.khimov.ru mailto: [email protected] gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3
PATCH 3/3 busybox: picking IPv6 per default is not up to the package
In reply to Khem Raj--- recipes/busybox/busybox-1.15.3/micro/defconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
recipes/busybox/busybox-1.15.3/micro/defconfig +1 -1
@@ -608,7 +608,7 @@ CONFIG_TIME=y # # Networking Utilities # -CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_IPV6 is not set CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y # CONFIG_VERBOSE_RESOLUTION_ERRORS is not set # CONFIG_ARP is not set
Signature · 1 line
1.7.1
Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
recipes/busybox/busybox-1.15.3/micro/defconfig CONFIG_TIME=y · line 614
Quoted 13 lines · Bernhard Reutner-Fischer
recipes/busybox/busybox-1.15.3/micro/defconfig +1
-1@@ -608,7 +608,7 @@ CONFIG_TIME=y # # Networking Utilities # -CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_IPV6 is not set CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y # CONFIG_VERBOSE_RESOLUTION_ERRORS is not set # CONFIG_ARP is not set
This change doesn't look very desirable to me. What's the reason for it?
p.
Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
Quoted 17 lines · Phil Blundell
recipes/busybox/busybox-1.15.3/micro/defconfig CONFIG_TIME=y · line 614
Quoted 13 lines · Bernhard Reutner-Fischer
recipes/busybox/busybox-1.15.3/micro/defconfig +1
-1@@ -608,7 +608,7 @@ CONFIG_TIME=y # # Networking Utilities # -CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_IPV6 is not set CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y # CONFIG_VERBOSE_RESOLUTION_ERRORS is not set # CONFIG_ARP is not setThis change doesn't look very desirable to me. What's the reason for it?
As long as you don't have ipv6 in distro features somehow, ipv6 will not be available. See introductory message of this series.
Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
Quoted 19 lines · Bernhard Reutner-Fischer
Quoted 17 lines · Phil Blundell
recipes/busybox/busybox-1.15.3/micro/defconfig CONFIG_TIME=y · line 614
Quoted 13 lines · Bernhard Reutner-Fischer
recipes/busybox/busybox-1.15.3/micro/defconfig +1
-1@@ -608,7 +608,7 @@ CONFIG_TIME=y # # Networking Utilities # -CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_IPV6 is not set CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y # CONFIG_VERBOSE_RESOLUTION_ERRORS is not set # CONFIG_ARP is not setThis change doesn't look very desirable to me. What's the reason for it?
Quoted 2 lines
As long as you don't have ipv6 in distro features somehow, ipv6 will not be available. See introductory message of this series.
Ah, so you're saying that ipv6 is missing from micro's DISTRO_FEATURES? If that's the case then it's just a bug: presumably it's been harmless in the past because very few packages care about it. Irrespective of that, the intended behaviour is that micro should be IPv6-enabled and turning it off in busybox does not seem like a good idea.
Actually, a quick "grep -ri ipv6" in conf/distro didn't turn up any matches at all, so enabling IPv6 by DISTRO_FEATURES doesn't seem to be terribly well entrenched at the moment. If it were to be introduced then I suspect it would need to be a negative property (i.e. the feature would be "no ipv6") in order to not break all the existing distros.
p.
Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
Quoted 20 lines · Phil Blundell
Quoted 19 lines · Bernhard Reutner-Fischer
Quoted 17 lines · Phil Blundell
recipes/busybox/busybox-1.15.3/micro/defconfig CONFIG_TIME=y · line 614
Quoted 13 lines · Bernhard Reutner-Fischer
recipes/busybox/busybox-1.15.3/micro/defconfig +1
-1@@ -608,7 +608,7 @@ CONFIG_TIME=y # # Networking Utilities # -CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_IPV6 is not set CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y # CONFIG_VERBOSE_RESOLUTION_ERRORS is not set # CONFIG_ARP is not setThis change doesn't look very desirable to me. What's the reason for it?
Quoted 4 lines
Quoted 2 lines
As long as you don't have ipv6 in distro features somehow, ipv6 will not be available. See introductory message of this series.
Ah, so you're saying that ipv6 is missing from micro's
DISTRO_FEATURES?
yes, like from any other distro, and like ipv4 or nls etc..
Quoted 7 lines
If that's the case then it's just a bug: presumably it's been harmless in the past because very few packages care about it. Irrespective of that, the intended behaviour is that micro should be IPv6-enabled and turning it off in busybox does not seem like a good idea.
Actually, a quick "grep -ri ipv6" in conf/distro didn't turn up any matches at all
exactly. Thus my RFC for feature/dep handling heuristics.
Quoted 4 lines
so enabling IPv6 by
DISTRO_FEATURESdoesn't seem to be
terribly well entrenched at the moment. If it were to be introduced then I suspect it would need to be a negative property (i.e. the feature would be "no ipv6") in order to not break all the existing distros.
I disagree. Distros should be fixed to ask for or require a feature if they require it.
For a nice way to flag packages with HANDLED_FEATURES, see conversation with kergoth from today, around 18:00 UTC.
Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
Quoted 2 lines · Bernhard Reutner-Fischer
I disagree. Distros should be fixed to ask for or require a feature if they require it.
That's a legitimate and worthy goal, but I can't see that this patch really goes any way towards achieving it. As far as I can tell, busybox doesn't currently respect DISTRO_FEATURES anyway, so even if I did add ipv6 to that variable for micro (which I'm certainly happy to do) this patch would still cause busybox to be built without it.
If the file you were patching was a generic one, and the majority of distros didn't want ipv6, then I would probably have some sympathy with this patch. But in this particular case the file you are patching is entirely micro specific: nobody else will benefit from this change.
p.
PATCH 1/2 uclibc: handle DISTRO_FEATURE="largefile"
--- recipes/uclibc/uclibc-config.inc | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
recipes/uclibc/uclibc-config.inc +5 -4
@@ -95,10 +95,11 @@ def features_to_uclibc_settings(d): cnf, rem = ([], []) distro_features = bb.data.getVar('DISTRO_FEATURES', d).split() machine_features = bb.data.getVar('MACHINE_FEATURES', d).split() - uclibc_cfg('ipv4', distro_features, 'UCLIBC_HAS_IPV4', cnf, rem) - uclibc_cfg('ipv6', distro_features, 'UCLIBC_HAS_IPV6', cnf, rem) - uclibc_cfg('nls', distro_features, 'UCLIBC_HAS_LOCALE', cnf, rem) - uclibc_cfg('bx', machine_features, 'USE_BX', cnf, rem) + uclibc_cfg('ipv4', distro_features, 'UCLIBC_HAS_IPV4', cnf, rem) + uclibc_cfg('ipv6', distro_features, 'UCLIBC_HAS_IPV6', cnf, rem) + uclibc_cfg('largefile', distro_features, 'UCLIBC_HAS_LFS', cnf, rem) + uclibc_cfg('nls', distro_features, 'UCLIBC_HAS_LOCALE', cnf, rem) + uclibc_cfg('bx', machine_features,'USE_BX', cnf, rem) return "\n".join(cnf), "\n".join(rem) # X, Y = ${@features_to_uclibc_settings(d)} # unfortunately doesn't seem to work with bitbake, workaround:
Signature · 1 line
1.7.1
PATCH 2/2 busybox: configure according to {MACHINE, DISTRO}_FEATURES
In reply to Phil Blundell--- recipes/busybox/busybox-config.inc | 28 +++++++++++++++++++++++++ recipes/busybox/busybox.inc | 39 +++++++++++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 1 deletions(-) create mode 100644 recipes/busybox/busybox-config.inc
recipes/busybox/busybox-config.inc new file +28 -0
@@ -0,0 +1,28 @@ +# internal helper +def busybox_cfg(feature, features, tokens, cnf, rem): + if type(tokens) == type(""): + tokens = [tokens] + rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens]) + if type(features) == type([]) and feature in features: + cnf.extend([token + '=y' for token in tokens]) + else: + cnf.extend(['# ' + token + ' is not set' for token in tokens]) +# Map distro and machine features to config settings +def features_to_busybox_settings(d): + cnf, rem = ([], []) + distro_features = bb.data.getVar('DISTRO_FEATURES', d).split() + machine_features = bb.data.getVar('MACHINE_FEATURES', d).split() + busybox_cfg('ipv6', distro_features, 'CONFIG_FEATURE_IPV6', cnf, rem) + busybox_cfg('largefile', distro_features, 'CONFIG_LFS', cnf, rem) + busybox_cfg('nls', distro_features, 'CONFIG_LOCALE_SUPPORT', cnf, rem) + busybox_cfg('ipv4', distro_features, 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem) + busybox_cfg('ipv6', distro_features, 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem) + return "\n".join(cnf), "\n".join(rem) +# X, Y = ${@features_to_uclibc_settings(d)} +# unfortunately doesn't seem to work with bitbake, workaround: +def features_to_busybox_conf(d): + cnf, rem = features_to_busybox_settings(d) + return cnf +def features_to_busybox_del(d): + cnf, rem = features_to_busybox_settings(d) + return rem
recipes/busybox/busybox.inc +38 -1
@@ -11,7 +11,7 @@ LICENSE = "GPLv2" SECTION = "base" PRIORITY = "required" -INC_PR = "r29" +INC_PR = "r30" SRC_URI = "\ file://busybox-cron \
@@ -70,10 +70,47 @@ RDEPENDS_${PN}-udhcpd += "${PN}" LD = "${CC} -nostdlib" inherit cml1 update-rc.d +require busybox-config.inc + +configmangle = '/CROSS_COMPILER_PREFIX/d; \ + /CONFIG_EXTRA_CFLAGS/d; \ + ' +OE_FEATURES := "${@features_to_busybox_conf(d)}" +OE_DEL := "${@features_to_busybox_del(d)}" +DO_IPv4 := ${@base_contains('DISTRO_FEATURES', 'ipv4', 1, 0, d)} +DO_IPv6 := ${@base_contains('DISTRO_FEATURES', 'ipv6', 1, 0, d)} +python () { + if "${OE_DEL}": + bb.data.setVar('configmangle_append', "${OE_DEL}" + "\n", d) + if "${OE_FEATURES}": + bb.data.setVar('configmangle_append', + "/^### DISTRO FEATURES$/a\\\n%s\n\n" % + ("\\n".join((bb.data.expand("${OE_FEATURES}", d).split("\n")))), + d) + bb.data.setVar('configmangle_append', + "/^### CROSS$/a\\\n%s\n" % + ("\\n".join(["CONFIG_CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"", + "CONFIG_EXTRA_CFLAGS=\"${CFLAGS}\"" + ]) + ), + d) +} do_configure () { sed -e 's#@DATADIR@#${datadir}#g' \ < ${WORKDIR}/defconfig > ${S}/.config + for i in 'CROSS' 'DISTRO FEATURES'; do echo "### $i"; done >> \ + ${S}/.config + sed -i -e '${configmangle}' ${S}/.config + if test ${DO_IPv4} -eq 0 && test ${DO_IPv6} -eq 0; then + # disable networking applets + mv ${S}/.config ${S}/.config.oe-tmp + awk 'BEGIN{net=0} + /^# Networking Utilities/{net=1} + /^#$/{if(net){net=net+1}} + {if(net==2&&$0 !~ /^#/&&$1){print("# "$1" is not set")}else{print}}' \ + ${S}/.config.oe-tmp > ${S}/.config + fi cml1_do_configure }
Signature · 1 line
1.7.1
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 34 lines · Bernhard Reutner-Fischer
Signed-off-by Bernhard Reutner-Fischer <[email protected]>--- recipes/busybox/busybox-config.inc | 28 +++++++++++++++++++++++++ recipes/busybox/busybox.inc | 39 +++++++++++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 1 deletions(-) create mode 100644 recipes/busybox/busybox-config.increcipes/busybox/busybox-config.inc new file +9
-0@@ -0,0 +1,28 @@ +# internal helper +def busybox_cfg(feature, features, tokens, cnf, rem): + if type(tokens) == type(""): + tokens = [tokens] + rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens]) + if type(features) == type([]) and feature in features: + cnf.extend([token + '=y' for token in tokens]) + else: + cnf.extend(['# ' + token + ' is not set' for token intokens])
recipes/busybox/busybox-config.inc new file +6
-0+# Map distro and machine features to config settings +def features_to_busybox_settings(d): + cnf, rem = ([], []) + distro_features = bb.data.getVar('DISTRO_FEATURES', d).split() + machine_features = bb.data.getVar('MACHINE_FEATURES', d).split() + busybox_cfg('ipv6', distro_features, 'CONFIG_FEATURE_IPV6', cnf,rem)
recipes/busybox/busybox-config.inc new file +2
-0+ busybox_cfg('largefile', distro_features, 'CONFIG_LFS', cnf, rem) + busybox_cfg('nls', distro_features, 'CONFIG_LOCALE_SUPPORT', cnf,
Quoted 6 lines
rem)
+ busybox_cfg('ipv4',distro_features,
'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem)
+ busybox_cfg('ipv6',distro_features,
'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem)
Should this (ipv6 at least) use COMBINED_FEATURES, since it requires kernel/machine support for it to be useful, along with distro support?
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 2 lines · Chris Larson
Should this (ipv6 at least) use
COMBINED_FEATURES, since it requires kernel/machine support for it to be useful, along with distro support?
I don't think it's machine dependent in any meaningful way; there is, to my knowledge, no OE-supported hardware which is actually incapable of supporting ipv6. Any distro that wants to use it just needs to make sure that the kernel support is present (either built-in or as a module) on all the supported targets. In any case, most packages will cope gracefully with ipv6 being selected on in the configuration and then found to be absent at runtime.
If you start factoring MACHINE_FEATURES into that kind of decision then, logically, the package needs to have PACKAGE_ARCH=${MACHINE}. I don't think it would be a very good thing to start forcing packages down that path unnecessarily.
p.
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 12 lines · Phil Blundell
Quoted 2 lines · Chris Larson
Should this (ipv6 at least) use
COMBINED_FEATURES, since it requires kernel/machine support for it to be useful, along with distro support?I don't think it's machine dependent in any meaningful way; there is, to my knowledge, no OE-supported hardware which is actually incapable of supporting ipv6. Any distro that wants to use it just needs to make sure that the kernel support is present (either built-in or as a module) on all the supported targets. In any case, most packages will cope gracefully with ipv6 being selected on in the configuration and then found to be absent at runtime.
Quoted 4 lines
If you start factoring
MACHINE_FEATURESinto that kind of decision then, logically, the package needs to have PACKAGE_ARCH=${MACHINE}. I don't think it would be a very good thing to start forcing packages down that path unnecessarily.
Fair enough, that seems reasonable for this particular case. Now that you bring it up, we adjust package arch to machine when we use a machine specific file:// file, but maybe we need to teach it to check for references to MACHINE_FEATURES or COMBINED_FEATURES, somehow.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 6 lines · Chris Larson
Quoted 4 lines · Phil Blundell
If you start factoring
MACHINE_FEATURESinto that kind of decision then, logically, the package needs to have PACKAGE_ARCH=${MACHINE}. I don't think it would be a very good thing to start forcing packages down that path unnecessarily.
This is unavoidable for certain special setups, isn't it.
Quoted 6 lines
Fair enough, that seems reasonable for this particular case. Now that you bring it up, we adjust package arch to machine when we use a machine specific file:// file, but maybe we need to teach it to check for references to
MACHINE_FEATURESorCOMBINED_FEATURES, somehow.
Both mmu and floatingpoint will need to look at COMBINED_FEATURES. At least for mmu vs. !mmu PACKAGE_ARCH=${MACHINE} is unavoidable, no?
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 2 lines · Bernhard Reutner-Fischer
Both mmu and floatingpoint will need to look at
COMBINED_FEATURES. At least for mmu vs. !mmu PACKAGE_ARCH=${MACHINE} is unavoidable, no?
I think both of those are more of a distro than a machine feature, really. I imagine that existing distros which are only interested in (i.e. only build for) MMU-equipped targets will not be very thrilled if their libc and/or other packages suddenly become MACHINE-specific.
p.
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 8 lines · Phil Blundell
Quoted 2 lines · Bernhard Reutner-Fischer
Both mmu and floatingpoint will need to look at
COMBINED_FEATURES. At least for mmu vs. !mmu PACKAGE_ARCH=${MACHINE} is unavoidable, no?I think both of those are more of a distro than a machine feature, really. I imagine that existing distros which are only interested in (i.e. only build for) MMU-equipped targets will not be very thrilled if their libc and/or other packages suddenly become MACHINE-specific.
If the machine does not provide a choice to use or not use the MMU then it makes no sense to take that into account for the package arch (think bfin or i586 or certain coldfires/m68k), yes. If, OTOH, a machine supports it (let's say ppc) then there must at least be a nice way to distinguish ppc<endian><mmu><floatingpoint> i would have hoped.
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 5 lines · Bernhard Reutner-Fischer
If the machine does not provide a choice to use or not use the MMU then it makes no sense to take that into account for the package arch (think bfin or i586 or certain coldfires/m68k), yes. If, OTOH, a machine supports it (let's say ppc) then there must at least be a nice way to distinguish ppc<endian><mmu><floatingpoint> i would have hoped.
Endianness and FPU are clearly both part of the general ABI: virtually every package which contains compiled code is going to have a dependency on those two settings. So, for DISTROs which support multiple values for either of those options, I would expect them to simply be encoded into the default PACKAGE_ARCH (either directly or via TARGET_ARCH); this is indeed what's already done with bi-endian ARM for example. For DISTROs which only support one or the other, there's no need to draw the distinction.
MMU is perhaps a little more complicated since, at least in theory, one could imagine a DISTRO which supported both MMU-equipped and non-MMU hardware and where the majority of binaries were capable of running on both targets. So in that case there might be a legitimate argument for making it be a per-package setting in order to get parallel builds of those packages that do actually care. But I think the time to worry about that would be when the situation does actually arise in practice.
p.
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 7 lines · Phil Blundell
Quoted 5 lines · Bernhard Reutner-Fischer
If the machine does not provide a choice to use or not use the MMU then it makes no sense to take that into account for the package arch (think bfin or i586 or certain coldfires/m68k), yes. If, OTOH, a machine supports it (let's say ppc) then there must at least be a nice way to distinguish ppc<endian><mmu><floatingpoint> i would have hoped.
Quoted 8 lines
Endianness and FPU are clearly both part of the general ABI: virtually every package which contains compiled code is going to have a dependency on those two settings. So, for DISTROs which support multiple values for either of those options, I would expect them to simply be encoded into the default
PACKAGE_ARCH(either directly or viaTARGET_ARCH); this is indeed what's already done with bi-endian ARM for example. For DISTROs which only support one or the other, there's no need to draw the distinction.
ok, i see.
Quoted 8 lines
MMU is perhaps a little more complicated since, at least in theory, one could imagine a DISTRO which supported both MMU-equipped and non-MMU hardware and where the majority of binaries were capable of running on both targets. So in that case there might be a legitimate argument for making it be a per-package setting in order to get parallel builds of those packages that do actually care. But I think the time to worry about that would be when the situation does actually arise in practice.
fair enough
I hereby mass-ping the patches in this thread:
[PATCH 1/3] uClibc: redo configuration
{1/2 was already applied by khem, thanks!}
[PATCH 3/3] busybox: picking IPv6 per default is not up to the package [PATCH 1/2] uclibc: handle DISTRO_FEATURE="largefile" [PATCH 2/2] busybox: configure according to {MACHINE,DISTRO}_FEATURES
ping**2 [was: Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES]
Quoted 27 lines · Bernhard Reutner-Fischer
Quoted 7 lines · Phil Blundell
Quoted 5 lines · Bernhard Reutner-Fischer
If the machine does not provide a choice to use or not use the MMU then it makes no sense to take that into account for the package arch (think bfin or i586 or certain coldfires/m68k), yes. If, OTOH, a machine supports it (let's say ppc) then there must at least be a nice way to distinguish ppc<endian><mmu><floatingpoint> i would have hoped.
Quoted 8 lines
Endianness and FPU are clearly both part of the general ABI: virtually every package which contains compiled code is going to have a dependency on those two settings. So, for DISTROs which support multiple values for either of those options, I would expect them to simply be encoded into the default
PACKAGE_ARCH(either directly or viaTARGET_ARCH); this is indeed what's already done with bi-endian ARM for example. For DISTROs which only support one or the other, there's no need to draw the distinction.ok, i see.
Quoted 8 lines
MMU is perhaps a little more complicated since, at least in theory, one could imagine a DISTRO which supported both MMU-equipped and non-MMU hardware and where the majority of binaries were capable of running on both targets. So in that case there might be a legitimate argument for making it be a per-package setting in order to get parallel builds of those packages that do actually care. But I think the time to worry about that would be when the situation does actually arise in practice.
Quoted 8 lines
fair enough
I hereby mass-ping the patches in this thread:
[PATCH 1/3] uClibc: redo configuration
{2/3 was already applied by khem, thanks!}
[PATCH 3/3] busybox: picking IPv6 per default is not up to the package [PATCH 1/2] uclibc: handle DISTRO_FEATURE="largefile" [PATCH 2/2] busybox: configure according to {MACHINE,DISTRO}_FEATURES
ping**2
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
In reply to Chris LarsonQuoted 20 lines · Chris Larson
Quoted 12 lines · Phil Blundell
Quoted 2 lines · Chris Larson
Should this (ipv6 at least) use
COMBINED_FEATURES, since it requires kernel/machine support for it to be useful, along with distro support?I don't think it's machine dependent in any meaningful way; there is, to my knowledge, no OE-supported hardware which is actually incapable of supporting ipv6. Any distro that wants to use it just needs to make sure that the kernel support is present (either built-in or as a module) on all the supported targets. In any case, most packages will cope gracefully with ipv6 being selected on in the configuration and then found to be absent at runtime.
Quoted 4 lines
If you start factoring
MACHINE_FEATURESinto that kind of decision then, logically, the package needs to have PACKAGE_ARCH=${MACHINE}. I don't think it would be a very good thing to start forcing packages down that path unnecessarily.
Quoted 4 lines
Fair enough, that seems reasonable for this particular case. Now that you bring it up, we adjust package arch to machine when we use a machine specific file:// file, but maybe we need to teach it to check for references to
MACHINE_FEATURESorCOMBINED_FEATURES, somehow.
will it force recompile then if I choose a similar arch but different machine say (qemuarm, osk5912 both are armv5te)
Quoted 11 lines
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 21 lines · Khem Raj
Quoted 20 lines · Chris Larson
Quoted 16 lines · Phil Blundell
Quoted 2 lines · Chris Larson
Should this (ipv6 at least) use
COMBINED_FEATURES, since it requires kernel/machine support for it to be useful, along with distro support?I don't think it's machine dependent in any meaningful way; there is, to my knowledge, no OE-supported hardware which is actually incapable of supporting ipv6. Any distro that wants to use it just needs to make sure that the kernel support is present (either built-in or as a module) on all the supported targets. In any case, most packages will cope gracefully with ipv6 being selected on in the configuration and then found to be absent at runtime.
If you start factoring
MACHINE_FEATURESinto that kind of decision then, logically, the package needs to have PACKAGE_ARCH=${MACHINE}. I don't think it would be a very good thing to start forcing packages down that path unnecessarily.
Quoted 7 lines
Quoted 4 lines
Fair enough, that seems reasonable for this particular case. Now that you bring it up, we adjust package arch to machine when we use a machine specific file:// file, but maybe we need to teach it to check for references to
MACHINE_FEATURESorCOMBINED_FEATURES, somehow.will it force recompile then if I choose a similar arch but different machine say (qemuarm, osk5912 both are armv5te)
No, unless you end up with
- different tune-*.inc
- mmu/nommu or floatingpoint support
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
In reply to Phil BlundellQuoted 8 lines · Phil Blundell
Quoted 2 lines · Chris Larson
Should this (ipv6 at least) use
COMBINED_FEATURES, since it requires kernel/machine support for it to be useful, along with distro support?I don't think it's machine dependent in any meaningful way; there is, to my knowledge, no OE-supported hardware which is actually incapable of supporting ipv6. Any distro that wants to use it just needs to make sure that the kernel support is present (either built-in or as a module)
the kernel configury should also look whether it should enable socket/ipv4/ipv6 or any combination.
There are quite some packages out there who can be configured with --disable-ipv6 ¹) and these should probably also honor the distro's ipv6 choice, for example.
I think it would also be good to put USE_NLS into DISTRO_FEATURES as "nls" like it was done for busybox and uclibc, yes?
¹) bind, mutt, libpcap, iptables, net-snmp, lighttpd, tcpdump, python, quagga come to mind, to name just a few. Not sure if all of them detect this properly so i tend to turn it off via configure.
Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Quoted 5 lines · Bernhard Reutner-Fischer
the kernel configury should also look whether it should enable socket/ipv4/ipv6 or any combination.
There are quite some packages out there who can be configured with --disable-ipv6 ¹) and these should probably also honor the distro's ipv6 choice, for example.
Yes, agreed.
Quoted 2 lines
I think it would also be good to put
USE_NLSintoDISTRO_FEATURESas "nls" like it was done for busybox and uclibc, yes?
Sounds OK to me, yeah.
p.
cover uClibc configury touchup; RFC WRT feature/dep picking heuristics
In reply to Khem RajHi,
These are independent.
1) uClibc: redo configuration
improve configury of uClibc
2) uclibc_git: keep PV at "git"
convenience
3) busybox: picking IPv6 per default is not up to the package first, busybox needs a better configury, like it's done for uclibc in 1).
Second, who picks features and with what preference? packages? user? distro? machine? See FIXME in 1).
This patchlet works around the real issue. Comments on how to tackle the underlying issue (or how it's solved elsewhere if it already is, i didn't see where/how ?) are _very_ welcome.
please install && cheers,
Bernhard Reutner-Fischer (3):
uClibc: redo configuration
uclibc_git: keep PV at "git"
busybox: picking IPv6 per default is not up to the package
conf/distro/include/sane-toolchain-uclibc.inc | 7 + conf/distro/include/sane-toolchain.inc | 3 +- conf/distro/include/uclibc.inc | 8 + recipes/busybox/busybox-1.15.3/micro/defconfig | 2 +- recipes/uclibc/bfin-uclibc_svn.bb | 2 +- recipes/uclibc/uclibc-config.inc | 110 +++++++++++ recipes/uclibc/uclibc-initial_0.9.30.2.bb | 12 +- recipes/uclibc/uclibc-initial_0.9.30.bb | 5 +- recipes/uclibc/uclibc-initial_git.bb | 6 +- recipes/uclibc/uclibc-old.inc | 186 ++++++++++++++++++ recipes/uclibc/uclibc.inc | 246 ++++++++++++------------ recipes/uclibc/uclibc_0.9.28.bb | 2 +- recipes/uclibc/uclibc_0.9.29.bb | 2 +- recipes/uclibc/uclibc_0.9.30.1.bb | 2 +- recipes/uclibc/uclibc_0.9.30.bb | 2 +- recipes/uclibc/uclibc_git.bb | 7 +- 16 files changed, 448 insertions(+), 154 deletions(-) create mode 100644 recipes/uclibc/uclibc-config.inc create mode 100644 recipes/uclibc/uclibc-old.inc
RFC feature/dep picking heuristics
Quoted 6 lines · Bernhard Reutner-Fischer
Hi,
These are independent.
1) uClibc: redo configuration
improve configury of uClibc
[]
Quoted 8 lines
3) busybox: picking IPv6 per default is not up to the package first, busybox needs a better configury, like it's done for uclibc in 1).
Second, who picks features and with what preference? packages? user? distro? machine? See FIXME in 1).
This patchlet works around the real issue. Comments on how to tackle the underlying issue (or how it's solved elsewhere if it already is, i didn't see where/how ?) are _very_ welcome.
that FIXME in 1) reads:
index ee18fc8..b40fbf5 100644
conf/distro/include/uclibc.inc +8 -0
@@ -9,3 +9,11 @@ PREFERRED_PROVIDER_virtual/libintl_avr32 = "proxy-libintl" PREFERRED_PROVIDER_virtual/libc = "uclibc" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "uclibc-initial" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "uclibc" + +# libc settings +DISTRO_FEATURES += "${@['', ' +nls'][bb.data.getVar('ENABLE_BINARY_LOCALE_GENERATION', d, 1) == '1']}" +MACHINE_FEATURES += "${@['', ' bx'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) +== 'thumb']}" +# FIXME: We enable IPv4 per default to avoid alot of breakage. +# FIXME: Figure out an acceptable way to negotiate either
+# FIXME: desired features or hard requirements, either top-down or bottom-up. +DISTRO_FEATURES += " ipv4"
Problem description:
[all of the following is rather obvious, please accept my apologies for being redundant and possibly not 100% accurate to keep this brief]
Two realms: Hardware / Software
Both of them provide optional features or impose hard constraints on the setup.
I) hardware/kernel/libc
Think arm thumb interworking bx or not any or all of them.
libc can use BX or fallback but only for thumb and for some -mtune's (IIRC).
networking.
- none
- socket
- ipv4 (requires socket)
- ipv6 (requires socket)
- ipv4 || ipv6
nls.
- locales to generate (GLIBC_GENERATE_LOCALES; uclibc can use the same)
- several other options, namely wchar (think mc or mutt -- if forgot which one -- which requires wchar if not patched)
II) packages
consider micro-base-image for libc=uclibc
consider recipes are equipped with HANDLE_FEATURE (big TODO, RFC). assume HANDLE_FEATURE is auto-filled off configure.ac for the most
part.
that one selects sysvinit (bug per se but no relevant for now) sysvinit uses inet_ntoa() or something to that effect
unconditionally -> not buildable since not base_contains HANDLE_FEATURE ipv4
Now my question is:
How can i fit a set of requirements to a set of config options that make up a system (ideally without changing anything)?
If i have to change something, how should the decision-flow look like to weight constraints against possibly provided features? What's the precedence of the following parts:
o HW hard constraints
o HW soft constraints (optional features)
o kernel/Lowlevel hard constraints
o kernel/Lowlevel soft constraints (optional features)
o libc hard constraints (unconfigurable vs. configurable)
o libc soft constraints (optional features)
o package hard constraints (sysvinit requires ipv4)
o package soft constraints (optional features, like iptables/busybox ipv6)
TIA for clarifications or pointers to existing docs covering OE in this respect && cheers,
PATCH 1/3 uClibc: redo configuration
In reply to Khem Raj--- conf/distro/include/sane-toolchain-uclibc.inc | 7 + conf/distro/include/sane-toolchain.inc | 3 +- conf/distro/include/uclibc.inc | 8 + recipes/uclibc/bfin-uclibc_svn.bb | 2 +- recipes/uclibc/uclibc-config.inc | 110 +++++++++++ recipes/uclibc/uclibc-initial_0.9.30.2.bb | 12 +- recipes/uclibc/uclibc-initial_0.9.30.bb | 5 +- recipes/uclibc/uclibc-initial_git.bb | 6 +- recipes/uclibc/uclibc-old.inc | 186 +++++++++++++++++++ recipes/uclibc/uclibc.inc | 246 ++++++++++++------------- recipes/uclibc/uclibc_0.9.28.bb | 2 +- recipes/uclibc/uclibc_0.9.29.bb | 2 +- recipes/uclibc/uclibc_0.9.30.1.bb | 2 +- recipes/uclibc/uclibc_0.9.30.bb | 2 +- recipes/uclibc/uclibc_git.bb | 1 - 15 files changed, 444 insertions(+), 150 deletions(-) create mode 100644 recipes/uclibc/uclibc-config.inc create mode 100644 recipes/uclibc/uclibc-old.inc
conf/distro/include/sane-toolchain-uclibc.inc +7 -0
@@ -14,6 +14,13 @@ USE_NLS ?= "no" USE_NLS_glib-2.0-native = "yes" USE_NLS_gcc-cross = "no" +PREFERRED_VERSION_uclibc ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-initial ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-cross ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-cross-sdk ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-cross-initial ?= "${PREFERRED_UCLIBC_VERSION}" +PREFERRED_VERSION_uclibc-cross-intermediate ?= "${PREFERRED_UCLIBC_VERSION}" + #mess with compiler flags to use -Os instead of -O2 #Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
conf/distro/include/sane-toolchain.inc +1 -2
@@ -13,8 +13,7 @@ PREFERRED_VERSION_glibc ?= "2.10.1" PREFERRED_VERSION_glibc-initial ?= "2.10.1" PREFERRED_VERSION_eglibc ?= "2.11" PREFERRED_VERSION_eglibc-initial ?= "2.11" -PREFERRED_VERSION_uclibc ?= "0.9.30.1" -PREFERRED_VERSION_uclibc-initial ?= "0.9.30.1" +PREFERRED_UCLIBC_VERSION ?= "0.9.31" # Some systems need a special gcc version PREFERRED_GCC_VERSION_486sx ?= "4.3.2"
conf/distro/include/uclibc.inc +8 -0
@@ -9,3 +9,11 @@ PREFERRED_PROVIDER_virtual/libintl_avr32 = "proxy-libintl" PREFERRED_PROVIDER_virtual/libc = "uclibc" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "uclibc-initial" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "uclibc" + +# libc settings +DISTRO_FEATURES += "${@['', ' nls'][bb.data.getVar('ENABLE_BINARY_LOCALE_GENERATION', d, 1) == '1']}" +MACHINE_FEATURES += "${@['', ' bx'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" +# FIXME: We enable IPv4 per default to avoid alot of breakage. +# FIXME: Figure out an acceptable way to negotiate either +# FIXME: desired features or hard requirements, either top-down or bottom-up. +DISTRO_FEATURES += " ipv4"
recipes/uclibc/bfin-uclibc_svn.bb +1 -1
@@ -9,7 +9,7 @@ UCLIBC_BASE ?= "0.9.29" PV = "${UCLIBC_BASE}+svnr${SRCPV}" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" SRCREV = "1857" PROVIDES_append_bfin = " virtual/${TARGET_PREFIX}libc-for-gcc "
recipes/uclibc/uclibc-config.inc new file +110 -0
110 lines not on this page · raw message
recipes/uclibc/uclibc-initial_0.9.30.2.bb +4 -8
@@ -7,19 +7,15 @@ PACKAGES = "" do_install() { # Install initial headers into the cross dir - make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ - install_headers + make PREFIX=${D} install_headers #ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include - # This conflicts with the c++ version of this header - rm -f ${D}${includedir}/bits/atomicity.h - install -d ${D}${libdir}/ - install -m 644 lib/crt[1in].o ${D}${libdir}/ - install -m 644 lib/libc.so ${D}${libdir}/ + install -d ${D}${layout_libdir}/ + install -m 644 lib/crt[1in].o lib/libc.so ${D}${layout_libdir}/ } do_compile () { - make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} \ lib/crt1.o lib/crti.o lib/crtn.o ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ -o lib/libc.so
recipes/uclibc/uclibc-initial_0.9.30.bb +1 -4
@@ -12,11 +12,8 @@ do_install() { #ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include - # This conflicts with the c++ version of this header - rm -f ${D}${includedir}/bits/atomicity.h install -d ${D}${libdir}/ - install -m 644 lib/crt[1in].o ${D}${libdir}/ - install -m 644 lib/libc.so ${D}${libdir}/ + install -m 644 lib/crt[1in].o lib/libc.so ${D}${libdir}/ } do_compile () {
recipes/uclibc/uclibc-initial_git.bb +2 -4
@@ -7,19 +7,17 @@ PACKAGES = "" do_install() { # Install initial headers into the cross dir - make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ install_headers #ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include - # This conflicts with the c++ version of this header - rm -f ${D}${includedir}/bits/atomicity.h install -d ${D}${libdir}/ install -m 644 lib/crt[1in].o ${D}${libdir}/ install -m 755 lib/lib[cm].so ${D}${libdir}/ } do_compile () { - make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ + make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ lib/crt1.o lib/crti.o lib/crtn.o ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ -o lib/libc.so
recipes/uclibc/uclibc-old.inc new file +186 -0
186 lines not on this page · raw message
recipes/uclibc/uclibc.inc +120 -126
298 lines not on this page · raw message
recipes/uclibc/uclibc_0.9.28.bb +1 -1
@@ -1,4 +1,4 @@ -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" # This is the correct KERNEL_SOURCE location, if the uClibc
recipes/uclibc/uclibc_0.9.29.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.29" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.0" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.1.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.30.1" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.4" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_0.9.30.bb +1 -1
@@ -8,7 +8,7 @@ # UCLIBC_BASE ?= "0.9.30" -require uclibc.inc +require uclibc-old.inc PR = "${INC_PR}.1" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
recipes/uclibc/uclibc_git.bb +0 -1
@@ -26,7 +26,6 @@ FILESPATHPKG =. "uclibc-git:uclibc-${UCLIBC_BASE}:" KERNEL_SOURCE = "${CROSS_DIR}/${TARGET_SYS}" SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \ - ${@['${UCLIBC_LOCALE_URI}', ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']} \ file://uClibc.config \ file://uClibc.machine \ file://uClibc.distro \
Signature · 1 line
1.7.1