From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 89-97-197-40.ip19.fastwebnet.it ([89.97.197.40] helo=srv-exc.techimp.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SDFbX-0004IR-Mr for barebox@lists.infradead.org; Thu, 29 Mar 2012 13:41:32 +0000 From: Martino Ruppi Date: Thu, 29 Mar 2012 15:35:59 +0200 Message-ID: <63954CAD61AA2440BC0B16A69EAE2BBC630E110778@srv-exc.techimp.com> Content-Language: it-IT MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1189695193304577882==" Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: filling string variables in script To: "barebox@lists.infradead.org" --===============1189695193304577882== Content-Language: it-IT Content-Type: multipart/alternative; boundary="_000_63954CAD61AA2440BC0B16A69EAE2BBC630E110778srvexctechimp_" --_000_63954CAD61AA2440BC0B16A69EAE2BBC630E110778srvexctechimp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 do= esn't implemented redirection. I'd like to do something of this: myvar=3D"" memcpy -s /dev/nor0.switch -d $myvar 0x0 0x0 4 or myvar=3D"$(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 Techimp HQ srl Via Toscana 11/C 40069 Zola Predosa (BO) Tel. 051 19986050 Fax. 051 19986099 Cell. 349 4677660 --_000_63954CAD61AA2440BC0B16A69EAE2BBC630E110778srvexctechimp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Dear all,

I w= ould ask a question as barebox user.

I mind to set a variable as result of memory readin= g but I understand it doesn’t implemented redirection.

I’d like to do somethi= ng of this:

 

myvar=3D&= #8221;”

= memcpy –s  /dev/nor0.switch –d $myvar 0x0 0x0 4=

 =

or

 

myvar=3D”$(cat /dev/nor0.switch)”

 

I think, I use one of l= ast releases (version command?).

Thanks to everyone can help me.

Marty

 

~~= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mart= ino Ruppi, FW engineer developer, PhD

mruppi@techimp.com

Techimp HQ srl

Via Toscana 11= /C

40069 Zola Predosa (BO)

Tel.   051 19986050

Fax.   051 19986099

Ce= ll.  349 4677660

 

 

= --_000_63954CAD61AA2440BC0B16A69EAE2BBC630E110778srvexctechimp_-- --===============1189695193304577882== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox --===============1189695193304577882==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 89-97-197-40.ip19.fastwebnet.it ([89.97.197.40] helo=srv-exc.techimp.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SEiF8-0007Ob-GA for barebox@lists.infradead.org; Mon, 02 Apr 2012 14:28:27 +0000 From: Martino Ruppi Date: Mon, 2 Apr 2012 16:28:22 +0200 Message-ID: <63954CAD61AA2440BC0B16A69EAE2BBC630E110855@srv-exc.techimp.com> References: <63954CAD61AA2440BC0B16A69EAE2BBC630E110778@srv-exc.techimp.com> In-Reply-To: <63954CAD61AA2440BC0B16A69EAE2BBC630E110778@srv-exc.techimp.com> Content-Language: it-IT MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5446919784886291845==" Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: R: filling string variables in script To: "barebox@lists.infradead.org" --===============5446919784886291845== Content-Language: it-IT Content-Type: multipart/alternative; boundary="_000_63954CAD61AA2440BC0B16A69EAE2BBC630E110855srvexctechimp_" --_000_63954CAD61AA2440BC0B16A69EAE2BBC630E110855srvexctechimp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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.infra= dead.org] Per conto di Martino Ruppi Inviato: gioved=EC 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 do= esn't implemented redirection. I'd like to do something of this: myvar=3D"" memcpy -s /dev/nor0.switch -d $myvar 0x0 0x0 4 or myvar=3D"$(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 Techimp HQ srl Via Toscana 11/C 40069 Zola Predosa (BO) Tel. 051 19986050 Fax. 051 19986099 Cell. 349 4677660 --_000_63954CAD61AA2440BC0B16A69EAE2BBC630E110855srvexctechimp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

I’m sorry, I renovate my previous question.<= o:p>

Or maybe it wasn’t arrived to the list.

I appreci= ate if someone could put me on right trace.

Thanks. Marty<= /o:p>

 

Da:= b= arebox-bounces@lists.infradead.org [mailto:barebox-bounces@lists.infradead.= org] Per conto di Martino Ruppi
Inviato: gioved=EC 29 marz= o 2012 15.36
A: barebox@lists.infradead.org
Oggetto: fi= lling string variables in script

 

D= ear all,

I wou= ld 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=3D= 221;”

me= mcpy –s  /dev/nor0.switch –d $myvar 0x0 0x0 4

 

or

 

myvar=3D”$(cat /dev/nor0.switch)”=

 <= /span>

I think, I use one of las= t releases (version command?).

<= span lang=3DEN-US>Thanks to everyone can help me.

Marty

 

~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

= Martino = Ruppi, FW engineer developer, PhD

mruppi@techimp.com

 

Techimp HQ srl

Via Toscana 1= 1/C

40069 Zola Predosa (BO)

Tel.   051 19986050

Fax.   051 19986099

C= ell.  349 4677660

 <= /span>

 

= --_000_63954CAD61AA2440BC0B16A69EAE2BBC630E110855srvexctechimp_-- --===============5446919784886291845== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox --===============5446919784886291845==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SEiOL-0001IC-IN for barebox@lists.infradead.org; Mon, 02 Apr 2012 14:38:00 +0000 Date: Mon, 2 Apr 2012 16:37:44 +0200 From: Sascha Hauer Message-ID: <20120402143744.GZ3852@pengutronix.de> References: <63954CAD61AA2440BC0B16A69EAE2BBC630E110778@srv-exc.techimp.com> <63954CAD61AA2440BC0B16A69EAE2BBC630E110855@srv-exc.techimp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <63954CAD61AA2440BC0B16A69EAE2BBC630E110855@srv-exc.techimp.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: R: filling string variables in script To: Martino Ruppi Cc: "barebox@lists.infradead.org" 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.inf= radead.org] Per conto di Martino Ruppi > Inviato: gioved=EC 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=3D"" > memcpy -s /dev/nor0.switch -d $myvar 0x0 0x0 4 > = > or > = > myvar=3D"$(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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by casper.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SEkVg-0007fO-S1 for barebox@lists.infradead.org; Mon, 02 Apr 2012 16:53:42 +0000 Date: Mon, 2 Apr 2012 18:53:34 +0200 From: Sascha Hauer Message-ID: <20120402165334.GC3852@pengutronix.de> References: <63954CAD61AA2440BC0B16A69EAE2BBC630E110778@srv-exc.techimp.com> <63954CAD61AA2440BC0B16A69EAE2BBC630E110855@srv-exc.techimp.com> <20120402143744.GZ3852@pengutronix.de> <63954CAD61AA2440BC0B16A69EAE2BBC630E11085B@srv-exc.techimp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <63954CAD61AA2440BC0B16A69EAE2BBC630E11085B@srv-exc.techimp.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: R: R: filling string variables in script To: Martino Ruppi Cc: "barebox@lists.infradead.org" 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=EC 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=EC 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 i= t doesn't implemented redirection. > > I'd like to do something of this: > > = > > myvar=3D"" > > memcpy -s /dev/nor0.switch -d $myvar 0x0 0x0 4 > > = > > or > > = > > myvar=3D"$(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 ba= rebox. What information is inside this nor partition? It seems like you wan= t 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 o= n 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 and loadenv . 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