u-boot sources

Note that there are a bunch of patches listed in

/home/jgd/BeagleBone_Dev/Angstrom_srcs/setup-scripts/sources/meta-ti/recipes-bsp/u-boot/u-boot_2011.10rc.bb

I think i have a good idea what is going on and will share.

Base U-boot sources for v2011.12 TAG is in git tree here:
~/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/beagleboard-angstrom-linux-gnueabi/u-boot-2011.12-r8/git

Next if you check:
~/setup-scripts/sources/meta-ti/recipes-bsp/u-boot/u-boot_2011.12.bb

Use the _2011.10rc.bb. That's what "bitbake -v -c u-boot" announces in
the verbose output.

This file says: the final u-boot is: v2011.12 + 14 patches mentioned
in this .bb file.

So to get to the right source, we will have to manually apply these
patches (git am *.patch)

From where would you do the git. Will the git apply the patches?
Sorry, noob to git.

I am going to try that now and see if this yields the final result
good MLO and u-boot.bin.

The binary that I made booted the 'bone just fine. Yay. Probably
un-patched, though.

Major part missing, though, is that none of what we've done so far touch
beagle.c. Neither the recipe nor the make file visit that directory.
Beagle.h is where all the pins are enumerated so that's important.

(If someone who knows this stuff would like to, feel free to pop in and
clear things up for us.)

(this is the recipe that gets executed with "bitbake -v -f u-boot" Add
the verbose command to see lots of stuff going on.)

This command fails for me with:
bitbake -v -f u-boot
Traceback (most recent call last):

Aha! You have to run that little setup script so that the beaglebone
utils are first in the $PATH string. If not, it tries to run
/usr/bin/bitbake and that won't work. (ain't standards grand?)

I edited that script with the following:
MACHINE=beaglebone
CROSS-COMPILER=arm-linux-gnueabi-

So that I don't have to type that out all the time.

For now I have .basrc call that little script as the last thing it does.
Saves a little time and hassle.

John

Guys, just a side note. The BeagleBone is fully supported in mainline
u-boot for at-least the last two u-boot releases... So if you just
want to build/modify that it might be easier then tweaking *.bb
scripts..

Regards,

I'd LOVE to do it that way. Could you give us a little guidance?

By "mainline release", do you mean from here:

http://www.denx.de/wiki/U-Boot/WebHome

or from the mainline Angstrom release?

It's been too many days and too many keystrokes ago but I did grab the
sources from denx and built what I thought was u-boot for the bone. The
result was almost 100k larger and obviously it didn't work.

My only goal in this endeavor is to get the second SPI chip enable pin
working on port 2. I'll figure out what needs to be done and write the
code but as you can see, both of us need pointing in the right direction.

Thanks
John

Guys, just a side note. The BeagleBone is fully supported in mainline
u-boot for at-least the last two u-boot releases... So if you just
want to build/modify that it might be easier then tweaking *.bb
scripts..

I'd LOVE to do it that way. Could you give us a little guidance?

By "mainline release", do you mean from here:

The U-Boot Documentation — Das U-Boot unknown version documentation

Correct..

git clone git://git.denx.de/u-boot.git
cd u-boot/
git checkout v2013.01.01 -b tmp

make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_config
make ARCH=arm CROSS_COMPILE=${CC}

Where CC is some sane gcc arm cross compiler... linaro/angstrom/etc...

or from the mainline Angstrom release?

It's been too many days and too many keystrokes ago but I did grab the
sources from denx and built what I thought was u-boot for the bone. The
result was almost 100k larger and obviously it didn't work.

Regards,

Robert

Note that there are a bunch of patches listed in

/home/jgd/BeagleBone_Dev/Angstrom_srcs/setup-scripts/sources/meta-ti/recipes-bsp/u-boot/u-boot_2011.10rc.bb

I think i have a good idea what is going on and will share.

Base U-boot sources for v2011.12 TAG is in git tree here:
~/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/beagleboard-angstrom-linux-gnueabi/u-boot-2011.12-r8/git

Next if you check:
~/setup-scripts/sources/meta-ti/recipes-bsp/u-boot/u-boot_2011.12.bb

Use the _2011.10rc.bb. That's what "bitbake -v -c u-boot" announces in
the verbose output.

This file says: the final u-boot is: v2011.12 + 14 patches mentioned
in this .bb file.

So to get to the right source, we will have to manually apply these
patches (git am *.patch)

From where would you do the git. Will the git apply the patches?
Sorry, noob to git.

I am going to try that now and see if this yields the final result
good MLO and u-boot.bin.

The binary that I made booted the 'bone just fine. Yay. Probably
un-patched, though.

Major part missing, though, is that none of what we've done so far touch
beagle.c. Neither the recipe nor the make file visit that directory.
Beagle.h is where all the pins are enumerated so that's important.

(If someone who knows this stuff would like to, feel free to pop in and
clear things up for us.)

(this is the recipe that gets executed with "bitbake -v -f u-boot" Add
the verbose command to see lots of stuff going on.)

This command fails for me with:
bitbake -v -f u-boot
Traceback (most recent call last):

Aha! You have to run that little setup script so that the beaglebone
utils are first in the $PATH string. If not, it tries to run
/usr/bin/bitbake and that won't work. (ain't standards grand?)

I edited that script with the following:
MACHINE=beaglebone
CROSS-COMPILER=arm-linux-gnueabi-

So that I don't have to type that out all the time.

For now I have .basrc call that little script as the last thing it does.
Saves a little time and hassle.

John

Guys, just a side note. The BeagleBone is fully supported in mainline
u-boot for at-least the last two u-boot releases... So if you just
want to build/modify that it might be easier then tweaking *.bb
scripts..

As always, i can see mainline may not be complete wrt distribution.

For angstrom we have a need to have ext4 as the filesystem type and
default in upstream mainline today is:
"mmcrootfstype=ext3 rootwait\0" \

This is just an example. Instead of encountering all these issues, its
best to replicate the source of the bb system for u-boot/kernel and
use that was the approach.

Robert

Note that there are a bunch of patches listed in

/home/jgd/BeagleBone_Dev/Angstrom_srcs/setup-scripts/sources/meta-ti/recipes-bsp/u-boot/u-boot_2011.10rc.bb

I think i have a good idea what is going on and will share.

Base U-boot sources for v2011.12 TAG is in git tree here:
~/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/beagleboard-angstrom-linux-gnueabi/u-boot-2011.12-r8/git

Next if you check:
~/setup-scripts/sources/meta-ti/recipes-bsp/u-boot/u-boot_2011.12.bb

Use the _2011.10rc.bb. That's what "bitbake -v -c u-boot" announces in
the verbose output.

This file says: the final u-boot is: v2011.12 + 14 patches mentioned
in this .bb file.

So to get to the right source, we will have to manually apply these
patches (git am *.patch)

From where would you do the git. Will the git apply the patches?
Sorry, noob to git.

I am going to try that now and see if this yields the final result
good MLO and u-boot.bin.

The binary that I made booted the 'bone just fine. Yay. Probably
un-patched, though.

Major part missing, though, is that none of what we've done so far touch
beagle.c. Neither the recipe nor the make file visit that directory.
Beagle.h is where all the pins are enumerated so that's important.

(If someone who knows this stuff would like to, feel free to pop in and
clear things up for us.)

(this is the recipe that gets executed with "bitbake -v -f u-boot" Add
the verbose command to see lots of stuff going on.)

This command fails for me with:
bitbake -v -f u-boot
Traceback (most recent call last):

Aha! You have to run that little setup script so that the beaglebone
utils are first in the $PATH string. If not, it tries to run
/usr/bin/bitbake and that won't work. (ain't standards grand?)

I edited that script with the following:
MACHINE=beaglebone
CROSS-COMPILER=arm-linux-gnueabi-

So that I don't have to type that out all the time.

For now I have .basrc call that little script as the last thing it does.
Saves a little time and hassle.

John

Guys, just a side note. The BeagleBone is fully supported in mainline
u-boot for at-least the last two u-boot releases... So if you just
want to build/modify that it might be easier then tweaking *.bb
scripts..

As always, i can see mainline may not be complete wrt distribution.

For angstrom we have a need to have ext4 as the filesystem type and
default in upstream mainline today is:
"mmcrootfstype=ext3 rootwait\0" \

So... Create a blank "uEnv.txt" text file in your boot partition with
this content:

mmcrootfstype=ext4 rootwait

This is just an example. Instead of encountering all these issues, its
best to replicate the source of the bb system for u-boot/kernel and
use that was the approach.

Regards,

OK, I followed those instructions to the letter - which brought back
earlier memories. .img file produced by this distro is 327,362 bytes
long while the BB distro u-boot.img is 241,984. The .img produced by
Randy's and my work is 242,696. It boots straight away.

looking back through my logbook, this is the same result that I got when
I tried the denx distro before. My suspicion is that it is making a
u-boot.img for the beagleboard instead of the 'bone.

Any more thoughts?

John

That size is fine, if it doesn't boot, I'd blame your c compiler...

For reference, I'm using:

https://launchpad.net/linaro-toolchain-binaries/trunk/2012.04/+download/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux.tar.bz2

And here's the file sizes:

[ps126131]$ ls -l u-boot-beaglebone-v2013.01.01-r1.img
-rw-rw-r-- 1 robertcnelson pg2305788 329672 Feb 4 09:00
u-boot-beaglebone-v2013.01.01-r1.img

[ps126131]$ ls -l MLO-beaglebone-v2013.01.01-r1
-rw-rw-r-- 1 robertcnelson pg2305788 82625 Feb 4 09:00
MLO-beaglebone-v2013.01.01-r1

Actual file binaries:
http://rcn-ee.net/deb/tools/beaglebone/MLO-beaglebone-v2013.01.01-r1
http://rcn-ee.net/deb/tools/beaglebone/u-boot-beaglebone-v2013.01.01-r1.img

Same binaries i'm shipping with my netinstall/demo images...

Regards,

Robert/Jon

Robert

Note that there are a bunch of patches listed in

/home/jgd/BeagleBone_Dev/Angstrom_srcs/setup-scripts/sources/meta-ti/recipes-bsp/u-boot/u-boot_2011.10rc.bb

I think i have a good idea what is going on and will share.

Base U-boot sources for v2011.12 TAG is in git tree here:
~/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/beagleboard-angstrom-linux-gnueabi/u-boot-2011.12-r8/git

Next if you check:
~/setup-scripts/sources/meta-ti/recipes-bsp/u-boot/u-boot_2011.12.bb

Use the _2011.10rc.bb. That's what "bitbake -v -c u-boot" announces in
the verbose output.

This file says: the final u-boot is: v2011.12 + 14 patches mentioned
in this .bb file.

So to get to the right source, we will have to manually apply these
patches (git am *.patch)

From where would you do the git. Will the git apply the patches?
Sorry, noob to git.

I am going to try that now and see if this yields the final result
good MLO and u-boot.bin.

The binary that I made booted the 'bone just fine. Yay. Probably
un-patched, though.

Major part missing, though, is that none of what we've done so far touch
beagle.c. Neither the recipe nor the make file visit that directory.
Beagle.h is where all the pins are enumerated so that's important.

(If someone who knows this stuff would like to, feel free to pop in and
clear things up for us.)

(this is the recipe that gets executed with "bitbake -v -f u-boot" Add
the verbose command to see lots of stuff going on.)

This command fails for me with:
bitbake -v -f u-boot
Traceback (most recent call last):

Aha! You have to run that little setup script so that the beaglebone
utils are first in the $PATH string. If not, it tries to run
/usr/bin/bitbake and that won't work. (ain't standards grand?)

I edited that script with the following:
MACHINE=beaglebone
CROSS-COMPILER=arm-linux-gnueabi-

So that I don't have to type that out all the time.

For now I have .basrc call that little script as the last thing it does.
Saves a little time and hassle.

John

Guys, just a side note. The BeagleBone is fully supported in mainline
u-boot for at-least the last two u-boot releases... So if you just
want to build/modify that it might be easier then tweaking *.bb
scripts..

As always, i can see mainline may not be complete wrt distribution.

For angstrom we have a need to have ext4 as the filesystem type and
default in upstream mainline today is:
"mmcrootfstype=ext3 rootwait\0" \

So... Create a blank "uEnv.txt" text file in your boot partition with
this content:

mmcrootfstype=ext4 rootwait

Upstream mlo/u-boot worked perfectly fine with existing angstrom system.
I based off TAG: v2013.01.01

Thanks for all the help and now i am unblocked.

Logs:
U-Boot SPL 2013.01.01 (Feb 17 2013 - 19:52:47)
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img

U-Boot 2013.01.01 (Feb 17 2013 - 19:52:47)

I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Any more thoughts?

That size is fine, if it doesn't boot, I'd blame your c compiler...

For reference, I'm using:

https://launchpad.net/linaro-toolchain-binaries/trunk/2012.04/+download/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux.tar.bz2

It was the compiler. I had previously installed the Linaro toolchain
but an Ubuntu .deb had installed an old compiler by the same name in
/usr/bin, upstream in my $PATH statement. That and editing my uEnv.txt
file as you instructed Randy did the trick.

Thank you so much.

Now. Any pointers to where I should be looking for that second chip
select pin?

John