* [RFC, PATCH 0/3] uClibc recipe touchup
2010-02-22 5:54 ` Khem Raj
@ 2010-03-12 17:46 ` Bernhard Reutner-Fischer
2010-03-12 17:46 ` [PATCH 1/3] uClibc: rename include file of old releases Bernhard Reutner-Fischer
` (6 subsequent siblings)
7 siblings, 0 replies; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-03-12 17:46 UTC (permalink / raw)
To: openembedded-devel
Hi,
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
^ permalink raw reply [flat|nested] 35+ messages in thread* [PATCH 1/3] uClibc: rename include file of old releases
2010-02-22 5:54 ` Khem Raj
2010-03-12 17:46 ` [RFC, PATCH 0/3] uClibc recipe touchup Bernhard Reutner-Fischer
@ 2010-03-12 17:46 ` Bernhard Reutner-Fischer
2010-03-12 17:46 ` [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION Bernhard Reutner-Fischer
` (5 subsequent siblings)
7 siblings, 0 replies; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-03-12 17:46 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
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
diff --git a/recipes/uclibc/bfin-uclibc_svn.bb b/recipes/uclibc/bfin-uclibc_svn.bb
index 80efd26..2d5c90a 100644
--- a/recipes/uclibc/bfin-uclibc_svn.bb
+++ b/recipes/uclibc/bfin-uclibc_svn.bb
@@ -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 "
diff --git a/recipes/uclibc/uclibc-old.inc b/recipes/uclibc/uclibc-old.inc
new file mode 100644
index 0000000..a2332e9
--- /dev/null
+++ b/recipes/uclibc/uclibc-old.inc
@@ -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`)
+}
diff --git a/recipes/uclibc/uclibc.inc b/recipes/uclibc/uclibc.inc
deleted file mode 100644
index a2332e9..0000000
--- a/recipes/uclibc/uclibc.inc
+++ /dev/null
@@ -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`)
-}
diff --git a/recipes/uclibc/uclibc_0.9.28.bb b/recipes/uclibc/uclibc_0.9.28.bb
index 2e90939..a6cb491 100644
--- a/recipes/uclibc/uclibc_0.9.28.bb
+++ b/recipes/uclibc/uclibc_0.9.28.bb
@@ -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
diff --git a/recipes/uclibc/uclibc_0.9.29.bb b/recipes/uclibc/uclibc_0.9.29.bb
index 1679ada..c1d7ee0 100644
--- a/recipes/uclibc/uclibc_0.9.29.bb
+++ b/recipes/uclibc/uclibc_0.9.29.bb
@@ -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"
diff --git a/recipes/uclibc/uclibc_0.9.30.1.bb b/recipes/uclibc/uclibc_0.9.30.1.bb
index 47b44cd..73346fd 100644
--- a/recipes/uclibc/uclibc_0.9.30.1.bb
+++ b/recipes/uclibc/uclibc_0.9.30.1.bb
@@ -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"
diff --git a/recipes/uclibc/uclibc_0.9.30.2.bb b/recipes/uclibc/uclibc_0.9.30.2.bb
index 703b5cd..a772e2a 100644
--- a/recipes/uclibc/uclibc_0.9.30.2.bb
+++ b/recipes/uclibc/uclibc_0.9.30.2.bb
@@ -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"
diff --git a/recipes/uclibc/uclibc_0.9.30.bb b/recipes/uclibc/uclibc_0.9.30.bb
index 9278299..15e8675 100644
--- a/recipes/uclibc/uclibc_0.9.30.bb
+++ b/recipes/uclibc/uclibc_0.9.30.bb
@@ -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"
diff --git a/recipes/uclibc/uclibc_git.bb b/recipes/uclibc/uclibc_git.bb
index 4ac1b89..26339f5 100644
--- a/recipes/uclibc/uclibc_git.bb
+++ b/recipes/uclibc/uclibc_git.bb
@@ -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"
diff --git a/recipes/uclibc/uclibc_nptl.bb b/recipes/uclibc/uclibc_nptl.bb
index cd67c6a..c7cbd00 100644
--- a/recipes/uclibc/uclibc_nptl.bb
+++ b/recipes/uclibc/uclibc_nptl.bb
@@ -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"
--
1.7.0
^ permalink raw reply related [flat|nested] 35+ messages in thread* [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION
2010-02-22 5:54 ` Khem Raj
2010-03-12 17:46 ` [RFC, PATCH 0/3] uClibc recipe touchup Bernhard Reutner-Fischer
2010-03-12 17:46 ` [PATCH 1/3] uClibc: rename include file of old releases Bernhard Reutner-Fischer
@ 2010-03-12 17:46 ` Bernhard Reutner-Fischer
2010-04-05 19:49 ` Roman I Khimov
2010-03-12 17:46 ` [PATCH 3/3] uClibc: redo configuration Bernhard Reutner-Fischer
` (4 subsequent siblings)
7 siblings, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-03-12 17:46 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
conf/distro/include/sane-toolchain-uclibc.inc | 7 +++++++
conf/distro/include/sane-toolchain.inc | 3 +--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/conf/distro/include/sane-toolchain-uclibc.inc b/conf/distro/include/sane-toolchain-uclibc.inc
index 3069820..d22cd3c 100644
--- a/conf/distro/include/sane-toolchain-uclibc.inc
+++ b/conf/distro/include/sane-toolchain-uclibc.inc
@@ -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"
diff --git a/conf/distro/include/sane-toolchain.inc b/conf/distro/include/sane-toolchain.inc
index daa2def..7d561fe 100644
--- a/conf/distro/include/sane-toolchain.inc
+++ b/conf/distro/include/sane-toolchain.inc
@@ -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"
--
1.7.0
^ permalink raw reply related [flat|nested] 35+ messages in thread* Re: [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION
2010-03-12 17:46 ` [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION Bernhard Reutner-Fischer
@ 2010-04-05 19:49 ` Roman I Khimov
2010-04-08 9:30 ` Stefan Schmidt
0 siblings, 1 reply; 35+ messages in thread
From: Roman I Khimov @ 2010-04-05 19:49 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: Text/Plain, Size: 548 bytes --]
В сообщении от Пятница 12 марта 2010 20:46:31 автор Bernhard Reutner-Fischer
написал:
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
> ---
> 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 <khimov@altell.ru>
--
http://roman.khimov.ru
mailto: roman@khimov.ru
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION
2010-04-05 19:49 ` Roman I Khimov
@ 2010-04-08 9:30 ` Stefan Schmidt
2010-06-09 17:11 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 35+ messages in thread
From: Stefan Schmidt @ 2010-04-08 9:30 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 690 bytes --]
Hello.
On Mon, 2010-04-05 at 23:49, Roman I Khimov wrote:
> В сообщении от Пятница 12 марта 2010 20:46:31 автор Bernhard Reutner-Fischer
> написал:
> > Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
> > ---
> > 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 <khimov@altell.ru>
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 258 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION
2010-04-08 9:30 ` Stefan Schmidt
@ 2010-06-09 17:11 ` Bernhard Reutner-Fischer
0 siblings, 0 replies; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-09 17:11 UTC (permalink / raw)
To: openembedded-devel
On Thu, Apr 08, 2010 at 11:30:14AM +0200, Stefan Schmidt wrote:
>Hello.
>
>On Mon, 2010-04-05 at 23:49, Roman I Khimov wrote:
>> В сообщении от Пятница 12 марта 2010 20:46:31 автор Bernhard Reutner-Fischer
>> написал:
>> > Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
>> > ---
>> > 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 <khimov@altell.ru>
>
>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)
wasn't applied yet, AFAIR. Re-sending updated variant in this thread,
fwiw.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 3/3] uClibc: redo configuration
2010-02-22 5:54 ` Khem Raj
` (2 preceding siblings ...)
2010-03-12 17:46 ` [PATCH 2/3] sane-toolchain: add PREFERRED_UCLIBC_VERSION Bernhard Reutner-Fischer
@ 2010-03-12 17:46 ` Bernhard Reutner-Fischer
2010-04-05 20:22 ` Roman I Khimov
2010-06-09 17:10 ` [PATCH 0/3] uClibc configury touchup; RFC WRT feature/dep picking heuristics Bernhard Reutner-Fischer
` (3 subsequent siblings)
7 siblings, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-03-12 17:46 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
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
diff --git a/classes/uclibc-arch.bbclass b/classes/uclibc-arch.bbclass
new file mode 100644
index 0000000..f097ff6
--- /dev/null
+++ b/classes/uclibc-arch.bbclass
@@ -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
diff --git a/recipes/uclibc/uclibc-initial_0.9.30.2.bb b/recipes/uclibc/uclibc-initial_0.9.30.2.bb
index a9fa146..d00cb38 100644
--- a/recipes/uclibc/uclibc-initial_0.9.30.2.bb
+++ b/recipes/uclibc/uclibc-initial_0.9.30.2.bb
@@ -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
diff --git a/recipes/uclibc/uclibc-initial_git.bb b/recipes/uclibc/uclibc-initial_git.bb
index 00330e2..3a33bd8 100644
--- a/recipes/uclibc/uclibc-initial_git.bb
+++ b/recipes/uclibc/uclibc-initial_git.bb
@@ -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
diff --git a/recipes/uclibc/uclibc-initial_nptl.bb b/recipes/uclibc/uclibc-initial_nptl.bb
index a7c079b..a2af017 100644
--- a/recipes/uclibc/uclibc-initial_nptl.bb
+++ b/recipes/uclibc/uclibc-initial_nptl.bb
@@ -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
diff --git a/recipes/uclibc/uclibc.inc b/recipes/uclibc/uclibc.inc
new file mode 100644
index 0000000..721629d
--- /dev/null
+++ b/recipes/uclibc/uclibc.inc
@@ -0,0 +1,184 @@
+DESCRIPTION = "C library for embedded systems"
+LICENSE = "LGPL"
+SECTION = "libs"
+PRIORITY = "required"
+INC_PR = "r33"
+inherit uclibc-arch
+#
+# 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"
+DEPENDS = "virtual/${TARGET_PREFIX}binutils \
+ virtual/${TARGET_PREFIX}gcc-intermediate \
+ linux-libc-headers ncurses-native"
+RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+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}/lib*.so \
+ ${libdir}/*_nonshared.a \
+ ${libdir}/[S]*crt[1in].o \
+ ${libdir}/lib*.a \
+ ${includedir}/*.h ${includedir}/*/*.h \
+ "
+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"
+
+SRC_URI = "\
+ file://uClibc.config \
+ http://www.uclibc.org/downloads/uClibc-${PV}.tar.bz2;name=uClibc-${PV} \
+ "
+
+# do_stage barfs on a CC with whitespace, therefore put the 'HOST_CC_ARCH' in
+# the CFLAGS (when building the utils).
+OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}'"
+EXTRA_OEMAKE = "${OEMAKE_NO_CC} \
+ 'HOSTCC=${BUILD_CC}' \
+ 'BUILD_CFLAGS=${BUILD_CFLAGS}' \
+ 'CC=${CC}' \
+ ARCH=${UCLIBC_ARCH}"
+EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"
+
+# enable verbose output:
+export V="1"
+
+UCLIBC_EXTRA_CFLAGS := "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
+CFLAGS :=#
+
+configmangle = '/^KERNEL_HEADERS/d; \
+ /^RUNTIME_PREFIX/d; \
+ /^DEVEL_PREFIX/d; \
+ /^SHARED_LIB_LOADER_PREFIX/d; \
+ /^UCLIBC_EXTRA_CFLAGS/d; \
+ 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']]} \
+ /^CROSS/d; \
+ /^TARGET_ARCH=/d; \
+ /^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \
+ s,^DOSTRIP.*,# DOSTRIP is not set,g; \
+ /_[EO]*ABI/d; \
+ /HAS_FPU/d; \
+ '
+OE_FEATURES := "${@features_to_uclibc_conf(d)}"
+OE_DEL := "${@features_to_uclibc_del(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(["CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"",
+ "UCLIBC_EXTRA_CFLAGS=\"${UCLIBC_EXTRA_CFLAGS}\"",
+ "KERNEL_HEADERS=\"${STAGING_INCDIR}\"",
+ "RUNTIME_PREFIX=\"/\"",
+ "DEVEL_PREFIX=\"/${prefix}\"",
+ "SHARED_LIB_LOADER_PREFIX=\"/lib\"",
+ ])
+ ),
+ d)
+ bb.data.setVar('configmangle_append',
+ "/^### TGT$/a\\\nTARGET_ARCH=\"%s\"\\nTARGET_%s=y\n" %
+ ("${UCLIBC_ARCH}", "${UCLIBC_ARCH}"),
+ d)
+ bb.data.setVar('configmangle_append',
+ "/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]]), d)
+ if "${UCLIBC_ENDIAN}":
+ bb.data.setVar('configmangle_append',
+ "/^### ABI$/a\\\nARCH_%s_ENDIAN=y\n\n" % ("${UCLIBC_ENDIAN}"),
+ d)
+ if "${UCLIBC_ABI}":
+ bb.data.setVar('configmangle_append',
+ "/^### ABI$/a\\\nCONFIG_%s=y\n\n" % ("${UCLIBC_ABI}"),
+ d)
+}
+
+uclibcbuild_do_patch() {
+ ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux
+ ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm
+}
+
+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
+
+ # OpenEmbedded splits the uClibc.config in two parts:
+ # uClibc.machine, 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
+ echo "### CROSS" >>${S}/merged.config
+ echo "### TGT" >>${S}/merged.config
+ echo "### MMU" >>${S}/merged.config
+ echo "### FPU" >>${S}/merged.config
+ echo "### ABI" >>${S}/merged.config
+ echo "### DISTRO FEATURES" >>${S}/merged.config
+ cp ${S}/merged.config ${S}/.config
+
+ # Mangle the resulting .config depending on OE variables
+ sed -i -e '${configmangle}' ${S}/.config
+
+ oe_runmake oldconfig
+}
+
+do_install() {
+ oe_runmake PREFIX=${D} install
+ oe_runmake PREFIX=${D} install_utils
+}
+
+get_monotonic_srcrev () {
+ (cd ${S}; eval `git rev-list HEAD|wc -l`)
+}
diff --git a/recipes/uclibc/uclibc_0.9.30.2.bb b/recipes/uclibc/uclibc_0.9.30.2.bb
index a772e2a..703b5cd 100644
--- a/recipes/uclibc/uclibc_0.9.30.2.bb
+++ b/recipes/uclibc/uclibc_0.9.30.2.bb
@@ -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"
diff --git a/recipes/uclibc/uclibc_git.bb b/recipes/uclibc/uclibc_git.bb
index 26339f5..1ee4c75 100644
--- a/recipes/uclibc/uclibc_git.bb
+++ b/recipes/uclibc/uclibc_git.bb
@@ -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 \
diff --git a/recipes/uclibc/uclibc_nptl.bb b/recipes/uclibc/uclibc_nptl.bb
index c7cbd00..b283953 100644
--- a/recipes/uclibc/uclibc_nptl.bb
+++ b/recipes/uclibc/uclibc_nptl.bb
@@ -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 \
--
1.7.0
^ permalink raw reply related [flat|nested] 35+ messages in thread* Re: [PATCH 3/3] uClibc: redo configuration
2010-03-12 17:46 ` [PATCH 3/3] uClibc: redo configuration Bernhard Reutner-Fischer
@ 2010-04-05 20:22 ` Roman I Khimov
0 siblings, 0 replies; 35+ messages in thread
From: Roman I Khimov @ 2010-04-05 20:22 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: Text/Plain, Size: 2940 bytes --]
В сообщении от Пятница 12 марта 2010 20:46:32 автор Bernhard Reutner-Fischer
написал:
> +# 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.
> b/recipes/uclibc/uclibc-initial_git.bb index 00330e2..3a33bd8 100644
> --- a/recipes/uclibc/uclibc-initial_git.bb
> +++ b/recipes/uclibc/uclibc-initial_git.bb
> @@ -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}/
.....
> do_compile () {
> - 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.
--
http://roman.khimov.ru
mailto: roman@khimov.ru
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 0/3] uClibc configury touchup; RFC WRT feature/dep picking heuristics
2010-02-22 5:54 ` Khem Raj
` (3 preceding siblings ...)
2010-03-12 17:46 ` [PATCH 3/3] uClibc: redo configuration Bernhard Reutner-Fischer
@ 2010-06-09 17:10 ` Bernhard Reutner-Fischer
2010-06-09 21:26 ` RFC " Bernhard Reutner-Fischer
2010-06-09 17:10 ` [PATCH 1/3] uClibc: redo configuration Bernhard Reutner-Fischer
` (2 subsequent siblings)
7 siblings, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-09 17:10 UTC (permalink / raw)
To: raj.khem; +Cc: openembedded-devel
Hi,
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
^ permalink raw reply [flat|nested] 35+ messages in thread* RFC feature/dep picking heuristics
2010-06-09 17:10 ` [PATCH 0/3] uClibc configury touchup; RFC WRT feature/dep picking heuristics Bernhard Reutner-Fischer
@ 2010-06-09 21:26 ` Bernhard Reutner-Fischer
0 siblings, 0 replies; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-09 21:26 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-devel
On Wed, Jun 09, 2010 at 07:10:34PM +0200, Bernhard Reutner-Fischer wrote:
>Hi,
>
>These are independent.
>
>1) uClibc: redo configuration
> improve configury of uClibc
[]
>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
--- a/conf/distro/include/uclibc.inc
+++ b/conf/distro/include/uclibc.inc
@@ -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,
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 1/3] uClibc: redo configuration
2010-02-22 5:54 ` Khem Raj
` (4 preceding siblings ...)
2010-06-09 17:10 ` [PATCH 0/3] uClibc configury touchup; RFC WRT feature/dep picking heuristics Bernhard Reutner-Fischer
@ 2010-06-09 17:10 ` Bernhard Reutner-Fischer
2010-06-09 17:10 ` [PATCH 2/3] uclibc_git: keep PV at "git" Bernhard Reutner-Fischer
2010-06-09 17:10 ` [PATCH 3/3] busybox: picking IPv6 per default is not up to the package Bernhard Reutner-Fischer
7 siblings, 0 replies; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-09 17:10 UTC (permalink / raw)
To: raj.khem; +Cc: openembedded-devel
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
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
diff --git a/conf/distro/include/sane-toolchain-uclibc.inc b/conf/distro/include/sane-toolchain-uclibc.inc
index 314340a..9f515a0 100644
--- a/conf/distro/include/sane-toolchain-uclibc.inc
+++ b/conf/distro/include/sane-toolchain-uclibc.inc
@@ -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"
diff --git a/conf/distro/include/sane-toolchain.inc b/conf/distro/include/sane-toolchain.inc
index 1b77f75..9784baf 100644
--- a/conf/distro/include/sane-toolchain.inc
+++ b/conf/distro/include/sane-toolchain.inc
@@ -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"
diff --git a/conf/distro/include/uclibc.inc b/conf/distro/include/uclibc.inc
index ee18fc8..b40fbf5 100644
--- a/conf/distro/include/uclibc.inc
+++ b/conf/distro/include/uclibc.inc
@@ -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"
diff --git a/recipes/uclibc/bfin-uclibc_svn.bb b/recipes/uclibc/bfin-uclibc_svn.bb
index e8cb63e..2757fc2 100644
--- a/recipes/uclibc/bfin-uclibc_svn.bb
+++ b/recipes/uclibc/bfin-uclibc_svn.bb
@@ -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 "
diff --git a/recipes/uclibc/uclibc-config.inc b/recipes/uclibc/uclibc-config.inc
new file mode 100644
index 0000000..624f596
--- /dev/null
+++ b/recipes/uclibc/uclibc-config.inc
@@ -0,0 +1,110 @@
+#
+# 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 = ([], [])
+ 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)
+ 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
diff --git a/recipes/uclibc/uclibc-initial_0.9.30.2.bb b/recipes/uclibc/uclibc-initial_0.9.30.2.bb
index a9fa146..d00cb38 100644
--- a/recipes/uclibc/uclibc-initial_0.9.30.2.bb
+++ b/recipes/uclibc/uclibc-initial_0.9.30.2.bb
@@ -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
diff --git a/recipes/uclibc/uclibc-initial_0.9.30.bb b/recipes/uclibc/uclibc-initial_0.9.30.bb
index 84c35c8..9391a8c 100644
--- a/recipes/uclibc/uclibc-initial_0.9.30.bb
+++ b/recipes/uclibc/uclibc-initial_0.9.30.bb
@@ -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 () {
diff --git a/recipes/uclibc/uclibc-initial_git.bb b/recipes/uclibc/uclibc-initial_git.bb
index 8c582e0..dd69dc0 100644
--- a/recipes/uclibc/uclibc-initial_git.bb
+++ b/recipes/uclibc/uclibc-initial_git.bb
@@ -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
diff --git a/recipes/uclibc/uclibc-old.inc b/recipes/uclibc/uclibc-old.inc
new file mode 100644
index 0000000..7198c44
--- /dev/null
+++ b/recipes/uclibc/uclibc-old.inc
@@ -0,0 +1,186 @@
+DESCRIPTION = "C library for embedded systems"
+LICENSE = "LGPL"
+SECTION = "libs"
+PRIORITY = "required"
+INC_PR = "r35"
+#
+# 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`)
+}
diff --git a/recipes/uclibc/uclibc.inc b/recipes/uclibc/uclibc.inc
index 4686d34..4ae79db 100644
--- a/recipes/uclibc/uclibc.inc
+++ b/recipes/uclibc/uclibc.inc
@@ -3,6 +3,7 @@ LICENSE = "LGPL"
SECTION = "libs"
PRIORITY = "required"
INC_PR = "r34"
+require uclibc-config.inc
#
# 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
@@ -20,172 +21,165 @@ python __anonymous () {
}
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"
+ virtual/${TARGET_PREFIX}gcc-intermediate \
+ linux-libc-headers ncurses-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
+# 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}/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}/libc*.so.* ${base_libdir}/libuClibc-*.so \
${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so \
- ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.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}/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"
+ ${libexecdir} ${datadir}/zoneinfo ${libdir}/locale"
FILES_ldd = "${bindir}/ldd"
-FILES_uclibc-dev_append = " ${libdir}/*.o ${libdir}/*_nonshared.a"
+FILES_uclibc-dev_append = "\
+ ${libdir}/lib*.so \
+ ${libdir}/*_nonshared.a \
+ ${libdir}/[S]*crt[1in].o \
+ ${libdir}/lib*.a \
+ ${includedir}/*.h ${includedir}/*/*.h \
+ "
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};name=locale"
-UCLIBC_LOCALE_URI_arm = "http://wiki.openembedded.net/dl/uclibc-locale/${UCLIBC_LOCALE_FILE};name=localearm"
-
-SRC_URI[locale.md5sum] = "d75b2239b4e27c3c9cbed1c8f6eabba6"
-SRC_URI[locale.sha256sum] = "c4362be318a38f18d98dccf462d22d95bab92f05548bb93f65298fe9afaebd57"
-SRC_URI[localearm.md5sum] = "fc0b6113f2b333564d3558e241059db8"
-SRC_URI[localearm.sha256sum] = "6765f08499079207ba8c4da999d602ca75c384ff5812aa973f27b6a501b3438e"
-
-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}"
+SRC_URI = "\
+ file://uClibc.config \
+ http://www.uclibc.org/downloads/uClibc-${PV}.tar.bz2;name=uClibc-${PV} \
+ "
-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']]} \
- '
+# do_stage barfs on a CC with whitespace, therefore put the 'HOST_CC_ARCH' in
+# the CFLAGS (when building the utils).
+OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}'"
+EXTRA_OEMAKE = "${OEMAKE_NO_CC} \
+ 'HOSTCC=${BUILD_CC}' \
+ 'BUILD_CFLAGS=${BUILD_CFLAGS}' \
+ 'CC=${CC}' \
+ ARCH=${UCLIBC_ARCH}"
-CFLAGS := "${@oe_filter_out('-I\S+', '${CFLAGS}', d)}"
+EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"
+# enable verbose output:
+export V="1"
+
+UCLIBC_EXTRA_CFLAGS := "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
+CFLAGS :=#
+
+configmangle = '/^KERNEL_HEADERS/d; \
+ /^RUNTIME_PREFIX/d; \
+ /^DEVEL_PREFIX/d; \
+ /^SHARED_LIB_LOADER_PREFIX/d; \
+ /^UCLIBC_EXTRA_CFLAGS/d; \
+ 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']]} \
+ /^CROSS/d; \
+ /^TARGET_ARCH=/d; \
+ /^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \
+ s,^DOSTRIP.*,# DOSTRIP is not set,g; \
+ /_[EO]*ABI/d; \
+ /HAS_FPU/d; \
+ '
+OE_FEATURES := "${@features_to_uclibc_conf(d)}"
+OE_DEL := "${@features_to_uclibc_del(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)
+ 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(["CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"",
+ "UCLIBC_EXTRA_CFLAGS=\"${UCLIBC_EXTRA_CFLAGS}\"",
+ "KERNEL_HEADERS=\"${STAGING_INCDIR}\"",
+ "RUNTIME_PREFIX=\"/\"",
+ "DEVEL_PREFIX=\"/${prefix}\"",
+ "SHARED_LIB_LOADER_PREFIX=\"/lib\"",
+ ])
+ ),
+ d)
+ bb.data.setVar('configmangle_append',
+ "/^### TGT$/a\\\nTARGET_ARCH=\"%s\"\\nTARGET_%s=y\n" %
+ ("${UCLIBC_ARCH}", "${UCLIBC_ARCH}"),
+ d)
+ bb.data.setVar('configmangle_append',
+ "/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]]), d)
+ if "${UCLIBC_ENDIAN}":
+ bb.data.setVar('configmangle_append',
+ "/^### ABI$/a\\\nARCH_%s_ENDIAN=y\n\n" % ("${UCLIBC_ENDIAN}"),
+ d)
+ if "${UCLIBC_ABI}":
+ bb.data.setVar('configmangle_append',
+ "/^### ABI$/a\\\nCONFIG_%s=y\n\n" % ("${UCLIBC_ABI}"),
+ 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']}
+ ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux
+ ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm
}
python do_patch () {
- bb.build.exec_func('base_do_patch', d)
- bb.build.exec_func('uclibcbuild_do_patch', d)
+ 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
+ rm -f ${S}/.config
+
+ # OpenEmbedded splits the uClibc.config in two parts:
+ # uClibc.machine, 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
+ echo "### CROSS" >>${S}/merged.config
+ echo "### TGT" >>${S}/merged.config
+ echo "### MMU" >>${S}/merged.config
+ echo "### FPU" >>${S}/merged.config
+ echo "### ABI" >>${S}/merged.config
+ echo "### DISTRO FEATURES" >>${S}/merged.config
+ cp ${S}/merged.config ${S}/.config
+
+ # Mangle the resulting .config depending on OE variables
+ sed -i -e '${configmangle}' ${S}/.config
+
+ 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}/*
+ oe_runmake PREFIX=${D} install
+ oe_runmake PREFIX=${D} install_utils
}
get_monotonic_srcrev () {
- (cd ${S}; eval `git rev-list HEAD|wc -l`)
+ (cd ${S}; eval `git rev-list HEAD|wc -l`)
}
diff --git a/recipes/uclibc/uclibc_0.9.28.bb b/recipes/uclibc/uclibc_0.9.28.bb
index a43d5ed..7da53f9 100644
--- a/recipes/uclibc/uclibc_0.9.28.bb
+++ b/recipes/uclibc/uclibc_0.9.28.bb
@@ -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
diff --git a/recipes/uclibc/uclibc_0.9.29.bb b/recipes/uclibc/uclibc_0.9.29.bb
index b83cd2e..829777b 100644
--- a/recipes/uclibc/uclibc_0.9.29.bb
+++ b/recipes/uclibc/uclibc_0.9.29.bb
@@ -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"
diff --git a/recipes/uclibc/uclibc_0.9.30.1.bb b/recipes/uclibc/uclibc_0.9.30.1.bb
index ea69249..d3d5c58 100644
--- a/recipes/uclibc/uclibc_0.9.30.1.bb
+++ b/recipes/uclibc/uclibc_0.9.30.1.bb
@@ -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"
diff --git a/recipes/uclibc/uclibc_0.9.30.bb b/recipes/uclibc/uclibc_0.9.30.bb
index 5d267b5..36e9de3 100644
--- a/recipes/uclibc/uclibc_0.9.30.bb
+++ b/recipes/uclibc/uclibc_0.9.30.bb
@@ -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"
diff --git a/recipes/uclibc/uclibc_git.bb b/recipes/uclibc/uclibc_git.bb
index 99ea40e..6be96b0 100644
--- a/recipes/uclibc/uclibc_git.bb
+++ b/recipes/uclibc/uclibc_git.bb
@@ -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 \
--
1.7.1
^ permalink raw reply related [flat|nested] 35+ messages in thread* [PATCH 2/3] uclibc_git: keep PV at "git"
2010-02-22 5:54 ` Khem Raj
` (5 preceding siblings ...)
2010-06-09 17:10 ` [PATCH 1/3] uClibc: redo configuration Bernhard Reutner-Fischer
@ 2010-06-09 17:10 ` Bernhard Reutner-Fischer
2010-06-09 17:10 ` [PATCH 3/3] busybox: picking IPv6 per default is not up to the package Bernhard Reutner-Fischer
7 siblings, 0 replies; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-09 17:10 UTC (permalink / raw)
To: raj.khem; +Cc: openembedded-devel
With 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.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
recipes/uclibc/uclibc_git.bb | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/recipes/uclibc/uclibc_git.bb b/recipes/uclibc/uclibc_git.bb
index 6be96b0..f026ae9 100644
--- a/recipes/uclibc/uclibc_git.bb
+++ b/recipes/uclibc/uclibc_git.bb
@@ -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
--
1.7.1
^ permalink raw reply related [flat|nested] 35+ messages in thread* [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
2010-02-22 5:54 ` Khem Raj
` (6 preceding siblings ...)
2010-06-09 17:10 ` [PATCH 2/3] uclibc_git: keep PV at "git" Bernhard Reutner-Fischer
@ 2010-06-09 17:10 ` Bernhard Reutner-Fischer
2010-06-09 18:44 ` Phil Blundell
7 siblings, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-09 17:10 UTC (permalink / raw)
To: raj.khem; +Cc: openembedded-devel
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
recipes/busybox/busybox-1.15.3/micro/defconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/recipes/busybox/busybox-1.15.3/micro/defconfig b/recipes/busybox/busybox-1.15.3/micro/defconfig
index 8431d19..f6eaa6d 100644
--- a/recipes/busybox/busybox-1.15.3/micro/defconfig
+++ b/recipes/busybox/busybox-1.15.3/micro/defconfig
@@ -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
--
1.7.1
^ permalink raw reply related [flat|nested] 35+ messages in thread* Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
2010-06-09 17:10 ` [PATCH 3/3] busybox: picking IPv6 per default is not up to the package Bernhard Reutner-Fischer
@ 2010-06-09 18:44 ` Phil Blundell
2010-06-09 18:52 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 35+ messages in thread
From: Phil Blundell @ 2010-06-09 18:44 UTC (permalink / raw)
To: openembedded-devel
On Wed, 2010-06-09 at 19:10 +0200, Bernhard Reutner-Fischer wrote:
> diff --git a/recipes/busybox/busybox-1.15.3/micro/defconfig b/recipes/busybox/busybox-1.15.3/micro/defconfig
> index 8431d19..f6eaa6d 100644
> --- a/recipes/busybox/busybox-1.15.3/micro/defconfig
> +++ b/recipes/busybox/busybox-1.15.3/micro/defconfig
> @@ -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.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
2010-06-09 18:44 ` Phil Blundell
@ 2010-06-09 18:52 ` Bernhard Reutner-Fischer
2010-06-09 19:18 ` Phil Blundell
0 siblings, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-09 18:52 UTC (permalink / raw)
To: openembedded-devel
On Wed, Jun 09, 2010 at 07:44:58PM +0100, Phil Blundell wrote:
>On Wed, 2010-06-09 at 19:10 +0200, Bernhard Reutner-Fischer wrote:
>> diff --git a/recipes/busybox/busybox-1.15.3/micro/defconfig b/recipes/busybox/busybox-1.15.3/micro/defconfig
>> index 8431d19..f6eaa6d 100644
>> --- a/recipes/busybox/busybox-1.15.3/micro/defconfig
>> +++ b/recipes/busybox/busybox-1.15.3/micro/defconfig
>> @@ -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?
As long as you don't have ipv6 in distro features somehow, ipv6 will
not be available. See introductory message of this series.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
2010-06-09 18:52 ` Bernhard Reutner-Fischer
@ 2010-06-09 19:18 ` Phil Blundell
2010-06-09 19:32 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 35+ messages in thread
From: Phil Blundell @ 2010-06-09 19:18 UTC (permalink / raw)
To: openembedded-devel
On Wed, 2010-06-09 at 20:52 +0200, Bernhard Reutner-Fischer wrote:
> On Wed, Jun 09, 2010 at 07:44:58PM +0100, Phil Blundell wrote:
> >On Wed, 2010-06-09 at 19:10 +0200, Bernhard Reutner-Fischer wrote:
> >> diff --git a/recipes/busybox/busybox-1.15.3/micro/defconfig b/recipes/busybox/busybox-1.15.3/micro/defconfig
> >> index 8431d19..f6eaa6d 100644
> >> --- a/recipes/busybox/busybox-1.15.3/micro/defconfig
> >> +++ b/recipes/busybox/busybox-1.15.3/micro/defconfig
> >> @@ -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?
>
> 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.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
2010-06-09 19:18 ` Phil Blundell
@ 2010-06-09 19:32 ` Bernhard Reutner-Fischer
2010-06-09 20:22 ` Phil Blundell
0 siblings, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-09 19:32 UTC (permalink / raw)
To: openembedded-devel
On Wed, Jun 09, 2010 at 08:18:13PM +0100, Phil Blundell wrote:
>On Wed, 2010-06-09 at 20:52 +0200, Bernhard Reutner-Fischer wrote:
>> On Wed, Jun 09, 2010 at 07:44:58PM +0100, Phil Blundell wrote:
>> >On Wed, 2010-06-09 at 19:10 +0200, Bernhard Reutner-Fischer wrote:
>> >> diff --git a/recipes/busybox/busybox-1.15.3/micro/defconfig b/recipes/busybox/busybox-1.15.3/micro/defconfig
>> >> index 8431d19..f6eaa6d 100644
>> >> --- a/recipes/busybox/busybox-1.15.3/micro/defconfig
>> >> +++ b/recipes/busybox/busybox-1.15.3/micro/defconfig
>> >> @@ -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?
>>
>> 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..
>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.
> 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.
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.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 3/3] busybox: picking IPv6 per default is not up to the package
2010-06-09 19:32 ` Bernhard Reutner-Fischer
@ 2010-06-09 20:22 ` Phil Blundell
2010-06-10 19:46 ` [PATCH 1/2] uclibc: handle DISTRO_FEATURE="largefile" Bernhard Reutner-Fischer
2010-06-10 19:46 ` [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES Bernhard Reutner-Fischer
0 siblings, 2 replies; 35+ messages in thread
From: Phil Blundell @ 2010-06-09 20:22 UTC (permalink / raw)
To: openembedded-devel
On Wed, 2010-06-09 at 21:32 +0200, Bernhard Reutner-Fischer wrote:
> 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.
^ permalink raw reply [flat|nested] 35+ messages in thread* [PATCH 1/2] uclibc: handle DISTRO_FEATURE="largefile"
2010-06-09 20:22 ` Phil Blundell
@ 2010-06-10 19:46 ` Bernhard Reutner-Fischer
2010-06-10 19:46 ` [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES Bernhard Reutner-Fischer
1 sibling, 0 replies; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-10 19:46 UTC (permalink / raw)
To: philb; +Cc: openembedded-devel
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
recipes/uclibc/uclibc-config.inc | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/recipes/uclibc/uclibc-config.inc b/recipes/uclibc/uclibc-config.inc
index 624f596..ff334da 100644
--- a/recipes/uclibc/uclibc-config.inc
+++ b/recipes/uclibc/uclibc-config.inc
@@ -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:
--
1.7.1
^ permalink raw reply related [flat|nested] 35+ messages in thread* [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-09 20:22 ` Phil Blundell
2010-06-10 19:46 ` [PATCH 1/2] uclibc: handle DISTRO_FEATURE="largefile" Bernhard Reutner-Fischer
@ 2010-06-10 19:46 ` Bernhard Reutner-Fischer
2010-06-10 19:55 ` Chris Larson
1 sibling, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-10 19:46 UTC (permalink / raw)
To: philb; +Cc: openembedded-devel
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
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
diff --git a/recipes/busybox/busybox-config.inc b/recipes/busybox/busybox-config.inc
new file mode 100644
index 0000000..26ccec4
--- /dev/null
+++ b/recipes/busybox/busybox-config.inc
@@ -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
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index f554478..827e917 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -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
}
--
1.7.1
^ permalink raw reply related [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 19:46 ` [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES Bernhard Reutner-Fischer
@ 2010-06-10 19:55 ` Chris Larson
2010-06-10 20:22 ` Phil Blundell
0 siblings, 1 reply; 35+ messages in thread
From: Chris Larson @ 2010-06-10 19:55 UTC (permalink / raw)
To: openembedded-devel
On Thu, Jun 10, 2010 at 12:46 PM, Bernhard Reutner-Fischer <
rep.dot.nop@gmail.com> wrote:
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
> ---
> 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
>
> diff --git a/recipes/busybox/busybox-config.inc
> b/recipes/busybox/busybox-config.inc
> new file mode 100644
> index 0000000..26ccec4
> --- /dev/null
> +++ b/recipes/busybox/busybox-config.inc
> @@ -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)
>
Should this (ipv6 at least) use COMBINED_FEATURES, since it requires
kernel/machine support for it to be useful, along with distro support?
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 19:55 ` Chris Larson
@ 2010-06-10 20:22 ` Phil Blundell
2010-06-10 20:27 ` Chris Larson
2010-06-10 20:44 ` Bernhard Reutner-Fischer
0 siblings, 2 replies; 35+ messages in thread
From: Phil Blundell @ 2010-06-10 20:22 UTC (permalink / raw)
To: Chris Larson; +Cc: openembedded-devel
On Thu, 2010-06-10 at 12:55 -0700, Chris Larson wrote:
> 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.
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 20:22 ` Phil Blundell
@ 2010-06-10 20:27 ` Chris Larson
2010-06-10 20:50 ` Bernhard Reutner-Fischer
2010-06-10 22:56 ` [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES Khem Raj
2010-06-10 20:44 ` Bernhard Reutner-Fischer
1 sibling, 2 replies; 35+ messages in thread
From: Chris Larson @ 2010-06-10 20:27 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-devel
On Thu, Jun 10, 2010 at 1:22 PM, Phil Blundell <philb@gnu.org> wrote:
> On Thu, 2010-06-10 at 12:55 -0700, Chris Larson wrote:
> > 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.
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.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 20:27 ` Chris Larson
@ 2010-06-10 20:50 ` Bernhard Reutner-Fischer
2010-06-10 21:06 ` Phil Blundell
2010-06-10 22:56 ` [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES Khem Raj
1 sibling, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-10 20:50 UTC (permalink / raw)
To: openembedded-devel
On Thu, Jun 10, 2010 at 01:27:36PM -0700, Chris Larson wrote:
>On Thu, Jun 10, 2010 at 1:22 PM, Phil Blundell <philb@gnu.org> wrote:
>> 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.
This is unavoidable for certain special setups, isn't it.
>
>
>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.
Both mmu and floatingpoint will need to look at COMBINED_FEATURES.
At least for mmu vs. !mmu PACKAGE_ARCH=${MACHINE} is unavoidable, no?
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 20:50 ` Bernhard Reutner-Fischer
@ 2010-06-10 21:06 ` Phil Blundell
2010-06-10 21:20 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 35+ messages in thread
From: Phil Blundell @ 2010-06-10 21:06 UTC (permalink / raw)
To: Bernhard Reutner-Fischer; +Cc: openembedded-devel
On Thu, 2010-06-10 at 22:50 +0200, Bernhard Reutner-Fischer wrote:
> 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.
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 21:06 ` Phil Blundell
@ 2010-06-10 21:20 ` Bernhard Reutner-Fischer
2010-06-11 12:59 ` Phil Blundell
0 siblings, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-10 21:20 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-devel
On Thu, Jun 10, 2010 at 10:06:31PM +0100, Phil Blundell wrote:
>On Thu, 2010-06-10 at 22:50 +0200, Bernhard Reutner-Fischer wrote:
>> 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.
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 21:20 ` Bernhard Reutner-Fischer
@ 2010-06-11 12:59 ` Phil Blundell
2010-06-22 20:39 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 35+ messages in thread
From: Phil Blundell @ 2010-06-11 12:59 UTC (permalink / raw)
To: Bernhard Reutner-Fischer; +Cc: openembedded-devel
On Thu, 2010-06-10 at 23:20 +0200, Bernhard Reutner-Fischer wrote:
> 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.
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-11 12:59 ` Phil Blundell
@ 2010-06-22 20:39 ` Bernhard Reutner-Fischer
2010-06-28 18:23 ` ping**2 [was: Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES] Bernhard Reutner-Fischer
0 siblings, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-22 20:39 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-devel
On Fri, Jun 11, 2010 at 01:59:12PM +0100, Phil Blundell wrote:
>On Thu, 2010-06-10 at 23:20 +0200, Bernhard Reutner-Fischer wrote:
>> 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.
ok, i see.
>
>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
^ permalink raw reply [flat|nested] 35+ messages in thread* ping**2 [was: Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES]
2010-06-22 20:39 ` Bernhard Reutner-Fischer
@ 2010-06-28 18:23 ` Bernhard Reutner-Fischer
0 siblings, 0 replies; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-28 18:23 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-devel
On Tue, Jun 22, 2010 at 10:39:53PM +0200, Bernhard Reutner-Fischer wrote:
>On Fri, Jun 11, 2010 at 01:59:12PM +0100, Phil Blundell wrote:
>>On Thu, 2010-06-10 at 23:20 +0200, Bernhard Reutner-Fischer wrote:
>>> 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.
>
>ok, i see.
>>
>>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
>{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
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 20:27 ` Chris Larson
2010-06-10 20:50 ` Bernhard Reutner-Fischer
@ 2010-06-10 22:56 ` Khem Raj
2010-06-11 7:16 ` Bernhard Reutner-Fischer
1 sibling, 1 reply; 35+ messages in thread
From: Khem Raj @ 2010-06-10 22:56 UTC (permalink / raw)
To: openembedded-devel
On Thu, Jun 10, 2010 at 1:27 PM, Chris Larson <clarson@kergoth.com> wrote:
> On Thu, Jun 10, 2010 at 1:22 PM, Phil Blundell <philb@gnu.org> wrote:
>
>> On Thu, 2010-06-10 at 12:55 -0700, Chris Larson wrote:
>> > 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.
>
>
> 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.
will it force recompile then if I choose a similar arch but different
machine say (qemuarm, osk5912 both are armv5te)
> --
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 22:56 ` [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES Khem Raj
@ 2010-06-11 7:16 ` Bernhard Reutner-Fischer
0 siblings, 0 replies; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-11 7:16 UTC (permalink / raw)
To: openembedded-devel
On Thu, Jun 10, 2010 at 03:56:30PM -0700, Khem Raj wrote:
>On Thu, Jun 10, 2010 at 1:27 PM, Chris Larson <clarson@kergoth.com> wrote:
>> On Thu, Jun 10, 2010 at 1:22 PM, Phil Blundell <philb@gnu.org> wrote:
>>
>>> On Thu, 2010-06-10 at 12:55 -0700, Chris Larson wrote:
>>> > 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.
>>
>>
>> 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.
>
>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
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 20:22 ` Phil Blundell
2010-06-10 20:27 ` Chris Larson
@ 2010-06-10 20:44 ` Bernhard Reutner-Fischer
2010-06-10 21:09 ` Phil Blundell
1 sibling, 1 reply; 35+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-06-10 20:44 UTC (permalink / raw)
To: openembedded-devel
On Thu, Jun 10, 2010 at 09:22:51PM +0100, Phil Blundell wrote:
>On Thu, 2010-06-10 at 12:55 -0700, Chris Larson wrote:
>> 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.
^ permalink raw reply [flat|nested] 35+ messages in thread* Re: [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
2010-06-10 20:44 ` Bernhard Reutner-Fischer
@ 2010-06-10 21:09 ` Phil Blundell
0 siblings, 0 replies; 35+ messages in thread
From: Phil Blundell @ 2010-06-10 21:09 UTC (permalink / raw)
To: openembedded-devel
On Thu, 2010-06-10 at 22:44 +0200, Bernhard Reutner-Fischer wrote:
> 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.
> 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?
Sounds OK to me, yeah.
p.
^ permalink raw reply [flat|nested] 35+ messages in thread