From: Josef Ahmad <[email protected]> Add the dmidecode logic that comes from galileod.sh to launcher.sh. At the moment this is pure duplication.
Signed-off-by: Josef Ahmad <[email protected]> Reviewed-by: Ong Boon Leong <[email protected]> Tested-by: Ong Boon Leong <[email protected]> Signed-off-by: Chang Rebecca Swee Fun <[email protected]> --- recipes-galileo/galileo-target/files/launcher.sh | 32 ++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/recipes-galileo/galileo-target/files/launcher.sh b/recipes-galileo/galileo-target/files/launcher.sh index 50fa378..a166345 100755 --- a/recipes-galileo/galileo-target/files/launcher.sh +++ b/recipes-galileo/galileo-target/files/launcher.sh @@ -11,11 +11,29 @@ mytrap() trap 'mytrap' USR1 -keepgoing=true -while $keepgoing -do - $CLLOADER $CLLOADER_OPTS < /dev/ttyGS0 > /dev/ttyGS0 & clPID=$! - wait $clPID - usleep 200000 -done +arduino_services() +{ + keepgoing=true + while $keepgoing + do + $CLLOADER $CLLOADER_OPTS < /dev/ttyGS0 > /dev/ttyGS0 & clPID=$! + wait $clPID + usleep 200000 + done +} + +galileo_board=false +type dmidecode > /dev/null 2>&1 || die "dmidecode not installed" +board=$(dmidecode -s baseboard-product-name) +case "$board" in + *"Galileo" ) + galileo_board=true + ;; + *"GalileoGen2" ) + galileo_board=true + ;; +esac +if [ $galileo_board == "true" ]; then + arduino_services +fi -- 1.9.1 -- _______________________________________________ meta-intel mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-intel
