Recovering uboot or its parameters from linux

118 views
Skip to first unread message

Gopal

unread,
Mar 3, 2011, 1:39:29 PM3/3/11
to hawkboard
Hi all,
This might have been discussed earlier but couldn't get a helpful link
to solve my issue.

My hawkboard has a u-boot and linux installed in NAND flash. While
working, I did a mistake to set the bootdelay parameter wrong and now
the bootdelay is coming zero so it is immediately booting linux from
NAND.

I want to get back to the uboot prompt. I tried following two ways:

1. Access u-boot environment variables using fw_printenv / fw_setenv
but it shows "not found" to these commands.
Is there any way to set the bootdelay parameter from linux?

2. UART boot using Innovate production uart uboot bin file. I could
successfully flash the .bin file as the UART Host utility showed
"Closing COM...." without any error message. But in this case, when I
switch to other terminal utility (TERA TERM), it still directly boots
the linux on NAND. It seems that after flashing Uboot from UART, it is
still booting from NAND immediately.
How this auto boot from NAND can be disabled and return to uboot
prompt?

Can someone please explain me how

Gopal

unread,
Mar 4, 2011, 2:30:28 AM3/4/11
to hawkboard
I tried again with this [1] file but still results are same. It seems
clearly that the uboot transferred over UART is not starting after
loading. The board is switching to NAND boot always.
Can anyone please give some clue?

[1] http://code.google.com/p/hawkboard/downloads/detail?name=u-boot_uart_ais_v1.bin&can=2&q=

Thanks....

Gopal

unread,
Mar 4, 2011, 12:15:13 PM3/4/11
to hawkboard
No clue so far.. Please help someone...

I also tried to install uboot-envtools so that uboot parameters may be
modified from within linux. But installing anything on hawkboard shows
me "there is no space on disk". There are 3 partitions on it and the
root parition is utilized ot 100% while there is lot of space on other
partitions.
So another way to solve this problem may be to re-partition linux.
Anyone has tried it?
Also, I think it should be possible to modify the flash memory from
linux so that I can modify the uboot variables from linux. I read
somewhere about mtdutils package but couldn't understand how to use
it. Has anyone tried that?

Please help...


On Mar 4, 12:30 pm, Gopal <gopal.amle...@gmail.com> wrote:
> I tried again with this [1] file but still results are same. It seems
> clearly that the uboot transferred over UART is not starting after
> loading. The board is switching to NAND boot always.
> Can anyone please give some clue?
>
> [1]http://code.google.com/p/hawkboard/downloads/detail?name=u-boot_uart_...

Bill Traynor

unread,
Mar 4, 2011, 12:40:59 PM3/4/11
to hawk...@googlegroups.com
On Fri, Mar 4, 2011 at 12:15, Gopal <gopal....@gmail.com> wrote:
No clue so far.. Please help someone...

I also tried to install uboot-envtools so that uboot parameters may be
modified from within linux. But installing anything on hawkboard shows
me "there is no space on disk". There are 3 partitions on it and the
root parition is utilized ot 100% while there is lot of space on other
partitions.
So another way to solve this problem may be to re-partition linux.
Anyone has tried it?
Also, I think it should be possible to modify the flash memory from
linux so that I can modify the uboot variables from linux. I read
somewhere about mtdutils package but couldn't understand how to use
it. Has anyone tried that?

Please help...

A quick google turned up a solution to define "CONFIG_ZERO_BOOTDELAY_CHECK" in your board configuration file. 

Have you tried this?

Gopal

unread,
Mar 4, 2011, 1:07:06 PM3/4/11
to hawkboard
Did not know about this. Can you give a link please? Which board
configuration file?

On Mar 4, 10:40 pm, Bill Traynor <btray...@gmail.com> wrote:

> A quick google turned up a solution to *define "CONFIG_ZERO_BOOTDELAY_CHECK"
> in your board configuration file.*
>
> Have you tried this?
>

Bill Traynor

unread,
Mar 4, 2011, 1:20:11 PM3/4/11
to hawk...@googlegroups.com
On Fri, Mar 4, 2011 at 13:07, Gopal <gopal....@gmail.com> wrote:
Did not know about this. Can you give a link please? Which board
configuration file?

I don't know, I just googled.

You may want to also try CTRL-C during boot up.  U-Boot may respond to it.

Gopal

unread,
Mar 5, 2011, 12:27:01 AM3/5/11
to hawkboard
Thanks Bill. That parameter CONFIG_ZERO_BOOTDELAY_CHECK is u-boot's
internal parameter. If u-boot is built with this check then it checks
for press of a switch when bootdelay is zero. I did not go into detail
of this. But I solved my problem in another way.
After loading linux I deleted the linuxrc file, which is I think the
Kernel image. And after that I gave command 'reboot'. So when the
system was rebooted, it found that there is no valid kernel image so
control was returned to uboot. I changed the bootdelay to 8 properly
now.
Now, this deletion of linuxrc was effective only on the linux loaded
in RAM so the NAND flash still holds complete linux. So when I power
cycled the board it came up correctly.
I do not know the reason why changes made to file system are not
effective on NAND storage. There must be some explicit action required
for that. I will find out later.
Thanks for your help..

Regards,


On Mar 4, 11:20 pm, Bill Traynor <btray...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages