mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 6/6] blspec: Automatically append rootarg
Date: Wed, 1 Jul 2015 09:22:42 +0200	[thread overview]
Message-ID: <55939542.7000607@pengutronix.de> (raw)
In-Reply-To: <20150701065856.GD18611@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 1381 bytes --]

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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

      reply	other threads:[~2015-07-01  7:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18  7:43 Bootspec: Allow to automatically append root= option Sascha Hauer
2015-06-18  7:43 ` [PATCH 1/6] Add globalvar_add_simple_string function Sascha Hauer
2015-06-18  7:43 ` [PATCH 2/6] cdev: Add partuuid string to struct cdev Sascha Hauer
2015-06-18  7:43 ` [PATCH 3/6] fs: Add device parameter for Linux root= option Sascha Hauer
2015-06-18  7:43 ` [PATCH 4/6] fs: ubifs: Implement Linux rootarg Sascha Hauer
2015-06-18  7:43 ` [PATCH 5/6] fs: nfs: " Sascha Hauer
2015-06-18  7:43 ` [PATCH 6/6] blspec: Automatically append rootarg Sascha Hauer
2015-06-30  7:26   ` Marc Kleine-Budde
2015-07-01  6:58     ` Sascha Hauer
2015-07-01  7:22       ` Marc Kleine-Budde [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55939542.7000607@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox