omap4: allow the use of a plain text env file instead boot scripts
PATCH v2 1/1 omap4: allow the use of a plain text env file instead boot scripts
For production systems it is better to use script images since they are protected by checksums and carry valuable information like name and timestamp. Also, you can't validate the content passed to env import.
But for development, it is easier to use the env import command and plain text files instead of script-images.
Since both OMAP4 supported boards (Panda and TI SDP4430) are used primarily for development, this patch allows U-Boot to load env var from a text file in case that an boot.scr script-image is not present.
The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt was loaded. If uenvcmd doesn't exist the default boot sequence will be started.
---
Changes since v2:
- Comment the advantages and drawbacks of using env import instead of boot scripts as explained by Wolfgang Denk.
- Don't break existing users/distributions that rely on boot.scr by looking for uEnv.txt only if boot.scr does not exist as suggested by Tom Rini.
include/configs/omap4_common.h | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-)
include/configs/omap4_common.h +14 -3
@@ -159,6 +159,9 @@"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \"source ${loadaddr}\0" \ +"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ +"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ +"env import -t ${loadaddr} ${filesize}\0" \"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \"mmcboot=echo Booting from mmc${mmcdev} ...; " \"run mmcargs; " \
@@ -166,12 +169,20 @@#define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ "if run loadbootscript; then " \ "run bootscript; " \ "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "fi; " \ + "if run loadbootenv; then " \ + "run importbootenv; " \ + "fi;" \ + "if test -n ${uenvcmd}; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "fi;" \ + "if run loaduimage; then " \ + "run mmcboot; " \ "fi; " \ "fi"
Signature · 1 line
1.7.7.6
PATCH v2 1/1 omap4: allow the use of a plain text env file instead boot scripts
Quoted 12 lines · Javier Martinez Canillas
For production systems it is better to use script images since they are protected by checksums and carry valuable information like name and timestamp. Also, you can't validate the content passed to env import.
But for development, it is easier to use the env import command and plain text files instead of script-images.
Since both OMAP4 supported boards (Panda and TI SDP4430) are used primarily for development, this patch allows U-Boot to load env var from a text file in case that an boot.scr script-image is not present.
Quoted 5 lines
The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt was loaded. If uenvcmd doesn't exist the default boot sequence will be started.
Signed-off-by Javier Martinez Canillas <[email protected]>
Tested on PandaBoard ES.
Regards,
Nishanth Menon
PATCH v2 1/1 omap4: allow the use of a plain text env file instead boot scripts
Quoted 18 lines · Nishanth Menon
Quoted 16 lines · Javier Martinez Canillas
For production systems it is better to use script images since they are protected by checksums and carry valuable information like name and timestamp. Also, you can't validate the content passed to env import.
But for development, it is easier to use the env import command and plain text files instead of script-images.
Since both OMAP4 supported boards (Panda and TI SDP4430) are used primarily for development, this patch allows U-Boot to load env var from a text file in case that an boot.scr script-image is not present.
The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt was loaded. If uenvcmd doesn't exist the default boot sequence will be started.
Quoted 6 lines
Quoted 1 line
Signed-off-by Javier Martinez Canillas <[email protected]>Acked-by Nishanth Menon <[email protected]>Tested on PandaBoard ES.
Regards,
Nishanth Menon
Hello Tom,
Any comments on this patch?
Thanks a lot and best regards,
Javier
PATCH v2 1/1 omap4: allow the use of a plain text env file instead boot scripts
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 22 lines · Javier Martinez Canillas
Quoted 21 lines · Nishanth Menon
Quoted 19 lines · Javier Martinez Canillas
For production systems it is better to use script images since they are protected by checksums and carry valuable information like name and timestamp. Also, you can't validate the content passed to env import.
But for development, it is easier to use the env import command and plain text files instead of script-images.
Since both OMAP4 supported boards (Panda and TI SDP4430) are used primarily for development, this patch allows U-Boot to load env var from a text file in case that an boot.scr script-image is not present.
The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt was loaded. If uenvcmd doesn't exist the default boot sequence will be started.
Signed-off-by: Javier Martinez Canillas
<[email protected]>
Quoted 7 lines
Quoted 3 lines
Acked-by Nishanth Menon <[email protected]>Tested on PandaBoard ES. Regards, Nishanth Menon
Hello Tom,
Any comments on this patch?
My Friday got overly busy, I hope to prepare a pull request for u-boot-ti early next week, with this patch. Thanks!
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQIcBAEBAgAGBQJQ+riyAAoJENk4IS6UOR1WYfEP+wZpmQJsF5n/KxmWuMudkixC uTDIcw9PAtPK4txMGy8gLsZtkwg4E6ObRgGx+HZyyCu4SHqTc5dXP8PvlcPdSsuZ WiKRefkFhDsgVDE12jw4UUije/dYO1/1fwxHWehLRovmMROEUo63pwqo8x2lBT0n JPFy3gBJAdWXmME08mkppHkCNs2fZogbWhsddCuRD5KBAGe8V+reEwlsLgqm8D1w 6wEiUVnmb0+vo4Kbo+otz7Sj94l2UGONSQ4gRWmAvQjbM2nLukf0QGFwfj1LLxKz fpP0CUzhaHVq9tDWgcv64R0T6odJMhc2y/JnnPKbpBCJ6Vb2MQLEEgb8MUub+0pA 1P68HZD7J62uWpg1s0tIqPbd0di0vCfaR2KlCt8LQS71DzeUhE15Jv8QCN2xAOwo XmE46x8W9Zm3JI7uRid3BiVnFaspdJawZe8XdjXMgzZxFqFf6JeKfEttyrN2wPYW In7MaZr1kiiQtK3t5hKhR5TAJujRu7tVyi+oDbP7cRPHzmuDddFsAtpTN6iSQ2kZ VtDGrUIZ8AJ43BNWQVJ/ZeUZ4SRNnnF1vgw4H1AVK9vBKcc557/X8akf9Fx3yotn W+7vwkdR1rx0gq5zo7c6NF7r9Bu6xxXNsOyd2Xi2vN038qyvcgqFFFcZ46YVP/sa Ny/AEt8VsZj1i692PrB5
=75hC
-----END PGP SIGNATURE-----
PATCH v2 1/1 omap4: allow the use of a plain text env file instead boot scripts
In reply to Javier Martinez CanillasQuoted 12 lines · Javier Martinez Canillas
For production systems it is better to use script images since they are protected by checksums and carry valuable information like name and timestamp. Also, you can't validate the content passed to env import.
But for development, it is easier to use the env import command and plain text files instead of script-images.
Since both OMAP4 supported boards (Panda and TI SDP4430) are used primarily for development, this patch allows U-Boot to load env var from a text file in case that an boot.scr script-image is not present.
Quoted 6 lines
The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt was loaded. If uenvcmd doesn't exist the default boot sequence will be started.
Signed-off-by Javier Martinez Canillas <[email protected]>Acked-by Nishanth Menon <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130125/62e6af43/attachment.pgp>