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

Richard Purdie rpurdie at rpsys.net
Tue Nov 27 13:03:33 UTC 2007


On Tue, 2007-11-27 at 21:43 +1030, Rod Whitby wrote:
> 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.

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








More information about the Openembedded-devel mailing list