Contact and Follow PenguinTux

This blog is to present and show all the possibilities to Contact us.

Website: http://www.penguintux.co.in/

WP Blog: https://pgtux.wordpress.com

Facebook: https://www.facebook.com/pgtux

LinkedIn: https://www.linkedin.com/company/penguintux

Twitter: https://twitter.com/pgtuxlinux @pgtuxlinux

Email Id: pgtuxlinux@gmail.com

YouTube Channel: https://www.youtube.com/channel/UCwtUNS_nka416amZW5P0wWA

Google+: https://plus.google.com/u/0/107796377888968279151/posts

Intel Edison Getting started with Linux

Update: This blog “Intel Edison Getting started Linux” helps you guide the Intel Edison beginner to work on this board.

When I came across IPv6, I was interested in learn the needs of it in Market. Then landed in the world of ‘Internet Of Things (IoT)‘ and while exploring IoT I understood that without hardware envelopment this is not possible. Then landed in ‘Intel Galileo‘ followed by ‘Intel Edison‘.

This is my first blog on Intel Edison. To kick start start it, I was moving here and there in Google & started my device. This blog explains the basic start up of Intel Edison alone (i.e. without Arduino programming). I purchased Intel Edison with Arduino Breakout kit from ExploreLabs.

Step 1:

  • Always the first step is open up the delivered hardware.

Intel Edison Unpacked

  • As you see in the above picture, I got¬†Arduino + Intel Edison + mounting screws.

Step 2:

  • Intel Edison needs to be placed in the empty space provided in left bottom corner in the above image.

02 Intel Edison placing over Arduino

Step 3:

  • Press the connector end gently to plug into¬†Arduino.

03 Intel Edison plugging

Step 4:

  • Screw the corners

04 Intel Edison Screwed with Arduino

Step 5:

04B Intel Edison Connected with Arduino

  • The step will look like the above picture after connecting

Step 6:

  • This device can be powered in two different ways (at least for beginners this two is the right option). Both of the options are explained below.
    1. Powering with DC adapter – Needs 12V and 1A adapter OR
    2. Powering with Micro USB to USB cable – 5V (You can even connect your mobile charger. At least for me, this was needed as I have only one Micro USB to USB cable)

Step 7:

  • I used 12V & 1A charger to power the device first.

05 Intel Edison Powering with Charger

  • Charger details

06 Intel Edison Charger

Step 8:

  • Once the charger is connected, your Intel Edison will starts up and you might observe LED blinking on your¬†Arduino board. Intel Edison and¬†Arduino doesn’t have any video output (like HDMI, composite) as in BBB and R-Pi
  • So we need to connect serial debug to explore the Linux part of Edison.

Step 9:

  • Arduino comes with three USB ports.

07A Intel Edison USB

  • Host USB Type A: Used to connect any client devices (like USB mass storage or pendrive) to Intel Edison.
  • Client USB Type B: Used to power the device with 5V. Notice that first two (tyep A and type B) connected to USB MUX in¬†Arduino.
  • Client USB Type B: UART is converted to Micro USB by¬†Arduino and the direct USB interface is provided. This can be directly used to get the serial debug console. In case of BeagleBone Black or Raspberry PI, we need to use UART- USB FTDI cable or CP2102 based chips to have USB.

Step 10:

  • To show the difference the between debug and Powering USB client, i have used two different colored cables. White for debugging and Black for powering.

07B Intel Edison Powering with Micro USB

  • Note that powering USB client is adjustment to the DC power Jack (J1) and the cable is black.
  • Don’t confuse with the Type A USB port which is used for connect USB client devices not for powering.

Step 11:

08 Intel Edison Powering and Debugging cable connection

  • Note that both the USB cables ares connected. Black for powering and White for Debugging.

Step 12:

  • Connecting both the cables to my laptop.

09A Intel Edison Connting and powering with Laptop

Step 13:

  • To setup the serial debug, you may need to connect only the serial cable i.e. white cable here first.
  • Connect only the serial cable and start minicom. Serial port settings can be opened with the command ‘sudo minicom -s’

Intel Edison Serail Port Settings

Step 14:

  • Start minicom.

10A Intel Edison Minicom starting 11 Intel Edison Minicom started

  • Connect your power cable or DC adapter to the board.

Step 15:

  • How Powering is possible with two different voltages?

09B Intel Edison Power Management

  • DC power i.e 12V & 1A is converted to 5V by Switching power supply module.
  • Followed by Diode ORed with 5V from Micro USB power. Which means connecting both the DC adapter and Micro USB or only either of the way is possible.
  • You might notice a slight delay in starting the board when connected only to Micro USB. This is because of the charging module before Intel Edison.

Step 16:

  • Connect your power cable and you will observe your device booting in debug console.

U-boot + Kernel booting shown:

12 Intel Edison U-boot stage 113 Intel Edison Booting U-boot 14 Intel Edison Linux Kernel booting

Step 17:

  • If you have connected your Micro USB to USB cable directly to Desktop or Laptop, Intel Edison’s storage will be mounted and you can observe it as empty for the first time.

15 Intel Edison Emptydrive Mounted

Step 18:

16 Intel Edison Downloaded image

  • Right click and unzip this file into the mounted partition. (People familiar with CLI can use ‘unzip’)

17 Intel Edison Browse to extract

18 Intel Edison Unzip or extract the downloaded image 19 Intel Edison Image Extract Success

Step 19:

  • Reboot the target to start from the flashed image. To do that, you need to login using username as ‘root‘ and ‘no password‘.
  • Followed by the command ‘reboot ota

20 Intel Edison Reboot OTA

Step 20:

  • Notice that the system is booting from flashed image.

21 Intel Edison Booted with flashed U-boot 22 Intel Edison Starting with flashed image

  • The difference in previous version can be observed with Date of Build show in boot logs.
  • The storage media again mounted and shows all the flashed files.

23 Intel Edison show files after extracting

Future Blogs: My future blogs will be on,

  • Intel Edison Getting started with Arduino
  • Intel Edison with Custom Yocto Build
  • Custom Linux for Intel Edison.

Follow us for more updates on Intel Edison.

Blog: https://pgtux.wordpress.com

Website: http://www.penguintux.co.in

PenguinTux Custom Ubuntu ISO using Ubuntu Customization Kit GUI in 16 steps

Tags

,

This article explains how to produce “Custom Ubuntu ISO” using Ubuntu Customization Kit (UCK). We often need a custom ISO image with software packages pre-installed for specific purpose or ISO with stripped version of packages. This can be achieved by mounting the ISO image and modify the required content before re-packing as ISO.

The easier way to do such changes can be done using UCK.

Step 1:

Step 2:

  • Install using the command “sudo apt-get install uck” in terminal or the following steps
  • Download the UCK from internet.
  • Install by double click on the .deb file or use “dpkg -i <deb file>

Step 3:

  • Open a Terminal (in Ubuntu by holing ‘Ctrl + Alt + t‘)
  • Type ‘uck-gui‘. This will open the UCK in GUI. Click ‘OK‘ and follow the screen.

1_UCKWelcome

 

Step 4:

  • Choose the language pack to install. (Here ‘en‘ for English)

2_ucklanguageselection

Step 5:

  • Choose the language for live CD boot up (Here ‘en‘ for English)

3_ucklanglivecd

 

4_uckdefaultlang

 

Step 6:

  • Browse and Select the ISO image file.

5_uckisoselection

Step 7:

  • Select whether to customize the ISO image or not before building a new ISO

6_packageediting

Step 8:

  • Enter a name for your ISO image.

7_ISOCDname

Step 9:

  • Choose the desktop environment which you want. I preferred gnome here.

8_desktopenv

Step 10:

  • Build proceeds after collecting all your inputs and asks for confirmation.

9_ucksummary

Step 11:

  • After the extraction of ISO and some operations in the background (see the build log attached later in this blog), UCK asks us to customize or to continue. We can select to ‘Run Console Application‘ to get the root shell (this is same as chroot to your mounted ISO image).

10_uckcontinueorconsole

Step 12:

  • Terminal is opened as root for our customization.

11_uckcustomconsole

Step 13:

Aware of errors. Get updated with errors and solutions here.

  • We can use the normal Ubuntu and Linux CLI for customize, install, remove packages.
  • In Ubuntu 14.04.1, this customization terminal is not updated with¬†proper hosts file under /etc. This will not allow you to run ‘apt-get‘. To resolve it, your need to copy the hosts file content from running system and update in Customization terminal.
  • This terminal will not come with all the sources.list in apt. You may need to update the required repositories in sources list.

Step 14:

  • After completing your customization, you can exit from the terminal using usual ‘exit‘ command.
  • UCK GUI comes back again and asks for confirmation on ‘Continue building

12_uckcontinue

Step 15:

  • On clicking ‘Continue Building‘ option, depends on the system speed it will take some time to complete the Custom ISO.
  • Once the build is successful, the following message will be thrown.

13_uckcustomsuccess

  • As this image can’t be burned to CD because its size, the following warning will be thrown.

14_uckisowarn

  • On clicking ‘OK‘ you will find a screen similar to the below one.

15_customisousbsuccess

Step 16:

  • As shown the image in previous step, Custom ISO file is placed under the following path.
  • PATH: /home/<your name>/tmp/remaster-new-files/livecd.iso (You can rename and use it)

Note: As the packages installed as part of PenguinTux ISO is related to training, workshops, the package list is not disclosed here. You can download our ISO image from here.

[Ubuntu Install inside Windows] 14.04 not booting

Tags

,

Note: Those who are using Ubuntu 14.04 or PenguinTux ISO image may face error after installing inside windows. Follow the below steps to resolve it permanently.

  1. Install inside Windows using the steps here.
  2. System starts installing Ubuntu automatically upon restart.
  3. Wait for the system to complete installation.
  4. System restarts after installation and comes back to GRUB menu to select Windows or Ubuntu
  5. When selecting Ubuntu and starting the system may result in mounting error.
  6. To solve this, you need to mount the tmp, Linux File System in Read-Write mode.
  7. Refer here for steps in askubuntu.

Note: To solve this error permanently, you need to update the GRUB after booting with fixing the changes in GRUB manually for 1st time.

[meta-raspberrypi] Failed to build with poky

Tags

,

Update on 09/12/2014:

This is problem is solved in upstream meta-raspberrypi BSP layer with the git hash “6c6f44136f7e1c97bc45be118a48bd9b1fef1072“. You can now pull/fetch your repository.

Problem:

When i tried building Yocto Project for Raspberry PI by enabling/adding the BSP layer for R-Pi (which is supplied as meta-raspberrypi) i have faced an error in gstreamer plugin (Find the below log snip).

Poky system expects the bb file presence for all the bbappend in the repository.

Log Snip:

parthiban@ubuntu:~/git/yocto/poky$ source oe-init-build-env rpi

### Shell environment set up for builds. ###

You can now run ‘bitbake <target>’

Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
adt-installer
meta-ide-support

You can also run generated qemu images with a command like ‘runqemu qemux86’
parthiban@ubuntu:~/git/yocto/poky/rpi$ bitbake -c fetchall core-image-minimal
Loading cache: 100% |########################################################################################################################################################################| ETA: 00:00:00
Loaded 1306 entries from dependency cache.
Parsing recipes: 100% |######################################################################################################################################################################| Time: 00:00:00
Parsing of 909 .bb files complete (907 cached, 2 parsed). 1305 targets, 66 skipped, 0 masked, 0 errors.
ERROR: No recipes available for:
/home/parthiban/git/yocto/poky/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.0.bbappend

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Solution:

Here the version of the gstreamer1.0-plugins-bad_1.4.1.bb under meta/recipes-multimedia/gstreamer is updated but not the according bbappend. To make the build working, the bbappend can be changed to correct version or version independent (never be after for future changes).

The below patch file can be used to update the repository to make it work or

  • git mv¬†gstreamer1.0-plugins-bad_1.4.0.bbappend¬†gstreamer1.0-plugins-bad_%.bbappend
  • git commit

will help in resolving the issue.

Patch File: rename-gstreamer-bbappend

‘nohup’ for running process

Tags

,

Quick workout:

To Stop/Suspend, Resume, Re-Parent, Move process across shell/init.

  • Suspend the process using ‘ctrl + z’
  • Move the process to background using ‘bg’
  • Re-parent the process to init using ‘disown %<job_id>’. Job_id can be listed using ‘jobs’
  • Now the process is under init.
  • or reptyr <pid to move> (Run from the destination shell)

Detailed description:

My git clone request simply stalls all my bandwidth in the router (no sure why. Still looking out for reason). When I was updating and cloning the repository, no one in my network was able to work on the internet. So I simply Suspended/Stopped the process by ‘Ctrl + z’ (Refer Quick CLI tips).

I was wondering there could be some option to resume my work even after exiting the current shell. Yes, i might have used ‘nohup’ while starting ‘git clone’. But how can i ‘nohup’ to the running/suspended process which is already started without ‘nohup’?

I resumed the suspended/stopped process using ‘bg’ and ‘disown %<jobid>’ (which can be listed used ‘jobs’ command) to re-parent to init. In my Ubuntu it was re-parented to ‘init –user’ (not sure why. Upstart is doing some trick here).

Note: For all the bash built-in commands (can be identified with ‘type <command>’ e.g. ‘type disown’ will show “disown is a shell builtin”) help can be read using ‘help <built-in command>’

Alternative way:

A better alternative is to the above process would be ‘reptyr’. Reptyr will re-parent the running process from one shell to another without disturbing the execution. Reptyr uses ptrace(2) to achieve this.

Usage: reptyr <PID to be re-parented> (Run this command the destination shell where you want to move the process)

The overhead here is to install ‘reptyr’ which doesn’t come by default or built-in to shell.

Quick Linux CLI tips

This blog is now updated with screen recorded video.

PenguinTux

EDIT: The below blog is now available as screen recorded video in 

Using Command Line Interface (CLI) in Linux is the real beauty when you know how to work faster. I wondered and admired myself in many places while exploring the beauty of ‚ÄėCtrl‚Äė key.¬†Below are the few of those places.

TIPS:

  1. Moving across: Ctrl + Side arrows , Ctrl + a and Ctrl + e
    • When you typed something very long (e.g. may be a long gcc command) on the terminal/console and all on a sudden you want to edit what you have typed which is in the beginning. Initially i was¬†using the ‚ÄėHome‚Äô button which worked very well in Distributions like Ubuntu, but not in Target‚Äôs console and Solaris console. I used to move char by char using side arrow, which is again worked only in targets but not on Solaris.
    • ‚ÄėCtrl + Side Arrows

View original post 682 more words

Branching Strategy in SDLC

The Branching Strategy depends on the version control we use. Let’s consider clearcase for the example.¬†

In a software development environment the branches are classified into 

  1. Integration Branch
  2. Developer Branch
  3. Bugfix/Hot Fix Branch

Integration Branch:

Integration branch is managed by Build and Release engineer. The official release build will happen in the Integration  branch.The developers changes will be merged by the build and release engineer and the official build will be triggered. As the official release take place in the integration branch for every release it will be baselined/labled/tagged. Ideally Integration branch always has the latest source code.

Developer Branch:

When the multiple developers were working for the same software development project every one needs individual environment so that they can develop without affecting the official release of the software.It’s managed by developers. once the developer finished his code changes he/she trigger the local build and check if his/her source code changes are perfect and then developer share the source code to the build release engineer (method of sharing changes depends on the version control).Ideally developers are allowed to create any numbers of branches.To avoid overhead of version control tool /confusion of multiple branches one branch for every developer this scenario is well suited if the change request are less(Fig-2.0).If single developer have many change request it’s really hard to track the changes made for the particular change request hence the developers can create branches for every change request to track changes(Fig-2.1).However ,In advance version controls we can create activity/associate task for each changes for tracking so it depends on the version control.

 dev_branchDeveloper_branch

               Fig-2.0                                            Fig-2.1

Bug/Hot Fix Branch:

When the particular change request is required need to be fixed on the older release for example if we are currently in Release 3.0 and a bug to be fixed on Release 2.0 a bugfix/hotfix branch will be branched out from the release 2.0 and only the corresponding bug will merged to the bugfix/hotfix branch and the offical build will be triggerd and the software is released as 2.1.it’s managed by Build and Release Engineer hence the parallel development will happen without affecting the official release in Integration Branch¬†

bug_fix_branch

                              Fig-3.0

What is version control?

Tags

,

Version Control is a SCM tools which is used to keep track or record changes involved in the phases of software development. Generally source code (scripts,programs,etc) are placed in the version control ¬†and each changes of the source code will have a version.it’s also called as Revision control

There are two type of version control

1.Centralized Version Control

In centralized version control, there is a centralized repository in which all the developers submit the their changes. The other project  members can accept the changes from the centralized repository

2.Distributed Version Control

In distributed version control, the developers can clone the copy of whole repository so that developers don’t have to relay on the centralized repository.

The following operation are done with the help of Version control

  • Merge

The multiple developers were working on software development, the possibility that developers can edit the same file in the source code. To get the changes of all the developers source code need to be merged from the different versions of the file from the source code developed by the developers to get the fully developed software

  • Baseline:

Different version of file are used to build the software ideally all the stable software source code to be labeled so that at any point of development we can revert to the stable version of the software and the major milestones  were planned and Baselined

  • Parallel Development:

As multiple developers were working across the globe each developers need the individual development environment without disturbing the actual release of the software there comes the strategy called Branching.The branching provides freedom to the developers to play along the source code independently, in which his source code changes will not be available to others unless developers performs the merges

Version Control Tools: Clearcase, GIT, Mercurial, SVN, Perforce, Teamware, sub version and many more…