barebox update: add note after successful update
PATCH 1/1 barebox update: add note after successful update
Some users of the barebox_update command forget to erase the external barebox environment after updating the barebox. Using an old barebox environment leads to various problems if there were major changes.
So add a gentle reminder after the successful update.
--- common/bbu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
common/bbu.c +4 -1
@@ -113,8 +113,11 @@ int barebox_update(struct bbu_data *data)if (ret == -EINTR )printf ("update aborted\n" ); -if (!ret) +if (!ret) {printf ("update succeeded\n" ); +if (IS_ENABLED (CONFIG_ENV_HANDLING )) +printf ("You maybe want to erase the barebox environment.\n" ); + }return ret; }
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 16 lines · Stefan Christ
Some users of the
barebox_updatecommand forget to erase the external barebox environment after updating the barebox. Using an old barebox environment leads to various problems if there were major changes.So add a gentle reminder after the successful update.
Signed-off-by Stefan Christ <[email protected]>--- common/bbu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)common/bbu.c +0
-0
common/bbu.c int barebox_update(struct bbu_data *data) · line 119
Quoted 8 lines
common/bbu.c +3
-1@@ -113,8 +113,11 @@ int barebox_update(struct bbu_data *data)if (ret == -EINTR )printf ("update aborted\n" ); -if (!ret) +if (!ret) {printf ("update succeeded\n" ); +if (IS_ENABLED (CONFIG_ENV_HANDLING )) +printf ("You maybe want to erase the barebox environment.\n" );
How about adding a hint ...using saveenv -z?
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 20 lines · Sascha Hauer
Quoted 19 lines · Stefan Christ
Some users of the
barebox_updatecommand forget to erase the external barebox environment after updating the barebox. Using an old barebox environment leads to various problems if there were major changes.So add a gentle reminder after the successful update.
Signed-off-by Stefan Christ <[email protected]>--- common/bbu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)common/bbu.c +0
-0@@ -113,8 +113,11 @@ int barebox_update(struct bbu_data *data)if (ret == -EINTR )printf ("update aborted\n" );
Quoted 7 lines
common/bbu.c int barebox_update(struct bbu_data *data) · line 119
Quoted 5 lines
common/bbu.c +3
-1-if (!ret) +if (!ret) {printf ("update succeeded\n" ); +if (IS_ENABLED (CONFIG_ENV_HANDLING )) +printf ("You maybe want to erase the barebox environment.\n" );How about adding a hint ...using saveenv -z?
Oh, I didn't know that the "-z" argument exits. Nice.
Ok, but what about the situation when a user boots the barebox from sdcard and uses the barebox_update handler to flash a barebox to NAND. In such case 'saveenv -z' overwrites the environment on the sdcard.
I've struggled a bit to come up with a short text that covers all these cases.
Mit freundlichen Grüßen / Kind regards,
Stefan Christ
Quoted 8 lines
Sascha
Signature · 4 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 29 lines · Stefan Christ
Quoted 20 lines · Sascha Hauer
Quoted 19 lines · Stefan Christ
Some users of the
barebox_updatecommand forget to erase the external barebox environment after updating the barebox. Using an old barebox environment leads to various problems if there were major changes.So add a gentle reminder after the successful update.
Signed-off-by Stefan Christ <[email protected]>--- common/bbu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)common/bbu.c +0
-0@@ -113,8 +113,11 @@ int barebox_update(struct bbu_data *data)if (ret == -EINTR )printf ("update aborted\n" );Quoted 7 lines
common/bbu.c int barebox_update(struct bbu_data *data) · line 119
Quoted 5 lines
common/bbu.c +3
-1-if (!ret) +if (!ret) {printf ("update succeeded\n" ); +if (IS_ENABLED (CONFIG_ENV_HANDLING )) +printf ("You maybe want to erase the barebox environment.\n" );How about adding a hint ...using saveenv -z?
Quoted 5 lines
Oh, I didn't know that the "-z" argument exits. Nice.
Ok, but what about the situation when a user boots the barebox from sdcard and uses the
barebox_updatehandler to flash a barebox to NAND. In such case 'saveenv -z' overwrites the environment on the sdcard.
I still have no good answer to this :/
I may also happen that the updated barebox comes with a different partition layout so that you can't properly erase the environment from the currently running barebox. At some point we thought about adding some version counter to the environment so that the updated barebox could either issue a warning when an outdated environment is detected or ignore it completely. This would of course mean we must not forget to increase the version when we do an incompatible change.
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox