- Don't supply site files for native.
- Split up the site information, so we don't need to add every single
combination of os and architecture to the siteinfo.bbclass.
- Drop the ${FILE_DIRNAME}/site-<bits> stuff, there are other ways to do it.
- SITEINFO_ENDIANESS -> SITEINFO_ENDIANNESS.
Signed-off-by: Chris Larson <clarson@kergoth.com>
inherit siteinfo
+def _autotools_get_sitefiles(d):
+ def inherits(d, *classes):
+ if any(bb.data.inherits_class(cls, d) for cls in classes):
+ return True
+
+ if inherits(d, "native", "nativesdk"):
+ return
+
+ sitedata = siteinfo_data(d)
+ for path in d.getVar("BBPATH", True).split(":"):
+ for element in sitedata:
+ filename = os.path.join(path, "site", element)
+ if os.path.exists(filename):
+ yield filename
+
# Space separated list of shell scripts with variables defined to supply test
# results for autoconf tests we cannot run at build time.
-export CONFIG_SITE = "${@siteinfo_get_files(d)}"
+export CONFIG_SITE = "${@' '.join(_autotools_get_sitefiles(d))}"
acpaths = "default"
EXTRA_AUTORECONF = "--exclude=autopoint"
dsmg600_pack_image () {
install -d ${DEPLOY_DIR_IMAGE}/firmupgrade
- install -m 0755 ${DEPLOY_DIR_IMAGE}/zImage-nslu2${SITEINFO_ENDIANESS}.bin \
+ install -m 0755 ${DEPLOY_DIR_IMAGE}/zImage-nslu2${SITEINFO_ENDIANNESS}.bin \
${DEPLOY_DIR_IMAGE}/firmupgrade/ip-ramdisk
install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
${DEPLOY_DIR_IMAGE}/firmupgrade/rootfs.gz
nas100d_pack_image () {
install -d ${DEPLOY_DIR_IMAGE}/firmupgrade
- install -m 0755 ${DEPLOY_DIR_IMAGE}/zImage-nslu2${SITEINFO_ENDIANESS}.bin \
+ install -m 0755 ${DEPLOY_DIR_IMAGE}/zImage-nslu2${SITEINFO_ENDIANNESS}.bin \
${DEPLOY_DIR_IMAGE}/firmupgrade/ip-ramdisk
install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
${DEPLOY_DIR_IMAGE}/firmupgrade/rootfs.gz
# It is an error for the target not to exist.
# If 'what' doesn't exist then an empty value is returned
#
-def get_siteinfo_list(d):
- target = bb.data.getVar('HOST_ARCH', d, 1) + "-" + bb.data.getVar('HOST_OS', d, 1)
+def siteinfo_data(d):
+ archinfo = {
+ "arm": "endian-little bit-32 arm-common",
+ "armeb": "endian-big bit-32 arm-common",
+ "avr32": "endian-big bit-32 avr32-common",
+ "bfin": "endian-little bit-32 bfin-common",
+ "i386": "endian-little bit-32 ix86-common",
+ "i486": "endian-little bit-32 ix86-common",
+ "i586": "endian-little bit-32 ix86-common",
+ "i686": "endian-little bit-32 ix86-common",
+ "ia64": "endian-little bit-64",
+ "mips": "endian-big bit-32 mips-common",
+ "mipsel": "endian-little bit-32 mips-common",
+ "powerpc": "endian-big bit-32 powerpc-common",
+ "nios2": "endian-little bit-32 nios2-common",
+ "powerpc64": "endian-big bit-64 powerpc-common powerpc64-linux",
+ "ppc": "endian-big bit-32 powerpc-common",
+ "ppc64": "endian-big bit-64 powerpc-common powerpc64-linux",
+ "sh3": "endian-little bit-32 sh-common",
+ "sh4": "endian-little bit-32 sh-common",
+ "sparc": "endian-big bit-32",
+ "viac3": "endian-little bit-32 ix86-common",
+ "x86_64": "endian-little bit-64",
+ }
+ osinfo = {
+ "darwin": "common-darwin",
+ "darwin9": "common-darwin",
+ "linux": "common-linux common-glibc",
+ "linux-gnueabi": "common-linux common-glibc",
+ "linux-gnuspe": "common-linux common-glibc",
+ "linux-uclibc": "common-linux common-uclibc",
+ "linux-uclibceabi": "common-linux common-uclibc",
+ "linux-uclibcspe": "common-linux common-uclibc",
+ "uclinux-uclibc": "common-uclibc",
+ "cygwin": "common-cygwin",
+ "mingw32": "common-mingw",
+ }
+ targetinfo = {
+ "arm-linux-gnueabi": "arm-linux",
+ "arm-linux-uclibceabi": "arm-linux-uclibc",
+ "armeb-linux-gnueabi": "armeb-linux",
+ "armeb-linux-uclibceabi": "armeb-linux-uclibc",
+ "powerpc-linux-gnuspe": "powerpc-linux",
+ "powerpc-linux-uclibcspe": "powerpc-linux-uclibc",
+ }
- targetinfo = {\
- "arm-darwin": "endian-little bit-32 common-darwin",\
- "arm-darwin9": "endian-little bit-32 common-darwin",\
- "arm-linux": "endian-little bit-32 common-linux common-glibc arm-common",\
- "arm-linux-gnueabi": "endian-little bit-32 common-linux common-glibc arm-common arm-linux",\
- "arm-linux-uclibc": "endian-little bit-32 common-linux common-uclibc arm-common",\
- "arm-linux-uclibceabi": "endian-little bit-32 common-linux common-uclibc arm-common arm-linux-uclibc",\
- "armeb-linux": "endian-big bit-32 common-linux common-glibc arm-common",\
- "armeb-linux-gnueabi": "endian-big bit-32 common-linux common-glibc arm-common armeb-linux",\
- "armeb-linux-uclibc": "endian-big bit-32 common-linux common-uclibc arm-common",\
- "armeb-linux-uclibceabi": "endian-big bit-32 common-linux common-uclibc arm-common armeb-linux-uclibc",\
- "avr32-linux-uclibc": "endian-big bit-32 common-linux common-uclibc avr32-common",\
- "bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\
- "i386-cygwin": "endian-little bit-32 common-cygwin ix86-common",\
- "i386-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
- "i386-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\
- "i386-mingw32": "endian-little bit-32 common-mingw ix86-common",\
- "i486-cygwin": "endian-little bit-32 common-cygwin ix86-common",\
- "i486-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
- "i486-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\
- "i486-mingw32": "endian-little bit-32 common-mingw ix86-common",\
- "i586-cygwin": "endian-little bit-32 common-cygwin ix86-common",\
- "i586-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
- "i586-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\
- "i586-mingw32": "endian-little bit-32 common-mingw ix86-common",\
- "i686-cygwin": "endian-little bit-32 common-cygwin ix86-common",\
- "i686-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
- "i686-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\
- "i686-mingw32": "endian-little bit-32 common-mingw ix86-common",\
- "ia64-linux": "endian-little bit-64 common-linux common-glibc",\
- "mips-linux": "endian-big bit-32 common-linux common-glibc mips-common",\
- "mips-linux-uclibc": "endian-big bit-32 common-linux common-uclibc mips-common",\
- "mipsel-linux": "endian-little bit-32 common-linux common-glibc mips-common",\
- "mipsel-linux-uclibc": "endian-little bit-32 common-linux common-uclibc mips-common",\
- "nios2-linux": "endian-little bit-32 common-linux common-glibc nios2-common nios2-linux",\
- "nios2-linux-uclibc": "endian-little bit-32 common-linux common-uclibc nios2-common nios2-linux-uclibc",\
- "powerpc-darwin": "endian-big bit-32 common-darwin",\
- "powerpc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\
- "powerpc-linux-gnuspe": "endian-big bit-32 common-linux common-glibc powerpc-common powerpc-linux",\
- "powerpc-linux-uclibc": "endian-big bit-32 common-linux common-uclibc powerpc-common",\
- "powerpc-linux-uclibcspe": "endian-big bit-32 common-linux common-uclibc powerpc-common powerpc-linux-uclibc",\
- "ppc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common powerpc-linux",\
- "ppc64-linux": "endian-big bit-64 common-linux common-glibc powerpc-common powerpc64-linux",\
- "sh3-linux": "endian-little bit-32 common-linux common-glibc sh-common",\
- "sh4-linux": "endian-little bit-32 common-linux common-glibc sh-common",\
- "sh4-linux-uclibc": "endian-little bit-32 common-linux common-uclibc sh-common",\
- "sparc-linux": "endian-big bit-32 common-linux common-glibc",\
- "viac3-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
- "x86_64-linux": "endian-little bit-64 common-linux common-glibc",\
- "x86_64-linux-uclibc": "endian-little bit-64 common-linux common-uclibc"}
- if target in targetinfo:
- info = targetinfo[target].split()
- info.append(target)
- info.append("common")
- return info
- else:
- bb.error("Information not available for target '%s'" % target)
+ arch = d.getVar("HOST_ARCH", True)
+ os = d.getVar("HOST_OS", True)
+ target = "%s-%s" % (arch, os)
+ sitedata = []
+ if arch in archinfo:
+ sitedata.extend(archinfo[arch].split())
+ if os in osinfo:
+ sitedata.extend(osinfo[os].split())
+ if target in targetinfo:
+ sitedata.extend(targetinfo[target].split())
+ sitedata.append(target)
+ sitedata.append("common")
-#
-# Define which site files to use. We check for several site files and
-# use each one that is found, based on the list returned by get_siteinfo_list()
-#
-# Search for the files in the following directories:
-# 1) ${BBPATH}/site (in reverse) - app specific, then site wide
-# 2) ${FILE_DIRNAME}/site-${PV} - app version specific
-#
-def siteinfo_get_files(d):
- sitefiles = ""
-
- # Determine which site files to look for
- sites = get_siteinfo_list(d)
- sites.append("common");
-
- # Check along bbpath for site files and append in reverse order so
- # the application specific sites files are last and system site
- # files first.
- path_bb = bb.data.getVar('BBPATH', d, 1)
- for p in (path_bb or "").split(':'):
- tmp = ""
- for i in sites:
- fname = os.path.join(p, 'site', i)
- if os.path.exists(fname):
- tmp += fname + " "
- sitefiles = tmp + sitefiles;
+ return sitedata
- # Now check for the applications version specific site files
- path_pkgv = os.path.join(bb.data.getVar('FILE_DIRNAME', d, 1), "site-" + bb.data.getVar('PV', d, 1))
- for i in sites:
- fname = os.path.join(path_pkgv, i)
- if os.path.exists(fname):
- sitefiles += fname + " "
+python () {
+ sitedata = set(siteinfo_data(d))
+ if "endian-little" in sitedata:
+ d.setVar("SITEINFO_ENDIANNESS", "le")
+ elif "endian-big" in sitedata:
+ d.setVar("SITEINFO_ENDIANNESS", "be")
+ else:
+ bb.error("Unable to determine endianness for architecture '%s'" %
+ d.getVar("HOST_ARCH", True))
+ bb.fatal("Please add your architecture to siteinfo.bbclass")
- bb.debug(1, "SITE files " + sitefiles);
- return sitefiles
-
-def siteinfo_get_endianess(d):
- info = get_siteinfo_list(d)
- if 'endian-little' in info:
- return "le"
- elif 'endian-big' in info:
- return "be"
- bb.error("Site info could not determine endianess for target")
-
-def siteinfo_get_bits(d):
- info = get_siteinfo_list(d)
- if 'bit-32' in info:
- return "32"
- elif 'bit-64' in info:
- return "64"
- bb.error("Site info could not determine bit size for target")
-
-#
-# Make some information available via variables
-#
-SITEINFO_ENDIANESS = "${@siteinfo_get_endianess(d)}"
-SITEINFO_BITS = "${@siteinfo_get_bits(d)}"
+ if "bit-32" in sitedata:
+ d.setVar("SITEINFO_BITS", "32")
+ elif "bit-64" in sitedata:
+ d.setVar("SITEINFO_BITS", "64")
+ else:
+ bb.error("Unable to determine bit size for architecture '%s'" %
+ d.getVar("HOST_ARCH", True))
+ bb.fatal("Please add your architecture to siteinfo.bbclass")
+}
# Add thumb-interwork to feature list if selected machine supports it.
DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'
-IMAGE_BASENAME = "${@['slugos${SITEINFO_ENDIANESS}', 'ucslugc'][bb.data.getVar('TARGET_OS', d, 1) == 'linux-uclibc']}"
+IMAGE_BASENAME = "${@['slugos${SITEINFO_ENDIANNESS}', 'ucslugc'][bb.data.getVar('TARGET_OS', d, 1) == 'linux-uclibc']}"
# The following need not be set, the defaults should be adequate
#USE_NLS = "no" or "yes"
USE_NLS ?= "no"
# To make errors easier to identify:
-DISTRO_NAME ?= "INVALID-${SITEINFO_ENDIANESS}-${ARM_INSTRUCTION_SET}-${TARGET_OS}"
+DISTRO_NAME ?= "INVALID-${SITEINFO_ENDIANNESS}-${ARM_INSTRUCTION_SET}-${TARGET_OS}"
DISTRO_TYPE ?= "INVALID"
# The following must not be changed.
the parameter for specifying the endianess can be computed and
passed in to the configure script:<screen>do_configure() {
# Additional flag based on target endianess (see siteinfo.bbclass)
- ENDIANESS="${@base_conditional('SITEINFO_ENDIANESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
+ ENDIANESS="${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
oenote Determined endianess as: $ENDIANESS
oe_runconf $ENDIANESS
}</screen></para>
user which endianess it determined was appropriate for the target
device:<screen>do_configure() {
# Additional flag based on target endianess (see siteinfo.bbclass)
- ENDIANESS="${@base_conditional('SITEINFO_ENDIANESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
+ ENDIANESS="${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
oenote Determined endianess as: $ENDIANESS
oe_runconf $ENDIANESS
}</screen></para>
<para>The following example from the openssl recipe shows the
addition of either <emphasis role="bold">-DL_ENDIAN</emphasis> or
<emphasis role="bold">-DB_ENDIAN</emphasis> depending on the value
- of <emphasis role="bold">SITEINFO_ENDIANESS</emphasis> which is set
+ of <emphasis role="bold">SITEINFO_ENDIANNESS</emphasis> which is set
to le for little endian targets and to be for big endian
targets:<screen>do_compile () {
...
# Additional flag based on target endianess (see siteinfo.bbclass)
- CFLAG="${CFLAG} ${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)}"
+ CFLAG="${CFLAG} ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)}"
...</screen></para>
</listitem>
</varlistentry>
<para>The following example from the openssl recipe shows the
addition of either <emphasis role="bold">-DL_ENDIAN</emphasis> or
<emphasis role="bold">-DB_ENDIAN</emphasis> depending on the value
- of <emphasis role="bold">SITEINFO_ENDIANESS</emphasis> which is set
+ of <emphasis role="bold">SITEINFO_ENDIANNESS</emphasis> which is set
to le for little endian targets and to be for big endian
targets:<screen>do_compile () {
...
# Additional flag based on target endianess (see siteinfo.bbclass)
- CFLAG="${CFLAG} ${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)}"
+ CFLAG="${CFLAG} ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)}"
...</screen></para>
</listitem>
</varlistentry>
<variablelist>
<varlistentry>
- <term>SITEINFO_ENDIANESS</term>
+ <term>SITEINFO_ENDIANNESS</term>
<listitem>
<para>Defines the endianess of the target as either
</varlistentry>
</variablelist>
- <para>A typical use for the <command>SITEINFO_ENDIANESS</command> and
+ <para>A typical use for the <command>SITEINFO_ENDIANNESS</command> and
<command>SITEINFO_BITS</command> variables is to provide configuration
within a recipe based on their values. The following example from the
<emphasis>openssl</emphasis> recipe showw the correct define for the
endiness of the target being passed to openssl via the compiler flags. The
define to add to the flags is set based on the value of the
- <command>SITEINFO_ENDIANESS</command> variable. Note that use of the
+ <command>SITEINFO_ENDIANNESS</command> variable. Note that use of the
<emphasis>base_conditional</emphasis> method (see the <xref
linkend="recipes_advanced_python" /> section) to select a value conditional
on the endianess setting:</para>
<para><screen> # Additional flag based on target endiness (see siteinfo.bbclass)
- CFLAG="${CFLAG} ${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)}"</screen></para>
+ CFLAG="${CFLAG} ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)}"</screen></para>
<section>
<title>CONFIG_SITE: The autoconf site files</title>
# defconfig to .config
do_configure() {
rm -f ${S}/.config
- if [ "x${SITEINFO_ENDIANESS}" = "xbe" ]; then
+ if [ "x${SITEINFO_ENDIANNESS}" = "xbe" ]; then
sed -e 's/.*CONFIG_USER_BIGENDIAN.*/CONFIG_USER_BIGENDIAN=y/' \
-e 's/.*CONFIG_BIGENDIAN.*/CONFIG_BIGENDIAN=y/' \
-e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/BE (16MiB Flash)\"/' \
-e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \
-e 's|CONFIG_ENV_DEFAULT_CMDLINE_ALT=|CONFIG_ENV_DEFAULT_CMDLINE_ALT=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \
${WORKDIR}/defconfig > ${S}/.config
- elif [ "x${SITEINFO_ENDIANESS}" = "xle" ]; then
+ elif [ "x${SITEINFO_ENDIANNESS}" = "xle" ]; then
sed -e 's/.*CONFIG_USER_LITTLEENDIAN.*/CONFIG_USER_LITTLEENDIAN=y/' \
-e 's/.*CONFIG_LITTLEENDIAN.*/CONFIG_LITTLEENDIAN=y/' \
-e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/LE (16MiB Flash)\"/' \
do_stage() {
install -d ${STAGING_LOADER_DIR}
- if [ "x${SITEINFO_ENDIANESS}" = "xbe" ]; then
+ if [ "x${SITEINFO_ENDIANNESS}" = "xbe" ]; then
cp src/arch-arm/rom/apex.bin ${STAGING_LOADER_DIR}/apex-nslu2-16mb.bin
- elif [ "x${SITEINFO_ENDIANESS}" = "xle" ]; then
+ elif [ "x${SITEINFO_ENDIANNESS}" = "xle" ]; then
devio '<<'src/arch-arm/rom/apex.bin >${STAGING_LOADER_DIR}/apex-nslu2-16mb.bin 'xp $,4'
else
oefatal do_populate_sysroot cannot determine endianess
# defconfig to .config
do_configure() {
rm -f ${S}/.config
- if [ "x${SITEINFO_ENDIANESS}" = "xbe" ]; then
+ if [ "x${SITEINFO_ENDIANNESS}" = "xbe" ]; then
sed -e 's/.*CONFIG_USER_BIGENDIAN.*/CONFIG_USER_BIGENDIAN=y/' \
-e 's/.*CONFIG_BIGENDIAN.*/CONFIG_BIGENDIAN=y/' \
-e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/BE (8MiB Flash)\"/' \
-e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \
-e 's|CONFIG_ENV_DEFAULT_CMDLINE_ALT=|CONFIG_ENV_DEFAULT_CMDLINE_ALT=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \
${WORKDIR}/defconfig > ${S}/.config
- elif [ "x${SITEINFO_ENDIANESS}" = "xle" ]; then
+ elif [ "x${SITEINFO_ENDIANNESS}" = "xle" ]; then
sed -e 's/.*CONFIG_USER_LITTLEENDIAN.*/CONFIG_USER_LITTLEENDIAN=y/' \
-e 's/.*CONFIG_LITTLEENDIAN.*/CONFIG_LITTLEENDIAN=y/' \
-e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/LE (8MiB Flash)\"/' \
do_stage() {
install -d ${STAGING_LOADER_DIR}
- if [ "x${SITEINFO_ENDIANESS}" = "xbe" ]; then
+ if [ "x${SITEINFO_ENDIANNESS}" = "xbe" ]; then
cp src/arch-arm/rom/apex.bin ${STAGING_LOADER_DIR}/apex-nslu2.bin
- elif [ "x${SITEINFO_ENDIANESS}" = "xle" ]; then
+ elif [ "x${SITEINFO_ENDIANNESS}" = "xle" ]; then
devio '<<'src/arch-arm/rom/apex.bin >${STAGING_LOADER_DIR}/apex-nslu2.bin 'xp $,4'
else
oefatal do_populate_sysroot cannot determine endianess
oe_runmake() {
mv ${S}/config.h ${S}/config.h.orig
# NSLU2
- if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
+ if [ ${SITEINFO_ENDIANNESS} == "be" ] ; then
sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
${WORKDIR}/config-nslu2.h > ${S}/config.h
else
oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2
make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2 || die "oe_runmake failed"
# NAS100d
- if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
+ if [ ${SITEINFO_ENDIANNESS} == "be" ] ; then
sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
${WORKDIR}/config-nas100d.h > ${S}/config.h
else
oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d
make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d || die "oe_runmake failed"
# DSMG-600
- if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
+ if [ ${SITEINFO_ENDIANNESS} == "be" ] ; then
sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
${WORKDIR}/config-dsmg600.h > ${S}/config.h
else
oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600
make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600 || die "oe_runmake failed"
# FSG-3
- if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
+ if [ ${SITEINFO_ENDIANNESS} == "be" ] ; then
sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
${WORKDIR}/config-fsg3.h > ${S}/config.h
else
require espeak.inc
inherit siteinfo
-EXTRA_PHONEMES = '${@base_contains("SITEINFO_ENDIANESS", "be", "espeak-data (= ${PV})", "", d)}'
+EXTRA_PHONEMES = '${@base_contains("SITEINFO_ENDIANNESS", "be", "espeak-data (= ${PV})", "", d)}'
RDEPENDS_${PN} = "portaudio-v19 ${EXTRA_PHONEMES}"
PR = "r0"
install -m 0644 ${S}/src/speak_lib.h ${D}${includedir}
oe_libinstall -so -C src libespeak ${D}${libdir}
- if [ "${SITEINFO_ENDIANESS}" = "be" ] ; then
+ if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
# the big-endian phon* files are provided by the package espeak-data
rm -f ${S}/espeak-data/phon*
fi
S = "${WORKDIR}/gnash-${PV}"
# Boost lacks defines for lots of archs
-TARGET_CC_ARCH_append = " -I${STAGING_INCDIR}/libxml2 -DHAVE_POLL_H ${@[' -D_BIG_ENDIAN', ' -D_LITTLE_ENDIAN'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
+TARGET_CC_ARCH_append = " -I${STAGING_INCDIR}/libxml2 -DHAVE_POLL_H ${@[' -D_BIG_ENDIAN', ' -D_LITTLE_ENDIAN'][bb.data.getVar('SITEINFO_ENDIANNESS', d, 1) == 'le']}"
do_configure_prepend() {
DEFAULT_PREFERENCE_angstrom = "1"
# Boost lacks defines for lots of archs
-TARGET_CC_ARCH_append = " -I${STAGING_INCDIR}/libxml2 -DHAVE_POLL_H ${@[' -D_BIG_ENDIAN', ' -D_LITTLE_ENDIAN'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
+TARGET_CC_ARCH_append = " -I${STAGING_INCDIR}/libxml2 -DHAVE_POLL_H ${@[' -D_BIG_ENDIAN', ' -D_LITTLE_ENDIAN'][bb.data.getVar('SITEINFO_ENDIANNESS', d, 1) == 'le']}"
do_configure_prepend() {
acpaths = " -Imacros"
# Boost lacks defines for lots of archs
-TARGET_CC_ARCH_append = " -I${STAGING_INCDIR}/libxml2 -DHAVE_POLL_H ${@[' -D_BIG_ENDIAN', ' -D_LITTLE_ENDIAN'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
+TARGET_CC_ARCH_append = " -I${STAGING_INCDIR}/libxml2 -DHAVE_POLL_H ${@[' -D_BIG_ENDIAN', ' -D_LITTLE_ENDIAN'][bb.data.getVar('SITEINFO_ENDIANNESS', d, 1) == 'le']}"
do_install_append() {
#
do_configure() {
# Additional flag based on target endiness (see siteinfo.bbclass)
- BYTEORDER="${@base_conditional('SITEINFO_ENDIANESS', 'le', '__LITTLE_ENDIAN_BITFIELD', '__BIG_ENDIAN_BITFIELD', d)}"
+ BYTEORDER="${@base_conditional('SITEINFO_ENDIANNESS', 'le', '__LITTLE_ENDIAN_BITFIELD', '__BIG_ENDIAN_BITFIELD', d)}"
oenote Determined byteorder as: $BYTEORDER
BYTEORDER="${BYTEORDER}" CONFIGOSTYPE="LINUX" ./configure
}
do_configure_prepend() {
rm -f ${S}/.config
echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >>'${S}/.config'
- if test '${SITEINFO_ENDIANESS}' = be
+ if test '${SITEINFO_ENDIANNESS}' = be
then
echo 'CONFIG_CPU_BIG_ENDIAN=y' >>'${S}/.config'
fi
nslu2_MACHID = "597"
PACKAGES += "kernel-image-nslu2"
PKG_kernel-image-nslu2 = "kernel-image-${KERNEL_VERSION}"
-PACKAGE_ARCH_kernel-image-nslu2 = "nslu2${SITEINFO_ENDIANESS}"
+PACKAGE_ARCH_kernel-image-nslu2 = "nslu2${SITEINFO_ENDIANNESS}"
DESCRIPTION_kernel-image-nslu2 = "Linux kernel for the LinkSys NSLU2"
-FILES_kernel-image-nslu2 = "/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nslu2${SITEINFO_ENDIANESS}-${KERNEL_VERSION}"
+FILES_kernel-image-nslu2 = "/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nslu2${SITEINFO_ENDIANNESS}-${KERNEL_VERSION}"
pkg_postinst_kernel-image-nslu2 () {
- update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nslu2${SITEINFO_ENDIANESS}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+ update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nslu2${SITEINFO_ENDIANNESS}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
}
pkg_postrm_kernel-image-nslu2 () {
- update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nslu2${SITEINFO_ENDIANESS}-${KERNEL_VERSION} || true
+ update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nslu2${SITEINFO_ENDIANNESS}-${KERNEL_VERSION} || true
}
# The correct settings for the NAS100D board:
nas100d_MACHID = "865"
PACKAGES += "kernel-image-nas100d"
PKG_kernel-image-nas100d = "kernel-image-${KERNEL_VERSION}"
-PACKAGE_ARCH_kernel-image-nas100d = "nas100d${SITEINFO_ENDIANESS}"
+PACKAGE_ARCH_kernel-image-nas100d = "nas100d${SITEINFO_ENDIANNESS}"
DESCRIPTION_kernel-image-nas100d = "Linux kernel for the IOMega NAS100D"
-FILES_kernel-image-nas100d = "/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nas100d${SITEINFO_ENDIANESS}-${KERNEL_VERSION}"
+FILES_kernel-image-nas100d = "/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nas100d${SITEINFO_ENDIANNESS}-${KERNEL_VERSION}"
pkg_postinst_kernel-image-nas100d () {
- update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nas100d${SITEINFO_ENDIANESS}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+ update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nas100d${SITEINFO_ENDIANNESS}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
}
pkg_postrm_kernel-image-nas100d () {
- update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nas100d${SITEINFO_ENDIANESS}-${KERNEL_VERSION} || true
+ update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-nas100d${SITEINFO_ENDIANNESS}-${KERNEL_VERSION} || true
}
# The correct settings for the DSMG600 board:
dsmg600_MACHID = "964"
PACKAGES += "kernel-image-dsmg600"
PKG_kernel-image-dsmg600 = "kernel-image-${KERNEL_VERSION}"
-PACKAGE_ARCH_kernel-image-dsmg600 = "dsmg600${SITEINFO_ENDIANESS}"
+PACKAGE_ARCH_kernel-image-dsmg600 = "dsmg600${SITEINFO_ENDIANNESS}"
DESCRIPTION_kernel-image-dsmg600 = "Linux kernel for the D-Link DSM-G600"
-FILES_kernel-image-dsmg600 = "/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-dsmg600${SITEINFO_ENDIANESS}-${KERNEL_VERSION}"
+FILES_kernel-image-dsmg600 = "/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-dsmg600${SITEINFO_ENDIANNESS}-${KERNEL_VERSION}"
pkg_postinst_kernel-image-dsmg600 () {
- update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-dsmg600${SITEINFO_ENDIANESS}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+ update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-dsmg600${SITEINFO_ENDIANNESS}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
}
pkg_postrm_kernel-image-dsmg600 () {
- update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-dsmg600${SITEINFO_ENDIANESS}-${KERNEL_VERSION} || true
+ update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-dsmg600${SITEINFO_ENDIANNESS}-${KERNEL_VERSION} || true
}
# The correct settings for the FSG-3 board:
fsg3_MACHID = "1091"
PACKAGES += "kernel-image-fsg3"
PKG_kernel-image-fsg3 = "kernel-image-${KERNEL_VERSION}"
-PACKAGE_ARCH_kernel-image-fsg3 = "fsg3${SITEINFO_ENDIANESS}"
+PACKAGE_ARCH_kernel-image-fsg3 = "fsg3${SITEINFO_ENDIANNESS}"
DESCRIPTION_kernel-image-fsg3 = "Linux kernel for the Freecom FSG-3"
-FILES_kernel-image-fsg3 = "/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-fsg3${SITEINFO_ENDIANESS}-${KERNEL_VERSION}"
+FILES_kernel-image-fsg3 = "/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-fsg3${SITEINFO_ENDIANNESS}-${KERNEL_VERSION}"
pkg_postinst_kernel-image-fsg3 () {
- update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-fsg3${SITEINFO_ENDIANESS}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+ update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-fsg3${SITEINFO_ENDIANNESS}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
}
pkg_postrm_kernel-image-fsg3 () {
- update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-fsg3${SITEINFO_ENDIANESS}-${KERNEL_VERSION} || true
+ update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-fsg3${SITEINFO_ENDIANNESS}-${KERNEL_VERSION} || true
}
BYTESWAP_armeb = "cp$"
install_image '${MACHINE_ARCH}'
# Add the machine specific images, with appropriate suffixes
- install_image 'nslu2${SITEINFO_ENDIANESS}' 'nslu2'
- install_image 'nas100d${SITEINFO_ENDIANESS}' 'nas100d'
- install_image 'dsmg600${SITEINFO_ENDIANESS}' 'dsmg600'
- install_image 'fsg3${SITEINFO_ENDIANESS}' 'fsg3'
+ install_image 'nslu2${SITEINFO_ENDIANNESS}' 'nslu2'
+ install_image 'nas100d${SITEINFO_ENDIANNESS}' 'nas100d'
+ install_image 'dsmg600${SITEINFO_ENDIANNESS}' 'dsmg600'
+ install_image 'fsg3${SITEINFO_ENDIANNESS}' 'fsg3'
}
deploy_image() {
deploy_image '${MACHINE_ARCH}'
# And the machine specific images
- deploy_image 'nslu2${SITEINFO_ENDIANESS}' 'nslu2'
- deploy_image 'nas100d${SITEINFO_ENDIANESS}' 'nas100d'
- deploy_image 'dsmg600${SITEINFO_ENDIANESS}' 'dsmg600'
- deploy_image 'fsg3${SITEINFO_ENDIANESS}' 'fsg3'
+ deploy_image 'nslu2${SITEINFO_ENDIANNESS}' 'nslu2'
+ deploy_image 'nas100d${SITEINFO_ENDIANNESS}' 'nas100d'
+ deploy_image 'dsmg600${SITEINFO_ENDIANNESS}' 'dsmg600'
+ deploy_image 'fsg3${SITEINFO_ENDIANNESS}' 'fsg3'
}
#
# endian support
#
- if [ "${SITEINFO_ENDIANESS}" = "be" ]; then
+ if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
echo "CONFIG_CPU_BIG_ENDIAN=y" >> ${S}/.config
fi
PR = "r5"
# NOTE: We need to save and restore PACKAGE_ARCHS, because sdk.bbclass
-# will change HOST_ARCH, which can result in SITEINFO_ENDIANESS (which
+# will change HOST_ARCH, which can result in SITEINFO_ENDIANNESS (which
# is computed in siteinfo.bbclass) in changing if the original HOST_ARCH
# endianess differs from the new HOST_ARCH endianess. SITEINFO_ENDIANNESS
# is used in a number of places, including the construction of the
do_configure() {
# Additional flag based on target endiness (see siteinfo.bbclass)
- ENDIANESS="${@base_conditional('SITEINFO_ENDIANESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
+ ENDIANESS="${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
oenote Determined endianess as: $ENDIANESS
oe_runconf $ENDIANESS
}
S = "${WORKDIR}/trunk"
-EXTRA_OEMAKE = " ZZIPLIB_CFLAGS=\"${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DOGRE_CONFIG_LITTLE_ENDIAN', '-DOGRE_CONFIG_BIG_ENDIAN', d)}\" "
+EXTRA_OEMAKE = " ZZIPLIB_CFLAGS=\"${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DOGRE_CONFIG_LITTLE_ENDIAN', '-DOGRE_CONFIG_BIG_ENDIAN', d)}\" "
do_configure_prepend() {
sed -i -e /OGRE_DETECT_ENDIAN/d ${S}/configure.in
INC_PR = "r12"
AR_append = " r"
-CFLAG = "${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
+CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
-DTERMIO ${FULL_OPTIMIZATION} -Wall"
# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
--host=${TARGET_SYS} \
--windres=${MACHINE_DISPLAY_WIDTH_PIXELS}x${MACHINE_DISPLAY_HEIGHT_PIXELS} \
--os=UNIX \
- --endian=${SITEINFO_ENDIANESS} \
+ --endian=${SITEINFO_ENDIANNESS} \
--prefix-dir=${prefix} \
--binary-dir=bin \
--with-midi=/bin/true \
--host=${TARGET_SYS} \
--windres=${MACHINE_DISPLAY_WIDTH_PIXELS}x${MACHINE_DISPLAY_HEIGHT_PIXELS} \
--os=UNIX \
- --endian=${SITEINFO_ENDIANESS} \
+ --endian=${SITEINFO_ENDIANNESS} \
--prefix-dir=${prefix} \
--binary-dir=bin \
--with-midi=/bin/true \
def qt_endian(d):
import bb
- if bb.data.getVar('SITEINFO_ENDIANESS', d, True) == "le":
+ if bb.data.getVar('SITEINFO_ENDIANNESS', d, True) == "le":
return "-little-endian"
- elif bb.data.getVar('SITEINFO_ENDIANESS', d, True) == "be":
+ elif bb.data.getVar('SITEINFO_ENDIANNESS', d, True) == "be":
return "-big-endian"
else:
assert False