[PATCH 6/6] blspec: Automatically append rootarg

Marc Kleine-Budde mkl at pengutronix.de
Wed Jul 1 00:22:42 PDT 2015


On 07/01/2015 08:58 AM, Sascha Hauer wrote:
>> Can you move the following into a separate function outside of blspec.c
>> so that it can be used somewhere else, too?
>>
>>> +	rootarg = path_get_linux_rootarg(entry->rootpath);
>>> +	if (IS_ERR(rootarg)) {
>>> +		pr_err("Getting root argument for %s failed with: %s\n",
>>> +				entry->rootpath, strerror(-PTR_ERR(rootarg)));
>>> +		return PTR_ERR(rootarg);
>>> +	}
>>> +
>>> +	globalvar_add_simple("linux.bootargs.dyn.blspec.appendroot", rootarg);
>>> +
>>> +	free(rootarg);
>>> +
>>> +	return 0;
>>> +}
> 
> You mean the combination of path_get_linux_rootarg() and globalvar_add_simple()
> should be a separate function? I'm not sure. Once we see a usecase for
> this we can do this.

I've the fit image support pachtes here. They use this functionality.

> Hm, just thinking. We could create a barebox command which takes a
> barebox device as argument and sets a linux.bootargs.* variable to the
> corresponding root= snippet. This might be useful.

Sounds nice - however I don't use the shell in that procject :D

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20150701/e19a738e/attachment.sig>


More information about the barebox mailing list