In our earlier post about the October releases of Linux and Android for i.MX6, we gave some links to the kernel and U-Boot for the latest Android.
We're also putting a couple of images on-line as we did last month for the R13.4-Beta release.
This time around, we'll do this in stages and try to document the steps we've taken so those of you with access to the Freescale source and images can follow along. In this post, we'll boot up the stock SABRE SD image over NFS, tweaking only the kernel.
To do this, we extracted the contents of file sabresd_6dq/NFS/android_fs.tar.gz
from the image_imx-android-r13.4-ga_6qsabresd.tar.gz
image from Freescale and added a line into /etc/exports
on our TFTP/NFS server:
/imx-android-r13.4-ga 192.168.0.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
After this, we told nfs-kernel-server
to reload the file and tested the mount: ~/$ sudo /etc/init.d/nfs-kernel-server reload
~/$ mkdir -p nfs && sudo mount 192.168.0.1:/imx-android-r13.4-ga ./nfs
~/$ ls nfs
acct device init.rc udisk
cache etc mnt ueventd.freescale.rc
config extsd proc ueventd.goldfish.rc
d init sbin ueventd.rc
data init.freescale.rc sdcard vendor
default.prop init.freescale.usb.rc sys
dev init.goldfish.rc system
~/$ sudo umount nfs && rm -rf nfs
Then we grabbed the matching Android kernel and compiled it: ~/$ git clone git://github.com/boundarydevices/linux-imx6.git
Cloning into 'linux-imx6'...
~/$ cd linux-imx6
~/linux-imx6$ git checkout origin/boundary-imx-android-r13.4-ga
-b boundary-imx-android-r13.4-ga
Checking out files: 100% (38112/38112), done.
...
Switched to a new branch 'boundary-imx-android-r13.4-ga'
~/linux-imx6$ export ARCH=arm
~/linux-imx6$ export CROSS_COMPILE=arm-none-linux-gnueabi-
~/linux-imx6$ make nitrogen6x_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
~/linux-imx6$ make uImage modules
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
...
~/linux-imx6$ cp -fv arch/arm/boot/uImage /tftpboot/uImage-imx6-android
To test this out without changing anything else, we placed the kernel on our TFTP server and ran the following commands by hand in U-Boot: U-Boot > setenv bootargs console=ttymxc1,115200
U-Boot > setenv bootargs $bootargs video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 mxcfb1:off mxcfb2:off
U-Boot > setenv bootargs $bootargs vmalloc=400M fbmem=28M
U-Boot > setenv bootargs $bootargs init=/init no_console_suspend
U-Boot > setenv bootargs $bootargs root=/dev/nfs nfsroot=192.168.0.1:/imx-android-r13.4-ga,v3,tcp
U-Boot > setenv bootargs $bootargs ip=dhcp
U-Boot > dhcp 12000000 192.168.0.1:uImage-imx6-android
U-Boot > bootm 12000000
With a USB mouse connected, this just works. At least Android boots up. There are some issues which we'll tackle in future posts, but for very little work, this is a great start.Note that these same steps should work with a Freescale 10" display by changing your
video=
clause appropriately. We'll need very little additional work to add support for our 7" multitouch display. The touch screen simply needs an .idc
file describing it. Since it's a virtual clone of the Freescale touch screen, we can just copy that one to the proper place: ~/$ sudo cp -fv /imx-android-r13.4-ga/system/usr/idc/HannStar_P1003_Touchscreen.idc
/imx-android-r13.4-ga/system/usr/idc/ft5x06.idc
This upload is available for download here: Note that this download requires registration before download and approval of an End-User License agreement.
Note that although networking is up and running when doing all of the above (we're running over NFS after all), Android isn't configured for a DNS server. To remedy that and get browser access, you can add your DNS server from a shell on the device like so:
# setprop net.dns1 192.168.0.1
Note that you'll need to change various instances of 192.168.0.1
above with the IP address of your TFTP/NFS server or your DNS server.