Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: ubbut on November 15, 2012, 03:04:04 PM

Title: problems installing arm-elf-gcc
Post by: ubbut on November 15, 2012, 03:04:04 PM
Hi,

I am trying to follow the build instructions (http://magiclantern.wikia.com/wiki/Build_instructions/Unified) but when running summon-arm I get the error message:


******************************************************************
* Patching gcc to add multilib support
******************************************************************
patch: **** Can't open patch file ../patches/patch-gcc-4.6.2-config-arm-t-arm-elf.diff : No such file or directory


I changed SUDO= to SUDO=sudo, but no difference...

thanks :-)
Title: Re: problems installing arm-elf-gcc
Post by: scrax on November 15, 2012, 03:41:08 PM
there is not the folder ../patches/

have you started summon arm script from it's folder?
Title: Re: problems installing arm-elf-gcc
Post by: ubbut on November 15, 2012, 06:45:54 PM
what I did was: (ubuntu)

I downloaded prepare.ubuntu.sh and summon-arm and put them in home/[myuserame]/

I ran sudo prepare.ubuntu.sh  (works)

and then

sudo bash summon-arm  (produces the above error)

I can't see any directory called patches and ~/arm-toolchain462/ is not created ...


Title: Re: problems installing arm-elf-gcc
Post by: nanomad on November 15, 2012, 07:52:43 PM
Step 2b. Or Use a pre-built toolcahin
https://launchpad.net/gcc-arm-embedded

From the sticky topic
Title: Re: problems installing arm-elf-gcc
Post by: scrax on November 15, 2012, 08:06:37 PM
Quote from: ubbut on November 15, 2012, 06:45:54 PM
what I did was: (ubuntu)

I downloaded prepare.ubuntu.sh and summon-arm and put them in home/[myuserame]/

I ran sudo prepare.ubuntu.sh  (works)

and then

sudo bash summon-arm  (produces the above error)

I can't see any directory called patches and ~/arm-toolchain462/ is not created ...

you need do have summon-arm from sources in toolchain folder there are:
prepare.ubuntu.sh
summon-arm and a patches/ folder
seems you missed to copy to your home folder the patches/ folder.

but as nanomad posted you can use a pre-built one
Title: Re: problems installing arm-elf-gcc
Post by: ubbut on November 16, 2012, 08:54:09 PM
Thanks!!

Using the pre-build toolchain I finally managed to compile ML :-)
Title: Re: problems installing arm-elf-gcc
Post by: jplxpto on November 21, 2012, 01:01:48 AM
I've been through all this. After successfully compiling toolchain and ML I decided to use the pre compiled toolchain.
Title: Re: problems installing arm-elf-gcc
Post by: eduperez on November 23, 2012, 11:49:39 AM
Quote from: jplxpto on November 21, 2012, 01:01:48 AM
I've been through all this. After successfully compiling toolchain and ML I decided to use the pre compiled toolchain.

Is there any particular reason to favorite the pre-compiled toolchain over the self-made version with the "summon-arm" script? Thanks.
Title: Re: problems installing arm-elf-gcc
Post by: nanomad on November 23, 2012, 12:26:30 PM
Yes, you don't waste time building it. A self-built toolchain may compile faster on YOUR machine but the gain is really minimal
Title: Re: problems installing arm-elf-gcc
Post by: eduperez on November 26, 2012, 08:18:28 AM
Quote from: nanomad on November 23, 2012, 12:26:30 PM
Yes, you don't waste time building it. A self-built toolchain may compile faster on YOUR machine but the gain is really minimal

Ok, many thanks!
Title: Re: problems installing arm-elf-gcc
Post by: mk11174 on March 03, 2014, 09:23:10 PM
Was wondering how to get the firmware analysis scripts to work with new toolchain such as disasm.py which wants arm-elf? It keeps getting stuck there with a check-elf because I don't have elf and when I try to install elf, it doesn't work with new toolchain?

Is there an easy fix or do I need to start over with an older setup just for the tools.

I already have a good new setup which works perfect for compiling and other scripts work fine, I just want it for the tools to mess with and the disasm just is the one that seems to have a problem so far?

Any tips would be helpful.
Title: Re: problems installing arm-elf-gcc
Post by: a1ex on March 03, 2014, 09:26:50 PM
Probably changing elf to none-eabi would work (didn't try). I still have a copy of arm-elf.
Title: Re: problems installing arm-elf-gcc
Post by: mk11174 on March 03, 2014, 09:32:01 PM
Quote from: a1ex on March 03, 2014, 09:26:50 PM
Probably changing elf to none-eabi would work (didn't try). I still have a copy of arm-elf.
Yeah, 1st thing i tried, it did not work. I wouldnt mind using arm-elf just need to figure out how to get it to work with new toolchain version i guess. Does it still need to be python 2.6 and ipython 0.10?
Title: Re: problems installing arm-elf-gcc
Post by: a1ex on March 03, 2014, 09:33:54 PM
I guess so.. didn't update it for a loooong time.
Title: Re: problems installing arm-elf-gcc
Post by: Marsu42 on March 03, 2014, 10:03:39 PM
Quote from: jplxpto on November 21, 2012, 01:01:48 AM
I've been through all this. After successfully compiling toolchain and ML I decided to use the pre compiled toolchain.

+1 from me - building your own toolchain is kinda interesting and some projects use it by default like OpenWRT, but for ML it makes tracking bugs much harder because any different source part of the toolchain could introduce unknown issues (I had this once with Linaro vs. vanilla gcc).
Title: Re: problems installing arm-elf-gcc
Post by: mk11174 on March 04, 2014, 04:58:26 AM
Ok, built a whole new Enviroment from scratch in UBUNTU, had to go with 10 because it came with python 2.6, I got everything working, using everything from the Build Instructions page, I was able to create hello.o just fine and can use tools now to dissasemble only thing is for now I need to use terminal to add PATH=~/arm-toolchain462/bin:$PATH

where would I add this in ubuntu to make it so its auto set so I dont have to do that everytime.

I am guessing .profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi


but where exactly would this go so it takes affect?
Title: Re: problems installing arm-elf-gcc
Post by: mk11174 on March 04, 2014, 05:22:24 AM
Quote from: mk11174 on March 04, 2014, 04:58:26 AM
Ok, built a whole new Enviroment from scratch in UBUNTU, had to go with 10 because it came with python 2.6, I got everything working, using everything from the Build Instructions page, I was able to create hello.o just fine and can use tools now to dissasemble only thing is for now I need to use terminal to add PATH=~/arm-toolchain462/bin:$PATH

where would I add this in ubuntu to make it so its auto set so I dont have to do that everytime.

I am guessing .profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi


but where exactly would this go so it takes affect?
UPDATE, I had to add it to the end of .bashrc

Works Now!