[U-Boot] debug uboot from ram for x86 board
Hi there, I am trying to add some codes(driver) to u boot, but I do not have jtag or other debugging tools. what I can use are :serial port/ethernet, so I can use tftp and loadb to download the bin to ram. Currently, I tried to use "loadb" to load the sample(hello_world) to ram and then execute it, I always failed .here are the output for my testing. I rename hello_world to rt61test then rebuild all uboot use nm command get follows: 0004 T rt61test 00040098 T dummy then start my board In:serial Out: serial Err: serial Net: i82559#0 boot > loadb 0x4 ## Ready for binary (kermit) download to 0x0004 at 115200 bps... ## Start Addr = 0x0004 boot > go 4 ## Starting application at 0x0004 ... Invalid Instruction at : I also tried other address for loadb(loadb 0x100) I got the same error result Appreciate anyone can give me a direction or explain the error Thanks -- View this message in context: http://www.nabble.com/debug-uboot-from-ram-for-x86-board-tp21165593p21165593.html Sent from the Uboot - Users mailing list archive at Nabble.com. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)
Remy Bohmer wrote: > Create a default fallback routine that can be used if there is no > strong implementation: > --- > __attribute__((weak)) unsigned long long printk_clock(void) > { > return sched_clock(); > } > --- > and here is an example of the strong implementation (from the ARM > architecture): > --- > unsigned long long printk_clock(void) > { > return (unsigned long long)(jiffies - INITIAL_JIFFIES) * > (10 / HZ); > } > --- > > If the strong implementation is available, the weak is simply > discarded during linking, if the strong is omitted, the weak is used > as fallback. This is a clean, lean and mean example without > complex/superfluous aliases or checks for NULL pointers. > It should not get any harder than this... +1. I like this one, and U-Boot/MIPS _machine_restart() is implemented in the same manner. -- Shinya Kuribayashi NEC Electronics ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)
Hello All, All instances have been replaced by empty functions with an alias. e.g. void __do_something (args) {} do_something(args) __atttribute__((weak, alias("__do_something"))); > Good to know. This doc also helps: > http://docs.sun.com/app/docs/doc/817-1984/chapter2-11?l=en&a=view > Then, > - we must try to not leave undefined weak symbols at all, > - or check the symbol before invocation for the safety in case of NULL > dereference. My 2 cents: And here an example from the linux kernel that just does the first option: Create a default fallback routine that can be used if there is no strong implementation: --- __attribute__((weak)) unsigned long long printk_clock(void) { return sched_clock(); } --- and here is an example of the strong implementation (from the ARM architecture): --- unsigned long long printk_clock(void) { return (unsigned long long)(jiffies - INITIAL_JIFFIES) * (10 / HZ); } --- If the strong implementation is available, the weak is simply discarded during linking, if the strong is omitted, the weak is used as fallback. This is a clean, lean and mean example without complex/superfluous aliases or checks for NULL pointers. It should not get any harder than this... Kind Regards, Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)
Joakim Tjernlund wrote: >>> - There is no purely weak functions and therfore no longer code like: >>> if (do_something) >>> do_somthing(); >>> All instances have been replaced by empty functions with an alias. e.g. >>> void __do_something (args) {} >>> do_something(args) __atttribute__((weak, alias("__do_something"))); > > Curious as to why you removed such code? Was it because it didn't work? If > so I might have an answer for that. See my post: > "Re: [U-Boot] [PATCH V4] cmd_bdinfo: move implementation to archinstead > of common" > > Jocke Good to know. This doc also helps: http://docs.sun.com/app/docs/doc/817-1984/chapter2-11?l=en&a=view Then, - we must try to not leave undefined weak symbols at all, - or check the symbol before invocation for the safety in case of NULL dereference. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] u-boot configurations for custom board with MPC 8265
Hi All, I am using a custom powerpc board with MPC8265 ( 66/200/300 Mhz) , 32MB of SDRAM ( 0x - 0x01FF) and 8 MB of Flash Simm ( 0xFF80 - 0x) . I am modifying the MPC8260ads configurations to match my board but I don't see any messages being printed on the serial port. I am using Codewarrior USB TAP debugger to debug the u-boot code with an initialization file as follows: setMMRBaseAddr 0x writemmr SCCR 0x writemmr SYPCR 0xffc3 writemmr RMR 0x0001 # Memory periodic timer prescaler writemmr MPTPR 0x3200 # Internal memory map register writemmr IMMR 0x0470 #Change the debugger's base address to match the new register base setMMRBaseAddr 0x0470 writemmr BR0 0xff801001 writemmr OR0 0xff800836 # CS2 is SDRAM, 64-bit port at 0x writemmr BR2 0x0041 writemmr OR2 0xfe002ec0 # set 60x Bus assigned SDRAM Refresh Timer (PSRT) writemmr PSRT 0x13 writemmr MPTPR 0x2800 # 60x SDRAM Mode Register # precharge all banks writemmr PSDMR 0x824b36a3 writemmr PSDMR 0xaa4b36a3 # perform an access writemem.b 0x 0x00 # cbr refresh writemmr PSDMR 0x8a4b36a3 # perform 8 accesses writemem.b 0x 0xFF writemem.b 0x 0xFF writemem.b 0x 0xFF writemem.b 0x 0xFF writemem.b 0x 0xFF writemem.b 0x 0xFF writemem.b 0x 0xFF writemem.b 0x 0xFF # 60x SDRAM Mode Register # Issue Mode register write writemmr PSDMR 0x9a4b36a3 writemem.b 0x0190 0x00 writemmr PSDMR 0xc24b36a3 With the above initialization file when I define CONFIG_IMMR to 0xF000 in u-boot it just doesn't go further and so I modified it to be same as the initilization file ( 0x047) and now I am stepping little further into the code but I am getting stuck at a point in cpu_init_f in start.S. Could anyone please let me know the exact configurations I need to define in mpc8260ads.h file in u-boot. Any help is greatly appreciated. Thanks in advance Best Regards Jyotshna ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)
> > > - There is no purely weak functions and therfore no longer code like: > > if (do_something) > > do_somthing(); > > All instances have been replaced by empty functions with an alias. e.g. > > void __do_something (args) {} > > do_something(args) __atttribute__((weak, alias("__do_something"))); Curious as to why you removed such code? Was it because it didn't work? If so I might have an answer for that. See my post: "Re: [U-Boot] [PATCH V4] cmd_bdinfo: move implementation to archinstead of common" Jocke ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Error in buffer data for NAND flash write, read on OMAP3430SDP.
Nishanth Menon said the following on 12/24/2008 07:41 AM: > Radha Krishna said the following on 12/24/2008 01:37 AM: > >> I got the U-boot from the URL: >> https://omapzoom.org/gf/project/bootloader/frs/ >> >> >> > I think you are with a really old U-Boot if the above is the place you > picked it from! if you look up the boot message it probably should be > 1.1.5 or something of that revision. You can find the old revision in > [1]. > > [1] http://git.omapzoom.org/?p=u-boot.git;a=summary > One more minor item of interest - for the u-boot pulled from omapzoom.org, you may be interested in contacting either [1] or [2]. Regards, Nishanth Menon Ref: [1] http://vger.kernel.org/vger-lists.html#linux-omap [2] https://omapzoom.org/mailman/listinfo/omapandroid-discussion ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Error in buffer data for NAND flash write, read on OMAP3430SDP.
Radha Krishna said the following on 12/24/2008 01:37 AM: > nand dua ...this commad is simple and executes nand erase,nand write and nand > read APIs. Write data and read data are like 1,2,3,4,5131072. > > For comparing byte by byte data, using two buffers write_buffer, read_buffer > both are of size 131072. > > U-boot version: > U-Boot uses a 3 level version number containing a version, a > sub-version, and a patchlevel: "U-Boot-2.34.5" means version "2", > sub-version "34", and patchlevel "4". > > I got the U-boot from the URL: > https://omapzoom.org/gf/project/bootloader/frs/ > > I think you are with a really old U-Boot if the above is the place you picked it from! if you look up the boot message it probably should be 1.1.5 or something of that revision. You can find the old revision in [1]. We are attempting to merge in patches to the very latest 1.5 release which still does not have SDP3430 support (but can be done with a little effort). You can see this new community initiative for a mainstream OMAP3 U-Boot in [2] - but note, it is still a work in progress and yet to be accepted in the mainline tree (But I guess we are getting pretty close to it now).. Regards, Nishanth Menon Ref: [1] http://git.omapzoom.org/?p=u-boot.git;a=summary [2] http://git.sakoman.net/cgi-bin/gitweb.cgi?p=u-boot-omap3.git;a=shortlog;h=refs/heads/omap3-dev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot on Xilinx ML510
Hi Felix, > Michal Simek wrote: >> Hi Felix >> there is generic-ppc440 support. I think it is easy to support ml510 >> board. >> Please look to board/xilinx/ml507/xparameters.h. >> >> 1. You can change this file manually >> 2. you can generate this file. (I am not sure which BSP generate this >> file but >> IMHO linux bsp do.) >> >> Regards, >> Michal >> > Thanks a lot for replying. Adding basic ml510 support seems easy indeed. ok. > I've > noticed that there's no Ethernet driver support. I guess if I need LL TEMAC > in u-boot I have to use u-boot from Xilinx git tree. Is that correct ? You are right in xilinx tree is ll_temac driver but it is based on xilinx files. We use one file ll_temac driver. I will send it to mailing list for reviewing next year. This driver will have support for Microblaze CPU. PPC support is pretty easy (just set correct name) and check cache flushing. I haven't worked with ml510 and I don't have information which PHY is on it but currently this driver I use on s3e and ml505. Adding new phy should not be too hard. Preliminary version is on my site www.monstr.eu. Just follow manual. Regards, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot on Xilinx ML510
Hi, Michal Michal Simek wrote: > Hi Felix > there is generic-ppc440 support. I think it is easy to support ml510 board. > > Please look to board/xilinx/ml507/xparameters.h. > > 1. You can change this file manually > 2. you can generate this file. (I am not sure which BSP generate this file but > IMHO linux bsp do.) > > Regards, > Michal > Thanks a lot for replying. Adding basic ml510 support seems easy indeed. I've noticed that there's no Ethernet driver support. I guess if I need LL TEMAC in u-boot I have to use u-boot from Xilinx git tree. Is that correct ? Felix. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] hush shell script commands(eval)
Hi All Mary Christmas . Happy New Year. I have some query on hush shell script language. I'm using hush shell script to automate the testing for command exists in U-boot. The scripts is as follows echo -- echo Target Test: setenv check 'if imi FE7E; then val=1; else val=0; fi' print check run check echo -- echo FRAM Command Test echo -- setenv check 'if fram; then val_fram=1; else val_fram=0; fi' print check run check echo -- echo $val echo $val_fram echo setenv check 'if $val; then echo imi command executes Success; else echo imi commd Fails; fi' print check run check echo setenv check 'if $val_fram; then echo fram command executes Success; else echo fram commd Fails; fi' print check run check echo END Test If i execute this string I’m getting this error. check=if ($val); then echo command executes Success; else echo imi commd Fails; fi Unknown command '(0)' - try 'help' imi commd Fails check= if $val_fram; then echo fram command executes Success; else echo fram commd Fails; fi Unknown command '1' - try 'help' I’m not able to fix this error. is it not support the constant value in if then else fi statement?. Is there any alternate method? I also trying to use the standalone application, is there any command like system("command") in u-boot. i want to run command in U-boot using standalone application. please help me. Thanks & Regards, Rudresh -- View this message in context: http://www.nabble.com/Re%3Ahush-shell-script-commands%28eval%29-tp21156593p21156593.html Sent from the Uboot - Users mailing list archive at Nabble.com. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot