Skip to contentSkip to conversation

U-Boot 2009.11.1 USB Issue and Building U-Boot 2013.07

U-Boot Chuck Wical 4 participants 7 messages Sep 3, 2013 – Sep 5, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

First I am fairly new to U-Boot but over the last 2 weeks I have been going through the README files and anything else I can find that would help resolve the issue I have. Here is a recap:

Currently the project I am working on was setup with U-Boot 2009-11-01 and works just fine with one exception. I was asked to find a solution where our field support engineers could recover if a firmware update failed causing our board to no longer boot. Basically it cycles through RomBOOT and U-Boot. As I looked through the environment variables and commands I came across the USB subsystem and found I could use fatload. With our system there are three files I need to load from USB, these are uImage, etc.jff2 and rootfs.ext2.gz.uboot.

I found if I used tftp these files transferred correctly and the board would boot with the new files. I thought the solution was found and I could simply setup the same files using USB through environment variables. The script worked but the problem was when it tried to load rootfs into RAM it would cause a CPU reset and RomBOOT to start. At first I thought there was something wrong with the script so I tried to load the file by typing it the command but got the same result.

Command:

usb start

fatload usb 0 $(loadaddr) rootfs.ext2.gz.uboot where loadaddr is the same address used by tftp.

My first question is, is there a solution for this issue using U-Boot 2009.11.1? This version builds currently within our project.

Second question is I downloaded U-Boot 2013.07 but noticed huge change in the build process. I figured out the patches I need along with the AT91 configuration for our board. We are using the arm926ej6 processor with a board similar to at91sam9260ek. When I try to build I get the hardware.h:49:3 error: #error "Unsupported AT91 processor" message. When I look at the header file I see where it fails but I don't understand why since I do have a matching define. For some reason hardware.h is not seeing this define and I am stumped as to why. So any suggestions on how to solve or figure this out would be appreciated.

Thanks!

Chuck

#1 lore raw

Dear Chuck,

Quoted 8 lines · In message <[email protected]> you wrote:

I found if I used tftp these files transferred correctly and the board would boot with the new files. I thought the solution was found and I could simply setup the same files using USB through environment variables. The script worked but the problem was when it tried to load rootfs into RAM it would cause a CPU reset and RomBOOT to start. At first I thought there was something wrong with the script so I tried to load the file by typing it the command but got the same result.

Are you using the same load address in RAM with both the tftp and the fatload commands? Can you provide a complete console log of both the working and the crashing cases?

Quoted 6 lines

Command:

usb start

fatload usb 0 $(loadaddr) rootfs.ext2.gz.uboot where loadaddr is the same address used by tftp.

Please show the complete commands, and all output.

Quoted 2 lines

My first question is, is there a solution for this issue using U-Boot 2009.11.1? This version builds currently within our project.

We need to understand the problem beforeanybody could answer that...

Quoted 9 lines

Second question is I downloaded U-Boot 2013.07 but noticed huge change in the build process. I figured out the patches I need along with the AT91 configuration for our board. We are using the arm926ej6 processor with a board similar to at91sam9260ek. When I try to build I get the hardware.h:49:3 error: #error "Unsupported AT91 processor" message. When I look at the header file I see where it fails but I don't understand why since I do have a matching define. For some reason hardware.h is not seeing this define and I am stumped as to why. So any suggestions on how to solve or figure this out would be appreciated.

Well, 2009.11 is indeed extremely old. With such an out-of-tree port you are essentially lost. Adapting the old patches to current mainline is more or less the same effort as starting from scratch (and probably even more so).

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Crash programs fail because they are based on the theory  that,  with
nine women pregnant, you can get a baby a month.  - Wernher von Braun

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Dear Chuck,

please always keep the mailing list on Cc:

And please don't top post / full quote. Thanks.

Quoted 3 lines · In message <[email protected]> you wrote:

Thank you for the reply! Yes the same loadaddr is used for both tftp and fatload as follows: loadaddr=0x21000000

OK.

Quoted 2 lines

I'm not sure what you mean by a complete console log so a little direction would be helpful so I can provide what you are asking for. I

Please copy all input and all output of your system into a file and include this with your posting. For example, you coul use the "script" command, or your terminal emulator may have a logging feature, or you could simply use copy & paste.

Quoted 5 lines

can tell you when I run the commands manually I get the same result each time. I have attached a txt file that shows what happens when I run the command. At the bottom of the file I included the environment variables. If you look at the variable usbgetrootfs this is the command being run.

I cannot see any such attachment.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When the bosses talk about improving  productivity,  they  are  never
talking about themselves.
#4 lore raw

Wolfgang,

Quoted 1 line

please always keep the mailing list on Cc:

My apologies but in my line of work I have to be careful about reply all so there are times I hit reply automatically.

Quoted 1 line

And please don't top post / full quote. Thanks.

Again, my apologies since I keep all emails in thread form here at work for reference. I will do my best to not top post on these forms.

Quoted 1 line

I cannot see any such attachment.

I failed to attached the file. It is now attached. It is just a copy & paste but yes, GtkTerm does have a method to save the screen. It's probably easier to just copy and paste. And before anything is said about what is used for a console it simply works the best for my application.

Chuck Wical
Embedded Software Engineer

Amano McGann, Inc.
651 Taft Street, NE
Minneapolis, MN 55413

Tel:  612-331-2020
Fax:  612-331-5187

Chuck.Wical at AmanoMcGann.com

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: u-boot-2009-usb.txt
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130904/eb2bbb5b/attachment.txt>

#5 lore raw
In reply to Chuck Wical

Dear Chuck Wical

Quoted 5 lines

usb start

fatload usb 0 $(loadaddr) rootfs.ext2.gz.uboot where loadaddr is the same address used by tftp.

Your load address 0 is wrong. On AT91 systems addresses greater than 0x20100000 should be used (RAM location).

Regards

jens

#6 lore raw
In reply to Chuck Wical

Dear Chuck Wical,

Quoted 4 lines · Chuck Wical

First I am fairly new to U-Boot but over the last 2 weeks I have been going through the README files and anything else I can find that would help resolve the issue I have. Here is a recap:

Quoted 8 lines

Currently the project I am working on was setup with U-Boot 2009-11-01 and works just fine with one exception. I was asked to find a solution where our field support engineers could recover if a firmware update failed causing our board to no longer boot. Basically it cycles through RomBOOT and U-Boot. As I looked through the environment variables and commands I came across the USB subsystem and found I could use fatload. With our system there are three files I need to load from USB, these are uImage, etc.jff2 and rootfs.ext2.gz.uboot.

you could also use fatload on mmc. Do you have some mmc in your device?

Quoted 7 lines

I found if I used tftp these files transferred correctly and the board would boot with the new files. I thought the solution was found and I could simply setup the same files using USB through environment variables. The script worked but the problem was when it tried to load rootfs into RAM it would cause a CPU reset and RomBOOT to start. At first I thought there was something wrong with the script so I tried to load the file by typing it the command but got the same result.

I tested the 2009.11.1 release on my 9263ek here and can confirm, that the usb support there is really buggy. It doesn't support current storage devices, seems to behave differently every time I access the device (timeouts, ...).
I managed however to load a 16MiB file via usb storage successfully.

Quoted 6 lines

Command:

usb start

fatload usb 0 $(loadaddr) rootfs.ext2.gz.uboot where loadaddr is the same address used by tftp.

That's in general correct.

Quoted 2 lines

My first question is, is there a solution for this issue using U-Boot 2009.11.1? This version builds currently within our project.

As these are my first steps with 2009.11.1 and usb storage I can't say it. You could backport current usb stack to have better support. On the other hand porting your board forward isn't that hard.

Quoted 5 lines

Second question is I downloaded U-Boot 2013.07 but noticed huge change in the build process. I figured out the patches I need along with the AT91 configuration for our board. We are using the arm926ej6 processor with a board similar to at91sam9260ek. When I try to build I get the hardware.h:49:3 error: #error "Unsupported AT91 processor" message. When I

HAve a look at 9260ek config, it is still in current releases and builds at least. I rarely test the built on real hardware, at the moment I only have an sam9263ek handy.

Quoted 4 lines

look at the header file I see where it fails but I don't understand why since I do have a matching define. For some reason hardware.h is not seeing this define and I am stumped as to why. So any suggestions on how to solve or figure this out would be appreciated.

If you plan to integrate your patches into mainline, we could help to adopt them where needed.

Best regards

Andreas Bie?mann

#7 lore raw

Hello Andreas,

Thanks for the reply!

Quoted 13 lines

Dear Chuck Wical,

Quoted 10 lines · Chuck Wical

First I am fairly new to U-Boot but over the last 2 weeks I have been going through the README files and anything else I can find that would help resolve the issue I have. Here is a recap:

Currently the project I am working on was setup with U-Boot 2009-11-01 and works just fine with one exception. I was asked to find a solution where our field support engineers could recover if a firmware update failed causing our board to no longer boot. Basically it cycles through RomBOOT and U-Boot. As I looked through the environment variables and commands I came across the USB subsystem

Quoted 6 lines

and

Quoted 3 lines

found I could use fatload. With our system there are three files I need to load from USB, these are uImage,
etc.jff2 and rootfs.ext2.gz.uboot.

you could also use fatload on mmc. Do you have some mmc in your device?

We do have mmc slots available on the board but U-Boot is not configured to use mmc. I don't know why that is as it would have made perfect sense to do so. In the meantime, I am trying to figure out how to enable mmc but running into a little difficulty. To put it simply, I just do not know where to enable it or where to look. I will keep trying but a little guidance would be very much appreciated.

Quoted 11 lines
Quoted 8 lines

I found if I used tftp these files transferred correctly and the board would boot with the new files. I thought the solution was found and I could simply setup the same files using USB through environment variables. The script worked but the problem was when it tried to load rootfs into RAM it would cause a CPU reset and RomBOOT to start. At first I thought there was something wrong with the script so I tried to load the file by typing it the command but got the same result.

I tested the 2009.11.1 release on my 9263ek here and can confirm, that the usb support there is really buggy. It doesn't support current storage

devices,

Quoted 1 line

seems to behave differently every time I access the device (timeouts,

...).

Quoted 1 line

I managed however to load a 16MiB file via usb storage successfully.

The size of file I am trying to load is <7MiB but with your comments above it makes me wonder if a timeout is occurring thus forcing the reboot.

Quoted 8 lines
Quoted 7 lines

Command:

usb start

fatload usb 0 $(loadaddr) rootfs.ext2.gz.uboot where loadaddr is the same address used by tftp.

Quoted 6 lines

That's in general correct.

Quoted 2 lines

My first question is, is there a solution for this issue using U-Boot 2009.11.1? This version builds currently within our project.

As these are my first steps with 2009.11.1 and usb storage I can't say it.

You

Quoted 11 lines

could backport current usb stack to have better support. On the other hand porting your board forward isn't that hard.

Quoted 7 lines

Second question is I downloaded U-Boot 2013.07 but noticed huge change in the build process. I figured out the patches I need along with the AT91 configuration for our board. We are using the arm926ej6 processor with a board similar to at91sam9260ek. When I try to build I get the
hardware.h:49:3 error: #error "Unsupported AT91 processor" message. When I

Quoted 1 line

HAve a look at 9260ek config, it is still in current releases and builds

at least. I

Quoted 2 lines

rarely test the built on real hardware, at the moment I only have an sam9263ek handy.

I will take a look and yes, we are using real hardware and I do not have access to a sam9263ek either.

Quoted 7 lines
Quoted 5 lines

look at the header file I see where it fails but I don't understand why since I do have a matching define. For some reason hardware.h is not seeing this define and I am stumped as to why. So any suggestions on how to solve or figure this out would be appreciated.

If you plan to integrate your patches into mainline, we could help to

adopt

Quoted 1 line

them where needed.

I have no plans to incorporate the patches into mainline as they seem very specific to our board and configuration.

Quoted 4 lines

Best regards

Andreas Bie?mann

Cheers

Chuck Wical