Re: kernel args from u-boot on M5282LITE

Greg Ungerer <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers.coldfire
Message-ID <[email protected]>
Hi Allon,

Allon Stern wrote:
> So, I figured out a way to pass kernel arguments from u-boot on the 
> M5282LITE. U-Boot calls the kernel, passing arguments on the stack; all 
> that is needed is to stash the pointer to the arguments (stashed in high 
> mem) when the kernel first starts, and before the stack pointer is 
> trounced, then use that pointer slightly later when the arguments are 
> looked at.
> 
> Any comments on this hack? Should I expect it to fail, and be surprised 
> that it works?

The thing to watch is where in practice do the args end
up being in the memory map?

The linux kernel will do a fair bit of setup (clear bss, initial
allocations, etc) before it gets around to looking at the args.
Will they have been overwritten by this time?


> Also, I'm somewhat puzzled that the stack pointer appears to be offset a 
> bit from where I would expect it to be, looking at the disassembly. I 
> don't have a BDM interface just yet, so I can't debug it to that level.....
> 
> If there is interest, I can post a patch for the 2.6.19-uc1 kernel; if I 
> manage to get the later kernel actually working, I'll put it in there 
> too. I'd really like to get the SP offset figured out, though it's 
> working and I don't want to complain too much :)

Please do post patches.

Regards
Greg


> Also, how can one write to the internal flash from from u-boot? Is there 
> an easy patch to a current u-boot?
> -
> allon
> 
> 
> ---
> [email protected]              Send a post to the list.
> [email protected]        Join the list.
> [email protected]    Join the list in digest mode.
> [email protected]     Leave the list.
> 
> 

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     [email protected]
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
---
[email protected]              Send a post to the list.
[email protected]        Join the list.
[email protected]    Join the list in digest mode.
[email protected]     Leave the list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.