* how to tftp download a newer u-boot into RAM and simply execute it? @ 2016-07-06 18:18 Robert P. J. Day 2016-07-06 18:53 ` Chris Hallinan 0 siblings, 1 reply; 6+ messages in thread From: Robert P. J. Day @ 2016-07-06 18:18 UTC (permalink / raw) To: Yocto discussion list 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 -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to tftp download a newer u-boot into RAM and simply execute it? 2016-07-06 18:18 how to tftp download a newer u-boot into RAM and simply execute it? Robert P. J. Day @ 2016-07-06 18:53 ` Chris Hallinan 2016-07-06 19:14 ` Robert P. J. Day 0 siblings, 1 reply; 6+ messages in thread From: Chris Hallinan @ 2016-07-06 18:53 UTC (permalink / raw) To: Robert P. J. Day; +Cc: Yocto discussion list [-- Attachment #1: Type: text/plain, Size: 4191 bytes --] 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 On Wed, Jul 6, 2016 at 2:18 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote: > > 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 > > -- > > ======================================================================== > Robert P. J. Day Ottawa, Ontario, CANADA > http://crashcourse.ca > > Twitter: http://twitter.com/rpjday > LinkedIn: http://ca.linkedin.com/in/rpjday > ======================================================================== > > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > -- Life is like Linux - it never stands still. [-- Attachment #2: Type: text/html, Size: 5494 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to tftp download a newer u-boot into RAM and simply execute it? 2016-07-06 18:53 ` Chris Hallinan @ 2016-07-06 19:14 ` Robert P. J. Day 2016-07-06 19:37 ` Bruce Ashfield 2016-07-07 6:48 ` Stefano Babic 0 siblings, 2 replies; 6+ messages in thread From: Robert P. J. Day @ 2016-07-06 19:14 UTC (permalink / raw) To: Chris Hallinan; +Cc: Yocto discussion list On Wed, 6 Jul 2016, Chris Hallinan wrote: > 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 -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to tftp download a newer u-boot into RAM and simply execute it? 2016-07-06 19:14 ` Robert P. J. Day @ 2016-07-06 19:37 ` Bruce Ashfield 2016-07-07 8:29 ` Kevin Hao 2016-07-07 6:48 ` Stefano Babic 1 sibling, 1 reply; 6+ messages in thread From: Bruce Ashfield @ 2016-07-06 19:37 UTC (permalink / raw) To: Robert P. J. Day, Chris Hallinan; +Cc: Yocto discussion list On 2016-07-06 03:14 PM, Robert P. J. Day wrote: > On Wed, 6 Jul 2016, Chris Hallinan wrote: > >> 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? Kevin Hao @ Wind has been looking after the reference build for us, so he is the best bet to know. Bruce > > rday > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to tftp download a newer u-boot into RAM and simply execute it? 2016-07-06 19:37 ` Bruce Ashfield @ 2016-07-07 8:29 ` Kevin Hao 0 siblings, 0 replies; 6+ messages in thread From: Kevin Hao @ 2016-07-07 8:29 UTC (permalink / raw) To: Bruce Ashfield; +Cc: Yocto discussion list [-- Attachment #1: Type: text/plain, Size: 436 bytes --] On Wed, Jul 06, 2016 at 03:37:04PM -0400, Bruce Ashfield wrote: > > > > 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 484 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to tftp download a newer u-boot into RAM and simply execute it? 2016-07-06 19:14 ` Robert P. J. Day 2016-07-06 19:37 ` Bruce Ashfield @ 2016-07-07 6:48 ` Stefano Babic 1 sibling, 0 replies; 6+ messages in thread From: Stefano Babic @ 2016-07-07 6:48 UTC (permalink / raw) To: Robert P. J. Day, Chris Hallinan; +Cc: Yocto discussion list Hi Robert, On 06/07/2016 21:14, Robert P. J. Day wrote: > On Wed, 6 Jul 2016, Chris Hallinan wrote: > >> 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: > 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... > 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? 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 -- ===================================================================== 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: sbabic@denx.de ===================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-07-07 8:30 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-07-06 18:18 how to tftp download a newer u-boot into RAM and simply execute it? Robert P. J. Day 2016-07-06 18:53 ` Chris Hallinan 2016-07-06 19:14 ` Robert P. J. Day 2016-07-06 19:37 ` Bruce Ashfield 2016-07-07 8:29 ` Kevin Hao 2016-07-07 6:48 ` Stefano Babic
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.