On Thu, Apr 30, 2015 at 07:32:10PM +0800, [email protected] 
wrote:
> 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

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
-- 
_______________________________________________
meta-intel mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-intel

Reply via email to