Building a Gateway OS

You are now ready to build the operating system and applications that will run on your Gateway. You have two choices to build your OS. Each will take several hours to complete:

Important:

The following options require an Intel® IoT Gateway Pro Software Suite license to use or deploy on a Gateway. A license is available at the Intel® IoT Platform Marketplace:

  • wr-exegin-zigbee-ia

  • wr-prosyst-mbs-smarthome-sdk-ia

  • wr-wks-oneagent-oma-dm-ia

  • wr-wks-oneagent-tr069

  • wr-ma

  • wr-mcafee

These options are referenced in step 2 when using a command line, and in step 20 when using the Wind River Workbench.

Using a Command Line

These steps use an example Wind River Linux configure command with options that vary slightly by Gateway model. To see additional options, see the Wind River® Intelligent Device Platform XT Programmer’s Guide.

  1. Go to the $HOME/Project directory on your Development Computer:
    cd $HOME/Project

  2. Define your Gateway options by copying and pasting the configure command to the Development Computer. In addition to the configure options listed here, you will potentially include other packages that contain drivers for your specific gateway hardware and layers for your gateway application software.

    Tip: To copy and paste this code or command, hold your mouse over it and look for this icon:

    Important: The parameters vary by Gateway processor. Use the configure command for your Gateway processor:
    • Configure for Intel® Atom™ processor
      /home/moon/WindRiver/wrlinux-7/wrlinux/configure \
         --enable-addons=wr-idp \
         --enable-board=intel-baytrail-64 \
         --enable-bootimage=ext3,hdd \
         --enable-internet-download=yes \
         --enable-kernel=idp \
         --enable-patchresolve=noop \
         --enable-rootfs=idp \
         --enable-test=no \
         --with-layer=wr-hac-agent,wr-kernel/kernel-dev,wr-ma,wr-mcafee,\
      wr-prosyst-mbs-smarthome-sdk-ia,wr-wks-oneagent-oma-dm-ia,\
      wr-wks-oneagent-tr069 \
         --with-package=autoconf,automake,conntrack-tools,curl,fuse,gdb,git,\
      iasl,igmpproxy,iperf,ipset,less,libcli,libtool,make,mipv6-daemon-umip,\
      netcat,ntfs-3g,ntfsprogs,perl,ruby,screen,sshfs-fuse,subversion,swig,\
      tcpdump,tftp-hpa,tftp-hpa-server,vim \
         --with-template=\feature/backports,\
      feature/bluetooth,\
      feature/haccmds,\
      feature/ipsec_vpn,\
      feature/non-grsec,\
      feature/online_updates,\
      feature/openjdk-bin,\
      feature/pptp_vpn,\
      feature/recovery,\
      feature/self-hosted,\
      feature/target-toolchain,\
      feature/vlan
      

    • Configure for Intel® Core™ processor
      /home/moon/WindRiver/wrlinux-7/wrlinux/configure \
         --enable-addons=wr-idp \
         --enable-board=intel-haswell-64 \
         --enable-bootimage=ext3,hdd \
         --enable-internet-download=yes \
         --enable-kernel=idp \
         --enable-patchresolve=noop \
         --enable-rootfs=idp \
         --enable-test=no \
         --with-layer=wr-hac-agent,wr-kernel/kernel-dev,wr-ma,wr-mcafee,\
      wr-prosyst-mbs-smarthome-sdk-ia,wr-wks-oneagent-oma-dm-ia,\
      wr-wks-oneagent-tr069 \
         --with-package=autoconf,automake,conntrack-tools,curl,fuse,gdb,git,\
      iasl,igmpproxy,iperf,ipset,less,libcli,libtool,make,mipv6-daemon-umip,\
      netcat,ntfs-3g,ntfsprogs,perl,ruby,screen,sshfs-fuse,subversion,swig,\
      tcpdump,tftp-hpa,tftp-hpa-server,vim \
         --with-template=\feature/backports,\
      feature/bluetooth,\feature/haccmds,\
      feature/ipsec_vpn,\feature/non-grsec,\
      feature/online_updates,\
      feature/openjdk-bin,\feature/pptp_vpn,\
      feature/recovery,\
      feature/self-hosted,\
      feature/target-toolchain,\
      feature/vlan

    • Configure for Intel® Quark™ processor
      /home/moon/WindRiver/wrlinux-7/wrlinux/configure \
         --enable-addons=wr-idp \
         --enable-board=intel-quark \
         --enable-bootimage=ext3,hdd \
         --enable-internet-download=yes \
         --enable-kernel=idp \
         --enable-patchresolve=noop \
         --enable-rootfs=idp \
         --enable-test=no \
         --with-layer=wr-exegin-zigbee-ia,wr-hac-agent,wr-kernel/kernel-dev,\
      wr-ma,wr-mcafee,wr-prosyst-mbs-smarthome-sdk-ia,\
      wr-wks-oneagent-oma-dm-ia,wr-wks-oneagent-tr069 \
         --with-package=autoconf,automake,conntrack-tools,curl,fuse,gdb,git,\
      iasl,igmpproxy,iperf,ipset,less,libcli,libtool,make,mipv6-daemon-umip,\
      netcat,ntfs-3g,ntfsprogs,perl,ruby,screen,sshfs-fuse,subversion,swig,\
      tcpdump,tftp-hpa,tftp-hpa-server,vim \
         --with-template=feature/backports,\
      feature/bluetooth,\
      feature/haccmds,\
      feature/ipsec_vpn,\
      feature/non-grsec,\
      feature/odm/aiot-x1000,\
      feature/odm/cse-e100,\
      feature/odm/ecs-gen2,\
      feature/odm/kbox-a201,\
      feature/odm/reliagate,\
      feature/online_updates,\
      feature/openjdk-bin,\
      feature/pptp_vpn,\
      feature/recovery,\
      feature/self-hosted,\
      feature/target-toolchain,\
      feature/vlan

    The configure command will take several minutes to complete. Upon completion, your terminal prompt will return.

  3. Build the Gateway operating system:
    make fs

    The Gateway OS build takes 3 - 5 hours and creates files with *.bz extensions in $HOME/Project/export.

  4. The config.log created in $HOME/Project is an exact copy of the configure options used to build the Gateway OS. Save this as config.sh for future development projects:
    cp config.log config.sh
  5. Continue to Copying the Gateway OS to a USB Flash Drive.

Using Wind River Workbench

  1. Launch Wind River Workbench:
    cd $HOME/WindRiver/workbench-4
    
    ./startWorkbench.sh

  2. In the Workspace Launcher window select a workspace folder and then click OK. For example: home/<username>/WindRiver/workbench-4/workspace where <username> is your Linux login ID.
  3. From the main menu, click File > New > Wind River Workbench Project.
  4. Select Platform as the build type. Click Next.
  5. Type a name for your project. Click Finish.
  6. Click Add Option.
  7. Locate and highlight --enable-addons=[ ]. With the line highlighted, replace the text in the Option: field with --enable-addons=wr-idp. Click OK.


  8. Click Add Option again.
  9. Locate and highlight --enable-internet-download=....
  10. With the line selected, replace the entire Option field with --enable-internet-download=yes
  11. Click OK.
  12. Click Add Option again.
  13. Locate and highlight --with-package=.... With the line selected, replace the entire Option field with the following.
    Tip: To copy and paste this code or command, hold your mouse over it and look for this icon:

    --enable-package=autoconf,automake,conntrack-tools,curl,fuse,gdb,git,iasl,igmpproxy,iperf,ipset,less,libcli,libtool,make,mipv6-daemon-umip,netcat,ntfs-3g,ntfsprogs,perl,ruby,screen,sshfs-fuse,subversion,swig,tcpdump,tftp-hpa,tftp-hpa-server,vim

    Click OK.

  14. IMPORTANT: Click Rescan Layers.
    Refer to the following figure to complete the next steps:


  15. The Board option refers to the processor type installed in the Gateway. Select the correct Board for your Gateway:
    • Intel® Atom™ processor: select intel-baytrail-64.
    • Intel® Core™ processor: select intel-haswell-64.
    • Intel® Quark™ processor: select intel-quark.
  16. Select idp for both RootFS and Kernel.
    Important: If idp is not listed as a choice, repeat steps 6 - 15, making sure you correctly define --enable-addons=wr-idp in step 7 and Rescan Layers in step 14.


    Keep referring to the figure above for steps 17 - 21.

  17. Click Add Layer.
  18. Click Browse.
  19. In the Places window select your user name (your home directory), and then the folder WindRiver/wrlinux-7/addons/wr-idp/layers/sys-version. Click OK, and then click Add.
  20. Repeat steps 17 - 18 to add these layers:

    Important:

    The parameters vary by Gateway processor. Use the correct layer list for your Gateway processor:

    • Intel® Atom™ or Core™ processor
      • wr-hac-agent
      • wr-kernel/kernel-dev
      • wr-ma
      • wr-mcafee
      • wr-prosyst-mbs-smarthome-sdk-ia
      • wr-wks-oneagent-oma-dm-ia
      • wr-wks-oneagent-tr069
    • Intel® Quark™ processor
      • wr-exegin-zigbee-ia
      • wr-hac-agent
      • wr-kernel/kernel-dev
      • wr-ma
      • wr-mcafee
      • wr-prosyst-mbs-smarthome-sdk-ia
      • wr-wks-oneagent-oma-dm-ia
      • wr-wks-oneagent-tr069
  21. Click Add Template.
  22. Locate and select the following features. Select them by clicking the box at the left of each. Refer to the figure below the list of features.
    Important: The parameters vary by Gateway processor. Use the correct parameter list for your Gateway processor:
    • Intel® Atom™ or Core™ processor
      • feature/backports
      • feature/bluetooth
      • feature/haccmds
      • feature/ipsec_vpn
      • feature/non-grsec
      • feature/online_updates
      • feature/openjdk-bin
      • feature/pptp_vpn
      • feature/recovery
      • feature/self-hosted
      • feature/target-toolchain
      • feature/vlan
    • Intel® Quark™ processor
      • feature/backports
      • feature/bluetooth
      • feature/haccmds
      • feature/ipsec_vpn
      • feature/non-grsec
      • feature/odm/aiot-x1000
      • feature/odm/cse-e100
      • feature/odm/ecs-gen2
      • feature/odm/kbox-a201
      • feature/odm/reliagate
      • feature/online_updates
      • feature/openjdk-bin
      • feature/pptp_vpn
      • feature/recovery
      • feature/self-hosted
      • feature/target-toolchain
      • feature/vlan


  23. Click Done.
  24. Click Run Configure.

    The configuration runs for a few minutes, and then displays results.

  25. Click Finish.
  26. From the Workbench menu, select Project > Build Project.
  27. Click OK in response to the message about parallel builds.

    The operating system build begins. It will take 3 - 5 hours to complete. A file with a .bz2 extension and a config.log file are created in $HOME/Project/export.

  28. Save config.log as config.sh for future development tasks:
    cp config.log config.sh
  29. Continue to Copying the Gateway OS to a USB Flash Drive.
Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.