Opened 14 years ago

Closed 11 years ago

#834 closed task (fixed)

"mipsel" isn't a usable value for $CLFS_ARCH

Reported by: Andrew Bradford Owned by: Andrew Bradford
Priority: major Milestone: CLFS Embedded 1.0.0
Component: BOOK Version: CLFS Embedded GIT
Keywords: Cc:

Description

In kernel 2.6.38 (and maybe others, haven't checked), a value of "mipsel" isn't valid for the way we use it in the Linux headers installation. The value needs to be "mips" for all variants of mips target triplets.

The offending sed line is:

export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/\(mips\)\(64\)\?\(el\)\?-.*/\1\3/')

Could changing this to just be "mips" rather than a possible "mipsel" be bad in other places in the book?

Change History (4)

comment:1 by Andrew Bradford, 14 years ago

My environment where I have issues is:

CLFS_HOST=x86_64-cross-linux-gnu
CLFS_TARGET=mipsel-unknown-linux-uclibc
CLFS=/opt/clfs-embedded-mips
CLFS_ARCH=mipsel
CLFS_MIPS_LEVEL=1
CLFS_ABI=32
CLFS_ENDIAN=little
CLFS_FLOAT=hard

Kernel headers_check will complain like:

Makefile:547: /mnt/clfs/sources/linux-2.6.38.2/arch/mipsel/Makefile: No such file or directory
make: *** No rule to make target `/mnt/clfs/sources/linux-2.6.38.2/arch/mipsel/Makefile'.  Stop.

comment:2 by Andrew Bradford, 14 years ago

In the "Build Variables" section, these two sed lines need to change:

export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/\(mips\)\(64\)\?\(el\)\?-.*/\1\3/')
export CLFS_ENDIAN=$(echo ${CLFS_ARCH} | sed -e 's/mipsel/little/' -e 's/mips/big/')

The only places CLFS_ARCH is used for MIPS or WRT builds is in uClibc and the kernel build. Changing CLFS_ARCH to just be "mips" will require a change to the uClibc patches naming convention. Currently the patches naming convention would look like "mipsel.little.blahblah", it'll change to "mips.little.blahblah". That's OK as the "el" was kind of redundant with the "little".

My proposed change is to make the first sed line not care about the "el" and the second sed line should work on the CLFS_TARGET variable rather than CLFS_ARCH.

comment:3 by Andrew Bradford, 12 years ago

Owner: changed from clfs-commits@… to Andrew Bradford
Status: newassigned

comment:4 by Andrew Bradford, 11 years ago

Resolution: fixed
Status: assignedclosed

This has been fixed, ${CLFS_ARCH} will now be "mips"

Note: See TracTickets for help on using tickets.