IDP Build & Deploy Image

From ESS-WIKI
Jump to: navigation, search

Build an IDP OS by WR Workbench

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

cd $HOME/Project
1.1 Source WRLinux Enviroment
 For MI2.0
./wrenv.sh -p wrlinux-5
 For MI3.x
./wrenv.sh -p wrlinux-7

2. Define your Gateway options by coping and pasting the configure command

MI3.1 Configure for Intel Atom processor

../../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-reconfig --enable-rootfs=idp --enable-test=no --with-layer=dev-experience,dev_hub,sys-version,wr-hac,wr-hdc-examples,wr-iot,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/ems-test,feature/haccmds,feature/ipsec_vpn,feature/non-grsec,feature/online_updates,feature/openjdk-bin,feature/pptp_vpn,feature/recovery,feature/remote-session,feature/self-hosted,feature/target-toolchain,feature/vlan

MI3.1 Configure for Intel Haswell processor

../../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-reconfig --enable-rootfs=idp --enable-test=no --with-layer=dev-experience,dev_hub,sys-version,wr-hac,wr-hdc-examples,wr-iot,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/ems-test,feature/haccmds,feature/ipsec_vpn,feature/non-grsec,feature/online_updates,feature/openjdk-bin,feature/pptp_vpn,feature/recovery,feature/remote-session,feature/self-hosted,feature/target-toolchain,feature/vlan

MI3.1 Configure for Intel Quark processor

../../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-reconfig --enable-rootfs=idp --enable-test=no --with-layer=dev-experience,dev_hub,sys-version,wr-hac,wr-hdc-examples,wr-iot,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/ems-test,feature/haccmds,feature/ipsec_vpn,feature/non-grsec,feature/online_updates,feature/openjdk-bin,feature/pptp_vpn,feature/recovery,feature/remote-session,feature/self-hosted,feature/target-toolchain,feature/vlan

MI3.0 Configure for Intel Atom processor
../WindRiver/wrlinux-7/wrlinux/configure --enable-board=intel-baytrail-64 --enable-kernel=idp --enable-bootimage=ext3,hdd --enable-patchresolve=noop --enablerootfs=idp \
--enable-addons=wr-idp --with-layer=wr-prosyst-mbs-smarthome-sdk-ia,wrdigi-idigiconnector,wr-wks-oneagent-oma-dm-ia,wr-wks-oneagent-tr069,\
sysversion,wr-iot --with-template=feature/vlan,feature/opc,feature/recovery,feature/opc_demo,feature/ipsec_vpn,feature/l2tp,feature/realtek, \
feature/ems-test,feature/remote-session,feature/openjdk-bin,feature/online_updates,feature/bluetooth,feature/pptp_vpn,feature/target-toolchain \
--withpackage=make,git,iasl,libtool,perl,ruby,subversion,autoconf,automake,curl,conntrack-tools,fuse,igmpproxy,iperf,ipset,libcli,mipv6-daemonumip,\
ntfs-3g,ntfsprogs,sshfs-fuse,tftp-hpa,tftp-hpa-server,tcpdump,vim 
MI3.0 Configure for Intel Core processor
../WindRiver/wrlinux-7/wrlinux/configure --enable-board=intel-haswell-64 --enable-kernel=idp --enable-bootimage=ext3,hdd --enable-patchresolve=noop --enablerootfs=idp \
--enable-addons=wr-idp --with-layer=wr-prosyst-mbs-smarthome-sdk-ia,wrdigi-idigiconnector,wr-wks-oneagent-oma-dm-ia,wr-wks-oneagent-tr069,\
sysversion,wr-iot --with-template=feature/vlan,feature/opc,feature/recovery,feature/opc_demo,feature/ipsec_vpn,feature/l2tp,feature/realtek, \
feature/ems-test,feature/remote-session,feature/openjdk-bin,feature/online_updates,feature/bluetooth,feature/pptp_vpn,feature/target-toolchain \
--withpackage=make,git,iasl,libtool,perl,ruby,subversion,autoconf,automake,curl,conntrack-tools,fuse,igmpproxy,iperf,ipset,libcli,mipv6-daemonumip,\
ntfs-3g,ntfsprogs,sshfs-fuse,tftp-hpa,tftp-hpa-server,tcpdump,vim 
MI2.0 Configure for Intel Atom processor
$WIND_LINUX_CONFIGURE --enable-board=intel-atom-baytrail --enable-kernel=standard --enable-rootfs=glibc-idp --enable-addons=wr-idp --enable-bootimage=ext3,hdd --enable-parallel-pkgbuilds=4 --enable-jobs=6 --enable-reconfig -- 
enable-rm-oldimgs=yes --enable-rm-work=yes --without-layer=wr-srm --with-layer=wr-intel-support,wr-mcafee,wr-wks-oneagent-tr069,wr-ieee11073,wr-mcafee,wr-wks-oneagent-oma-dm-ia,wr-intel-support --with- 
template=feature/online_updates,feature/recovery,feature/pptp_vpn,feature/pppoe,feature/upnp,feature/opc,feature/openjdk-bin, 
feature/ipsec_vpn,feature/mqtt,feature/l2tp,feature/webif,feature/firewall,feature/vlan,feature/intel-wilkinpeak2,feature/bluetooth --with-rcpl-version=17

3. Build the IDP

make fs

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 Copy Gateway OS to USB Flash Drive.
Note: Remove grsecurity to experiment with application development. Refer to IDP Build IDP Without Grsecurity

Grsecurity is included in the Linux kernel by default. This feature can inhibit exploration by preventing your apps from working.
Disable grsecurity while you experiement with your Gateway. When you are ready to build a production-ready Gateway, consider re-enabling grsecurity

Kernel Driver Menu Config

$make -C build linux-windriver.menuconfig
$make -C build linux-windriver.rebuild
Note: 1.Type "/" to search key word
      2.To select be installed driver or function
      For example: Ath9k wifi module driver

Copy Gateway OS to USB Flash Drive

1. Insert the USB flash drive into your Development Computer
2. ls /dv/sd?
3. cd $HOME/workspace/<YourProjectDirectory_prj>
4. Deploy the image to USB flash drive MI2.0/3.0. Note: The deploy process takes about 15 minutes.

For Atom processor
sudo ./deploy.sh -u -f export/intel-baytrail-64-idp-idp-dist.tar.bz2 -d /dev/sdx -y; sync

For Intel Core processor
sudo ./deploy.sh -u -f export/intel-haswell-64-idp-idp-dist.tar.bz2 -d /dev/sdx -y; sync
For Quark
sudo ./deploy.sh -u -f export/intel-quark-idp-idp-dist.tar.bz2 -d /dev/sdx -y; sync

4.1 For MI3.1

For Baytrail
sudo ./deploytool -f export/intel-baytrail-64-idp-idp-dist.tar.bz2 -d /dev/sdX -y -u -B 1; sync

For Haswell
sudo ./deploytool -f export/intel-haswell-64-idp-idp-dist.tar.bz2 -d /dev/sdX -y -u -B 1; sync
For Quark processor
sudo ./deploytool -f export/intel-quark-idp-idp-dist.tar.bz2 -d /dev/sdX -y -u -B 1; sync

5. Type your Linux password if prompted and click OK. The bootable USB drive is created when you see DONE! 6. Remove and reinsert into your Development Computer. The flash drive mounts with two partitions, one of which is /media/<username>/wr_usb_boot 7. Copy image to the flash drive

For Atom processor 
sudo cp export/intel-baytrail-64-idp-idp-dist.tar.bz2 /media/<username>/wr_usb_boot/opt/; sync
For Intel Core processor
sudo cp export/intel-haswell-64-idp-idp-dist.tar.bz2 /media/<username>/wr_usb_boot/opt/; sync

For MI3.1
sudo cp export/intel-baytrail-64-idp-idp-dist.tar.bz2 /media/<username>/efi/SFR/; sync

8. Remove the USB flash drive from your Development Computer

Install the OS on the Gateway

1. Insert the USB to Gateway and power on. Login using "root" for the login ID and password.
2. Install the OS: 2.0 / 3.0

tgt=/dev/sda /sbin/reset_media
For 3.1
deploytool -d /dev/sda --reset-media -F

3. Installation is complete when you see the message "DONE!" Shut down the Gateway

poweroff

4. Remove the USB flash drive and power up your Gateway 5. Login using "root" for both the login ID and password. The OS installation is complete.

MI3.1 Advantech Standard BSP by ECG