Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

Difference between revisions of "Panda How to kernel 3 2 rcx"

From eLinux.org
Jump to: navigation, search
(Created page with "== Introduction == Continuing Happy 20th Birthday Greetings to Linux!! The merge window for 3.1 is over and the 3.1-rc1 kernel has been released. Lots of work on the omap platfor...")
 
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
Continuing Happy 20th Birthday Greetings to Linux!!
+
The merge window for 3.2 is over and we are currently at v3.2-rc6.
The merge window for 3.1 is over and the 3.1-rc1 kernel has been released.
+
Lots of work on the OMAP platforms and on Pandaboard. Let's see
Lots of work on the omap platforms and on pandaboard. Let's see
+
what the various release candidates have provided.
what -rc1 has brought.
+
  
== rc1 ==
+
You can download a tarball of the mainline kernel at http://kernel.org/
  
There is still an issue with the setting up of the wl12xx:
+
or you can clone a copy of mainline kernel with:
  
[    0.181457] error setting wl12xx data
+
<pre>
 +
git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 +
cd linux
 +
git checkout v3.2-rcx
 +
</pre>
  
The extremely simple workaround available for 3.0, moved to twl_common.c in -rc1, doesn't produce the working wlan as in 3.0.
+
where x is the release candidate version.
But applying that to the -rc2 code does result in a functional wl12xx driver.
+
  
More to come as these issue are investigated.
+
''' Important Note '''
 +
There has been a lot of work done on the HDMI interface and its related driver omapdrm. Between kernel 3.1 and 3.2-rc1 enough changed so that the Testing section on the HDMI interface is no longer correct. The hdmi init functions are no longer in arch/arm/mach_omap2/board-omap4panda.c. When this situation stabilises, the HDMI testing section below will be updated.
 +
 
 +
 
 +
== 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 ==
 
== rc2 ==
Yep, -rc2 is out and I haven't had the time to fiddle much with it as yet, on to -rc3.
+
 
In short, -rc2 fixes some of the wl12xx issues, but still requires a patch to function.
+
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.
There is still an unresolved start up issue with wl12xx, in that sometimes it will work, sometimes, not. Same kernel, MLO, & u-boot and userspace.
+
  
 
== rc3 ==
 
== rc3 ==
-rc3 is out and there are no OMAP or Panda changes. However there is a boot issue with Panda
 
as described here: https://lkml.org/lkml/2011/8/25/117
 
  
This issue has been resolved, so be sure to get this commit or later from git:
+
There were no changes to OMAP or PandaBoard related code in the -rc3 release. The same patches required for -rc1 work for the -rc3 sources, and the kernel works as does the -rc1.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=69dd3d8e29e294caaf63eb5e8a72d250279f9e5f
+
  
 
== rc4 ==
 
== rc4 ==
-rc4 has been released and yet again there are no OMAP or Panda changes. The issue introduced in -rc3 noted above, has been resolved.
 
  
If you build the wl12xx driver as a module, and modprobe it, the wlan seems to start up fine every time, must be some sort of race when it is compiled into the kernel.
+
There were quite a few updates to OMAP code, but no PandaBoard related changes. The same patches required for -rc1 & -rc3 work for the -rc4 sources, and the kernel works as does the -rc1 & -rc3.
  
 
== rc5 ==
 
== rc5 ==
-rc5 has been released, and kernel.org is still sort of sick. Not to worry, Linus has a github repository that you can pull from (if you dare ;>),
+
 
see https://lkml.org/lkml/2011/9/4/92 for details. From the changelog, it doesn't look like any omap4 or PandaBoard related changes, so we'll wait a bit to see if kernel.org recovers after the holiday.
+
There were no changes to OMAP or PandaBoard related code in the -rc5 release. The same patches required for -rc1, -rc3 & -rc4 work for the -rc5 sources, and the kernel works as well.
  
 
== rc6 ==
 
== rc6 ==
-rc6 has been released, and kernel.org is still down. I cloned Linus's github repo so as not to disturb my kernel.org repo (yes I know I could have pulled from the github repo, and with a few other magic git incantations resulted in the same thing...maybe...). There have been some OMAP4 related changes, but applying the same patches as -rc4, a working kernel as described below is the result.
+
 
 +
There were no changes to PandaBoard related code in the -rc6 release. The same patches required for -rc1, -rc3, -rc4 & -rc5 work for the -rc6 sources, and the kernel works as well.
  
 
== rc7 ==
 
== rc7 ==
-rc7 has been released and Linus says that 3.1 won't happen till kernel.org is back, so we may have a few more -rcx's ahead of us.
 
No OMAP or Panda related changes in -rc7, the same patches that worked for -rc4 still work (some with a bit of an offset).
 
  
== git.kerenl.org ==
+
Inching towards the 3.2 release. There were no changes to PandaBoard related code in the -rc7 release, although there was an OMAP change relating to I2c. The same patches required for -rc1, -rc3, -rc4, -rc5 and -rc6 work for the -rc7 sources, and the kernel works as well.
It's back, mostly, as of 10/3/2011. Stay tuned.
+
  
 +
== PandaBoard ES ==
  
== rc8 ==
+
There is now a PandaBoard ES http://pandaboard.org/content/pandaboard-es which includes an OMAP 4460 at up to 1.2GHz. Several important differences make it important (at the present time) that the [[PandaBoard_ES_uboot_howto| MLO/u-boot be specifically crafted for the 4460]]. The thermal management is not in the mainline 4430 code as yet and therefore the max clock frequency when running the OMAP4460 on the PandaBoard ES with the mainline kernel is 920MHz(same as the OMAP4430).
Skipped
+
  
== rc9 ==
 
With git.kerne.org back, Linus has resumed the 3.1-rcx series on http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git
 
  
3.1 should be released soon, -rc9 is out which should be pretty close. The same patches that worked for -rc4 still work (some with a bit of an offset).
+
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.
 
+
 
+
== 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
+
  
 
== wlan12xx patch ==
 
== wlan12xx patch ==
This patch is necessary to resolve the issue noted in 3.0 and 3.1-rc1 above, however the code has moved to twl_common.c and so an new patch is presented here.
+
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]]
 
[[Media:0001a-omap4-pandaboard-wlan-fix.patch|0001a-omap4-pandaboard-wlan-fix.patch]]
Line 79: Line 65:
  
 
== DVI Patch ==
 
== DVI Patch ==
This patch is necessary to make 720p resolution available.
+
A patch is no longer necessary to make 720p resolution available. The DVI driver now reads the EDID and sets the resolution on bootup if the display is plugged into the DVI connector. If the display is not plugged in on bootup it will default to 640 x 480.
  
[[Media:0003-omap4-pandaboard-dvi720p.patch|0003-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)
 
Apply it like so: (from inside the kernel sources directory)
  
  patch -p1 < 0001-omap4-pandaboard-dvi720p.patch
+
  patch -p1 < 0002a-omap4-pandaboard-i2c.patch
  
Then use either of the following configs
+
== 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.
  
make ARCH=arm omap2plus_defconfig
+
[[Media:0006-omap4-usb-improvement.patch|0006-omap4-usb-improvement.patch]]
        or
+
make ARCH=arm panda_dvi_defconfig
+
 
+
Compile as above.
+
 
+
== I2C Patch ==
+
i2c character device driver
+
 
+
Ever since 2.6.38, the i2c character device driver support from user space has been broken for OMAP44xx.
+
* A fix has been submitted for the linux-omap-2.6 branch, but it may be a while till it gets into an -rcx.
+
See http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=39fe1a6fafe1e85c183379af9f3ceda7cd24bd65 for the commit.
+
* A quick fix for this issue is available [[file:omap44xx-i2c-fix.patch|Available]]
+
  
 
Apply it like so: (from inside the kernel sources directory)
 
Apply it like so: (from inside the kernel sources directory)
  
  patch -p1 < Omap44xx-i2c-fix.patch
+
  patch -p1 < 0006-omap4-usb-improvement.patch
 
+
Compile as above.
+
  
 
== Building ==
 
== Building ==
Building 3.1-rc1 or -rc2 is basically the same as [[Panda_How_to_kernel_2_6_38|How to build 2.6.38 kernel]], but of course you need the 3.1-rc1/rc2 sources. The omap2plus_defconfig works and illustrates the wl12xx issue, with or without a patch to twl_common.c.  [[Media:config.3.1-rc1.1|config.3.1-rc1.1]] works with the dvi patch and i2c patch.
+
Building 3.2-rc1,3,4,5,6,7 is a bit different from previous How-To's if you want to have a working wlan.
 
+
Building 3.1-rc4 -rc6/7 or -rc9 is a bit different 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.
 
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.1-rc4 or -rc6/7/9 sources and use [[Media:config.3.1-rc4.1|config.3.1-rc4.1]], [[Media:config.3.1-rc6.1|config.3.1-rc6.1]], [[Media:config.3.1-rc7.1|config.3.1-rc7.1]] or [[Media:config.3.1-rc9.1|config.3.1-rc9.1]]as the .config (this requires you patch the dvi & i2c as above)
+
Grab the 3.2-rc1,3,4,5,6,7 sources and use [[Media:config.3.2-rc1.1|config.3.2-rc1.1]], [[Media:config.3.2-rc3.1|config.3.2-rc3.1]], [[Media:config.3.2-rc4.1|config.3.2-rc4.1]], [[Media:config.3.2-rc5.1|config.3.2-rc5.1]], [[Media:config.3.2-rc6.1|config.3.2-rc6.1]] or [[Media:config.3.2-rc7.1|config.3.2-rc7.1]] as the .config (you should apply all the above patches)
  
 
Then compile like so:
 
Then compile like so:
Line 130: Line 107:
 
  make ARCH=arm CROSS_COMPILE=/home/kenm/Panda/arm-2010q1/bin/arm-none-linux-gnueabi- INSTALL_MOD_PATH=../testlib_omap modules_install  
 
  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.1.0-rc4-dirty/, lib/modules/3.1.0-rc6-dirty/, lib/modules/3.1.0-rc7-dirty/ or lib/modules/3.1.0-rc9-dirty/ to your SD card (as root), boot up the Pandaboard.
+
Copy lib/modules/3.2.0-rc1-dirty/ to your SD card (as root), boot up the Pandaboard.
 +
After 3.2-rc1, the kernel versioning was changed and the modules for -rc4,5,6,7 are now located in lib/modules/3.2.0-rc4-00002-gd3aebaf/ the last digits will change as the sources are edited, so your version numbers may differ.
  
  
Line 141: Line 119:
 
[[File:fbtest.jpg|240px]]
 
[[File:fbtest.jpg|240px]]
  
=== Switching primary display to the HDMI port ===
+
=== Switching primary display to the HDMI port --> Currently not functional <-- ===
 
Make sure that a monitor is plugged into the HDMI port before doing the following:
 
Make sure that a monitor is plugged into the HDMI port before doing the following:
  
Line 178: Line 156:
 
The above commands should be run from the serial console and the cable should be in the destination port before running the commands.
 
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 ===
+
=== fbtest on HDMI Port --> Currently not functional <-- ===
  
 
Run fbtest to see a nice test pattern from the HDMI port.
 
Run fbtest to see a nice test pattern from the HDMI port.

Latest revision as of 02:07, 19 February 2012

Introduction

The merge window for 3.2 is over and we are currently at v3.2-rc6. Lots of work on the OMAP platforms and on Pandaboard. Let's see what the various release candidates have provided.

You can download a tarball of the mainline kernel at http://kernel.org/

or you can clone a copy of mainline kernel with:

git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
git checkout v3.2-rcx

where x is the release candidate version.

Important Note There has been a lot of work done on the HDMI interface and its related driver omapdrm. Between kernel 3.1 and 3.2-rc1 enough changed so that the Testing section on the HDMI interface is no longer correct. The hdmi init functions are no longer in arch/arm/mach_omap2/board-omap4panda.c. When this situation stabilises, the HDMI testing section below will be updated.


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.

rc3

There were no changes to OMAP or PandaBoard related code in the -rc3 release. The same patches required for -rc1 work for the -rc3 sources, and the kernel works as does the -rc1.

rc4

There were quite a few updates to OMAP code, but no PandaBoard related changes. The same patches required for -rc1 & -rc3 work for the -rc4 sources, and the kernel works as does the -rc1 & -rc3.

rc5

There were no changes to OMAP or PandaBoard related code in the -rc5 release. The same patches required for -rc1, -rc3 & -rc4 work for the -rc5 sources, and the kernel works as well.

rc6

There were no changes to PandaBoard related code in the -rc6 release. The same patches required for -rc1, -rc3, -rc4 & -rc5 work for the -rc6 sources, and the kernel works as well.

rc7

Inching towards the 3.2 release. There were no changes to PandaBoard related code in the -rc7 release, although there was an OMAP change relating to I2c. The same patches required for -rc1, -rc3, -rc4, -rc5 and -rc6 work for the -rc7 sources, and the kernel works as well.

PandaBoard ES

There is now a PandaBoard ES http://pandaboard.org/content/pandaboard-es which includes an OMAP 4460 at up to 1.2GHz. Several important differences make it important (at the present time) that the MLO/u-boot be specifically crafted for the 4460. The thermal management is not in the mainline 4430 code as yet and therefore the max clock frequency when running the OMAP4460 on the PandaBoard ES with the mainline kernel is 920MHz(same as the OMAP4430).


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.

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

A patch is no longer necessary to make 720p resolution available. The DVI driver now reads the EDID and sets the resolution on bootup if the display is plugged into the DVI connector. If the display is not plugged in on bootup it will default to 640 x 480.

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

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.

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,3,4,5,6,7 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,3,4,5,6,7 sources and use config.3.2-rc1.1, config.3.2-rc3.1, config.3.2-rc4.1, config.3.2-rc5.1, config.3.2-rc6.1 or config.3.2-rc7.1 as the .config (you should apply all the above patches)

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. After 3.2-rc1, the kernel versioning was changed and the modules for -rc4,5,6,7 are now located in lib/modules/3.2.0-rc4-00002-gd3aebaf/ the last digits will change as the sources are edited, so your version numbers may differ.


Testing

fbtest on DVI Port

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

Fbtest.jpg

Switching primary display to the HDMI port --> Currently not functional <--

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

# Enable HDMI
echo "1" > /sys/devices/platform/omapdss/display1/enabled

# Disable overlay0 (an overlay must be disabled before changing its properties)
echo "0" > /sys/devices/platform/omapdss/overlay0/enabled

# Set the manager of overlay0 to display1 which is HDMI
echo "tv" > /sys/devices/platform/omapdss/overlay0/manager

# Enable overlay0
echo "1" > /sys/devices/platform/omapdss/overlay0/enabled

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:

# Disable HDMI
echo "0" > /sys/devices/platform/omapdss/display1/enabled

# Disable overlay0 (an overlay must be disabled before changing its properties)
echo "0" > /sys/devices/platform/omapdss/overlay0/enabled

# Set the manager of overlay0 to display0 which is DVI
echo "lcd2" > /sys/devices/platform/omapdss/overlay0/manager

# Enable overlay0
echo "1" > /sys/devices/platform/omapdss/overlay0/enabled

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 --> Currently not functional <--

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

Fbtest2.jpg

i2cdetect

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

# i2cdetect -y -r 1
    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: -- -- -- -- -- -- -- --

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
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

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.