* [U-Boot] user-space ===>> U-Boot ====>> user-space ?
@ 2010-10-12 1:44 bosmith
2010-10-12 5:16 ` Wolfgang Denk
2010-10-12 22:18 ` Swarthout Edward L-SWARTHOU
0 siblings, 2 replies; 3+ messages in thread
From: bosmith @ 2010-10-12 1:44 UTC (permalink / raw)
To: u-boot
Hi
Is there a simple way to send data from a Linux user-space program to
U-Boot?
How about from U-Boot up to a user-space program?
The data may change often enough that using fw_printenv and fw_setenv might
wear out the NAND storage area for the environment.
The use-case is to have two kernel images, two root file systems, and to let
a user-space application specify which to use and then force a reboot. The
system will not lose power during this reboot.
This seems like a common enough problem. Has anyone solved it before?
--
View this message in context: http://old.nabble.com/user-space--%3D%3D%3D%3E%3E--U-Boot--%3D%3D%3D%3D%3E%3E--user-space---tp29939469p29939469.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] user-space ===>> U-Boot ====>> user-space ?
2010-10-12 1:44 [U-Boot] user-space ===>> U-Boot ====>> user-space ? bosmith
@ 2010-10-12 5:16 ` Wolfgang Denk
2010-10-12 22:18 ` Swarthout Edward L-SWARTHOU
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2010-10-12 5:16 UTC (permalink / raw)
To: u-boot
Dear bosmith,
In message <29939469.post@talk.nabble.com> you wrote:
>
> Is there a simple way to send data from a Linux user-space program to
> U-Boot?
> How about from U-Boot up to a user-space program?
I know of two communication methods:
Using the environment (and fw_printenv/fw_setenv in Linux user space),
and using a shared log buffer (which may be a bit difficult to read /
process in U-Boot if that should be needed).
> The data may change often enough that using fw_printenv and fw_setenv might
> wear out the NAND storage area for the environment.
Then put all this stuff in a UBI partition, and use the "env import" /
"env export" features in U-Boot to access it (or extend the code to
handle environment in a UBI partition directly).
> The use-case is to have two kernel images, two root file systems, and to let
> a user-space application specify which to use and then force a reboot. The
> system will not lose power during this reboot.
And you think you will switch betweent these two so often that using
the environment would wear out the NAND? I think you are too
pessimistic.
> This seems like a common enough problem. Has anyone solved it before?
Most people use the environment for this purpose.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Today is the yesterday you worried about tomorrow.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] user-space ===>> U-Boot ====>> user-space ?
2010-10-12 1:44 [U-Boot] user-space ===>> U-Boot ====>> user-space ? bosmith
2010-10-12 5:16 ` Wolfgang Denk
@ 2010-10-12 22:18 ` Swarthout Edward L-SWARTHOU
1 sibling, 0 replies; 3+ messages in thread
From: Swarthout Edward L-SWARTHOU @ 2010-10-12 22:18 UTC (permalink / raw)
To: u-boot
From: bosmith
>
> ...
> The use-case is to have two kernel images, two root file
> systems, and to let a user-space application specify which to
> use and then force a reboot. The system will not lose power
> during this reboot.
>
> This seems like a common enough problem. Has anyone solved it before?
This sort of image swapping in flash is best done with some
support from board logic.
For example, the FSL mpc85xx boards have a register that a user can
write
that inverts a high-order flash address bit. Inverting this bit
causes the next boot to access the alternate bank.
This allows simple bank switching with no modification to any code.
Ed
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-12 22:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-12 1:44 [U-Boot] user-space ===>> U-Boot ====>> user-space ? bosmith
2010-10-12 5:16 ` Wolfgang Denk
2010-10-12 22:18 ` Swarthout Edward L-SWARTHOU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox