how to tftp download a newer u-boot into RAM and simply execute it?
ok, i'm trying to do something on my MPC8315E-RDB that *should* be
really simple, and i'm getting nowhere.
currently on this machine, i have u-boot in NOR flash, and it's old
but it will still boot the other images also stored in NOR flash:
U-Boot 1.3.0-rc2 (Mar 21 2008 - 16:00:02) MPC83XX
i just built a new image from the current poky repo for precisely this target, and my generated artifacts include the newer u-boot binary image:
-rwxr-xr-x. 2 rpjday rpjday 423964 Jul 5 06:46
u-boot-mpc8315e-rdb-v2016.03+gitAUTOINC+df61a74e68-r0.bin
rather than immediately write it to flash, i'd like to download and test it first, and everything i've seen suggests i should be able to:
=> tftp 0x100000 u-boot-mpc8315e-rdb-v2016.03+gitAUTOINC+df61a74e68-r0.bin => go 0x100000
well, the downloading seems to work fine:
=> tftp 0x100000 u-boot-mpc8315e-rdb-v2016.03+gitAUTOINC+df61a74e68-r0.bin
Speed: 1000, full duplex
Using eTSEC0 device
TFTP from server 192.168.1.13; our IP address is 192.168.1.127 Filename 'u-boot-mpc8315e-rdb-v2016.03+gitAUTOINC+df61a74e68-r0.bin'. Load address: 0x100000
Loading: #############################
done
Bytes transferred = 423964 (6781c hex)
=>
so the number of bytes transferred is correct. and then bad things happen:
=> go 0x100000
## Starting application at 0x00100000 ...
NIP: 00100008 XER: 20000000 LR: 07FC6614 REGS: 07f2fcd0 TRAP: 0700 DAR: 00000000
MSR: 0008b002 EE: 1 PR: 0 FP: 1 ME: 1 IR/DR: 00
GPR00: 07FC6604 07F2FDC0 00000080 00000001 07F329E4 00000010 00000001 00000030
GPR08: 00000041 00000020 00000006 FFFFFFFF 00000000 00000200 07FF9000 09FB2000
GPR16: 00000000 00000000 00000000 00000000 00000000 FFFFFFFF 00000000 00000000
GPR24: 07F32930 00000000 00000000 00000002 00100000 07F2FF4C 07FF98F8 07F329E4 Call backtrace:
07FC6604 07FD767C 07FD6D10 07FD6E98 07FC6110 07FB6BF8 07FB568C Program Check Exception
Resetting the board.
am i missing something? downloading to the wrong address in RAM?
jumping to the wrong entry point? i'mopen to suggestions, i know i've done this sort of thing before.
i'm willing to start a new configure and build from scratch if
someone wants to supply a recipe. since this is the current YP powerpc reference board, it really should work out of the box, no?
rday
Signature · 7 lines
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================Hi Robert,
That's not old, that's ancient in dog^HU-Boot years - LOL!
It's been quite a while since I looked at a PPC U-Boot, but at a minimum, you will need to link U-Boot to a RAM'able address. By default, I'm sure the recipe links it for the NOR addresses. When it boots from NOR it immediately relocates itself to a RAM address from NOR, if memory serves. Notice it's crashing right away, on the second instruction.
In past history, many U-Boot ports would require more work than simply linking it to a proper RAM address. I can't comment on the 8313, 'cuz I haven't worked on it in ages. Older ports had configuration options for exactly that use case, but I haven't seen that used in a long time. Perhaps if you can find one of those ports, it will lead you in the right direction. I can't recall: CFG_RUN_IN_RAM or some such magic???
Hopefully someone on this list smarter (and more current on U-Boot) than me can help.
Regards,
Chris
Quoted 84 lines · Robert P. J. Day
ok, i'm trying to do something on my MPC8315E-RDB that *should* be
really simple, and i'm getting nowhere.currently on this machine, i have u-boot in NOR flash, and it's old
but it will still boot the other images also stored in NOR flash:U-Boot 1.3.0-rc2 (Mar 21 2008 - 16:00:02) MPC83XX
i just built a new image from the current poky repo for precisely this target, and my generated artifacts include the newer u-boot binary image:
-rwxr-xr-x. 2 rpjday rpjday 423964 Jul 5 06:46
u-boot-mpc8315e-rdb-v2016.03+gitAUTOINC+df61a74e68-r0.binrather than immediately write it to flash, i'd like to download and test it first, and everything i've seen suggests i should be able to:
=> tftp
0x100000u-boot-mpc8315e-rdb-v2016.03+gitAUTOINC+df61a74e68-r0.bin => go0x100000well, the downloading seems to work fine:
=> tftp
0x100000u-boot-mpc8315e-rdb-v2016.03+gitAUTOINC+df61a74e68-r0.bin
Speed: 1000, full duplex
Using eTSEC0 device
TFTP from server 192.168.1.13; our IP address is 192.168.1.127 Filename 'u-boot-mpc8315e-rdb-v2016.03+gitAUTOINC+df61a74e68-r0.bin'. Load address:0x100000
Loading: #############################
done
Bytes transferred = 423964 (6781c hex)
=>so the number of bytes transferred is correct. and then bad things happen:
=> go
0x100000
## Starting application at0x00100000...
NIP: 00100008 XER: 20000000 LR: 07FC6614 REGS:07f2fcd0TRAP: 0700 DAR:
00000000
MSR:0008b002EE: 1 PR: 0 FP: 1 ME: 1 IR/DR: 00GPR00: 07FC6604 07F2FDC0 00000080 00000001 07F329E4 00000010 00000001 00000030
GPR08: 00000041 00000020 00000006 FFFFFFFF 00000000 00000200 07FF9000 09FB2000
GPR16: 00000000 00000000 00000000 00000000 00000000 FFFFFFFF 00000000 00000000
GPR24: 07F32930 00000000 00000000 00000002 00100000 07F2FF4C 07FF98F8 07F329E4
Call backtrace:
07FC6604 07FD767C 07FD6D10 07FD6E98 07FC6110 07FB6BF8 07FB568C Program Check Exception
Resetting the board.am i missing something? downloading to the wrong address in RAM?
jumping to the wrong entry point? i'mopen to suggestions, i know i've done this sort of thing before.i'm willing to start a new configure and build from scratch if
someone wants to supply a recipe. since this is the current YP powerpc reference board, it really should work out of the box, no?rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.caTwitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday========================================================================
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Signature · 1 line
Life is like Linux - it never stands still.
Quoted 9 lines · Chris Hallinan
Hi Robert,
That's not old, that's ancient in dog^HU-Boot years - LOL!It's been quite a while since I looked at a PPC U-Boot, but at a minimum, you will need to link U-Boot to a RAM'able address. By default, I'm sure the recipe links it for the NOR addresses. When it boots from NOR it immediately relocates itself to a RAM address from NOR, if memory serves. Notice it's crashing right away, on the second instruction.
i came to that conclusion ... i looked at the u-boot.srec file that
was generated and, sure enough:
S00E0000752D626F6F742E73726563C0
S315FE00000042424242424242420606060606060606AC
S315FE00001000000000000000000000000000000000DC
S315FE000020A0A0A0A0A0A0A0A06060606060606060CC
... snip ...
so definitely linked for flashing to beginning of NOR flash at 0xFE000000. so i suspect i could just flash it and reset and it would work just fine. and never mind, i found the answer i was after:
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM
i was hoodwinked into thinking it would be easy because i found this page:
https://blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:tftp_loading_files
of course, that page is for the blackfin, precisely one of the platforms the denx page says it *can* work for. grrrrrrrrr.
so, before i commit myself to this, who's the PPC/MPC8315E-RDB
expert on this list who can confirm a stock u-boot should flash to NOR and just plain run?
rday
Signature · 7 lines
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================Quoted 30 lines · Robert P. J. Day
Quoted 9 lines · Chris Hallinan
Hi Robert,
That's not old, that's ancient in dog^HU-Boot years - LOL!It's been quite a while since I looked at a PPC U-Boot, but at a minimum, you will need to link U-Boot to a RAM'able address. By default, I'm sure the recipe links it for the NOR addresses. When it boots from NOR it immediately relocates itself to a RAM address from NOR, if memory serves. Notice it's crashing right away, on the second instruction.
i came to that conclusion ... i looked at the u-boot.srec file that
was generated and, sure enough:S00E0000752D626F6F742E73726563C0
S315FE00000042424242424242420606060606060606AC
S315FE00001000000000000000000000000000000000DC
S315FE000020A0A0A0A0A0A0A0A06060606060606060CC
... snip ...so definitely linked for flashing to beginning of NOR flash at
0xFE000000. so i suspect i could just flash it and reset and it would work just fine. and never mind, i found the answer i was after:http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM
i was hoodwinked into thinking it would be easy because i found this page:
Quoted 8 lines
https://blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:tftp_loading_files
of course, that page is for the blackfin, precisely one of the platforms the denx page says it *can* work for. grrrrrrrrr.
so, before i commit myself to this, who's the PPC/MPC8315E-RDB
expert on this list who can confirm a stock u-boot should flash to NOR and just plain run?
Kevin Hao @ Wind has been looking after the reference build for us, so he is the best bet to know.
Bruce
Quoted 3 lines
rday
Hi Robert,
Quoted 21 lines · Robert P. J. Day
Quoted 9 lines · Chris Hallinan
Hi Robert,
That's not old, that's ancient in dog^HU-Boot years - LOL!It's been quite a while since I looked at a PPC U-Boot, but at a minimum, you will need to link U-Boot to a RAM'able address. By default, I'm sure the recipe links it for the NOR addresses. When it boots from NOR it immediately relocates itself to a RAM address from NOR, if memory serves. Notice it's crashing right away, on the second instruction.
i came to that conclusion ... i looked at the u-boot.srec file that
was generated and, sure enough:S00E0000752D626F6F742E73726563C0
S315FE00000042424242424242420606060606060606AC
S315FE00001000000000000000000000000000000000DC
S315FE000020A0A0A0A0A0A0A0A06060606060606060CC
... snip ...
Quoted 4 lines
so definitely linked for flashing to beginning of NOR flash at
0xFE000000. so i suspect i could just flash it and reset and it would work just fine. and never mind, i found the answer i was after:
U-Boot is linked at the address set with CONFIG_SYS_TEXT_BASE in include/configs/MPC8315ERDB.h. You can try to change this.
It is not only a problem of the linker address. U-Boot sets the RAM controller and this should be skipped with some other basic part (PLL, and so on) if you run from RAM.
However, I see the board has already a setup.
#if CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE && \
!defined(CONFIG_NAND_SPL)
#define CONFIG_SYS_RAMBOOT
#else
#undef CONFIG_SYS_RAMBOOT
#endif
You could set CONFIG_SYS_MONITOR_BASE in RAM and SYS_RAMBOOT should be automatically set. This change the bootloader and the RAM controller is not set up again.
However, as mentioned in the website, you are not exactly testing the new boot loader, you are testing another bootloader. If the new bootloader has issues by setting the RAM controller, for example, it runs when you load from RAM and it will not run later...
Quoted 5 lines
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM
i was hoodwinked into thinking it would be easy because i found this page:
Quoted 8 lines
https://blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:tftp_loading_files
of course, that page is for the blackfin, precisely one of the platforms the denx page says it *can* work for. grrrrrrrrr.
so, before i commit myself to this, who's the PPC/MPC8315E-RDB
expert on this list who can confirm a stock u-boot should flash to NOR and just plain run?
I have not the board and I cannot test it - if you have a JTAG debugger, you are always able to restore the board in case something goes wrong.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
Quoted 4 lines · Bruce Ashfield
Quoted 4 lines
so, before i commit myself to this, who's the PPC/MPC8315E-RDB
expert on this list who can confirm a stock u-boot should flash to NOR and just plain run?
The ramboot is not supported for this board in u-boot. There do have some codes about ramboot in the startup code, but you can't expect it to work without some tweaking.
Thanks,
Kevin