small bootloader that passes arguments
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.
Signature · 2 lines
View this message in context: http://www.nabble.com/small-bootloader-that-passes-arguments-tf4793411.html#a13712778 Sent from the linuxppc-embedded mailing list archive at Nabble.com.
Hi,
the normal operation of a bootloader is:
memcpy() -- copy the programme to boot to some new location maybe some decoding done here, toojump_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
Quoted 14 lines · khollan
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.
Signature · 2 lines
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.