small bootloader that passes arguments

Lorenz Kolb linuxppcemb at lkmail.de
Tue Nov 13 18:35:43 EST 2007


Hi,

the normal operation of a bootloader is: 

memcpy() -- copy the programme to boot to some new location maybe some
decoding done here, too
jump_to_addr() -- the easiest way to jump to some address in a higher level
language is to make a function call to some pointer. You can pass arguments
to this function, that is what bootloaders like u-boot do.

Personally I would recommand you to use some small first-stage-loader
loading U-Boot and make U-Boot do the rest. There is a U-Boot 1.1.4 port on
Xilinx' website for some Xilinx boards that can easily be adapted to Your
board (if it is no yet supported), I guess.
You can find Xilinx' U-Boot-"tree" here:
http://www.xilinx.com/ml410-p/81i_19.5/designs/u-boot.zip

Regards,

Lorenz Kolb



khollan wrote:
> 
> Hi,
> 
> I would like to create a small bootloader that is able to pass kernel
> arguments and boot a linux kernel.  Im using a xilinx PPC, and have
> already booted a working kernel with a Xilinx provided XMD bootloader over
> USB.  My main question is how does a bootloader pass these arguments to
> the kernel before booting it?  Most specifically the root=/dev/xsa1
> command so I can tell it to either boot from compact flash or NFS.
> 
> I really don't want to try and port U-boot since I don't need the bells
> and whistles and I want it to fit in the BRAM of the FPGA so it will load
> when I load the hardware configuration.
> 

-- 
View this message in context: http://www.nabble.com/small-bootloader-that-passes-arguments-tf4793411.html#a13721038
Sent from the linuxppc-embedded mailing list archive at Nabble.com.



More information about the Linuxppc-embedded mailing list