Panda How to kernel 3 2 rcx

Introduction
The merge window for 3.2 is over and the 3.2-rc1 kernel has been released. Lots of work on the omap platforms and on pandaboard. Let's see what -rc1 has brought.

rc1
There are several issues requiring new patches. The WL12xx driver needs newer firmware, and the same patch as used for 3.1. when the driver isn't happy, the error messages are somewhat less than useful, however the drivers/firmware are being constantly improved and it would not be a good idea to have the driver support anything but the latest firmware. Still a work in progress.

rc2
There are no changes to OMAP or PandaBoard related code in the -rc2 release, or any fixes that would eliminate any of the patches required for -rc1, so we'll skip testing this release for a bit.

The latest wlan firmware is available from git: git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git just copy the contents of the ti-connectivity folder to /lib/firmware/ti-connectivity.

wlan12xx patch
This patch is necessary to resolve the issue noted in 3.0 and 3.1, the code was moved to twl_common.c and a patch is supposed to be in -rc2 or -rc3.

[[Media:0001a-omap4-pandaboard-wlan-fix.patch|0001a-omap4-pandaboard-wlan-fix.patch]]

Apply it like so: (from inside the kernel sources directory)

patch -p1 < 0001a-omap4-pandaboard-wlan-fix.patch

DVI Patch
This patch is necessary to make 720p resolution available. there is also a new selection in the .config file for DVI

[[Media:0003-omap4-pandaboard-dvi720p.patch|0003-omap4-pandaboard-dvi720p.patch]]

Apply it like so: (from inside the kernel sources directory)

patch -p1 < 0001-omap4-pandaboard-dvi720p.patch

I2C Patch
i2c character device driver patch that has been necessary is no longer required, however a couple of issues still need patching, so a new patch is required

[[Media:0002a-omap4-pandaboard-i2c.patch|0002a-omap4-pandaboard-i2c.patch]]

Apply it like so: (from inside the kernel sources directory)

patch -p1 < 0002a-omap4-pandaboard-i2c.patch

USB Performance improvement
This patch fixs one performance bug on ARM Cortex A9 dual core platform, which has been reported on quite a few ARM machines (OMAP4, Tegra 2, snowball...), see details from link of https://bugs.launchpad.net/bugs/709245.

[[Media:0006-omap4-usb-improvement.patch|0006-omap4-usb-improvement.patch]]

Apply it like so: (from inside the kernel sources directory)

patch -p1 < 0006-omap4-usb-improvement.patch

Building
Building 3.2-rc1 is a bit different from previous How-To's if you want to have a working wlan.

In order to ensure that the wlan starts up consistently, it is recommended that the wl12xx driver be built as a module and started after the PandaBoard has booted.

Grab the 3.2-rc1 sources and use [[Media:config.3.2-rc1.1|config.3.2-rc1.1]] as the .config (you should apply all the above patchs)

Then compile like so:

make ARCH=arm CROSS_COMPILE=Path_to_your/arm-2010q1/bin/arm-none-linux-gnueabi- uImage

Then compile the modules like so:

make ARCH=arm CROSS_COMPILE=/home/kenm/Panda/arm-2010q1/bin/arm-none-linux-gnueabi- modules

"Install" the modules to somewhere convenient:

make ARCH=arm CROSS_COMPILE=/home/kenm/Panda/arm-2010q1/bin/arm-none-linux-gnueabi- INSTALL_MOD_PATH=../testlib_omap modules_install

Copy lib/modules/3.2.0-rc1-dirty/ to your SD card (as root), boot up the Pandaboard.

fbtest on DVI Port
After booting run fbtest to see a nice test pattern from the dvi port.



Switching primary display to the HDMI port
Make sure that a monitor is plugged into the HDMI port before doing the following:

echo "1" > /sys/devices/platform/omapdss/display1/enabled echo "0" > /sys/devices/platform/omapdss/overlay0/enabled echo "tv" > /sys/devices/platform/omapdss/overlay0/manager echo "1" > /sys/devices/platform/omapdss/overlay0/enabled
 * 1) Enable HDMI
 * 1) Disable overlay0 (an overlay must be disabled before changing its properties)
 * 1) Set the manager of overlay0 to display1 which is HDMI
 * 1) Enable overlay0

And content on overlay 0 of primary lcd would be transferred to HDMI. It works similarly for all other overlay's.

Switching primary display to the DVI port
See: http://omappedia.org/wiki/Bootargs_for_enabling_display for lots of useful info on the display subsystem. Be aware that the display, manager and overlay numbers don't match the panda configuration.

Make sure that a monitor is plugged into the DVI port before doing the following:

echo "0" > /sys/devices/platform/omapdss/display1/enabled echo "0" > /sys/devices/platform/omapdss/overlay0/enabled echo "lcd2" > /sys/devices/platform/omapdss/overlay0/manager echo "1" > /sys/devices/platform/omapdss/overlay0/enabled
 * 1) Disable HDMI
 * 1) Disable overlay0 (an overlay must be disabled before changing its properties)
 * 1) Set the manager of overlay0 to display0 which is DVI
 * 1) Enable overlay0

The above commands should be run from the serial console and the cable should be in the destination port before running the commands.

fbtest on HDMI Port
Run fbtest to see a nice test pattern from the HDMI port.



i2cdetect
You can run i2cdetect and the results should look like this:

0 1  2  3  4  5  6  7  8  9  a  b  c  d  e  f 00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  40: -- -- -- -- -- -- -- -- UU UU UU UU -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  70: -- -- -- -- -- -- -- --
 * 1) i2cdetect -y -r 1

wlan
Run the following commands after the PandaBoard is booted:

modprobe wl12xx_sdio ifconfig wlan0 up iwconfig wlan0 essid "Your AccessPoint Name" udhcpc -i wlan0

If your network is set up to provide DHCP services, the PandaBoard will get all the "right stuff(tm)" and you will be able to access the Internet.

PING www.google.com (74.125.73.99): 56 data bytes 64 bytes from 74.125.73.99: seq=0 ttl=43 time=62.683 ms 64 bytes from 74.125.73.99: seq=1 ttl=43 time=54.077 ms 64 bytes from 74.125.73.99: seq=2 ttl=43 time=51.484 ms 64 bytes from 74.125.73.99: seq=3 ttl=43 time=54.108 ms
 * 1) ping www.google.com

USB Performance
Insert a USB memory stick into one of the usb ports

Run dmesg to see what sdx the stick was recognised as, then:

hdparam -tT /dev/sdx

If you did this on a kernel without the patch you will see some improvement, if you run the same command on a desktop Linux system, with the same USB memory stick, the PandaBoard's speed should roughly be the same.