Building a Root File System


This page provides instructions on how to build a basic root file-system for application development.

Pre-built ramdisk images are available in each release package and recommended for getting started with application development before attempting to built a custom root filesystem as directed by this page.


This process requires a Linux development machine with root access along with the following tools:


The directions on this page assume:

  • The directory used for the root filesystem is “/home/devel/_rootfs”.
  • The Xilinx ARM toolchain {this is the toolchain what we are using currently , as we use a zedboard for our developments } is located in “/opt/14.2/ISE_DS/EDK/gnu/arm/lin64/”.
  • CROSS_COMPILE environment variable is set to arm-xilinx-linux-gnueabi-

Any references to these directories should be modified for specific design needs.

Build process

These instructions use BusyBox for common Unix tools, Dropbear to provide an SSH client/server, and the Xilinx Toolchain for the standard C library and helper applications such as gdb-server.

The root filesystem will be built in the following order:

  1. Building BusyBox
  2. Building Dropbear
  3. Toolchain Library and Application Setup
  4. Directory Creation and Configuration

Building BusyBox

Get a copy of BusyBox from and enter the new directory:

bash> git clone git://
bash> cd busybox

Setup the initial default configuration for BusyBox:

bash> make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- defconfig

The build can be customized from the supplied defaults by running “make menuconfig”.

In the menu options set the install location to “/home/devel/_rootfs” (BusyBox Settings->Installation Options->BusyBox installation prefix):

bash> make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- menuconfig

To setup the initial root filesystem directory for BusyBox run “make install”:

bash> make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- install

Building Dropbear

This build uses Dropbear v0.53.1.

Get a copy from the Dropbear website, extract the tarball and enter the directory:

bash> wget
bash> tar xfvz dropbear-0.53.1.tar.gz
bash> cd dropbear-0.53.1

Configure the build as follows:

bash> ./configure --prefix=/home/devel/_rootfs --host=arm-xilinx-linux-gnueabi --disable-zlib CC=arm-xilinx-linux-gnueabi-gcc LDFLAGS="-Wl,--gc-sections" CFLAGS="-ffunction-sections -fdata-sections -Os"

Build Dropbear with the following command:

bash> make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1 strip

Finalize the Dropbear installation by running “make install” and create a symbolic link for scp in the root filesystem:

bash> sudo make install
bash> ln -s ../../sbin/dropbear /home/devel/_rootfs/usr/bin/scp

Toolchain Library and Application Setup

The Xilinx ARM tool-chain includes a pre-built standard C library along with some helper applications like gdb-server.

Enter the “_rootfs” directory and create a “lib” directory:

bash> cd /home/devel/_rootfs
bash> mkdir lib

Copy in the supplied libraries:

bash> cp /opt/14.2/ISE_DS/EDK/gnu/arm/lin64/arm-xilinx-linux-gnueabi/libc/lib/* lib -r

Strip the libraries of debug symbols:

bash> arm-xilinx-linux-gnueabi-strip lib/*

Copy in the supplied tools in libc/sbin and libc/usr/bin

bash> cp /opt/14.2/ISE_DS/EDK/gnu/arm/lin64/arm-xilinx-linux-gnueabi/libc/sbin/* sbin/ -r
bash> cp /opt/14.2/ISE_DS/EDK/gnu/arm/lin64/arm-xilinx-linux-gnueabi/libc/usr/bin/* usr/bin/ -r

Directory Creation and Configuration

This last portion of the root filesystem creation will setup the needed directory structure along with the miscellaneous configuration files needed to start the system up appropriately.

This step will be performed within the “_rootfs” directory.

Create the needed directory structure:

bash> mkdir dev etc etc/dropbear etc/init.d mnt opt proc root sys tmp var var/log var/www

Now that the directories are present etc needs to be populated.

Create “etc/fstab” containing the following:

LABEL=/     /           tmpfs   defaults        0 0
none        /dev/pts    devpts  gid=5,mode=620  0 0
none        /proc       proc    defaults        0 0
none        /sys        sysfs   defaults        0 0
none        /tmp        tmpfs   defaults        0 0

Create “etc/inittab”


# /bin/ash
# Start an askfirst shell on the serial ports


# What to do when restarting the init process


# What to do before rebooting

::shutdown:/bin/umount -a -r

“etc/passwd” should contain:


“etc/init.d/rcS” needs the following:


echo "Starting rcS..."

echo "++ Mounting filesystem"
mount -t proc none /proc
mount -t sysfs none /sys
mount -t tmpfs none /tmp

echo "++ Setting up mdev"

echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s

mkdir -p /dev/pts
mkdir -p /dev/i2c
mount -t devpts devpts /dev/pts

echo "++ Starting telnet daemon"
telnetd -l /bin/sh

echo "++ Starting http daemon"
httpd -h /var/www

echo "++ Starting ftp daemon"
tcpsvd 0:21 ftpd ftpd -w /&

echo "++ Starting dropbear (ssh) daemon"

echo "rcS Complete"

Set the appropriate permissions on “etc/init.d/rcS”:

bash> chmod 755 etc/init.d/rcS
bash> sudo chown root:root etc/init.d/rcS

Building the Ramdisk

Now that the root filesystem has been built the last step will create the final ramdisk image that can be used with QEMU or on the board.

Start by creating the file that will contain the final image and format it’s contents with the desired filesystem.

bash> cd ~
bash> dd if=/dev/zero of=ramdisk.img bs=1024 count=8192
bash> mke2fs -F ramdisk.img -L "ramdisk" -b 1024 -m 0
bash> tune2fs ramdisk.img -i 0
bash> chmod 777 ramdisk.img

Mount the image to a folder and copy the “_rootfs” contents to the mounted image:

bash> mkdir ramdisk
bash> sudo mount -o loop ramdisk.img ramdisk/
bash> sudo cp -R _rootfs/* ramdisk
bash> sudo umount ramdisk/

Compress the image:

bash> gzip -9 ramdisk.img

Test the image

This step assumes that QEMU has already been installed and the Linux kernel has been built. To test the image run the following command:

bash> qemu-system-arm -M xilinx-zynq-a9 -m 1024 -kernel zImage -initrd ramdisk.img.gz -nographic -net nic,model=cadence_gem -net user

How to Compile and build U-Boot

Compiling U-Boot

To configure and build U-Boot for a target board “cd” to, or copy the source tree to somewhere local and then type:

host% make distclean
host% make <config>
host% make

Where <config> is one of the configuration names given. ( check include/configs )

Note: If building for a 32-bit environment (SE=1) then the config will have a “se” suffix after the board name, otherwise, for 29-bit mode (SE=0) it will not.

This will create the following set of files:

  • u-boot – Elf executable file (for download with GDB)
  • u-boot.bin – binary file (for burning into Flash)
  • – Linker memory map file

For example, to build a 29-bit U-Boot for a STx7111 on a MB618 board, then run the following commands:

host% make distclean
host% make mb618_config
host% make

To build a 32-bit U-Boot for a STx7105 on a MB680 board, then run the following commands:

host% make distclean
host% make mb680se_config
host% make

U-Boot commands
The list of U-boot commands can be accessed while in the U-Boot prompt.
Type "help" or "?" for a complete listing of available commands.
Documentation on U-Boot may be found at .

Running Linux using U-Boot
Preparing the Linux images for U-Boot

Specific details on building the kernel for MicroBlaze are contained in 
the Build Kernel page.Instructions to obtain a root filesystem can be found
at the Build and Modify a Root File System page.
The kernel and the root filesystem must be wrapped with a U-Boot header 
in order for U-Boot to accept these files. The mkimage utility is used 
for this purpose, however, it is not part of the MicroBlaze GNU tools.
It is part of U-Boot itself and if U-Boot has been compiled as specified on
 this page, it will be found under <u-boot-src>/build/tools/ .
When building linux.bin, as explained in the Build Kernel page, the kernel
 build process automatically creates an additional image, with the ".ub" 
suffix. linux.bin.ub is the Linux binary image wrapped with a U-Boot header.
The Linux compilation process will automatically invoke mkimage, therefore,
it is important to include the path to the U-Boot tools in the PATH environment 
The root filesystem also needs to be wrapped with a U-Boot header as follows:
mkimage -A microblaze -O linux -T ramdisk -C gzip -d ramdisk.image.gz uramdisk.image.gz
Booting Linux
Once the kernel, root filesystem, and device tree images are present in memory,
the command to boot Linux is:
U-Boot> bootm <addr of kernel> <addr of rootfs> <addr of device tree blob (dtb)>
Note: Make sure the kernel and root filesystem images are wrapped by with the U-Boot 
header. The device tree blob does not need to be wrapped with the U-Boot header.

Vim Editor | Why do I need it ?

Vim is the editor of choice for many developers and power users. It’s a “modal” text editor based on the vi editor written by Bill Joy in the 1970s for a version of UNIX. It inherits the key bindings of vi, but also adds a great deal of functionality and extensibility that are missing from the original vi.

Interactive tutorial @


:e filename Open filename for edition
:w Save file
:q Exit Vim
:q! Quit without saving
: x Write file (if changes has been made) and exit
:sav filename Saves file as filename
. Repeats the last change made in normal mode
5. Repeats 5 times the last change made in normal mode

Moving in the file

k or Up Arrow move the cursor up one line
j or Down Arrow move the cursor down one line
e move the cursor to the end of the word
b move the cursor to the begining of the word
0 move the cursor to the begining of the line
G move the cursor to the end of the file
gg move the cursor to the begining of the file
L move the cursor to the bottom of the screen
:59 move cursor to line 59. Replace 59 by the desired line number.
20| move cursor to column 20.
% Move cursor to matching parenthesis
[[ Jump to function start
[{ Jump to block start

Cut, copy & paste

y Copy the selected text to clipboard
p Paste clipboard contents
dd Cut current line
yy Copy current line
y$ Copy to end of line
D Cut to end of line


/word Search word from top to bottom
?word Search word from bottom to top
* Search the word under cursor
/\cstring Search STRING or string, case insensitive
/jo[ha]n Search john or joan
/\< the Search the, theatre or then
/the\> Search the or breathe
/\< the\> Search the
/\< ¦.\> Search all words of 4 letters
/\/ Search fred but not alfred or frederick
/fred\|joe Search fred or joe
/\<\d\d\d\d\> Search exactly 4 digits
/^\n\{3} Find 3 empty lines
:bufdo /searchstr/ Search in all open files
bufdo %s/something/somethingelse/g Search something in all the open buffers and replace it with somethingelse


:%s/old/new/g Replace all occurences of old by new in file
:%s/onward/forward/gi Replace onward by forward, case unsensitive
:%s/old/new/gc Replace all occurences with confirmation
:2,35s/old/new/g Replace all occurences between lines 2 and 35
:5,$s/old/new/g Replace all occurences from line 5 to EOF
:%s/^/hello/g Replace the begining of each line by hello
:%s/$/Harry/g Replace the end of each line by Harry
:%s/onward/forward/gi Replace onward by forward, case unsensitive
:%s/ *$//g Delete all white spaces
:g/string/d Delete all lines containing string
:v/string/d Delete all lines containing which didn’t contain string
:s/Bill/Steve/ Replace the first occurence of Bill by Steve in current line
:s/Bill/Steve/g Replace Bill by Steve in current line
:%s/Bill/Steve/g Replace Bill by Steve in all the file
:%s/^M//g Delete DOS carriage returns (^M)
:%s/\r/\r/g Transform DOS carriage returns in returns
:%s#<[^>]\+>##g Delete HTML tags but keeps text
:%s/^\(.*\)\n\1$/\1/ Delete lines which appears twice
Ctrl+a Increment number under the cursor
Ctrl+x Decrement number under cursor
ggVGg? Change text to Rot13


Vu Lowercase line
VU Uppercase line
g~~ Invert case
vEU Switch word to uppercase
vE~ Modify word case
ggguG Set all text to lowercase
gggUG Set all text to uppercase
:set ignorecase Ignore case in searches
:set smartcase Ignore case in searches excepted if an uppercase letter is used
:%s/\<./\u&/g Sets first letter of each word to uppercase
:%s/\<./\l&/g Sets first letter of each word to lowercase
:%s/.*/\u& Sets first letter of each line to uppercase
:%s/.*/\l& Sets first letter of each line to lowercase

Read/Write files

:1,10 w outfile Saves lines 1 to 10 in outfile
:1,10 w >> outfile Appends lines 1 to 10 to outfile
:r infile Insert the content of infile
:23r infile Insert the content of infile under line 23

File explorer

:e . Open integrated file explorer
:Sex Split window and open integrated file explorer
:Sex! Same as :Sex but split window vertically
:browse e Graphical file explorer
:ls List buffers
:cd .. Move to parent directory
:args List files
:args *.php Open file list
:grep expression *.php Returns a list of .php files contening expression
gf Open file name under cursor

Interact with Unix

:!pwd Execute the pwd unix command, then returns to Vi
!!pwd Execute the pwd unix command and insert output in file
:sh Temporary returns to Unix
$exit Retourns to Vi


:%!fmt Align all lines
!}fmt Align all lines at the current position
5!!fmt Align the next 5 lines


:tabnew Creates a new tab
gt Show next tab
:tabfirst Show first tab
:tablast Show last tab
:tabm n(position) Rearrange tabs
:tabdo %s/foo/bar/g Execute a command in all tabs
:tab ball Puts all open files in tabs
:new abc.txt Edit abc.txt in new window

Window spliting

:e filename Edit filename in current window
:split filename Split the window and open filename
ctrl-w up arrow Puts cursor in top window
ctrl-w ctrl-w Puts cursor in next window
ctrl-w_ Maximize current window vertically
ctrl-w| Maximize current window horizontally
ctrl-w= Gives the same size to all windows
10 ctrl-w+ Add 10 lines to current window
:vsplit file Split window vertically
:sview file Same as :split in readonly mode
:hide Close current window
:­nly Close all windows, excepted current
:b 2 Open #2 in this window


Ctrl+n Ctrl+p (in insert mode) Complete word
Ctrl+x Ctrl+l Complete line
:set dictionary=dict Define dict as a dictionnary
Ctrl+x Ctrl+k Complete with dictionnary


m {a-z} Marks current position as {a-z}
‘ {a-z} Move to position {a-z}
Move to previous position


:ab mail Define mail as abbreviation of

Text indent

:set autoindent Turn on auto-indent
:set smartindent Turn on intelligent auto-indent
:set shiftwidth=4 Defines 4 spaces as indent size
ctrl-t, ctrl-d Indent/un-indent in insert mode
>> Indent
<< Un-indent
=% Indent the code between parenthesis
1GVG= Indent the whole file

Syntax highlighting

:syntax on Turn on syntax highlighting
:syntax off Turn off syntax highlighting
:set syntax=perl Force syntax highlighting


How to create patch file using patch and diff

Hi folks , Before doing this, please backup your source code, patch wrongly will screwup your source code.


First, how to create patch file?
Patch file is a readable file that created by diff with -c (context output format). It doesn’t matter and if you wanna know more, man diff. To patch the entire folder of source codes(as usually people do)I do as bellow:

Assume Original source code at folder Tb01, and latest source code at folder Tb02. And there have multiple sub directories at Tb01 and Tb02 too.

diff -crB Tb01 Tb02 > Tb02.patch

-c context, -r recursive (multiple levels dir), -B is to ignore Blank Lines.
I put -B because blank lines is really useless for patching, sometimes I need to manually read the patch file to track the changes, without -B is really headache.

How to patch?
First of all, please do a dry-run before really patch it. Bare in mind, patch will be working very specifically. Let say the version 3 Tb03.patch is use to patch from Tb02, if you apply patch on Tb01, sometimes it will corrupt your source code. So, to make sure it works, do a dry run. Dry-run means a fake-test, do it at the directory of the source code targeted to patch.

Doing dry-run like this:

patch --dry-run -p1 -i Tb02.patch

The success output looks like this:

patching file TbApi.cpp
patching file TbApi.h
patching file TbCard.cpp

The failure ouptut looks like this:

patching file TbCard.cpp
Hunk #2 FAILED at 585.
1 out of 2 hunks FAILED -- saving rejects to file TbCard.cpp.rej
patching file TbCard.h
Hunk #1 FAILED at 57.
Hunk #2 FAILED at 77.
Hunk #3 succeeded at 83 with fuzz 1 (offset -21 lines).

At last, if the dry-run is giving good result, do this and enjoy the compilation.

patch -p1 -i Tb02.patch

Linux resources for learning programming and BASH scripting

Some very good Linux resources for learning programming and BASH scripting.


    Building Linux Kernel

    How to build Linux Kernel :

    1. Traditional , Build from source method
    2. Debian Method.

    This tutorial will outline the process to compile your own kernel for Ubuntu. It will demonstrate both the traditional process using ‘make’ and ‘make install’ as well as the Debian method, using ‘make-dpkg’. This is the detailed version of this tutorial, see Compile Linux Kernel on Ubuntu 12.04 LTS for the quick overview.  In any case, we begin by installing some dependencies:

    sudo apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev linux-source qt3-dev-tools libqt3-mt-dev libncurses5 libncurses5-dev fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge kernel-package

    Note: qt3-dev-tools and libqt3-mt-dev is necessary if you plan to use ‘make xconfig’ and libncurses5 and libncurses5-dev  if you plan to use ‘make menuconfig’.  Next, copy the kernel sources with wget:


    Extract the archive and change into the kernel directory:

    tar -xjvf linux-3.2.17.tar.bz2 cd linux-3.2.17/

    Now you are in the top directory of a kernel source tree. The kernel comes in a default configuration, determined by the people who put together the kernel source code distribution. It will include support for nearly everything, since it is intended for general use, and is huge. In this form it will take a very long time to compile and a long time to load.  So, before building the kernel, you must configure it. If you wish to re-use the configuration of your currently-running kernel, start by copying the current config contained in /boot:

    cp -vi /boot/config-`uname -r` .config

     Parse the .config file using make with the oldconfig flag.  If there are new options available in the downloaded kernel tree, you may be prompted to make a selection to include them or not.  If unsure, press enter to accept the defaults.

    make oldconfig

    Since the 2.6.32 kernel, a new feature allows you to update the configuration to only compile modules that are actually used in your system. As above, make selections if prompted, otherwise hit enter for the defaults.

    make localmodconfig

    The next step is to configure the kernel to your needs. You can configure the build with ncurses using the ‘menuconfig’ flag:

    make menuconfig

    or, using a GUI with the ‘xconfig’ flag:

    make xconfig

    In either case, you will be presented with a series of menus, from which you will choose the options you want to include. For most options you have three choices: (blank) leave it out; (M) compile it as a module, which will only be loaded if the feature is needed; (*) compile it into monolithically into the kernel, so it will always be there from the time the kernel first loads.
    There are several things you might want to accomplish with your reconfiguration:

    • Reduce the size of the kernel, by leaving out unnecessary components. This is helpful for kernel development. A small kernel will take a lot less time to compile and less time to load. It will also leave more memory for you to use, resulting in less page swapping and faster compilations.
    • Retain the modules necessary to use the hardware installed on your system. To do this without including just about everything conceivable, you need figure out what hardware is installed on your system. You can find out about that in several ways.

    Before you go too far, use the “General Setup” menu and the “Local version” and “Automatically append version info” options to add a suffix to the name of your kernel, so that you can distinguish it from the “vanilla” one. You may want to vary the local version string, for different configurations that you try, to distinguish them also.
    Assuming you have a running Linux system with a working kernel, there are several places you can look for information about what devices you have, and what drivers are running.

    • Look at the system log file, /var/log/messages or use the command dmesg to see the messages printed out by the device drivers as they came up.
    • Use the command lspci -vv to list out the hardware devices that use the PCI bus.
    • Use the command lsub -vv to list out the hardware devices that use the USB.
    • Use the command lsmod to see which kernel modules are in use.
    • Look at /proc/modules to see another view of the modules that are in use.
    • Look at /proc/devices to see devices the system has recognized.
    • Look at /proc/cpuinfo to see what kind of CPU you have.
    • Open up the computer’s case and read the labels on the components.
    • Check the hardware documentation for your system. If you know the motherboard, you should be able to look up the manual, which will tell you about the on-board devices.

    Using the available information and common sense, select a reasonable set of kernel configuration options. Along the way, read through the on-line help descriptions (for at least all the top-level menu options) so that you become familiar with the range of drivers and software components in the Linux kernel.
    Before exiting the final menu level and saving the configuration, it is a good idea to save it to a named file, using the “Save Configuration to an Alternate File” option. By saving different configurations under different names you can reload a configuration without going through all the menu options again. Alternatively, you can backup the file (which is named .config manually, by making a copy with an appropriate name.
    One way to reduce frustration in the kernel trimming process (which involves quite a bit of guesswork, trial, and error) is to start with a kernel that works, trim just a little at a time, and test at each stage, saving copies of the .config file along the way so that you can back up when you run into trouble. However, the first few steps of this process will take a long time since you will be compiling a kernel with huge number of modules, nearly all of which you do not need. So, you may be tempted to try eliminating a large number of options from the start
    Now we are ready to start the build. You can speed up the compilation process by enabling parallel make with the -j flag. The recommended use is ‘processor cores + 1′, e.g. 5 if you have a quad core processor:

    make -j5 (Usually I use -j32 ,you can see the system monitor for processor usage)

    This will compile the kernel and create a compressed binary image of the kernel. After the first step, the kernel image can be found at arch/i386/boot/bzImage (for a x86 based processor).  Once the initial compilation has completed, install the dynamically loadable kernel modules:

    sudo make modules_install

    The modules are installed in a subdirectory of “/lib/modules”, named after the kernel version. The resulting modules have the suffix “.ko”. For example, if you chose to compile the network device driver for the Realtek 8139 card as a module, there will be a kernel module name 8139too.ko. The third command is OS specific and will copy the new kernel into the directory “/boot” and update the Grub bootstrap loader configuration file “/boot/grub/grub.cfg” to include a line for the new kernel.
    Finally, install the kernel:

    sudo make install

    This command performs many operations behind the scenes.  Examine the /etc/grub.d/ directory structure before and after you run the above commands to see the changes.  Also look in the /boot/grub/grub.cfg file for your kernel entry.
    The OS specific make install, Ubuntu in this case, also creates an initrd image in the /boot directory.  If you compiled the needed drives into the kernel then you will not need this ramdisk file to aid in booting.  For extra credit remove the created initrd from the /boot/ directory as well as the references in /etc/grub.d/*.
    If there are error messages from any of the make stages, you may be able to solve them by going back and playing with the configuration options. some options require other options or cannot be used in conjunction with some other options. These dependencies and conflicts may not all be accounted-for in the configuration script. If you run into this sort of problem, you are reduced to guesswork based on the compilation or linkage error messages. For example, if the linker complains about a missing definition of some symbol in some module, you might either turn on an option that seems likely to provide a definition for the missing symbol, or turn off the option that made reference to the symbol.
    Reboot the system, selecting your new kernel from the boot loader menu. Watch the messages. See if it works. If it does not, reboot with the old kernel, try to fix what went wrong, and repeat until you have a working new kernel

    Debian Method:

    Instead of the compilation process of above, you can alternatively compile the kernel as installable .deb packages. This improves the portability of the kernel, since installation on a different machine is as simple as installing the packages. Rather than using ‘make’ and ‘make install’, we use ‘make-kpkg’:

    fakeroot make-kpkg – -initrd – -append-to-version=-some-string-here kernel-image kernel-headers

    Unlike above, you cannot enable parallel compilation with make-kpkg using the -j flag. Instead, define the CONCURRENCY_LEVEL environment variable.


    Once the compilation has completed, you can install the kernel and kernel headers using dpkg:

    sudo dpkg -i linux-image-3.2.14-mm_3.2.14-mm-10.00.Custom_amd64.deb
    sudo dpkg -i linux-headers-3.2.14-mm_3.2.14-mm-10.00.Custom_amd64.deb

    Thats it, done !!

    Cross-Compiling Wireless tools/utilities for ARM

    Cross-Compiling Wireless tools/utilities for ARM

    • 1 iw
      • 1.1 Netlink Protocol Library Suite
      • 1.2 iw
    • 2 wpa_supplicant
      • 2.1 Netlink Protocol Library Suite libnl-1.x
      • 2.2 OpenSSL
      • 2.3 wpa_supplicant
    • 3 hostapd
    • 4 rfkill 



    iw is a new nl80211 (802.11 netlink interface) based CLI configuration utility for wireless devices.

    Netlink Protocol Library Suite

    iw requires the Netlink Protocol Library Suite (libnl)

    Download, cross compile and install the Netlink Protocol libraries:

    tar -xzf libnl-3.2.24.tar.gz
    cd libnl-3.2.24
    ./configure --host=arm-linux-gnueabi --prefix=/usr/arm-linux-gnueabi
    make install
    cd include
    make install


    With the Netlink Protocol Library Suite prerequisite installed, download and build the iw nl80211 based CLI configuration utility: 

    tar -xzf iw-3.15.tar.gz
    cd iw-3.15/
    export PKG_CONFIG_PATH=/usr/arm-linux-gnueabi/lib/pkgconfig
    export CC=arm-linux-gnueabi-gcc
    Manually install iw and required libraries on your target root-fs:  
    cp iw /home/export/rootfs/sbin/
    cp /usr/arm-linux-gnueabi/lib/ /home/export/rootfs/lib/
    cp /usr/arm-linux-gnueabi/lib/ /home/export/rootfs/lib/
     And update the dynamic linker run-time bindings on your target: 
     ldconfig -v 


    wpa_supplicant is a WPA Supplicant for linux offering support for WPA and WPA2.

    Netlink Protocol Library Suite libnl-1.x

    wpa_supplicant requires the Netlink Protocol Library Suite (libnl) version 1.x.

    Download, build and install libnl-1.x: 

    tar -xzf libnl-1.1.4.tar.gz
    cd libnl-1.1.4
    ./configure --host=arm-linux-gnueabi --prefix=/usr/arm-linux-gnueabi
    make install


    OpenSSL is a library for Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1).

    Download, build and install OpenSSL: 

    tar -xzf openssl-1.0.1h.tar.gz
    cd openssl-1.0.1h
    export ARCH=arm
    export CROSS_COMPILE=arm-linux-gnueabi-
    ./Configure linux-generic32 --prefix=/usr/arm-linux-gnueabi
    make install


    With all the prerequisites installed, finally download, build and install the wpa_supplicant: 

    tar -xzf wpa_supplicant-2.2.tar.gz
    cd wpa_supplicant-2.2/wpa_supplicant
    cp defconfig .config
    make CC=arm-linux-gnueabi-gcc
    make install DESTDIR=/home/export/rootfs
    To be able to use wpa_supplicant on your target, it requires the following libraries to be installed:  
    cp /usr/arm-linux-gnueabi/lib/ /home/export/rootfs/lib/
    cp /usr/arm-linux-gnueabi/lib/ /home/export/rootfs/lib/
    cp /usr/arm-linux-gnueabi/lib/ /home/export/rootfs/lib/
    wpa_supplicant runs as a daemon and requires a configuration file. Create a file called 
    /etc/wpa_supplicant.conf with the following contents:  
    pairwise=CCMP TKIP

    The above file works with both WPA (TKIP) and WPA2 (CCMP/AES). Please insert your access point name at MySSID and your pass phrase at MyPassPhase.
    Once configured, wpa_supplicant can be started using: 

    wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf 


    hostapd is an 802.11 Access Point and IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator daemon.

    Download, extract and build hostapd:

    tar -xzf hostapd-2.2.tar.gz
    cd hostapd-2.2/hostapd
    cp defconfig .config
    make CC=arm-linux-gnueabi-gcc
    make install DESTDIR=/home/export/rootfs 


    rfkill is a userspace tool to query the state of the rfkill switches.

    Download, extract and build rfkill: 

    tar -xzf rfkill-0.5.tar.gz
    cd rfkill-0.5/
    make CC=arm-linux-gnueabi-gcc





    This woman and her machine learning tech could make Box a whole lot smarter

    One more indian talent


    When cloud collaboration goldenboy Box acquired a stealth content-discovery startup called dLoop last month, the deal was about a lot more than helping Box become this generation’s version of Autonomy. Box sees a lot of potential in dLoop’s machine learning technology to help the company evolve into a platform for developers and maybe even a pioneer in mobile content-management. Divya Jain, dLoop’s co-founder and now a software engineer at Box, will help lead that charge.

    The dLoop technology uses machine learning algorithms and graph analysis to detect the similarities among documents and organize them into clusters that are searchable not just by keyword, but by relevance. The immediate benefits are obvious — Box users will be able to search for documents more confidently, knowing they’ll see everything they might need even if it doesn’t feature or even include a particular term. It’s helpful for security, too, Jain explained in recent…

    View original post 726 more words