[U-Boot-Users] Question about Bad CRC

Hi
I know that with UBoot, to fix the Bad CRC, all you have to do is to type saveenv during the boot process. However, what if someone does not have access to a terminal to be able to type in the saveenv command? Basically, I want to know of a way that a Bad CRC can be fixed without a user having to interact with the boot up process.
Thank you.
Solo

In message 7773DF3D5AD05647B155E7F56554B45CB35ED6@srvhouexc13.nov.com you wrote:
I know that with UBoot, to fix the Bad CRC, all you have to do is to type saveenv during the boot process. However, what if someone does not have access to a terminal to be able to type in the saveenv command?
If you don't have access to the console, you won;t even see the warning message, so just ignore it and continue to use the default environment. Where's the problem?
Basically, I want to know of a way that a Bad CRC can be fixed without a user having to interact with the boot up process.
You can do tricks like defining a CONFIG_PREBOOT command equivalent to this one:
=> setenv preboot 'setenv preboot;saveenv'
At the time of the next boot this will first delete this setting (so it's run exactly once only), and then save the environment.
------_=_NextPart_001_01C8BB67.BD30E8ED Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable
Please don't post HTML here!
Best regards,
Wolfgang Denk

Wolfgang,
1. I think I might be making an error with the syntax. Can you verify that this is the exact correct syntax to fix the Bad CRC (quotations, colons etc) (or am I making an error somewhere in the syntax)
#define CONFIG_PREEBOOT "setenv preboot 'setenv preboot;saveenv';"
2. And also can you verify that I would add this line in the file that I am adding this line of code to is at91rm9200dk.h in /u-boot/include/configs
Thanks a lot
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de] Sent: Wednesday, May 21, 2008 1:43 PM To: Rugunda, Solo Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] Question about Bad CRC
In message 7773DF3D5AD05647B155E7F56554B45CB35ED6@srvhouexc13.nov.com you wrote:
I know that with UBoot, to fix the Bad CRC, all you have to do is to type saveenv during the boot process. However, what if someone does
not
have access to a terminal to be able to type in the saveenv command?
If you don't have access to the console, you won;t even see the warning message, so just ignore it and continue to use the default environment. Where's the problem?
Basically, I want to know of a way that a Bad CRC can be fixed without
a
user having to interact with the boot up process.
You can do tricks like defining a CONFIG_PREBOOT command equivalent to this one:
=> setenv preboot 'setenv preboot;saveenv'
At the time of the next boot this will first delete this setting (so it's run exactly once only), and then save the environment.
------_=_NextPart_001_01C8BB67.BD30E8ED Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable
Please don't post HTML here!
Best regards,
Wolfgang Denk

In message 7773DF3D5AD05647B155E7F56554B45CCBED93@srvhouexc13.nov.com you wrote:
- I think I might be making an error with the syntax. Can you verify
that this is the exact correct syntax to fix the Bad CRC (quotations, colons etc) (or am I making an error somewhere in the syntax)
#define CONFIG_PREEBOOT "setenv preboot 'setenv preboot;saveenv';"
-------------------^^ typo
Try CONFIG_PREBOOT instead...
- And also can you verify that I would add this line in the file that I
am adding this line of code to is at91rm9200dk.h in
Include/configs/at91rm9200dk.h is the configuration file for the old evaluation kit; I don;t think you should meddle with this file. You should have your own board config file instead.
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de]
...
Please don't top post / full quote.
Best regards,
Wolfgang Denk

Wolfgang
Thanks for the help so far. Ok. A little background. I'm completely new to the boot loader myself. The company that developed the prototype for us was a third party who we do not have a contract with anymore so the "new guy" is stuck trying to figure out what is going on.
It looks like they defined the environment variables (ip address, hostname etc) in the /include/configs/at91rm9200dk.h. From your previous email, I gathered that they probably should not have done this (meddle with this file). Or maybe there I could be getting something wrong somewhere. Not entirely sure which the board config file is but there are 2 files I suspect, the first is the fw_env.h ( I guess this the header file - should I define the preboot there?) or the other config file is under etc / fw_env.config but has only one line in it "/dev/mtd2 0x0000 0x10000 0x20000"
Anyway, the way I see it, since they defined the environment variables in /include/configs/at91rm9200dk.h and it has been working fine (bar the bad crc), maybe I should just go ahead and define the config preboot there as well. A couple of questions if I do this:
1. Will the command be seen or picked up from here? And if not? Where will it be picked up? 2. What exactly will the command do? 3. Is this the correct syntax: #define CONFIG_PREBOOT "setenv preboot 'setenv preboot;saveenv';" Or do I have too many quotation marks in here?
Thanks a lot
Solomon
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de] Sent: Wednesday, July 16, 2008 4:53 AM To: Rugunda, Solo Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] Question about Bad CRC
In message 7773DF3D5AD05647B155E7F56554B45CCBED93@srvhouexc13.nov.com you wrote:
- I think I might be making an error with the syntax. Can you verify
that this is the exact correct syntax to fix the Bad CRC (quotations, colons etc) (or am I making an error somewhere in the syntax)
#define CONFIG_PREEBOOT "setenv preboot 'setenv preboot;saveenv';"
-------------------^^ typo
Try CONFIG_PREBOOT instead...
- And also can you verify that I would add this line in the file that
I
am adding this line of code to is at91rm9200dk.h in
Include/configs/at91rm9200dk.h is the configuration file for the old evaluation kit; I don;t think you should meddle with this file. You should have your own board config file instead.
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de]
...
Please don't top post / full quote.
Best regards,
Wolfgang Denk

Hi
I am fairly new to Uboot. I am having trouble running the "make" command from the "u-boot-1.1.4/tools #" prompt.
When I do a make, this is the error I get
Makefile:108: /config.mk: No such file or directory make: *** No rule to make target `/config.mk'. Stop.
I am told by one of the developers that I need to have the correct make parameters and told me to try this ... make HOSTARCH=at91rm9200 .... But I still get the same error
I believe that I don't have the parameters right OR I am missing something in my make command. Do I have to say anything about the target arch or the cross compiler while writing the make command ? My target architecture is the at91rm9200 processor
Thanks
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de] Sent: Wednesday, July 16, 2008 4:53 AM To: Rugunda, Solo Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] Question about Bad CRC
In message 7773DF3D5AD05647B155E7F56554B45CCBED93@srvhouexc13.nov.com you wrote:
- I think I might be making an error with the syntax. Can you verify
that this is the exact correct syntax to fix the Bad CRC (quotations, colons etc) (or am I making an error somewhere in the syntax)
#define CONFIG_PREEBOOT "setenv preboot 'setenv preboot;saveenv';"
-------------------^^ typo
Try CONFIG_PREBOOT instead...
- And also can you verify that I would add this line in the file that
I
am adding this line of code to is at91rm9200dk.h in
Include/configs/at91rm9200dk.h is the configuration file for the old evaluation kit; I don;t think you should meddle with this file. You should have your own board config file instead.
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de]
...
Please don't top post / full quote.
Best regards,
Wolfgang Denk

Rugunda, Solo wrote:
Hi
I am fairly new to Uboot. I am having trouble running the "make" command from the "u-boot-1.1.4/tools #" prompt.
When I do a make, this is the error I get
Makefile:108: /config.mk: No such file or directory make: *** No rule to make target `/config.mk'. Stop.
Hi Solo,
Run make in your top level directory, "u-boot-1.1.4", not in the tools subdirectory.
By the way, the prompt "#" indicates you are running make as root. You should not need to. Running as root for anything that doesn't need root access (essentially everything but host configuration) is a poor practice and discouraged.
HTH, gvb

Thanks Jerry and Nathan
So I built the image by running the Make with the correct cross compiler from the uboot prompt.
The file produced is u-boot.bin.gz
Now, How do I put this image onto my board and in the right location?
Thanks
Solo
-----Original Message----- From: Jerry Van Baren [mailto:gerald.vanbaren@ge.com] Sent: Tuesday, July 22, 2008 2:11 PM To: Rugunda, Solo Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] Trouble with Make Command
Rugunda, Solo wrote:
Hi
I am fairly new to Uboot. I am having trouble running the "make"
command
from the "u-boot-1.1.4/tools #" prompt.
When I do a make, this is the error I get
Makefile:108: /config.mk: No such file or directory make: *** No rule to make target `/config.mk'. Stop.
Hi Solo,
Run make in your top level directory, "u-boot-1.1.4", not in the tools subdirectory.
By the way, the prompt "#" indicates you are running make as root. You should not need to. Running as root for anything that doesn't need root
access (essentially everything but host configuration) is a poor practice and discouraged.
HTH, gvb

On 14:49 Tue 22 Jul , Rugunda, Solo wrote:
Thanks Jerry and Nathan
So I built the image by running the Make with the correct cross compiler from the uboot prompt.
The file produced is u-boot.bin.gz
u-boot.bin.gz? are you sure? It's suppose to produce a elf u-boot and u-boot.bin. You are suppose to burn the u-boot.bin to your flash
Best Regards, J.

You are right. After taking a closer look, the binaries generated are u-boot.bin, u-boot.srec and u-boot ,not sure why the u-boot.bin.gz is in there tho.
Anyway, it looks like I have the correct binary files. Which one do I burn to flash? And how do I go about putting it on the board? (new to uboot)
Thanks.
-----Original Message----- From: Jean-Christophe PLAGNIOL-VILLARD [mailto:plagnioj@jcrosoft.com] Sent: Tuesday, July 22, 2008 3:12 PM To: Rugunda, Solo Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] Trouble with Make Command
On 14:49 Tue 22 Jul , Rugunda, Solo wrote:
Thanks Jerry and Nathan
So I built the image by running the Make with the correct cross
compiler
from the uboot prompt.
The file produced is u-boot.bin.gz
u-boot.bin.gz? are you sure? It's suppose to produce a elf u-boot and u-boot.bin. You are suppose to burn the u-boot.bin to your flash
Best Regards, J.

I have corrected the syntax to CONFIG_PREBOOT. I believe the reason that I am not seeing the effect of this is I am not able to build the binary image.
I have sprinkled questions along this email that I hope someone can assist with
In an earlier reply to me, you (Wolfgang) mentioned that I should be making this Preboot Change in my own board config file. Which file would this be? Or under which directory would I find it? (A 3rd Party with whom we no longer have a contract with designed our software system - hence all the 'inexperienced' questions)
I believe that the 3rd party that built our system set up environment variables in at91rm9200dk.h file (the one you said I probably shouldn't meddle with). The reason I am saying this is because our at91rm9200dk.h file contains parameters like CONFIG_IPADDR, CONFIG_GATEWAYIP, CONFIG_HOSTNAME, CONFIG_EXTRA_ENV_SETTINGS... etc. Because of this, my assumption was to go ahead and also define CONFIG_PREBOOT in this file. Is this fine? Did the 3rd party make a mistake in defining the environment variables in this file?
Anyway, so I went ahead and defined CONFIG_PREBOOT here. To build this changes, I built from the u-boot-1.1.4 prompt. Question - is this where I would build from to incorporate the CONFIG_PREBOOT changes?
I went ahead and run the following commands: 1 - make distclean 2 - make clean 3 - make at91rm9200dk_config 4 - make CROSS_COMPILE=arm-softfloat-linux-gnu-
The build fails saying: "No rule to make target `hello_world.srec', needed by `all'. Stop. Leaving directory `/home/srugunda_backup2/u-boot-1.1.4/examples'
Why is it failing?
I would appreciate any help I can get with the questions in this email.
Thanks.
Solo
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de] Sent: Wednesday, July 16, 2008 4:53 AM To: Rugunda, Solo Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] Question about Bad CRC
In message 7773DF3D5AD05647B155E7F56554B45CCBED93@srvhouexc13.nov.com you wrote:
- I think I might be making an error with the syntax. Can you verify
that this is the exact correct syntax to fix the Bad CRC (quotations, colons etc) (or am I making an error somewhere in the syntax)
#define CONFIG_PREEBOOT "setenv preboot 'setenv preboot;saveenv';"
-------------------^^ typo
Try CONFIG_PREBOOT instead...
- And also can you verify that I would add this line in the file that
I
am adding this line of code to is at91rm9200dk.h in
Include/configs/at91rm9200dk.h is the configuration file for the old evaluation kit; I don;t think you should meddle with this file. You should have your own board config file instead.
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de]
...
Please don't top post / full quote.
Best regards,
Wolfgang Denk
participants (4)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Jerry Van Baren
-
Rugunda, Solo
-
Wolfgang Denk