This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux kernel build for DM36x fails...



... with an error: as: unrecognized option '-EL' after the "CC scripts/mod/empty.o" on Ubuntu 10.04 running as user (not root).

It looks like the toolchain's compiler is calling the host's "as" and not the one for the cross compile.  Does anyone know what's wrong?

 CodeSourcery toolchain has the following file dates:

pnorisez@Ubuntu-1004:/opt/codesourcery/Sourcery_G++_Lite/bin$ ls -l

total 15348

-rwxr-xr-x 1 root root  543420 2009-05-21 12:27 arm-none-linux-gnueabi-addr2line

-rwxrwxr-x 2 root root  564048 2009-05-21 12:27 arm-none-linux-gnueabi-ar

-rwxrwxr-x 2 root root  943708 2009-05-21 12:27 arm-none-linux-gnueabi-as

-rwxr-xr-x 2 root root  200980 2009-05-21 12:27 arm-none-linux-gnueabi-c++

-rwxr-xr-x 1 root root  539384 2009-05-21 12:27 arm-none-linux-gnueabi-c++filt

-rwxr-xr-x 1 root root  199732 2009-05-21 12:27 arm-none-linux-gnueabi-cpp

-rwxr-xr-x 2 root root  200980 2009-05-21 12:27 arm-none-linux-gnueabi-g++

-rwxr-xr-x 2 root root  198548 2009-05-21 12:27 arm-none-linux-gnueabi-gcc

-rwxr-xr-x 2 root root  198548 2009-05-21 12:27 arm-none-linux-gnueabi-gcc-4.3.3

-rwxr-xr-x 1 root root   23536 2009-05-21 12:27 arm-none-linux-gnueabi-gcov

-rwxr-xr-x 1 root root 2728868 2009-05-21 12:27 arm-none-linux-gnueabi-gdb

-rwxr-xr-x 1 root root 2728868 2009-05-21 12:27 arm-none-linux-gnueabi-gdbtui

-rwxr-xr-x 1 root root  602080 2009-05-21 12:27 arm-none-linux-gnueabi-gprof

-rwxrwxr-x 2 root root  946080 2009-05-21 12:27 arm-none-linux-gnueabi-ld

-rwxrwxr-x 2 root root  550076 2009-05-21 12:27 arm-none-linux-gnueabi-nm

-rwxrwxr-x 2 root root  694100 2009-05-21 12:27 arm-none-linux-gnueabi-objcopy

-rwxrwxr-x 2 root root  824024 2009-05-21 12:27 arm-none-linux-gnueabi-objdump

-rwxrwxr-x 2 root root  564080 2009-05-21 12:27 arm-none-linux-gnueabi-ranlib

-rwxr-xr-x 1 root root  303624 2009-05-21 12:27 arm-none-linux-gnueabi-readelf

-rwxr-xr-x 1 root root  543452 2009-05-21 12:27 arm-none-linux-gnueabi-size

-rwxr-xr-x 1 root root  334148 2009-05-21 12:27 arm-none-linux-gnueabi-sprite

-rwxr-xr-x 1 root root  543388 2009-05-21 12:27 arm-none-linux-gnueabi-strings

-rwxrwxr-x 2 root root  694100 2009-05-21 12:27 arm-none-linux-gnueabi-strip

  • What's your setting for CROSS_COMPILE?

    The "make" command needs to have both ARCH and CROSS_COMPILE set:
        $ make ARCH=arm CROSS_COMPILE=/opt/codesourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- uImage
    or
        $ PATH=$PATH:/opt/codesourcery/Sourcery_G++_Lite/bin
        $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage

    Regards,

    - Rob

  •  make uImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
    pnorisez@Ubuntu-1004:~$ echo $PATH 
    /opt/codesourcery/Sourcery_G++_Lite/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  • That looks like it *should* work.  Perhaps you can try the other form I suggested with the full absolute path in CROSS_COMPILE.

    Regards,

    - Rob

  • Rob,

    Thanks for helping me.  The other form gets the same result.  Have you any other ideas? 

    -phil

  • No, unfortunately I don't have any other ideas.  The -EL option is an ARM-specific option to the Gnu assembler, so it does seem that your host Ubuntu toolchain is being invoked (and complaining properly since your host machine is not an ARM).

    Just a stab in the dark here, but does it help if you put your "make" goal after the variable assignments?:
        $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage

    Regards,

    - Rob

     

  • No, it makes no difference whether the make target is first or last on the command line.  I'm installing a later CodeSourcery Lite to see if maybe that's the problem.  More later...

  • Rob,

    make ARCH=arm CROSS_COMPILE=arm-none-eabi- uImage using the arm-none-eabi toolchain gets a lot further, but still fails with the following.  It looks to me like I'm using a wrong architecture, but it's late and I'll get back to it in the morning.  If you have any ideas on this new development, I'd like to hear them.  Many Thanks.  If not, I'll close this out as answered tomorrow, and pursue it on my own, until another cul-de-sac appears.  -phil

    ...
    AS      arch/arm/lib/clearbit.o
      AS      arch/arm/lib/copy_from_user.o
    arch/arm/lib/copy_template.S: Assembler messages:
    arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r3,[r1],#4'
    arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
    arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
    arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
    arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
    arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
    arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4'
    arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
    arch/arm/lib/copy_template.S:118: Error: selected processor does not support ARM mode `ldralt r3,[r1],#4'
    arch/arm/lib/copy_template.S:119: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
    arch/arm/lib/copy_template.S:120: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
    arch/arm/lib/copy_template.S:121: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
    arch/arm/lib/copy_template.S:122: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
    arch/arm/lib/copy_template.S:123: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
    arch/arm/lib/copy_template.S:124: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
    arch/arm/lib/copy_template.S:173: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
    arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
    arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
    arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
    arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
    arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
    arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r9,[r1],#4'
    arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4'
    arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
    arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
    arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
    arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
    arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
    arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
    arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
    arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r9,[r1],#4'
    arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4'
    arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
    arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
    arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
    arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
    arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
    arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
    arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
    arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r9,[r1],#4'
    arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4'
    arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
    arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
    make[1]: *** [arch/arm/lib/copy_from_user.o] Error 1
    make: *** [arch/arm/lib] Error 2 
     
  • Hi Phillip Norisez,

           Please do confirm your Platform or hardware, and pick the appropriate configuration file from arch/arm/config/ directory of your kernel. Better manualy copy this config file to .config file of your build directory and try  the command make ARCH=xxx CROSS_COMPILE=tool chain path .

    It should work, if you pick the proper configuration.

  • Hi,

    Can you list out the steps you followed to build the kernel rite from start.

    Regards,

    --Prabhakar Lad

  • Hello ravikiran hv,

    make distclean
    make davinci_dm365_defconfig ARCH=arm CROSS_COMPILE=arm-none-eabi-
    make -d uImage ARCH=arm CROSS_COMPILE=arm-none-eabi->>t4.t 2>&1

    This had the same results as above.

    make distclean
    make davinci_all_defconfig ARCH=arm CROSS_COMPILE=arm-none-eabi-
    make -d uImage ARCH=arm CROSS_COMPILE=arm-none-eabi->>t4.t 2>&1

    Got many compile errors for redefinitions in header files and failed also.

    Maybe I'm still using the wrong toolchain from CodeSourcery?

     

  • Hello, Prabhakar Lad,

    I'm not sure you can see my reply to ravikiran hv, so I repeat it here for you:

    make distclean
    make davinci_dm365_defconfig ARCH=arm CROSS_COMPILE=arm-none-eabi-
    make -d uImage ARCH=arm CROSS_COMPILE=arm-none-eabi->>t4.t 2>&1

    This had the same results as above.

    make distclean
    make davinci_all_defconfig ARCH=arm CROSS_COMPILE=arm-none-eabi-
    make -d uImage ARCH=arm CROSS_COMPILE=arm-none-eabi->>t4.t 2>&1

    Got many compile errors for redefinitions in header files and failed also.

    Maybe I'm still using the wrong toolchain from CodeSourcery?

  • OK, Texas Instruments:  I followed all instructions and have downloaded several version of the CodeSourcery toolchain and I can't even build U-BOOT, let alone the Linux kernel.  I'm following the instructions in your document "Community Linux PSP for DaVinci devices", which state:

    "Follow these steps to rebuild U-Boot:
    1. If you have not already done so, install the CodeSourcery tools on your Linux host. For documentation on
    installing the CodeSourcery tools, please visit the CodeSourcery website [2].
    2. Use your Linux host to extract source files for building U-Boot from the
    src/u-boot/u-boot-#.#.#.#.tar.gz tarball from the Linux PSP package, which is located in the
    DaVinci-PSP-SDK-#.#.#.# directory under the main SDK installation directory. Use the tar command to
    extract the sources.
    Note: Patches from the uboot-patches-#.#.#.#.tar.gz file have already been applied to U-Boot. This is the list of
    patches which have been developed on top of the base version. You can find information about the base U-Boot
    version from the release notes accompanying the PSP release.
    3. Go to the u-boot directory created when you extracted the files.
    4. Run the following commands on your Linux host to build U-Boot. Note: The steps below assume that the
    CodeSourcery tools are already present in your $PATH variable. Information on how to add the tools to your
    $PATH can be obtained form the Getting Started Guide for the CodeSourcery tools.
    host$ make distclean CROSS_COMPILE=arm-none-linux-gnueabi-
    • for DM36x (DM365 and DM368) EVM
    host$ make davinci_dm365evm_config
    CROSS_COMPILE=arm-none-linux-gnueabi-
    host$ make all CROSS_COMPILE=arm-none-linux-gnueabi-
    8. The compiled u-boot.bin file will be created in the same directory.
    9. To change the default options, the EVM configuration file needs to be edited.• for DM36x (DM365 and DM368) EVM are specified in the include file
    include/configs/davinci_dm365evm.h
    To change U-Boot environment area location or size:
    • CONFIG_ENV_SIZE Configures the environment variable size.
    • CONFIG_ENV_OFFSET Configures the environment variable offset."

    In the make all CROSS_COMPILE=arm-none-linux-gnueabi- the process fails with:

    arm-none-linux-gnueabi-gcc  -g  -Os   -fno-common -ffixed-r8 -msoft-float  -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x81080000 -I/home/pnorisez/Desktop/DaVinci_03_21-03_21_00_04/DaVinci-PSP-SDK-03.21.00.04/src/u-boot/uboot-03.21.00.04/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork -march=armv5te -march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector -fno-toplevel-reorder   \
      -o hello_world.o hello_world.c -c
    Assembler messages:
    Fatal error: Invalid -march= option: `armv5te'
    make[1]: *** [hello_world.o] Error 2
    make[1]: Leaving directory `/home/pnorisez/Desktop/DaVinci_03_21-03_21_00_04/DaVinci-PSP-SDK-03.21.00.04/src/u-boot/uboot-03.21.00.04/examples/standalone'
    make: *** [examples/standalone] Error 2

    HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • Hi Phillip,

    1: Can you post the output of 'echo $PATH'

    2: In command prompt type arm-non and hit tab to see if it auto completes.

    3: make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- clean distclean

    4: make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-  davinci_dm365_defconfig

    5: make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage

    Regards,

    --Prabhakar Lad

  • Hi Phillip Norisez,

             Can you open your Rules.make file and verify the path for BUILD_TOOL_DIR? This path must be the one where u have arm-none-linux-xxx toolchain.

    Try with, make ARCH=arm CROSS_COMPILE= /PATH/arm-none-linux-xxxx

    In place of PATH ypo directly give the complete path of arm tool chain.

    If suppose u placed ur toolchain in /home/phillip/xyz/, then ur cmd should be,

    make ARCH=arm CROSS_COMPILE=/home/phillip/xyz/arm-2009q1/bin/arm-none-linux-xxx

    Best of luck !!

  • 1. /opt/codesourcery/SourceryLite_2012.09-64-arm-linux-gnueabi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

    2. arm-none-linux-gnueabi-

    3. Completes OK:

    CLEAN .
    CLEAN arch/arm/kernel
    CLEAN drivers/tty/vt
    CLEAN drivers/video/logo
    CLEAN kernel
    CLEAN usr
    CLEAN .tmp_versions
    CLEAN scripts/basic
    CLEAN scripts/genksyms
    CLEAN scripts/kconfig
    CLEAN scripts/mod
    CLEAN scripts
    CLEAN include/config include/generated
    CLEAN .config .version include/linux/version.h 

    4. Completes OK:

      HOSTCC  scripts/basic/fixdep
      HOSTCC  scripts/basic/docproc
      HOSTCC  scripts/kconfig/conf.o
      HOSTCC  scripts/kconfig/kxgettext.o
      SHIPPED scripts/kconfig/zconf.tab.c
      SHIPPED scripts/kconfig/lex.zconf.c
      SHIPPED scripts/kconfig/zconf.hash.c
      HOSTCC  scripts/kconfig/zconf.tab.o
      HOSTLD  scripts/kconfig/conf
    #
    # configuration written to .config
    #

    5. After compiling much of the kernel, still blows up with:

      AS      arch/arm/lib/copy_from_user.o arch/arm/lib/copy_template.S: Assembler messages: arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r3,[r1],#4' arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4' arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4' arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4' arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4' arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4' arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4' arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4' arch/arm/lib/copy_template.S:118: Error: selected processor does not support ARM mode `ldralt r3,[r1],#4' arch/arm/lib/copy_template.S:119: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4' arch/arm/lib/copy_template.S:120: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4' arch/arm/lib/copy_template.S:121: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4' arch/arm/lib/copy_template.S:122: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4' arch/arm/lib/copy_template.S:123: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4' arch/arm/lib/copy_template.S:124: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4' arch/arm/lib/copy_template.S:173: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4' arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4' arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4' arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4' arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4' arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4' arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r9,[r1],#4' arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4' arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4' arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4' arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4' arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4' arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4' arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4' arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4' arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r9,[r1],#4' arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4'

  • 1. I did not find a "Rules.make" anywhere.  I did find a Makefile.rulse deeply buried under the source directory and looked at it with cat, as follows:

     DaVinci-PSP-SDK-03.21.00.04/src/kernel/linux-03.21.00.04$ cat ./arch/um/scripts/Makefile.rules
    # ===========================================================================
    # arch/um: Generic definitions
    # ===========================================================================

    USER_SINGLE_OBJS := \
     $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
    USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m)  $(USER_SINGLE_OBJS))
    USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))

    $(USER_OBJS:.o=.%): \
     c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(basetarget).o)
    $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
     -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)

    # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of
    # using it directly.
    UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file))

    $(UNPROFILE_OBJS:.o=.%): \
     c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o)
    $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
     -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)

    # The stubs can't try to call mcount or update basic block data
    define unprofile
     $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
    endef

    ifdef subarch-obj-y
    obj-y += subarch.o
    subarch-y = $(addprefix ../../$(HEADER_ARCH)/,$(subarch-obj-y))
    endif

    As you can see, no BUILD_TOOL_DIR at all.

    2. I tried "make ARCH=arm CROSS_COMPILE=/opt/codesourcery/SourceryLite_2012.09-64-arm-linux-gnueabi/bin/arm-none-linux-gnueabi- uImage" with the same resulkts as above, many " Error: selected processor does not support ARM mode" messages for module arch/arm/lib/copy_template.S, after building much of the kernel.

  • Hi Phillip,

               Can u post your basic directory structure and in which path you are executing the build command?

    This is bcz, we might be missing some dependencies while building!!. It will be better if we know, how your code is organized and and what we are trying to build.

  • Hi Phillip,

    Refer the following links :-

    https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=869025

    http://sourceware.org/bugzilla/show_bug.cgi?id=1457

    http://sourceware.org/ml/binutils-cvs/2012-09/msg00119.html

    You need to upgrade binutils (http://www.gnu.org/software/binutils/)

    Regards,

    --Prabhakar Lad

  • /home/pnorisez/Desktop/DaVinci_03_21-03_21_00_04/DaVinci-PSP-SDK-03.21.00.04/src/kernel/linux-03.21.00.04 is the path to the build directory.  This was obtained from the DM36x PSP download.

    /opt/codesourcery/SourceryLite_2012.09-64-arm-linux-gnueabi/bin is the location of the toolchain path which I prepend to $PATH.  It contains:

    arm-none-linux-gnueabi-addr2line   arm-none-linux-gnueabi-gcov
    arm-none-linux-gnueabi-ar          arm-none-linux-gnueabi-gdb
    arm-none-linux-gnueabi-as          arm-none-linux-gnueabi-gprof
    arm-none-linux-gnueabi-c++         arm-none-linux-gnueabi-ld
    arm-none-linux-gnueabi-c++filt     arm-none-linux-gnueabi-nm
    arm-none-linux-gnueabi-cpp         arm-none-linux-gnueabi-objcopy
    arm-none-linux-gnueabi-elfedit     arm-none-linux-gnueabi-objdump
    arm-none-linux-gnueabi-g++         arm-none-linux-gnueabi-ranlib
    arm-none-linux-gnueabi-gcc         arm-none-linux-gnueabi-readelf
    arm-none-linux-gnueabi-gcc-4.7.2   arm-none-linux-gnueabi-size
    arm-none-linux-gnueabi-gcc-ar      arm-none-linux-gnueabi-strings
    arm-none-linux-gnueabi-gcc-nm      arm-none-linux-gnueabi-strip
    arm-none-linux-gnueabi-gcc-ranlib

  • Hi, Prabhakar Lad

    Do I need the upgrade to the host computer or the target build directory?

    Phil Norisez

  • Hi Phillip,

    Do I need the upgrade to the host computer or the target build directory?

    Yes the host computer.

    Regards,

    --Prabhakar Lad

  • I have abandoned the Leopardboard and am now using a Beaglebone which, at least, boots my kernel.   Thanks to everyone for their help!

  • Hai Phillip

    I am here working in linux kernel for ARM processor.I am encounter the same problem that you had..

    arch/arm/lib/copy_template.S: Assembler messages:
    arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r3,[r1],#4'

    You have know one thing at this time.the ERROR shows in architecture library (ARM),so your cross-compiler is right and working good.Problem with in your defconfig file.so check and modify the .config and defconfig file for your TARGET ARCHITECTURE that really what you want to compile.

    what board you are currently working???and what processor????

    Try this one more time it works...i think....Execute the following commands in terminal

    1)make distclean

    2)make <board-name>_defconfig ARCH=arm CROSS_COMPILE= <your codesourcery toolchain path>

    3)make uImage ARCH=arm CROSS_COMPILE= <your codesourcery toolchain path>

    for eg:make uImage ARCH=arm CROSS_COMPILE=/home/sekra/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-

    Try this....Reply if you get anything gud or bad

    Gud luck

    eg)

  • Hello phillip,prabhakar and Ravi

    I'm sekra...im working in Linux kernel 3.3.7...I am stucked out in this problem few days back.if you are in this same problem..this may be helpful to you...

    Your Toolchain is right but version may be collapse or overwhelm your codes because OMAP,davinci media processors were very sensitive to binutilities,ncurses-dev like some of the format utilities...So you may try this toolchain may be it helpful to you.

    Step1: Download this toolchain version from codesourcery as lite edition = arm-2010q1-202-arm-none-linux-gnueabi.bin

    step2: Extract to install it.    

       chmod a+x arm-2010q1-202-arm-none-linux-gnueabi.bin

       ./sudo a+x arm-2010q1-202-arm-none-linux-gnueabi.bin

    Step3: After the installation,Deliver the toolchain PATH to the linux kernel directory...Kindly guys you prefer kernels after 2.6.37 ( 2.6.37)

             Download & extract the kernel...Execute foolowing commands

    1)make distclean

    2)make <board name>_defconfig ARCH=arm CROSS_COMPILE=< your newly installed above toolchain PATH >

    3)make <board name>_defconfig ARCH=arm CROSS_COMPILE=< your newly installed above toolchain PATH >

              eg:make davinci_defconfig ARCH=arm CROSS_COMPILE=/home/xyz/abcd/bin/arm-none-linux-gnueabi- 

    Thanks Try it.God with us