Skip to contentSkip to conversation

RFC: Adding endian support to linux.inc

PATCH Rod Whitby 4 participants 5 messages Nov 27, 2007 – Nov 28, 2007

lore
Share & tools
lore

Rod Whitby

author
#0 lore raw

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.

linux/linux.inc 12ee7627f507a1eb127802f7268674f901a357fc renamed from linux/linux.inc 14e3b9590c6a3ef9334959ab19c1b24b1954b55b +8 -0
@@ -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

#1 lore raw
Quoted 37 lines · Rod Whitby

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.

linux/linux.inc 12ee7627f507a1eb127802f7268674f901a357fc renamed from linux/linux.inc 14e3b9590c6a3ef9334959ab19c1b24b1954b55b +8 -0
@@ -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'
Quoted 2 lines

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

Ack from me.

It sounds like those other = signs are bugs?

Also, we should really add a function to kernel.bbclass which does this neatly without all the shell foo. But that is for another time/place (writing such a function is somewhere on my todo list) :).

Cheers,

Richard

#2 lore raw
In reply to Rod Whitby
Quoted 3 lines · Rod Whitby

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.

Acked

Signature · 4 lines
JID: hrw-jabber.org
OpenEmbedded developer/consultant

       If you're going down in flames, aim for something expensive.
#3 lore raw
In reply to Rod Whitby
Quoted 3 lines · Rod Whitby

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.

+1. Thanks.

Regards,

:M:

Signature · 1 line
Michael 'Mickey' Lauer | IT-Freelancer | http://www.vanille-media.de
author
#4 lore raw
In reply to Rod Whitby
Quoted 6 lines · Rod Whitby

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.

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

Since it got three ACKs in a row, I've committed it.

-- Rod