Project

General

Profile

Building Uboot on MityArm

Added by Anonymous almost 12 years ago

Hi,
I'm trying to build uboot on a Virtual machine running Ubuntu 11.10. I've pulled
u-boot-mityarm from git and downloaded and installed
ti-sdk-am335x-evm-05.05.01.00-Linux-x86-Install from ti. When I attempt to
"make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mityarm335x" I get
/bin/bash: arm-arago-linux-gnueabi-gcc: command not found. I have read that there might
be a problem with the PATH so I tried to run the install.sh in the /usr/local/ti-sdk-am335x-evm
directory but that gives me:
--------------------------------------------------------------------------------
TISDK setup script

This script will set up your development host for SDK development.
Parts of this script require administrator priviliges (sudo access).
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Verifying Linux host distribution
Unsupported host machine, only Ubuntu 10.04 LTS supported
Failed setup, aborting..

So do I need to be running on a much earlier Ubuntu or is this just another 
PATH issue.

Thanks in advance for any help.

John C.


Replies (18)

RE: Building Uboot on MityArm - Added by Anonymous almost 12 years ago

I've located arm-arago-linux-gnueabi-gcc in the /usr/local/ti-sdk-am335x-evm/linux-devkit/bin/
directory. So the am335x-evm seems to have installed so is this just a PATH issue?

Thanks,
John C.

RE: Building Uboot on MityArm - Added by Tim Iskander almost 12 years ago

John
There is a note in the devkit errata about this. There is an error in the setup script.
See http://support.criticallink.com/redmine/projects/am335x-devkit/wiki/Errata

cheers
/Tim

RE: Building Uboot on MityArm - Added by Anonymous almost 12 years ago

Hi Tim,
I saw that note but it does not make sense to me:
------------------------------------------------------------------------
There is an error in the environment setup script on early (before 4/20/2012) versions of the MityARM-335X development kit SDK virtual machine configuration. The TI SDK was not installed correctly and the SDK_PATH is set incorrectly. This will cause issues trying to build with the toolchain. To correct this issue, comment out line 10 in /usr/local/ti-sdk-am335x-evm-05.03.02.00/linux-devkit/environment-setup like this.

export SDK_PATH=/export/space/ti-sdk-am335x-evm-05.03.02.00/linux-devkit
------------------------------------------------------------------------

I'm not sure if they want me to comment out the line (I forget what character starts a comment in these files) or
change the line to what it shows on the page.

So is it supposed to be "comment out" or "change line to be"?
If it is comment out than what is the character for beginning a comment?

If it is change is this correct:
From:
export SDK_PATH=/usr/local/ti-sdk-am335x-evm/linux-devkit
To:
export SDK_PATH=/export/space/ti-sdk-am335x-evm-05.03.02.00/linux-devkit

Thanks,
John C.

RE: Building Uboot on MityArm - Added by Tim Iskander almost 12 years ago

John
You can just comment it out (by inserting a # at the beginning of the line).
cheers
/Tim

RE: Building Uboot on MityArm - Added by Anonymous almost 12 years ago

Hey Tim,
Put the comment in but running trying to run "make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mityarm335x"
still fails trying to find arm-arago-linux-gnueabi-gcc. Do I need to run another script after commenting the
line out? (I'm trying to follow the procedure on
'http://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Das_U-Boot_Port')

Thanks for the help,
John C.

RE: Building Uboot on MityArm - Added by Anonymous almost 12 years ago

Tim,
I also tried adding to the PATH per the Environment Setup
of the AM335x PSP User guide (which can be found in
/usr/local/ti-sdk-am335x-evm/docs:

export PATH=/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/:$PATH
export PATH=/home/jconover/u-boot-mityarm-335x-d5a32ec/tools:$PATH

This did not help either as I get the following error:

jconover@jconover-Parallels-Virtual-Platform:~/u-boot-mityarm-335x-d5a32ec$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mityarm335x
Configuring for mityarm335x board...
make
make1: Entering directory `/home/jconover/u-boot-mityarm-335x-d5a32ec'
Generating include/autoconf.mk
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Generating include/autoconf.mk.dep
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make1: Leaving directory `/home/jconover/u-boot-mityarm-335x-d5a32ec'
make1: Entering directory `/home/jconover/u-boot-mityarm-335x-d5a32ec'
arm-arago-linux-gnueabi-ld: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
arm-arago-linux-gnueabi-gcc -DDO_DEPS_ONLY \
-g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -I/home/jconover/u-boot-mityarm-335x-d5a32ec/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv5 -Wall -Wstrict-prototypes \
-o lib/asm-offsets.s lib/asm-offsets.c -c -S
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make1: * [lib/asm-offsets.s] Error 1
make1: Leaving directory `/home/jconover/u-boot-mityarm-335x-d5a32ec'
make: *
[mityarm335x] Error 2
jconover@jconover-Parallels-Virtual-Platform:~/u-boot-mityarm-335x-d5a32ec$

Maybe Ubuntu?

RE: Building Uboot on MityArm - Added by Tim Iskander almost 12 years ago

John,
did you re-source the environment-setup file after commenting out the erroneous line?
It sounds like your SDK_PATH variable might not be set.

cheers
/Tim

RE: Building Uboot on MityArm - Added by Tim Iskander almost 12 years ago

John
I just realized you are using a newer version of the SDK than we are. I will have to download the new version and try it so we can talk apples to apples.
cheers
/Tim

RE: Building Uboot on MityArm - Added by Tim Iskander almost 12 years ago

John
I downloaded the 05.05.01.00 and was able to build u-boot with no issue (I am still on 10.04 tho). I did review the instructions on the wiki [[http://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Das_U-Boot_Port]] and noticed that there was a step missing (to source the environment setup file!). I have updated the wiki.

cheers
/Tim

RE: Building Uboot on MityArm - Added by Anonymous almost 12 years ago

Hey Tim,

I was just going through verifying what I had. Everything seems ok except the sdk directory is "/usr/local/ti-sdk-am335x-evm" 
without the version number. I'm not sure why you have it and I don't.
I checked your new command to get to the development prompt and what I get as an output is below.
It seems the board creation part is ok but during the build "error while loading shared libraries: libz.so.1".
What is the libz.so.1 supposed to be part of?

Thanks,
John C.

------------------------------------------------------------------------------------------------------
jconover@jconover-Parallels-Virtual-Platform:/usr/local/ti-sdk-am335x-evm$ ls
bin board-support docs example-applications filesystem Graphics_SDK_setuplinux_4_06_00_02.bin host-tools linux-devkit Makefile Rules.make setup.sh
jconover@jconover-Parallels-Virtual-Platform:/usr/local/ti-sdk-am335x-evm$ . /usr/local/ti-sdk-am335x-evm/linux-devkit/environment-setup
[linux-devkit]:/usr/local/ti-sdk-am335x-evm>
[linux-devkit]:/usr/local/ti-sdk-am335x-evm> make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mityarm335x_config
make: * No rule to make target `mityarm335x_config'. Stop.
[linux-devkit]:/usr/local/ti-sdk-am335x-evm> cd /home/jconover/u-boot-mityarm-335x
u-boot-mityarm-335x/ u-boot-mityarm-335x-d5a32ec/
[linux-devkit]:/usr/local/ti-sdk-am335x-evm> cd /home/jconover/u-boot-mityarm-335x-d5a32ec/
[linux-devkit]:~/u-boot-mityarm-335x-d5a32ec> make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mityarm335x_config
Configuring for mityarm335x board...
[linux-devkit]:~/u-boot-mityarm-335x-d5a32ec> make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mityarm335x
Generating include/autoconf.mk
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Generating include/autoconf.mk.dep
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Configuring for mityarm335x board...
make
make1: Entering directory `/home/jconover/u-boot-mityarm-335x-d5a32ec'
Generating include/autoconf.mk
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Generating include/autoconf.mk.dep
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make1: Leaving directory `/home/jconover/u-boot-mityarm-335x-d5a32ec'
make1: Entering directory `/home/jconover/u-boot-mityarm-335x-d5a32ec'
arm-arago-linux-gnueabi-ld: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
arm-arago-linux-gnueabi-gcc DDO_DEPS_ONLY \
-g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -I/home/jconover/u-boot-mityarm-335x-d5a32ec/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv5 -Wall -Wstrict-prototypes \
-o lib/asm-offsets.s lib/asm-offsets.c -c -S
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make1:
[lib/asm-offsets.s] Error 1
make1: Leaving directory `/home/jconover/u-boot-mityarm-335x-d5a32ec'
make: *
* [mityarm335x] Error 2
[linux-devkit]:~/u-boot-mityarm-335x-d5a32ec>
-----------------------------------------------------------------------------------------------------

RE: Building Uboot on MityArm - Added by Tim Iskander almost 12 years ago

John
libz is the zlib compression library and should be in the SDK install directory (under linux-devkit/arm-arago-linux-gnueabi/usr/lib, along with about 1000 other files (1188 on my machine to be precise).
[linux-devkit]:~/ti-sdk-am335x-evm-05.05.01.00/linux-devkit/arm-arago-linux-gnueabi/usr/lib> ls -l libz*
lrwxrwxrwx 1 mitydsp mitydsp 13 2012-12-11 08:53 libz.so -> libz.so.1.2.3
lrwxrwxrwx 1 mitydsp mitydsp 13 2012-12-11 08:53 libz.so.1 -> libz.so.1.2.3
-rwxr-xr-x 1 mitydsp mitydsp 68724 2012-11-15 10:40 libz.so.1.2.3

[linux-devkit]:~/ti-sdk-am335x-evm-05.05.01.00/linux-devkit/arm-arago-linux-gnueabi/usr/lib> ls -1|wc -l
1188

There are about 135000 files in the SDK
[linux-devkit]:~/ti-sdk-am335x-evm-05.05.01.00> ls -1R|wc -l
135551

Did the install prehaps bail on you part-way though?
cheers
/Tim

RE: Building Uboot on MityArm - Added by Anonymous almost 12 years ago

Tim,
The file is there in /usr/local/ti-sdk-am335x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/lib. Can you tell me what
your $SDK_PATH is because I don't have any.

Thanks,
John C.

RE: Building Uboot on MityArm - Added by Tim Iskander almost 12 years ago

John
I think in my confusion, I may have talked you into messing up your setup (I didn't realize at first the different SDKs).
I've attached my environment-setup file for reference.
If line 10 in your environment-setup file points to the correct install path for the SDK, you can un-comment it (remove the #)
The SDK_PATH points to the "top" of the SDK directory and many of the other environment vars set in the environment-setup script build off it.

The SDK_PATH variable assignment should be the only difference between your environment-setup and mine (I think)
cheers
/Tim

environment-setup (2.38 KB) environment-setup example environment setup

RE: Building Uboot on MityArm - Added by Anonymous almost 12 years ago

Tim,
Removed the uncomment and SDK_PATH looks good:

[linux-devkit]:~/u-boot-mityarm-335x> $SDK_PATH
bash: /usr/local/ti-sdk-am335x-evm/linux-devkit: Is a directory
[linux-devkit]:~/u-boot-mityarm-335x>

The error appears to be in the execution of the cc1 command. /usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1

[linux-devkit]:~/u-boot-mityarm-335x> make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mityarm335x
Generating include/autoconf.mk
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

Not sure how the cc1 gets compiled. Could you tell me where you got the sdk from? I downloaded a binary executable from here:
"http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/sdk/AM335xSDK/latest/index_FDS.html"
I keep coming back to the fact that are paths are different which would lead me to believe that our SDK's were slightly different. Add that to my slightly
newer Ubuntu and maybe that's enough to through off this cc1 executable.

John C.

RE: Building Uboot on MityArm - Added by Michael Williamson almost 12 years ago

Hi John,

With TI's SDKs, they include a setup.sh script in the base installation path to make sure that you have all the necessary Ubuntu packages installed to support their tools.

Have you run this script (as root) to confirm that all the needed packages are installed on your ubuntu machine?

-Mike

RE: Building Uboot on MityArm - Added by Anonymous almost 12 years ago

Tim,

I forgot about it, but that was the one that booted me out because I was not
running Ubuntu 10.04 LTS.

John C.

--------------------------------------------------------------------------------
TISDK setup script

This script will set up your development host for SDK development.
Parts of this script require administrator priviliges (sudo access).
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Verifying Linux host distribution
Unsupported host machine, only Ubuntu 10.04 LTS supported
Failed setup, aborting..
jconover@jconover-Parallels-Virtual-Platform:/usr/local/ti-sdk-am335x-evm$

RE: Building Uboot on MityArm - Added by Tim Iskander almost 12 years ago

John,
try running /usr/local/ti-sdk-am335x-evm/bin/setup-package-install.sh and see if that fixes it.
It looks like maybe its that libz is missing in your host environment, not the target?
cheers
/Tim

RE: Building Uboot on MityArm - Added by Anonymous almost 12 years ago

Hey Tim,

I run the shell script and it seemed to go well (I included the output in a file) but
re-running the script in the environment still yields an error when trying to run the
cc1 command. I built a Ubuntu 10.04 virtual machine but using ti-sdk-am335x-evm-05.05.01.00-Linux-x86-Install
binary for TI site does not seem to run. The file permissions are set to executable and there is
no error output in the shell, it just returns to the prompt. There is no error in the syslog either.
I'd be more than happy if it would run in 10.04 but something is not cooperating. Any suggestions?
Just as a side note we have your we do have your MityARM-3359 running on our base card so a lot
is going well. It was that a little ways down the road we will need to do some tweaks to u-boot.

Thanks,
John C.

[linux-devkit]:~/u-boot-mityarm-335x> make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mityarm335x_config
Generating include/autoconf.mk
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Generating include/autoconf.mk.dep
/usr/local/ti-sdk-am335x-evm/linux-devkit/bin/../libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Configuring for mityarm335x board...
[linux-devkit]:~/u-boot-mityarm-335x>

    (1-18/18)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)