Signed-off-by: Joel A Fernandes <agnel...@gmail.com>
---
Changes since v1:
* Bumped PR
* Using commit revision number instead of AUTOREV
* Using update-rc.d class instead of copying init script to /etc/rc5.d/
* Removed full stops from the commit summary
* Made comment on the init script in do_install more clear
.../beagleboard/beagleboard-test-scripts_git.bb | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/recipes/beagleboard/beagleboard-test-scripts_git.bb b/recipes/beagleboard/beagleboard-test-scripts_git.bb
index be0d059..4e0f54f 100644
--- a/recipes/beagleboard/beagleboard-test-scripts_git.bb
+++ b/recipes/beagleboard/beagleboard-test-scripts_git.bb
@@ -1,14 +1,18 @@
## Reminder: The correct spacing for a variable is FOO = "BAR" in : PR="r1"
DESCRIPTION = "BeagleBoard test scripts"
HOMEPAGE = "http://beagleboad.org/support"
-PR = "r2"
+PR = "r3"
-SRC_URI = "git://gitorious.org/beagleboard-validation/scripts.git;protocol=git \
+SRC_URI = "git://gitorious.org/~joelf/beagleboard-validation/validation-scripts.git;protocol=git \
"
-SRCREV = "473dd2ab20d866be6168c9f992c2c9e74e485c9d"
+SRCREV = "c482b7cb6caaa986a86d360d39e9040c77667d6b"
S = "${WORKDIR}/git"
+inherit update-rc.d
+INITSCRIPT_NAME = "flash-fs.sh"
+INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
+
do_install() {
TEST_FILES=" \
testaudio \
@@ -28,4 +32,8 @@ do_install() {
for i in ${TEST_FILES}; do
install -m 0755 ${S}/${i} ${D}/${bindir}
done
+ # A script to flash NAND if the board has it, and if there is valid image to flash on the SD Card.
+ # We also register it as an init script so that the SD Card auto-flashes to NAND during boot.
+ install -d ${D}/${sysconfdir}/init.d/
+ install -m 0755 ${S}/flashing/flash-fs.sh ${D}/${sysconfdir}/init.d/flash-fs.sh
}
--
1.7.0.4
Acked-by: Jason Kridner <jkri...@beagleboard.org>
I will eventually merge your changes into the mainline, but I believe
it is helpful to get these updates in OE for BeagleBoard users who
want to reproduce the shipping images.
Can you update the process to only flash the boards if the USER button
is held or some other similar strategy? It seems that enabling this
script would make the SD card image useless for non-flashing
activities. Of course, Gerald would need to sign-off on any flashing
process changes.
> _______________________________________________
> Openembedded-devel mailing list
> Openembed...@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
> Can you update the process to only flash the boards if the USER button
> is held or some other similar strategy? It seems that enabling this
> script would make the SD card image useless for non-flashing
Since we cannot access user-button as its used as an input event, can
I put in a message like "Press any key to flash", timeout if no key is
hit and then normally boot?
Regards
Joel
Don't see how this will work when the same card is used to flash
multiple boards?
Regards,
Joel
That would indeed make the card more useful, but it seems to be tied
to the wrong state--especially in a production environment where you
likely want to reuse the card on multiple boards.
It is critical that the public has a card image they can download to
restore the flash into its factory condition. For C5 boards, it seems
to me that the USER button is a reasonable approach as it will cause
the on-card x-loader to be used that will give preference to the
on-card u-boot. The remaining challenge is the lack of an isolated
command to read the environment from the NAND flash. The current
u-boot will always have the default environment overridden by the
environment in NAND flash.
We discussed previously on this list the idea of adding a command to
read the environment from the NAND flash and then adjusting the
default environment to perform that read and use the on-NAND
environment (as priority above any other environment settings, such as
uenv.txt on the SD card) if the USER button was not pressed. Then,
the reading of the environment from the NAND flash could be removed
and only read as part of the default environment settings.
A C5 image needs to go out, so I'm OK adding none of these changes for
this release, but I'd like it if Joel could make the above NAND/USER
button related changes to the mainline u-boot as part of the effort to
get all of the BeagleBoard u-boot patches into mainline. At that
point, a new flashing image could be released. In the meantime,
manual intervention of 'nand erase 260000 2000' may be required to
initiate flashing boards that have been modified.
>
>
> Texas Instruments Limited, 800 Pavilion Drive, Northampton, NN4 7YL. Registered in England & Wales under company number 00574102
>
> -----Original Message-----
You should be able to check the status similar to the way you do for
keyboards. From what I've read[1][2], you can simply use the
EVIOCGKEY ioctl to check the state.
[1] http://andrey.thedotcommune.com/2010/02/heres-another-quick-linux-input-snippet.html
[2] http://www.linuxjournal.com/node/6429/print
>
> Regards
> Joel
>
Texas Instruments Limited, 800 Pavilion Drive, Northampton, NN4 7YL. Registered in England & Wales under company number 00574102
-----Original Message-----
From: Jason Kridner [mailto:jkri...@beagleboard.org]
Sent: Thursday, July 07, 2011 4:35 PM
To: openembed...@lists.openembedded.org
Cc: Fernandes, Joel A; beagl...@googlegroups.com; Kooi, Koen; Joel A Fernandes; Kridner, Jason
Subject: Re: [oe] [PATCH v2] beagleboard-test-scripts: Add a script flash-fs.sh for flashing NAND
So what is your recommended design approach? Do you agree with my
assertion that the reading of the NAND environment should be moved
into a command executed (optionally) by the default environment
(compiled-in environment that might test the USER button, rather than
the compiled-in option that always reads the environment from NAND)?
> So what is your recommended design approach? Do you agree with my
> assertion that the reading of the NAND environment should be moved
> into a command executed (optionally) by the default environment
> (compiled-in environment that might test the USER button, rather than
> the compiled-in option that always reads the environment from NAND)?
I agree this and will work on it.
On a separate note, for now, I will like to check the user button
anyway in U-boot (once uEnv.txt takes precedence after a NAND erase of
the environment) to determine if we should flash U-boot and Uimage, or
instead, boot directly from NAND if the user button is not pressed.
Are you ok with this? Thanks,
Joel
I believe the prevailing opinion is that 2 card images are necessary:
1 for flashing boards that have flash (ie. BeagleBoard rev Bx/Cx
boards) and 1 for executing boards without flash (ie. xM rev A/B/C
boards). Despite this, I think it is still a stretch goal to try to
have one SD card image that can be shipped with BeagleBoard-xMs and be
used to flash BeagleBoards. I'd like to see as little documentation
required as possible on how to use that SD card image. The more that
can be done to reduce the permutations, the better, in my opinion. I
think what you are talking about is a difference in the default
environment and I'm not supportive of that. Having different
uenv.txt/user.txt files is something for which I'd be more supportive,
if they were necessary for initiating the flashing.
Hi Jason,
Sorry I am afraid I'm not very clear about it.
Are you saying you're against something like this in uEnv.txt that
will go into the final image?
uenvcmd=if userbutton; then run nandflash; else run nandboot; fi
nandflash would write uImage and u-boot to NAND partitions, and then do a boot
nandboot would expect everything to be already there.
thanks,
Joel
Signed-off-by: Joel A Fernandes <agnel...@gmail.com>
---
Changes since v2:
User button is checked before flashing of the board
This is based on Jason's review:
http://groups.google.com/group/beagleboard/msg/835de9a37c3a340a
.../beagleboard/beagleboard-test-scripts_git.bb | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/recipes/beagleboard/beagleboard-test-scripts_git.bb b/recipes/beagleboard/beagleboard-test-scripts_git.bb
index be0d059..3f3cc56 100644
--- a/recipes/beagleboard/beagleboard-test-scripts_git.bb
+++ b/recipes/beagleboard/beagleboard-test-scripts_git.bb
@@ -1,14 +1,18 @@
## Reminder: The correct spacing for a variable is FOO = "BAR" in : PR="r1"
DESCRIPTION = "BeagleBoard test scripts"
HOMEPAGE = "http://beagleboad.org/support"
-PR = "r2"
+PR = "r3"
-SRC_URI = "git://gitorious.org/beagleboard-validation/scripts.git;protocol=git \
+SRC_URI = "git://gitorious.org/~joelf/beagleboard-validation/validation-scripts.git;protocol=git \
"
-SRCREV = "473dd2ab20d866be6168c9f992c2c9e74e485c9d"
+SRCREV = "513bfa2e99822150ea5845f3a33c349029cb7c13"
Acked-by: Jason Kridner <jkri...@beagleboard.org>
> ---
> Changes since v2:
> User button is checked before flashing of the board
>
> This is based on Jason's review:
> http://groups.google.com/group/beagleboard/msg/835de9a37c3a340a
>
> .../beagleboard/beagleboard-test-scripts_git.bb | 14 +++++++++++---
> 1 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/recipes/beagleboard/beagleboard-test-scripts_git.bb b/recipes/beagleboard/beagleboard-test-scripts_git.bb
> index be0d059..3f3cc56 100644
> --- a/recipes/beagleboard/beagleboard-test-scripts_git.bb
> +++ b/recipes/beagleboard/beagleboard-test-scripts_git.bb
> @@ -1,14 +1,18 @@
> ## Reminder: The correct spacing for a variable is FOO = "BAR" in : PR="r1"
> DESCRIPTION = "BeagleBoard test scripts"
> HOMEPAGE = "http://beagleboad.org/support"
> -PR = "r2"
> +PR = "r3"
>
> -SRC_URI = "git://gitorious.org/beagleboard-validation/scripts.git;protocol=git \
> +SRC_URI = "git://gitorious.org/~joelf/beagleboard-validation/validation-scripts.git;protocol=git \
> "
>
> -SRCREV = "473dd2ab20d866be6168c9f992c2c9e74e485c9d"
> +SRCREV = "513bfa2e99822150ea5845f3a33c349029cb7c13"
Thanks!
Would it be better to call it flash-nand-fs.sh ? Or have NAND somewhere in it's name
Signed-off-by: Joel A Fernandes <agnel...@gmail.com>
---
Changes since v3:
* User button changes for flashing have been removed as it seemed unstable and we would like to have a
revision which we're using for the BeagleBoard image that's being shipped with a BeagleBoard C5 board.
We're calling this version of the build "Alpha", the "Beta" will have the flash-with-userbutton feature
* flash-fs.sh renamed to to flash-nand-fs.sh after suggestion from Khem
.../beagleboard/beagleboard-test-scripts_git.bb | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/recipes/beagleboard/beagleboard-test-scripts_git.bb b/recipes/beagleboard/beagleboard-test-scripts_git.bb
index be0d059..0ee7954 100644
--- a/recipes/beagleboard/beagleboard-test-scripts_git.bb
+++ b/recipes/beagleboard/beagleboard-test-scripts_git.bb
@@ -1,14 +1,18 @@
## Reminder: The correct spacing for a variable is FOO = "BAR" in : PR="r1"
DESCRIPTION = "BeagleBoard test scripts"
HOMEPAGE = "http://beagleboad.org/support"
-PR = "r2"
+PR = "r3"
-SRC_URI = "git://gitorious.org/beagleboard-validation/scripts.git;protocol=git \
+SRC_URI = "git://gitorious.org/~joelf/beagleboard-validation/validation-scripts.git;protocol=git \
"
-SRCREV = "473dd2ab20d866be6168c9f992c2c9e74e485c9d"
+SRCREV = "2df76857155fbd462527c2b00ee83214483f0594"
S = "${WORKDIR}/git"
+inherit update-rc.d
+INITSCRIPT_NAME = "flash-nand-fs.sh"
+INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
+
do_install() {
TEST_FILES=" \
testaudio \
@@ -28,4 +32,8 @@ do_install() {
for i in ${TEST_FILES}; do
install -m 0755 ${S}/${i} ${D}/${bindir}
done
+ # A script to flash NAND if the board has it, and if there is valid image to flash on the SD Card.
+ # We also register it as an init script so that the SD Card auto-flashes to NAND during boot.
+ install -d ${D}/${sysconfdir}/init.d/
+ install -m 0755 ${S}/flashing/flash-nand-fs.sh ${D}/${sysconfdir}/init.d/flash-nand-fs.sh
}
--
1.7.0.4
For what it is worth:
Acked-by: Jason Kridner <jkri...@beagleboard.org>
> --
> You received this message because you are subscribed to the Google Groups "Beagle Board" group.
> To post to this group, send email to beagl...@googlegroups.com.
> To unsubscribe from this group, send email to beagleboard...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.
>
>