[oe] RFC: Adding endian support to linux.inc

Rod Whitby rod at whitby.id.au
Tue Nov 27 11:13:58 UTC 2007


I wish to propose the following patch to linux.inc to enable automatic
support for setting the endian configuration value for those CPUs that
can run in both big and little endian modes.

This is the first step in rationalisation of ixp4xx-kernel.inc to more
closely match the other kernel recipes in OE.

Note that SITEINFO_ENDIANESS is set automatically by siteinfo.class for
all OE MACHINE settings, not just when MACHINE is ixp4xx.

Also note that there is no '=' sign near the end of the line added to
the call to sed.  This is intentional, to remove both commented and
uncommented settings of CPU_BIG_ENDIAN in the original defconfig.

--- packages/linux/linux.inc    14e3b9590c6a3ef9334959ab19c1b24b1954b55b
+++ packages/linux/linux.inc    12ee7627f507a1eb127802f7268674f901a357fc
@@ -41,11 +41,19 @@ do_configure_prepend() {
                 echo "# CONFIG_OABI_COMPAT is not set"  >> ${S}/.config
         fi

+       #
+       # endian support
+       #
+        if [ "${SITEINFO_ENDIANESS}" = "be" ]; then
+                echo "CONFIG_CPU_BIG_ENDIAN=y"          >> ${S}/.config
+        fi
+
         echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config

         sed -e '/CONFIG_AEABI/d' \
             -e '/CONFIG_OABI_COMPAT=/d' \
             -e '/CONFIG_CMDLINE=/d' \
+            -e '/CONFIG_CPU_BIG_ENDIAN/d' \
             -e '/CONFIG_LOGO=/d' \
             -e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
             < '${WORKDIR}/defconfig' >>'${S}/.config'

Silence will be taken as acceptance, and if there are no objections this
change will be committed sometime this coming weekend.

-- Rod




More information about the Openembedded-devel mailing list