Re: [PATCH 6/6] blspec: Automatically append rootarg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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   |

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux