[meta-intel] [meta-intel-galileo] [PATCH 2/3] launcher.sh: start clloader only on galileo
Brendan Le Foll
brendan.le.foll at intel.com
Fri May 1 09:46:27 PDT 2015
On Thu, Apr 30, 2015 at 07:32:10PM +0800, rebecca.swee.fun.chang at intel.com wrote:
> From: Josef Ahmad <josef.ahmad at intel.com>
>
> Add the dmidecode logic that comes from galileod.sh to launcher.sh.
> At the moment this is pure duplication.
>
> Signed-off-by: Josef Ahmad <josef.ahmad at intel.com>
> Reviewed-by: Ong Boon Leong <boon.leong.ong at intel.com>
> Tested-by: Ong Boon Leong <boon.leong.ong at intel.com>
> Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>
> ---
> 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
This logic is duplicated in so many places it's untrue. I wish someone
would go through and remove them so we just do this kind of hack once.
Also you don't need to call dmidecode, you can just read in sysfs...
Anyways for the sake of time I applied the series anyways.
Cheers,
Brendan
More information about the meta-intel
mailing list