omap3evm: Set preliminary environment
RFC 1/1 omap3evm: Set preliminary environment
This is still work-in-progress, but wanted to
share them early for any feedback.
---
I have made offline edits on these scripts before making this patch. There is a possibility of run-time failure.
You will also observe many TODOs. Hope to get them sorted tomorrow - for a patch worthy of applying on the tree.
arch/arm/boards/omap3evm/env/bin/boot | 27 ++++++++++ arch/arm/boards/omap3evm/env/bin/init | 27 ++++++++++ arch/arm/boards/omap3evm/env/bin/set-local-env | 66 ++++++++++++++++++++++++ arch/arm/boards/omap3evm/env/config | 52 +++++++++++++++++++ 4 files changed, 172 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boards/omap3evm/env/bin/boot create mode 100644 arch/arm/boards/omap3evm/env/bin/init create mode 100644 arch/arm/boards/omap3evm/env/bin/set-local-env create mode 100644 arch/arm/boards/omap3evm/env/config
arch/arm/boards/omap3evm/env/bin/boot new file +27 -0
@@ -0,0 +1,27 @@ +#!/bin/sh + +if [ "$boot_method" = "disk" ]; then + # + # Mount the partition containing kernel image + # + mkdir /boot + + echo mount /dev/$kernel_part fat /boot + mount /dev/$kernel_part fat /boot +# +# TODO: This (and similar variations of the check) cause exceptions +# Keep commented for now. +# if [ "$?" != "0" ]; then +# echo ":: Couldn't mount the MMC/SD card" +# exit 1 +# fi + + bootm -c -v /boot/uImage +else + # + # TODO: Boot from tftp + nfs + # +fi + +echo ":: Unable to boot. Check environment variables." +echo "::"
arch/arm/boards/omap3evm/env/bin/init new file +27 -0
@@ -0,0 +1,27 @@ +#!/bin/sh + +export PATH=/env/bin + +# +# Source generic configuration +# +. /env/config + +# +# Populate environment based on config params +# +. /env/bin/set-local-env + +echo "" +echo -n ":: Press any key to stop autoboot: " +timeout -a $autoboot_timeout +if [ $? != 0 ]; then + exit +fi + +echo "" + +# +# Proceed to boot +# +. /env/bin/boot
arch/arm/boards/omap3evm/env/bin/set-local-env new file +66 -0
66 lines not on this page · raw message
arch/arm/boards/omap3evm/env/config new file +52 -0
52 lines not on this page · raw message
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 10 lines · Sanjeev Premi
This is still work-in-progress, but wanted to
share them early for any feedback.Signed-off-by Sanjeev Premi <[email protected]>---
I have made offline edits on these scripts before making this patch. There is a possibility of run-time failure.You will also observe many TODOs. Hope to get them sorted tomorrow - for a patch worthy of applying on the tree.
You are rewriting what we already have in form of the generic environment. You shouldn't do this, we've been there before. Before there was the generic environment every board had its own set of environment scripts. This resulted in tons of board specific scripts in slightly different states.
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 16 lines
-----Original Message-----
From: Sascha Hauer [mailto:[email protected]]
Sent: Friday, February 10, 2012 5:54 PM
To: Premi, Sanjeev
Cc: [email protected]
Subject: Re: [RFC] omap3evm: Set preliminary environmentQuoted 8 lines · Sanjeev Premi
This is still work-in-progress, but wanted to
share them early for any feedback.Signed-off-by Sanjeev Premi <[email protected]>---
I have made offline edits on these scripts before making this patch. There is a possibility of run-time failure.
Quoted 8 lines
Quoted 2 lines
You will also observe many TODOs. Hope to get them sorted tomorrow - for a patch worthy of applying on the tree.
You are rewriting what we already have in form of the generic environment. You shouldn't do this, we've been there before. Before there was the generic environment every board had its own set of environment scripts. This resulted in tons of board specific scripts in slightly different states.
Agree. I didn't want duplication - but was swayed by "FIXME"s the barebox/defaultenv and scripts in some of the boards that I saw.
It is possible to override selective variables? e.g.
machine=FIXME
bootargs="console=ttyFIXME,115200"
kernel_part=disk0.2
Is there an example to refer?
~sanjev
Quoted 13 lines
Sascha
Signature · 8 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 · Sanjeev
Quoted 16 lines
-----Original Message-----
From: Sascha Hauer [mailto:[email protected]]
Sent: Friday, February 10, 2012 5:54 PM
To: Premi, Sanjeev
Cc: [email protected]
Subject: Re: [RFC] omap3evm: Set preliminary environmentQuoted 8 lines · Sanjeev Premi
This is still work-in-progress, but wanted to
share them early for any feedback.Signed-off-by Sanjeev Premi <[email protected]>---
I have made offline edits on these scripts before making this patch. There is a possibility of run-time failure.Quoted 8 lines
Quoted 2 lines
You will also observe many TODOs. Hope to get them sorted tomorrow - for a patch worthy of applying on the tree.
You are rewriting what we already have in form of the generic environment. You shouldn't do this, we've been there before. Before there was the generic environment every board had its own set of environment scripts. This resulted in tons of board specific scripts in slightly different states.
Agree. I didn't want duplication - but was swayed by "FIXME"s the barebox/defaultenv and scripts in some of the boards that I saw.
Quoted 7 lines
It is possible to override selective variables? e.g.
machine=FIXME
bootargs="console=ttyFIXME,115200"
kernel_part=disk0.2Is there an example to refer?
The idea is to just overwrite env/config and keeping the rest from the default env. There currently is no way to overwrite only single variables.
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