User Tools

Site Tools


automotive

INTRODUCTION

TIZEN:IVI

Check tizen dedicated page:

GENIVI Development Platform

Status : 1.2.1 Integrated

Usage

git clone https://github.com/GENIVI/genivi-dev-platform ; cd genivi-dev-platform
MACHINE=qemux86-64 # or minnowboard, raspberrypi2 etc
source ./init.sh ${MACHINE} && bitbake genivi-dev-platform
runqemu tmp/deploy/images/${MACHINE}/genivi-dev-platform-${MACHINE}.qemuboot.conf 
xvncviewer localhost
ssh root@192.168.7.2 # Or adapt
ls /opt/iotivity*

Then look at shipped examples.

Download

For demo purpose here is a demo image for MinnowMax :

Dump image to USB stick using qemu-utils :

 time qemu-img convert -p "${file}" "${disk}" 

Boot if from UEFI shell :

fs0:\EFI\Boot\bootx64.efi

If you want to make this image self bootable, after 1st login and type :

  echo 'fs0:\EFI\Boot\bootx64.efi' > "/media/realroot/startup.nsh"

WORK IN PROGRESS

You can use this “forked” repo instead of upstream one :

git clone https://github.com/tizenteam/genivi-dev-platform -b sandbox/pcoval/on/master/devel
cd genivi-dev-platform
MACHINE=raspberrypi2 # or supported
source ./init.sh $MACHINE && bitbake genivi-dev-platform # Rebuild image

Or:

MACHINE=minnowboard # or supported
source ./init.sh $MACHINE && bitbake genivi-dev-platform # Rebuild image
ls -l gdp-src-build/tmp/deploy/images/intel-corei7-64/genivi-dev-platform-intel-corei7-64.hddimg

Read, edit automotive yocto pages if unclear

Boot device on supported hardware

Try examples from yocto paths (/opt/…)

Ask for support ( https://wiki.tizen.org/wiki/User:Pcoval )

Usage / Node

Let's verify with switch examples

Start sample server :

systemctl stop iotivity-example

/opt/iotivity-example/server
log: Server:
Press Ctrl-C to quit....
log: Successfully created oic.r.switch.binary resource
0:

Use basic client:

  mkdir -p /usr/lib/node_modules/iotivity-node/local/js
  cd /usr/lib/node_modules/iotivity-node/local/js
  url=https://raw.githubusercontent.com/TizenTeam/iotivity-node/sandbox/pcoval/wip/js/switch-client.js
  curl $url > switch-client.js
  node switch-client.js 

sh-4.3#   node switch-client.js
{ main
[ '/usr/bin/node',
  '/usr/lib/node_modules/iotivity-node/local/js/switch-client.js' ]
Starting OCF stack in client mode
# post on Discovery, can be posted without with args : destination port
Issuing discovery request
} main
Received response to DISCOVER request:
{

(...)
            {   
                "uri": "/BinarySwitchResURI",
                "types": [
                    "oic.r.switch.binary"
                ],
                "interfaces": [
                    "oic.if.baseline"
                ],
                "bitmap": 3,
                "secure": false,
                "port": 0
            }
        ]

Back to server you should have the “1” line that change resource value:

0:
In entity handler wrapper:

1

iotivity-node (server)

Now node as server:

sudo systemctl stop iotivity-example
mkdir -p /usr/lib/node_modules/iotivity-node/local/js
cd /usr/lib/node_modules/iotivity-node/local/js
url=https://raw.githubusercontent.com/TizenTeam/iotivity-node/sandbox/pcoval/wip/js/switch-server-hilevel.js
curl $url > switch-server-hilevel.js
node switch-server-hilevel.js

You can use native c++ client from:

/opt/iotivity-example/client # type: 1 or 0 and observe server

Details

If you need to work on other base. then port those changes :

git clone https://github.com/GENIVI/genivi-dev-platform 

Update meta-oic git module to next release

  rm -rf meta-oic
  git clone https://github.com/TizenTeam/meta-oic/ -b sandbox/pcoval/on/master/patch
  git commit -am "WIP:"

Add iotivity to demo image by picking this patch

  cd meta-genivi-dev
  url=https://github.com/TizenTeam/meta-genivi-dev/commit/6e1f9af09d05de4701fdb4eb05cba9258f20b0b5.patch
  curl $url | git am 
  git commit -am "WIP: $url"

Add iotivity-node form meta-iot-web:

git clone https://github.com/TizenTeam/meta-iot-web/ -b sandbox/pcoval/on/master/wip

Add package and nodejs to image.

That's the idea

MISC

On “Taskhash mismatch” issues update genivi-dev-platform.bb's PR

RESOURCES

AUTOMOTIVE GRADE LINUX (AGL)

Resources :

Status: 1.2.0 Integrated

USAGE:

Check official documentation:

machine=qemux86-64 # or qemux86 RPi etc
url=https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
repo init --no-clone-bundle  -u $url && repo sync
rm -rf build/conf # remove previous configuration if any
source ./meta-agl/scripts/aglsetup.sh agl-all-features agl-iotivity
bitbake agl-demo-platform
#
ln -fs agl-demo-platform-$machine.ext4 \
  tmp/deploy/images/$machine/agl-demo-platform-image-$machine.ext4
ROOTFS=$PWD/tmp/deploy/images/$machine/agl-demo-platform-$machine.ext4 \
  runqemu $machine

Then you can try the shipped examples as explained on dedicated page.

WORK IN PROGRESS:

Rebuild test is welcome.

url=https://github.com/TizenTeam/AGL-repo/
branch=sandbox/pcoval/on/master/devel
repo init -u $url -b $branch && repo sync
source ./meta-agl/scripts/aglsetup.sh agl-demo agl-iotivity
bitbake agl-demo-platform
ROOTFS=$PWD/tmp/deploy/images/qemux86-64/agl-demo-platform-qemux86-64.ext4 runqemu qemux86-64

MISC

Here is a proposal for cross distro maintenance :

meta-ocf-automotive : A layer focused on Automotive needs based on IoTivity and OCF for any Yocto distribution

The structure could be something like this:

     - meta-ocf-automotive/
       - recipes/apps/iotivity-example.bb
       - recipes/image/ocf-automotive-demo-image.bb :
         require recipes-image/images/core-image-minimal.bb
         IMAGE_INSTALL += " iotivity-example "
       - meta-genivi-dev/
         - meta-genivi-dev/recipes-dev-platform/images/genivi-dev-platform.bbappend :
           require recipes/image/ocf-autotmotive-demo-image.bb
       - meta-agl-demo/
         - meta-agl-demo/recipe-platform/images/agl-demoplatform-ocf.bb :
           require agl-demo-image.bb
           require ocf-auto-demo-image.bb
         - meta-agl-demo/recipe-platform/core/iotivity_git.bb
       - meta-tizen_common/
         - meta-tizen_common/recipes/images/tizen_common-core-image.bbappend :
           require ocf-autotmotive-demo-image
       - ...

Then the base layer meta-ocf-automotive and meta-ocf-automotive/meta-$distro layer should be added to BBLAYERS in local.conf

automotive.txt · Last modified: 2017/08/28 11:54 by Phil Coval