From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: "Premi, Sanjeev" <premi@ti.com>
Cc: "U-Boot Version 2 (barebox)" <barebox@lists.infradead.org>
Subject: RE: [PATCH] Add support for default env and mounting /boot to BeagleBoard
Date: Thu, 9 Feb 2012 11:35:49 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.2.02.1202091135080.14123@oneiric> (raw)
In-Reply-To: <E28AAFD00EFAA646AE3DF9B89CD24A893183BA4E@DBDE01.ent.ti.com>
On Thu, 9 Feb 2012, Premi, Sanjeev wrote:
> > /******************** Board Boot Time *******************/
> >
> > @@ -317,3 +320,30 @@ static int beagle_devices_init(void)
> > return 0;
> > }
> > device_initcall(beagle_devices_init);
> > +
> > +#ifdef CONFIG_DEFAULT_ENVIRONMENT
> > +static int beagle_env_init(void)
> > +{
> > + struct stat s;
> > + char *diskdev = "/dev/disk0.0";
> > + int ret;
> > +
> > + ret = stat(diskdev, &s);
> > + if (ret) {
> > + printf("no %s. using default env\n", diskdev);
> > + return 0;
> > + }
> > +
> > + mkdir ("/boot", 0666);
> > + ret = mount(diskdev, "fat", "/boot");
> > + if (ret) {
> > + printf("failed to mount %s\n", diskdev);
> > + return 0;
> > + }
> > +
> > + default_environment_path = "/boot/bareboxenv";
> > +
> > + return 0;
> > +}
> > +late_initcall(beagle_env_init);
> > +#endif
>
> Keeping this sequence, in init scripts makes things more & easily configurable.
i agree, it was a bad idea of mine. so moving it *out* of the panda
code would make sense as well, yes?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2012-02-09 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 13:39 Robert P. J. Day
2012-02-09 14:54 ` Premi, Sanjeev
2012-02-09 16:35 ` Robert P. J. Day [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=alpine.DEB.2.02.1202091135080.14123@oneiric \
--to=rpjday@crashcourse.ca \
--cc=barebox@lists.infradead.org \
--cc=premi@ti.com \
/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