IDP Build & Deploy Image

From ESS-WIKI
Revision as of 07:41, 6 April 2016 by Winston (talk | contribs)
Jump to: navigation, search

Build an IDP OS

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

cd $HOME/Project
1.1 Source WRLinux Enviroment
./wrenv.sh -p wrlinux-5
./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-board=intel-baytrail-64 --enable-kernel=idp --enable-rootfs=idp --enable-addons=wr-idp --enable-bootimage=ext3,hdd --enable-patchresolve=noop --enable-rm-work=yes --enable-reconfig - 
-enable-test=no --enable-internet-download=yes --with-layer=wr-kernel/kernel-dev,wr-iot,sys-version,dev_hub,dev-experience,wr-prosyst-mbs-smarthome-sdk-ia,wr-wks-oneagent-oma-dm-ia,wr-wks-oneagent-tr069,wr-ma --with-
template=feature/l2tp,feature/pptp_vpn,feature/opc_demo,feature/vlan,feature/recovery,feature/ipsec_vpn,feature/openjdk-bin,feature/online_updates,feature/bluetooth,feature/opc,feature/ems-test,feature/remote- 
session,feature/target-toolchain,feature/self-hosted,feature/backports,feature/non-grsec,feature/upgrade --with-package=conntrack-tools,fuse,igmpproxy,iperf,ipset,libcli,ntfs-3g,ntfsprogs,sshfs-fuse,tftp-hpa,tftp-hpa-
server,tcpdump,ipset,mipv6-daemon-umip,make,git,iasl,libtool,ruby,subversion,autoconf,automake,curl,vim,less,gdb,screen,netcat,swig,perl,perl-modules,perl-module-deprecate,perl-module-sys-syslog,perl-dbg,perl-misc,perl-
dev,perl-pod,perl-doc,perl-lib,perl-module-cpan,perl-module-unicore,perl-module-cgi --without-layer=wr-mcafee,wr-srm
MI3.1 Configure for Intel Haswell processor
../../wrlinux-7/wrlinux/configure --enable-board=intel-haswell-64 --enable-kernel=idp --enable-rootfs=idp --enable-addons=wr-idp --enable-bootimage=ext3,hdd --enable-patchresolve=noop --enable-rm-work=yes --enable-reconfig - 
-enable-test=no --enable-internet-download=yes --with-layer=wr-kernel/kernel-dev,wr-iot,sys-version,dev_hub,dev-experience,wr-prosyst-mbs-smarthome-sdk-ia,wr-wks-oneagent-oma-dm-ia,wr-wks-oneagent-tr069,wr-ma --with-
template=feature/l2tp,feature/pptp_vpn,feature/opc_demo,feature/vlan,feature/recovery,feature/ipsec_vpn,feature/openjdk-bin,feature/online_updates,feature/bluetooth,feature/opc,feature/ems-test,feature/remote- 
session,feature/target-toolchain,feature/self-hosted,feature/backports,feature/non-grsec,feature/upgrade --with-package=conntrack-tools,fuse,igmpproxy,iperf,ipset,libcli,ntfs-3g,ntfsprogs,sshfs-fuse,tftp-hpa,tftp-hpa-
server,tcpdump,ipset,mipv6-daemon-umip,make,git,iasl,libtool,ruby,subversion,autoconf,automake,curl,vim,less,gdb,screen,netcat,swig,perl,perl-modules,perl-module-deprecate,perl-module-sys-syslog,perl-dbg,perl-misc,perl-
dev,perl-pod,perl-doc,perl-lib,perl-module-cpan,perl-module-unicore,perl-module-cgi --without-layer=wr-mcafee,wr-srm
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. ls /dev/sd?
2. Insert the USB flash drive into your Development Computer
3. ls /dv/sd?
4. cd $HOME/workspace/<YourProjectDirectory_prj>
5. Deploy the image to USB flash drive. 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/sd? -y; sync

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

6. Type your Linux password if prompted and click OK. The bootable USB drive is created when you see DONE! 7. Remove and reinsert into your Development Computer. The flash drive mounts with two partitions, one of which is /media/<username>/wr_usb_boot 8. 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

9. 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:

tgt=/dev/sda /sbin/reset_media

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.