Skip to contentSkip to conversation

Running updated U-boot.img/u-boot.bin from already loaded u-boot shell

U-Boot harsha kiran 2 participants 2 messages Sep 17, 2014

lore
Share & tools
lore
#0 lore raw

Hi !

I am unable to load a different u-boot.img/u-boot.bin which is located in a different ext4 partition from the u-boot shell.
Here are my observations.

1) i compiled a U-boot.img with a print statement(THIS IS A NEW U_BOOT) in (board_init) function in board.c file and placed it in the Boot partition of SD
2) Compiled again removing the print statement and placed the u-boot.bin in the Root partition of SD under BOOTHERE
3) Start the board and stoped it in the shell

U-Boot SPL 2014.07 (Aug 29 2014 - 15:16:50)
reading u-boot.img
reading u-boot.img

U-Boot 2014.07 (Sep 16 2014 - 17:51:00)

I2C:   ready
DRAM:  256 MiB

THIS IS A NEW U_BOOT
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw
Hit any key to stop autoboot: 0
U-Boot#
U-Boot#
U-Boot#

4) Try to load the u-boot.bin from ext4 partition

U-Boot# ext4load mmc 0:2 0x83000000 /BOOTHERE/u-boot.bin 303420 bytes read in 77 ms (3.8 MiB/s)
U-Boot# go 0x83000000
## Starting application at 0x83000000 ...

U-Boot 2014.07 (Sep 16 2014 - 17:51:00)

I2C:   ready
DRAM:  256 MiB

THIS IS A NEW U_BOOT
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1(part 0) is current device
EMMC found on device 1
** Unrecognized filesystem type **

uenvcmd was not defined in uEnv.txt ...
halting ...

switch to partitions #0, OK
mmc0 is current device
SD CARD DEVICE found on device 0
reading uEnv.txt
** Unable to read file uEnv.txt **

uenvcmd was not defined in uEnv.txt ...
trying eMMC (uEnv.txt) ...

U-Boot#

I observe that it is running the previous u-boot.img but not the updated u-boot.bin.
When i try to load the u-boot.img in the shell it resets the board and the application does not run

U-Boot#
U-Boot# ext4load mmc 0:2 0x83000000 /BOOTHERE/u-boot.img 303484 bytes read in 82 ms (3.5 MiB/s)
U-Boot# go 0x83000000
## Starting application at 0x83000000 ...
IT is stuck here.. and then board resets

I tried putting the u-boot.bin in the same fat partition with MLO and u-boot.img and even with
fatload mmc 0:1 0x80200000 u-boot.bin
go 0x80200000

It still runs the previously loaded u-boot.img.

Is there a way i can load an updated u-boot from a u-boot?

Thanks,
KJ

--
View this message in context: http://u-boot.10912.n7.nabble.com/Running-updated-U-boot-img-u-boot-bin-from-already-loaded-u-boot-shell-tp189648.html
Sent from the U-Boot mailing list archive at Nabble.com.

#1 lore raw

Dear harsha kiran,

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

I am unable to load a different u-boot.img/u-boot.bin which is located in a different ext4 partition from the u-boot shell.

This is to be expected. U-Boot is supposed to start on a system coming directly out of reset. If you try to run it on a pre-initialized system, a number of assumptions / requirements may not be met, and it will not work - actual behaviour depends on the hardware, but the general rule is that such a use is bound to fail.

Best regards,

Wolfgang Denk

Signature · 6 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
If there was anything that depressed him more than his own  cynicism,
it was that quite often it still wasn't as cynical as real life.
                                 - Terry Pratchett, _Guards! Guards!_