* filling string variables in script
@ 2012-03-29 13:35 Martino Ruppi
2012-04-02 14:28 ` R: " Martino Ruppi
0 siblings, 1 reply; 4+ messages in thread
From: Martino Ruppi @ 2012-03-29 13:35 UTC (permalink / raw)
To: barebox
[-- Attachment #1.1: Type: text/plain, Size: 652 bytes --]
Dear all,
I would ask a question as barebox user.
I mind to set a variable as result of memory reading but I understand it doesn't implemented redirection.
I'd like to do something of this:
myvar=""
memcpy -s /dev/nor0.switch -d $myvar 0x0 0x0 4
or
myvar="$(cat /dev/nor0.switch)"
I think, I use one of last releases (version command?).
Thanks to everyone can help me.
Marty
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martino Ruppi, FW engineer developer, PhD
mruppi@techimp.com<mailto:mruppi@techimp.com>
Techimp HQ srl
Via Toscana 11/C
40069 Zola Predosa (BO)
Tel. 051 19986050
Fax. 051 19986099
Cell. 349 4677660
[-- Attachment #1.2: Type: text/html, Size: 4596 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* R: filling string variables in script
2012-03-29 13:35 filling string variables in script Martino Ruppi
@ 2012-04-02 14:28 ` Martino Ruppi
2012-04-02 14:37 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Martino Ruppi @ 2012-04-02 14:28 UTC (permalink / raw)
To: barebox
[-- Attachment #1.1: Type: text/plain, Size: 1041 bytes --]
I'm sorry, I renovate my previous question.
Or maybe it wasn't arrived to the list.
I appreciate if someone could put me on right trace.
Thanks. Marty
Da: barebox-bounces@lists.infradead.org [mailto:barebox-bounces@lists.infradead.org] Per conto di Martino Ruppi
Inviato: giovedì 29 marzo 2012 15.36
A: barebox@lists.infradead.org
Oggetto: filling string variables in script
Dear all,
I would ask a question as barebox user.
I mind to set a variable as result of memory reading but I understand it doesn't implemented redirection.
I'd like to do something of this:
myvar=""
memcpy -s /dev/nor0.switch -d $myvar 0x0 0x0 4
or
myvar="$(cat /dev/nor0.switch)"
I think, I use one of last releases (version command?).
Thanks to everyone can help me.
Marty
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martino Ruppi, FW engineer developer, PhD
mruppi@techimp.com<mailto:mruppi@techimp.com>
Techimp HQ srl
Via Toscana 11/C
40069 Zola Predosa (BO)
Tel. 051 19986050
Fax. 051 19986099
Cell. 349 4677660
[-- Attachment #1.2: Type: text/html, Size: 5970 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: R: filling string variables in script
2012-04-02 14:28 ` R: " Martino Ruppi
@ 2012-04-02 14:37 ` Sascha Hauer
[not found] ` <63954CAD61AA2440BC0B16A69EAE2BBC630E11085B@srv-exc.techimp.com>
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2012-04-02 14:37 UTC (permalink / raw)
To: Martino Ruppi; +Cc: barebox
On Mon, Apr 02, 2012 at 04:28:22PM +0200, Martino Ruppi wrote:
> I'm sorry, I renovate my previous question.
> Or maybe it wasn't arrived to the list.
> I appreciate if someone could put me on right trace.
> Thanks. Marty
>
> Da: barebox-bounces@lists.infradead.org [mailto:barebox-bounces@lists.infradead.org] Per conto di Martino Ruppi
> Inviato: giovedì 29 marzo 2012 15.36
> A: barebox@lists.infradead.org
> Oggetto: filling string variables in script
>
> Dear all,
> I would ask a question as barebox user.
> I mind to set a variable as result of memory reading but I understand it doesn't implemented redirection.
> I'd like to do something of this:
>
> myvar=""
> memcpy -s /dev/nor0.switch -d $myvar 0x0 0x0 4
>
> or
>
> myvar="$(cat /dev/nor0.switch)"
>
> I think, I use one of last releases (version command?).
> Thanks to everyone can help me.
If I understand correctly then you want to copy the content of
/dev/nor0.switch to a variable. I'm afraid there currently is no
way to do this in barebox. What information is inside this nor
partition? It seems like you want to implement some kind of redundant
boot and want to decide which rootfs you want to boot. Am I right?
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 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: R: R: filling string variables in script
[not found] ` <63954CAD61AA2440BC0B16A69EAE2BBC630E11085B@srv-exc.techimp.com>
@ 2012-04-02 16:53 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2012-04-02 16:53 UTC (permalink / raw)
To: Martino Ruppi; +Cc: barebox
On Mon, Apr 02, 2012 at 04:52:41PM +0200, Martino Ruppi wrote:
>
>
> -----Messaggio originale-----
> Da: Sascha Hauer [mailto:s.hauer@pengutronix.de]
> Inviato: lunedì 2 aprile 2012 16.38
> A: Martino Ruppi
> Cc: barebox@lists.infradead.org
> Oggetto: Re: R: filling string variables in script
>
> On Mon, Apr 02, 2012 at 04:28:22PM +0200, Martino Ruppi wrote:
> > I'm sorry, I renovate my previous question.
> > Or maybe it wasn't arrived to the list.
> > I appreciate if someone could put me on right trace.
> > Thanks. Marty
> >
> > Da: barebox-bounces@lists.infradead.org
> > [mailto:barebox-bounces@lists.infradead.org] Per conto di Martino
> > Ruppi
> > Inviato: giovedì 29 marzo 2012 15.36
> > A: barebox@lists.infradead.org
> > Oggetto: filling string variables in script
> >
> > Dear all,
> > I would ask a question as barebox user.
> > I mind to set a variable as result of memory reading but I understand it doesn't implemented redirection.
> > I'd like to do something of this:
> >
> > myvar=""
> > memcpy -s /dev/nor0.switch -d $myvar 0x0 0x0 4
> >
> > or
> >
> > myvar="$(cat /dev/nor0.switch)"
> >
> > I think, I use one of last releases (version command?).
> > Thanks to everyone can help me.
>
> If I understand correctly then you want to copy the content of /dev/nor0.switch to a variable. I'm afraid there currently is no way to do this in barebox. What information is inside this nor partition? It seems like you want to implement some kind of redundant boot and want to decide which rootfs you want to boot. Am I right?
>
> Sascha
>
> It's exactly as you write.
> I mind to boot from a redundant filesystem to safety upgrade the former.
> it's no matter about /dev/nor0.switch content, now I wrote "ZERO" chars on it.
> I tried also comparing 2 blocks (memcmp) but it seems I can't get boolean answer form it.
> If you suggest another way, I can move on it.
You can access the barebox environment from Linux using
scripts/bareboxenv (I have a patch which compiles it for the target
also)
We use this in a similar setup to set a variable under Linux and read it
out under barebox to decide which rootfs to boot. If you prefer to
put this into a seperate partition you can add it using
saveenv <path_to_env> <directory> and
loadenv <path_to_env> <directory>.
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 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-02 16:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29 13:35 filling string variables in script Martino Ruppi
2012-04-02 14:28 ` R: " Martino Ruppi
2012-04-02 14:37 ` Sascha Hauer
[not found] ` <63954CAD61AA2440BC0B16A69EAE2BBC630E11085B@srv-exc.techimp.com>
2012-04-02 16:53 ` R: " Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox