[PATCH RFC 1/2] bootm: Simplify initrd address handling

Sascha Hauer s.hauer at pengutronix.de
Fri May 3 00:24:26 EDT 2013


On Thu, May 02, 2013 at 11:07:11AM +0200, Uwe Kleine-König wrote:
> 	data.initrd_address = UIMAGE_SOME_ADDRESS;
> 	...
> 	if (-L was given to bootm)
> 		data.initrd_address = address_provided_to_-L;
> 	...
> 	if (initrd is provided as uInitrd && data.initrd_address == UIMAGE_SOME_ADDRESS)
> 		data.initrd_address = load_address_from_uInitrd;
> 	...
> 	if (data.initrd_address == UIMAGE_SOME_ADDRESS)
> 		data.initrd_address = UIMAGE_INVALID_ADDRESS;
> 
> can be simplified to:
> 
> 	data.initrd_address = UIMAGE_INVALID_ADDRESS;
> 	...
> 	if (-L was given to bootm)
> 		data.initrd_address = address_provided_to_-L;
> 	...
> 	if (initrd is provided as uInitrd && data.initrd_address == UIMAGE_INVALID_ADDRESS)
> 		data.initrd_address = load_address_from_uInitrd;
> 	...
> 
> The only change introduced by this simplification is for cases where the
> user passes -L UIMAGE_SOME_ADDRESS or -L UIMAGE_INVALID_ADDRESS to
> bootm. (-L UIMAGE_SOME_ADDRESS is now used literally instead of ignored
> before. -L UIMAGE_INVALID_ADDRESS used to skip getting the
> initrd-address from the uInitrd, now the uInitrd address is honored.)

And now I remember why I did that in the first place. It was to be able
to explicitly ignore a uInitrd load address from an image. Anyway, since
we ignore this address in any case with the next patch these patches are
ok.


Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list