* [U-Boot] mpc83xx U-boot questions
2008-09-26 18:32 ` Yuke Tian
@ 2008-09-26 18:51 ` David Hawkins
2008-09-26 19:02 ` Yuke Tian
2008-09-26 18:55 ` Jerry Van Baren
2008-10-04 1:42 ` [U-Boot] U-boot Saveenv question Suresh Bhaskaran
2 siblings, 1 reply; 25+ messages in thread
From: David Hawkins @ 2008-09-26 18:51 UTC (permalink / raw)
To: u-boot
Hi Yuke,
> To be specific, I followed the steps to build RTEMS:
> 1) Download a set of toolsets (gcc-4.2.3, binutils-2.18, newlib-1.16 and
> RTEMS specific patches) and build them or use the pre-built rpm toolset
> for RHLE5.
> 2) Download the RTEMS (4.9.0 for the latest version) and use the toolset
> to build RTEMS.
> 3) Compile a RTEMS application, tailed for specific BSP. That is where
> I get .exe (it is ELF 32-bit MSB executable, PowerPC or cisco 4500,
> version 1 (SYSV), statically linked, not stripped). I just want to use
> the vendor provided U-Boot to download the .exe and get it run. I didn't
> expect to rebuilt U-Boot, but that might be educational :-)
Great, that is useful background information in which
to pose your questions.
It sounds like the Makefile puts a .exe extension on
the ELF file, and that can safely be ignored.
Does the RTEMs BSP for the MPC8313 board have a README
that tells you how to boot RTEMs? The ELF file is
not what will be executed by U-Boot. powerpc-linux-objcopy
would most likely be used to convert the ELF into a binary
image. mkimage might be run on that image to add a header.
However, I've only used U-Boot with standalone apps and
Linux, so someone else would have to comment.
(VxWorks/RTEMs users - any help here?)
It does however sound like you have a reasonable tools
setup, and the step you are looking for is
'what is necessary to convert the ELF file to a U-Boot
compatible format, and then what U-Boot command is needed
to execute it?'
Hopefully someone can help answer that. Please go and re-review
the U-Boot README file too, there's a chance that there are
some useful comments in there - now that you know what you
are looking for.
If someone on the RTEMs list answers your question, please
post the results back to this list so that the solution
is available in the archive.
Cheers,
Dave
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] mpc83xx U-boot questions
2008-09-26 18:51 ` David Hawkins
@ 2008-09-26 19:02 ` Yuke Tian
2008-09-26 19:20 ` David Hawkins
0 siblings, 1 reply; 25+ messages in thread
From: Yuke Tian @ 2008-09-26 19:02 UTC (permalink / raw)
To: u-boot
David Hawkins wrote:
> Hi Yuke,
>
>> To be specific, I followed the steps to build RTEMS:
>> 1) Download a set of toolsets (gcc-4.2.3, binutils-2.18, newlib-1.16 and
>> RTEMS specific patches) and build them or use the pre-built rpm toolset
>> for RHLE5.
>> 2) Download the RTEMS (4.9.0 for the latest version) and use the toolset
>> to build RTEMS.
>> 3) Compile a RTEMS application, tailed for specific BSP. That is where
>> I get .exe (it is ELF 32-bit MSB executable, PowerPC or cisco 4500,
>> version 1 (SYSV), statically linked, not stripped). I just want to use
>> the vendor provided U-Boot to download the .exe and get it run. I didn't
>> expect to rebuilt U-Boot, but that might be educational :-)
>
> Great, that is useful background information in which
> to pose your questions.
>
> It sounds like the Makefile puts a .exe extension on
> the ELF file, and that can safely be ignored.
>
> Does the RTEMs BSP for the MPC8313 board have a README
> that tells you how to boot RTEMs? The ELF file is
> not what will be executed by U-Boot. powerpc-linux-objcopy
> would most likely be used to convert the ELF into a binary
> image. mkimage might be run on that image to add a header.
> However, I've only used U-Boot with standalone apps and
> Linux, so someone else would have to comment.
> (VxWorks/RTEMs users - any help here?)
>
> It does however sound like you have a reasonable tools
> setup, and the step you are looking for is
>
> 'what is necessary to convert the ELF file to a U-Boot
> compatible format, and then what U-Boot command is needed
> to execute it?'
>
That is exactly what I want now (I need to pick up U-boot later :-) ). I
will try powerpc-linux-objcopy and let you know.
Thank you and sorry again for the unclear statement.
> Hopefully someone can help answer that. Please go and re-review
> the U-Boot README file too, there's a chance that there are
> some useful comments in there - now that you know what you
> are looking for.
>
> If someone on the RTEMs list answers your question, please
> post the results back to this list so that the solution
> is available in the archive.
>
> Cheers,
> Dave
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] mpc83xx U-boot questions
2008-09-26 19:02 ` Yuke Tian
@ 2008-09-26 19:20 ` David Hawkins
2008-09-26 20:00 ` Yuke Tian
0 siblings, 1 reply; 25+ messages in thread
From: David Hawkins @ 2008-09-26 19:20 UTC (permalink / raw)
To: u-boot
Hi Yuke,
> That is exactly what I want now (I need to pick up
> U-boot later :-) ). I will try powerpc-linux-objcopy
> and let you know.
Well, powerpc-linux-object copy will give you a binary
blob, but thats useless to you unless you know how to
use/load the blob.
I'm a little confused as to why you say you have
a BSP, and none of this is explained in the BSP.
Where did this BSP come from? Got a link?
Cheers,
Dave
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] mpc83xx U-boot questions
2008-09-26 19:20 ` David Hawkins
@ 2008-09-26 20:00 ` Yuke Tian
2008-09-26 20:14 ` David Hawkins
0 siblings, 1 reply; 25+ messages in thread
From: Yuke Tian @ 2008-09-26 20:00 UTC (permalink / raw)
To: u-boot
Hi David,
After email some people in RTEMS community, I got the solutions:
--- To prepare the U-boot image for RTEMS application (with os built in
for RTMES) in host pc (RHEL5)
powerpc-rtems4.9-objcopy -O binary test.ext test.bin (the
powerpc-rtems4.9-objcopy is provided from rtems toolset)
gzip -9 test.bin
mkimage -A ppc -O rtems -T kernel -C gzip -a 100 -e 10000 -n "RTEMS
Test" -d test.bin test.img (I am still looking for mkimage software)
--To load through U-boot (pre-installed by board vendor)
setenv ethact TSEC1 (this board has 6 ethernet port, choose one)
setenv ipaddr 123.345.123.1 (board ip)
setenv serverip 123.345.123.2 (tftp server ip)
tftp 1000000 test.img (load image to this RAM address)
bootm (then run)
This is the recommended step to boot the board into RTEMS through U-boot.
I guess to get mkimage for this board, I need to rebuilt U-boot anyway.
Or this mkimage is a standard utility from U-boot ?
Thanks for the discussion.
Yuke
David Hawkins wrote:
> Hi Yuke,
>
>> That is exactly what I want now (I need to pick up
>> U-boot later :-) ). I will try powerpc-linux-objcopy
>> and let you know.
>
> Well, powerpc-linux-object copy will give you a binary
> blob, but thats useless to you unless you know how to
> use/load the blob.
>
> I'm a little confused as to why you say you have
> a BSP, and none of this is explained in the BSP.
>
> Where did this BSP come from? Got a link?
>
> Cheers,
> Dave
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] mpc83xx U-boot questions
2008-09-26 20:00 ` Yuke Tian
@ 2008-09-26 20:14 ` David Hawkins
0 siblings, 0 replies; 25+ messages in thread
From: David Hawkins @ 2008-09-26 20:14 UTC (permalink / raw)
To: u-boot
Hi Yuke,
> After email some people in RTEMS community, I got the solutions:
>
> --- To prepare the U-boot image for RTEMS application (with os built in
> for RTMES) in host pc (RHEL5)
> powerpc-rtems4.9-objcopy -O binary test.ext test.bin (the
> powerpc-rtems4.9-objcopy is provided from rtems toolset)
> gzip -9 test.bin
> mkimage -A ppc -O rtems -T kernel -C gzip -a 100 -e 10000 -n "RTEMS
> Test" -d test.bin test.img (I am still looking for mkimage software)
Install the ELDK tools as per my document, and it'll
get installed for you. You'll want to install whatever
the latest version is ... ELDK-4.2 I think.
> --To load through U-boot (pre-installed by board vendor)
> setenv ethact TSEC1 (this board has 6 ethernet port, choose one)
> setenv ipaddr 123.345.123.1 (board ip)
> setenv serverip 123.345.123.2 (tftp server ip)
> tftp 1000000 test.img (load image to this RAM address)
> bootm (then run)
>
> This is the recommended step to boot the board into RTEMS through U-boot.
Great!
> I guess to get mkimage for this board, I need to rebuilt U-boot anyway.
> Or this mkimage is a standard utility from U-boot ?
Its a binary for the development host (RHEL5), so it will
get installed with the ELDK.
As a bonus, once you boot a version of RTEMs built using their
toolset, you should be able to set the compiler tools to those
provided with the ELDK and build RTEMs with that toolset too.
Cheers,
Dave
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] mpc83xx U-boot questions
2008-09-26 18:32 ` Yuke Tian
2008-09-26 18:51 ` David Hawkins
@ 2008-09-26 18:55 ` Jerry Van Baren
2008-10-04 1:42 ` [U-Boot] U-boot Saveenv question Suresh Bhaskaran
2 siblings, 0 replies; 25+ messages in thread
From: Jerry Van Baren @ 2008-09-26 18:55 UTC (permalink / raw)
To: u-boot
Yuke Tian wrote:
> Thanks.
>
> To be specific, I followed the steps to build RTEMS:
> 1) Download a set of toolsets (gcc-4.2.3, binutils-2.18, newlib-1.16 and
> RTEMS specific patches) and build them or use the pre-built rpm toolset
> for RHLE5.
OK.
> 2) Download the RTEMS (4.9.0 for the latest version) and use the toolset
> to build RTEMS.
OK for RTEMS, it may be some work getting it to compile u-boot or linux.
Or maybe not. Around here, ELDK dominates because it is easy to build
u-boot and linux with it (thanks, Wolfgang!). If you get serious about
rebuilding u-boot or linux, I would strongly urge you to use ELDK to
build the first one before trying to get RTEMS' toolset to work. Rule
#1 of engineering: change only ONE variable at a time!
> 3) Compile a RTEMS application, tailed for specific BSP. That is where
> I get .exe (it is ELF 32-bit MSB executable, PowerPC or cisco 4500,
> version 1 (SYSV), statically linked, not stripped).
That's good.
> I just want to use the vendor provided U-Boot to download the .exe
> and get it run.
I don't know anything about RTEMS and its BSP. It may want to be burned
into flash, replacing u-boot. In that case, open your wallet and buy a
JTAG debugger (e.g. BDI-3000).
----
If you want to use u-boot to load & go, you need to figure out where the
.exe is loaded in memory and make sure it is in RAM, not by the start of
RAM (interrupt vectors) or end of RAM (u-boot). You probably will need
to change the load location (Makefile or linker script *.lds).
You will need to figure out where RTEMS wants to live. It may want to
live at the start of RAM so it can take over the interrupt vectors. You
will need to figure out how to get it where it needs to be, if you
cannot load it directly there. You may be able to learn from how u-boot
boots a vxWorks image? That is the closest match that I can think of to
how RTEMS will work.
You will also have to figure out how to make RTEMS support your board's
I/O (serial first, ethernet second).
All of the above should be addressed more or less successfully by the
BSP. Whether your RTEMS+BSP plays well (or at all) with u-boot, I don't
have a clue. Since we (I) don't know much about RTEMS and the BSP you
have, we (I) cannot say much specific.
> I didn't expect to rebuilt U-Boot, but that might be educational :-)
It could be expensive too, if you don't have a JTAG debugger to recover
from oopses. :-/
> Yuke
BTW, please bottom/inline post.
<http://en.wikipedia.org/wiki/Posting_style#Bottom-posting>
Best regards,
gvb
> Jerry Van Baren wrote:
>> Yuke Tian wrote:
>>> Hi,
>>>
>>> Sorry to ask the stupid question. I did study the RTEMS for a while and
>>> am sure the tool set are correct (from ftp://www.rtems.com), otherwise
>>> they will not build RTEMS. All the tools and development are done in
>>> linux (RHLE5). I just got this board using U-boot and not sure about
>>> it. David's manual help a lot. Thanks.
>>>
>>> Yuke
>> I didn't call your question stupid, just clueless. ;-)
>>
>> It sounds like you are coming up to speed rapidly, including providing
>> useful background information and asking smart questions. You might
>> add the following to your reading list:
>> <http://www.catb.org/esr/faqs/smart-questions.html>
>>
>> Best regards,
>> gvb
>>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] U-boot Saveenv question
2008-09-26 18:32 ` Yuke Tian
2008-09-26 18:51 ` David Hawkins
2008-09-26 18:55 ` Jerry Van Baren
@ 2008-10-04 1:42 ` Suresh Bhaskaran
2008-10-05 15:55 ` Andrejs Cainikovs
2 siblings, 1 reply; 25+ messages in thread
From: Suresh Bhaskaran @ 2008-10-04 1:42 UTC (permalink / raw)
To: u-boot
Hello,
I have a question relating to doing saveenv from the u-boot command line
(after hitting key to stop autoboot), and having u-boot come up during
the next reboot with the saved environment.
First of all, I apologize in advance if this question is out of place in
this mailing list.
This mailing list seems to be for u-boot patch upgrades, rather than for
general questions?
Anyway, it's the best list on u-boot I was able to find:
1. I upgraded from u-boot 1.1.3 (2005) to u-boot 1.3.4 (2008)
2. I've put in the board/target-specific files incorporated, and have
it working.
3. However, when I do a saveenv (e.g. after "set serverip 10.0.0.1"),
and I do a reboot, the new environment variable doesn't show up.
a. (I've verified that it actually gets written to flash...)
4. Is there something I else I need to do to "turn on" re-booting from
saved environment?
Thanks in advance.
Suresh Bhaskaran
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] U-boot Saveenv question
2008-10-04 1:42 ` [U-Boot] U-boot Saveenv question Suresh Bhaskaran
@ 2008-10-05 15:55 ` Andrejs Cainikovs
2008-10-06 17:02 ` Suresh Bhaskaran
0 siblings, 1 reply; 25+ messages in thread
From: Andrejs Cainikovs @ 2008-10-05 15:55 UTC (permalink / raw)
To: u-boot
How did you verified that your environment get saved?
What is the result of running the 'flinfo'?
Is CONFIG_ENV_OVERWRITE defined in your board file?
Kind regards,
Andrejs Cainikovs.
Suresh Bhaskaran wrote:
> Hello,
>
> I have a question relating to doing saveenv from the u-boot command line
> (after hitting key to stop autoboot), and having u-boot come up during
> the next reboot with the saved environment.
>
> First of all, I apologize in advance if this question is out of place in
> this mailing list.
>
> This mailing list seems to be for u-boot patch upgrades, rather than for
> general questions?
>
> Anyway, it's the best list on u-boot I was able to find:
>
> 1. I upgraded from u-boot 1.1.3 (2005) to u-boot 1.3.4 (2008)
> 2. I've put in the board/target-specific files incorporated, and have
> it working.
>
> 3. However, when I do a saveenv (e.g. after "set serverip 10.0.0.1"),
> and I do a reboot, the new environment variable doesn't show up.
> a. (I've verified that it actually gets written to flash...)
>
> 4. Is there something I else I need to do to "turn on" re-booting from
> saved environment?
>
> Thanks in advance.
>
> Suresh Bhaskaran
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] U-boot Saveenv question
2008-10-05 15:55 ` Andrejs Cainikovs
@ 2008-10-06 17:02 ` Suresh Bhaskaran
2008-10-06 17:06 ` Jerry Van Baren
0 siblings, 1 reply; 25+ messages in thread
From: Suresh Bhaskaran @ 2008-10-06 17:02 UTC (permalink / raw)
To: u-boot
1. I verified flash contents using the md.w command in u-boot
2. I've already verified correct flash r/w operation using the cp.w
command
3. Yes, the CONFIG_ENV_OVERWRITE flag is defined in my boardfile
4. Flinfo shows the correct flash configuration (sectors, etc) of the
flash
I can see the new env variable (e.g. set serverip 10.0.0.1) at the end
of the saveenv area in flash (after I do a saveenv). (the original
entry is removed from the list in flash, and the new updated entry is
added to the end of the list in flash).
Still, when I reboot u-boot, I don't get the new environment variable
updated from flash.
What am I missing?
Thanks.
Suresh
-----Original Message-----
From: Andrejs Cainikovs [mailto:andrejsc at globalautomationsystems.com]
Sent: Sunday, October 05, 2008 8:55 AM
To: Suresh Bhaskaran
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] U-boot Saveenv question
How did you verified that your environment get saved?
What is the result of running the 'flinfo'?
Is CONFIG_ENV_OVERWRITE defined in your board file?
Kind regards,
Andrejs Cainikovs.
Suresh Bhaskaran wrote:
> Hello,
>
> I have a question relating to doing saveenv from the u-boot command
line
> (after hitting key to stop autoboot), and having u-boot come up during
> the next reboot with the saved environment.
>
> First of all, I apologize in advance if this question is out of place
in
> this mailing list.
>
> This mailing list seems to be for u-boot patch upgrades, rather than
for
> general questions?
>
> Anyway, it's the best list on u-boot I was able to find:
>
> 1. I upgraded from u-boot 1.1.3 (2005) to u-boot 1.3.4 (2008)
> 2. I've put in the board/target-specific files incorporated, and have
> it working.
>
> 3. However, when I do a saveenv (e.g. after "set serverip 10.0.0.1"),
> and I do a reboot, the new environment variable doesn't show up.
> a. (I've verified that it actually gets written to flash...)
>
> 4. Is there something I else I need to do to "turn on" re-booting
from
> saved environment?
>
> Thanks in advance.
>
> Suresh Bhaskaran
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] U-boot Saveenv question
2008-10-06 17:02 ` Suresh Bhaskaran
@ 2008-10-06 17:06 ` Jerry Van Baren
2008-10-06 18:17 ` Suresh Bhaskaran
2008-10-07 0:57 ` [U-Boot] U-boot Saveenv question --> final tested solution Suresh Bhaskaran
0 siblings, 2 replies; 25+ messages in thread
From: Jerry Van Baren @ 2008-10-06 17:06 UTC (permalink / raw)
To: u-boot
Suresh Bhaskaran wrote:
> 1. I verified flash contents using the md.w command in u-boot
> 2. I've already verified correct flash r/w operation using the cp.w
> command
> 3. Yes, the CONFIG_ENV_OVERWRITE flag is defined in my boardfile
> 4. Flinfo shows the correct flash configuration (sectors, etc) of the
> flash
>
> I can see the new env variable (e.g. set serverip 10.0.0.1) at the end
> of the saveenv area in flash (after I do a saveenv). (the original
> entry is removed from the list in flash, and the new updated entry is
> added to the end of the list in flash).
>
> Still, when I reboot u-boot, I don't get the new environment variable
> updated from flash.
>
> What am I missing?
>
> Thanks.
> Suresh
Please don't top post.
Are you using DHCP (BOOTP)? If you are, serverip is probably being sent
by your DHCP server and overriding the value you have set in your env.
I'm assuming you are *not* getting env CRC failure warnings on boot.
If neither of the above guesses solve the problem, please copy what is
printed to the console on start up. Without more information, we're
just guessing.
Best regards,
gvb
> -----Original Message-----
> From: Andrejs Cainikovs [mailto:andrejsc at globalautomationsystems.com]
> Sent: Sunday, October 05, 2008 8:55 AM
> To: Suresh Bhaskaran
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] U-boot Saveenv question
>
> How did you verified that your environment get saved?
> What is the result of running the 'flinfo'?
> Is CONFIG_ENV_OVERWRITE defined in your board file?
>
> Kind regards,
> Andrejs Cainikovs.
>
> Suresh Bhaskaran wrote:
>> Hello,
>>
>> I have a question relating to doing saveenv from the u-boot command
> line
>> (after hitting key to stop autoboot), and having u-boot come up during
>> the next reboot with the saved environment.
>>
>> First of all, I apologize in advance if this question is out of place
> in
>> this mailing list.
>>
>> This mailing list seems to be for u-boot patch upgrades, rather than
> for
>> general questions?
>>
>> Anyway, it's the best list on u-boot I was able to find:
>>
>> 1. I upgraded from u-boot 1.1.3 (2005) to u-boot 1.3.4 (2008)
>> 2. I've put in the board/target-specific files incorporated, and have
>> it working.
>>
>> 3. However, when I do a saveenv (e.g. after "set serverip 10.0.0.1"),
>> and I do a reboot, the new environment variable doesn't show up.
>> a. (I've verified that it actually gets written to flash...)
>>
>> 4. Is there something I else I need to do to "turn on" re-booting
> from
>> saved environment?
>>
>> Thanks in advance.
>>
>> Suresh Bhaskaran
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] U-boot Saveenv question
2008-10-06 17:06 ` Jerry Van Baren
@ 2008-10-06 18:17 ` Suresh Bhaskaran
2008-10-07 0:57 ` [U-Boot] U-boot Saveenv question --> final tested solution Suresh Bhaskaran
1 sibling, 0 replies; 25+ messages in thread
From: Suresh Bhaskaran @ 2008-10-06 18:17 UTC (permalink / raw)
To: u-boot
-----Original Message-----
From: Jerry Van Baren [mailto:gerald.vanbaren at ge.com]
Sent: Monday, October 06, 2008 10:07 AM
To: Suresh Bhaskaran
Cc: Andrejs Cainikovs; u-boot at lists.denx.de
Subject: Re: [U-Boot] U-boot Saveenv question
Suresh Bhaskaran wrote:
> 1. I verified flash contents using the md.w command in u-boot
> 2. I've already verified correct flash r/w operation using the cp.w
> command
> 3. Yes, the CONFIG_ENV_OVERWRITE flag is defined in my boardfile
> 4. Flinfo shows the correct flash configuration (sectors, etc) of the
> flash
>
> I can see the new env variable (e.g. set serverip 10.0.0.1) at the end
> of the saveenv area in flash (after I do a saveenv). (the original
> entry is removed from the list in flash, and the new updated entry is
> added to the end of the list in flash).
>
> Still, when I reboot u-boot, I don't get the new environment variable
> updated from flash.
>
> What am I missing?
>
> Thanks.
> Suresh
Please don't top post.
Are you using DHCP (BOOTP)? If you are, serverip is probably being sent
by your DHCP server and overriding the value you have set in your env.
I'm assuming you are *not* getting env CRC failure warnings on boot.
If neither of the above guesses solve the problem, please copy what is
printed to the console on start up. Without more information, we're
just guessing.
Best regards,
gvb
------------------------------
Thanks, Jerry.
Sorry for the previous top post.
Your guess is right!
Upon looking more carefully at my log, I see
"bad CRC, using default environment"
In my boot-up log.
I am looking thru the code to see why I might have a bad crc.
Meanwhile, any guesses as to why I have bad crc?
Could I have ported code from u1.1.3 to u1.3.4 incorrectly?
Or could I have accidentally ignored some "change" from u1.1.3 to
u1.3.4?
Thanks.
Suresh
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] U-boot Saveenv question --> final tested solution
2008-10-06 17:06 ` Jerry Van Baren
2008-10-06 18:17 ` Suresh Bhaskaran
@ 2008-10-07 0:57 ` Suresh Bhaskaran
2008-10-07 22:24 ` Jerry Van Baren
1 sibling, 1 reply; 25+ messages in thread
From: Suresh Bhaskaran @ 2008-10-07 0:57 UTC (permalink / raw)
To: u-boot
-----Original Message-----
From: Jerry Van Baren [mailto:gerald.vanbaren at ge.com]
Sent: Monday, October 06, 2008 10:07 AM
To: Suresh Bhaskaran
Cc: Andrejs Cainikovs; u-boot at lists.denx.de
Subject: Re: [U-Boot] U-boot Saveenv question
Suresh Bhaskaran wrote:
> 1. I verified flash contents using the md.w command in u-boot
> 2. I've already verified correct flash r/w operation using the cp.w
> command
> 3. Yes, the CONFIG_ENV_OVERWRITE flag is defined in my boardfile
> 4. Flinfo shows the correct flash configuration (sectors, etc) of the
> flash
>
> I can see the new env variable (e.g. set serverip 10.0.0.1) at the end
> of the saveenv area in flash (after I do a saveenv). (the original
> entry is removed from the list in flash, and the new updated entry is
> added to the end of the list in flash).
>
> Still, when I reboot u-boot, I don't get the new environment variable
> updated from flash.
>
> What am I missing?
>
> Thanks.
> Suresh
Please don't top post.
Are you using DHCP (BOOTP)? If you are, serverip is probably being sent
by your DHCP server and overriding the value you have set in your env.
I'm assuming you are *not* getting env CRC failure warnings on boot.
If neither of the above guesses solve the problem, please copy what is
printed to the console on start up. Without more information, we're
just guessing.
Best regards,
gvb
-------------------------------------------------------------
Thanks for help:
I've got it working:
Final answer:
1. If *only* CONFIG_ENV_OVERWRITE is turned on in board file, then crc
is not written to flash [don't know if it's bug, or if I am setting
incorrect flags]
2. But if CFG_ENV_ADDR_REDUND is also set, then it sets CRC to flash,
and it works correctly.
In any case, setup 2. works for me.
Thanks for all the help.
Suresh
^ permalink raw reply [flat|nested] 25+ messages in thread
* [U-Boot] U-boot Saveenv question --> final tested solution
2008-10-07 0:57 ` [U-Boot] U-boot Saveenv question --> final tested solution Suresh Bhaskaran
@ 2008-10-07 22:24 ` Jerry Van Baren
0 siblings, 0 replies; 25+ messages in thread
From: Jerry Van Baren @ 2008-10-07 22:24 UTC (permalink / raw)
To: u-boot
Suresh Bhaskaran wrote:
>
> -----Original Message-----
> From: Jerry Van Baren [mailto:gerald.vanbaren at ge.com]
> Sent: Monday, October 06, 2008 10:07 AM
> To: Suresh Bhaskaran
> Cc: Andrejs Cainikovs; u-boot at lists.denx.de
> Subject: Re: [U-Boot] U-boot Saveenv question
>
> Suresh Bhaskaran wrote:
>> 1. I verified flash contents using the md.w command in u-boot
>> 2. I've already verified correct flash r/w operation using the cp.w
>> command
>> 3. Yes, the CONFIG_ENV_OVERWRITE flag is defined in my boardfile
>> 4. Flinfo shows the correct flash configuration (sectors, etc) of the
>> flash
>>
>> I can see the new env variable (e.g. set serverip 10.0.0.1) at the end
>> of the saveenv area in flash (after I do a saveenv). (the original
>> entry is removed from the list in flash, and the new updated entry is
>> added to the end of the list in flash).
>>
>> Still, when I reboot u-boot, I don't get the new environment variable
>> updated from flash.
>>
>> What am I missing?
>>
>> Thanks.
>> Suresh
>
> Please don't top post.
>
> Are you using DHCP (BOOTP)? If you are, serverip is probably being sent
>
> by your DHCP server and overriding the value you have set in your env.
>
> I'm assuming you are *not* getting env CRC failure warnings on boot.
>
> If neither of the above guesses solve the problem, please copy what is
> printed to the console on start up. Without more information, we're
> just guessing.
>
> Best regards,
> gvb
>
> -------------------------------------------------------------
>
> Thanks for help:
>
> I've got it working:
>
> Final answer:
Sorry, workaround for you, this isn't the final answer.
> 1. If *only* CONFIG_ENV_OVERWRITE is turned on in board file, then crc
> is not written to flash [don't know if it's bug, or if I am setting
> incorrect flags]
This may work for you, but there is something else wrong for you. From
the README file:
If CONFIG_ENV_OVERWRITE is #defined in your config
file, the write protection for vendor parameters is
completely disabled. Anybody can change or delete
these parameters.
so CONFIG_ENV_OVERWRITE controls some logic WRT what can be changed in
the env, but it doesn't directly affect flash writing.
> 2. But if CFG_ENV_ADDR_REDUND is also set, then it sets CRC to flash,
> and it works correctly.
s/CFG/CONFIG/ What version is your u-boot? They have been renamed
CONFIG_* for several months now.
Again from the README:
- CONFIG_ENV_ADDR_REDUND
CONFIG_ENV_SIZE_REDUND
These settings describe a second storage area used to hold
a redundant copy of the environment data, so that there is
a valid backup copy in case there is a power failure during
a "saveenv" operation.
...so this *does* directly affect flash writing. In particular, it
causes "extra" flash writing.
My first suspicion is that you have a buffering/caching problem so that
a non-redundant flash write doesn't actually go to completion (doesn't
actually make it into the flash or the writes get reordered by the
processor's bus interface unit). By setting the redundancy config
option, your program does another flash write operation which forces the
"hung" write out to flash.
I would check if your data cache is disabled or handled properly if
enabled and I would check if you have the right "sync" magic to flush
the flash write operations out the bus interface unit properly.
> In any case, setup 2. works for me.
>
> Thanks for all the help.
>
> Suresh
Best regards,
gvb
^ permalink raw reply [flat|nested] 25+ messages in thread