Compiling the Linux Kernel for i.MX6

March 29th, 2014

In this post we will go through the process of compiling the Linux for i.MX6. This procedure is NOT through the ltib, but the regular arm compiler methods. You may like to see the uboot compile post to look for installing and setting up of the compile tool chain. The same toolchain used for uboot can also be used for the Linux kernel.

Grab the source code

The first thing you want to do is grab a copy of the latest source code.

export ARCH=arm
export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-

Look into the directory arch/arm/config and see the relevant config file. In my case it was imx6_defconfig. Give the following command to make config file.

make imx6_defconfig

At this stage we compiled it using

make uImage

However, we found some issue and errors and had to do the following

edit .config and add the following line
# CONFIG_SWITCH is not set
CONFIG_SWITCH=y

Again compile

make uImage

At this stage it compiled and the uImage is generated and stored in arch/arm/boot/.

copy the generated uImage to the directory called /tftpboot. Now boot your i.MX system and stop it at u-boot. Load and run the kernel ( Follow the instruction in
tftp boot).
setenv loadaddr 10800000
tftp 0×10800000 uImage
bootm

At this stage you should see the linux runs.

Update :

If you use the boundary devices git (https://github.com/boundarydevices/u-boot-imx6/) , you should use the following for the config

make nitrogen6x_defconfig

This should not throw errors.

Uncategorized

Transferring and Running Linux on i.MX6 using NFS ( tftp)

March 29th, 2014

Once you have built kernel for i.MX6 ( I will have a separate blog in how to build kernel) you need to transfer it to your i.MX6 board to test it. In this blog I will walk through the steps needed to transfer the kernel and run it.

Installing the tftp Server in Linux machine

You need to install the tfto server on the Host linux machine. Use following command to install the tftp

sudo apt-get install xinetd tftpd tftp

Now create file named tffp ( you can use gedit editor) in the directory

/etc/xinetd.d/

and put the following contents

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}

Make /tftpboot directory

$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot

Start tftpd through xinetd

$ sudo /etc/init.d/xinetd start

You can find if the tftp server is running or not by using the command

ps aux | egrep 'xinetd'

It gives something like ( if the xinetd is running)

vikas 2440 0.0 0.0 13584 924 pts/0 S+ 11:50 0:00 egrep --color=auto xinetd

Find the ipaddress of the Linux machine using ifconfig ( let us say – it is 192.168.202.144)

On the i.MX6 board set the correct serverip

setenv serverip 192.168.202.144

Set the correct gatewayip

setenv 192.168.0.1

( Also make sure that the environment variable ipaddr is set. You can use dhcp to get the current ip Address)

Place the uImage file in the director /tftpboot

Transfer the uImage using tftp

> tftp 0×10008000 uImage

Run the uImage

> bootm

Hope it helps

Uncategorized

Transferring kernel in i.MX6 Android system using ADB

March 12th, 2014

This blog talks about a method to transfer kernel from your machine to your freescale’s i.MX6 system ( should also work with other Android system).

In the Android system ( i.MX6 or other) connect to its root ( Use SSH or other) and do following

root@android: setprop service.adb.tcp.port 5555; stop adbd; start adbd
root@android: adb connect IPADDRESS
root@android:/ #mount -o remount,rw /
root@android:/ #cd /
root@android:/ #cp uImage original_uImage ( just to keep the original back up backup)

And then from the computer:

C:/ adb connect IPADDRESS
C:/ adb push uImage /

Not the forward slash in the end in the final command.

Uncategorized

Creating Log of Errors in Android Devices

March 11th, 2014

This blog shows how to create a log of errors in your Android device.

1. Connecting to the Android device :

- Connect to your Android device using SSH or USB.
-Use following command to restart adb
setprop service.adb.tcp.port 5555; stop adbd; start adbd
- adb connect IPADDRESS (where IP address is the IP address of your Android device – e.g. connect 192.168.0.131)

Now got to Command prompt :

1.) adb connect IPADDRESS

2.) adb devices ( Check whether the device is connected)

3.) cd /sdcard

4.) adb logcat -v time > FILENAME.txt

Uncategorized

Transferring system files to and fro between Android device and your computer

March 7th, 2014

Once you have an updated a system file ( like a library file ) for being transferred to you Android device, you need to actually transfer it. In this article we will show you how to do it. Notice that the images and regular files can easily be transferred by connecting your device with a USB Cable to your computer.

1. Connect to your Android device using SSH. You will need the authentication file, IP Address and the login name of your android system. We will write a separate article about it.

2. Now run the following command from the SSH

#setprop service.adb.tcp.port 5555;stop adbd;start adbd
#adb connect IP

Where IP is the IP address of your system. You should see the device when you give the command

#adb devices

Now open the command prompt and go to the directory sdk\platform-tools in you android SDK installation directory. You should see the sdk.exe file in this directory. Run sdk.exe

Now if you give the command

#adb devices

You should see your device

Give the following command to remount the directory as a read / write directory.

#adb remount

You can now transfer the file from your computer to the android device using the following command

#adb push local remote

Where local is the path and file name of the file to be transferred and remote is the directory name of the remote android device.

Uncategorized

Snap EDA still in Beta – does not provide support for Allegro

March 5th, 2014

Sometimes in September 2013, we had written about snapeda and we found it promising if they were to spend time on creating some initial database.

Six months later in March 2014, it is still in Beta stage. We observed that the footprints of most of the components listed out are missing. The navigation is not as smooth as you would like it to be. You would expect a snapshot of the components but none exists.

Most importantly, it is missing altogether a the footprints for Allegro – one of the major EDA vendors. But even if it intends to provide support for ALlegro, it will have to work on several different versions of Allegro. A footprint created in version 16.6, may, for example not work in version 16.3.

There are huge challenges ahead for SnapEDA.But if they are willing to work hard, they may reap benefits.

Uncategorized