Panda How to kernel 3 5 rcx
Kernel 3.5 merge window has closed and 3.5-rc1 has been released.
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.5-rcx
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 has been removed from this How-To. The HDMI testing section below will return when the code stabilises.
Many changes in OMAP and Panda specific code since 3.4 was released. The HDMI, DVI interfaces both work under certain circumstances and properly read the EDID info from the monitor. HDMI sound is now functional. Changes to the WLAN code continue, and WLAN does function as well under the proper circumstances.
-rc4 has a few omap4 related changes, but nothing specific to the PandaBoard.
-rc5 does not have any OMAP or PandaBoard specific changes.
The WL12xx driver on a PandaBoard still needs the same patch as used for 3.1 and 3.2. 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. With the modules built in, operation is not consistent. The PandaBoard ES does not need the patch.
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).
This patch is still necessary to resolve the issue noted in 3.2 and earlier
Apply it like so: (from inside the kernel sources directory)
patch -p1 < 0001a-omap4-pandaboard-wlan-fix.patch
NOTE: it applies with offsets which is ok.
The latest wlan firmware is available from git: git://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git just copy the contents of the ti-connectivity folder to /lib/firmware/ti-connectivity.
The patch is no longer necessary for the PandaBoard ES but does not seem to hurt if applied. In addition, the race issue that required building as a module has returned. As part of the code cleanup, the wl12xx and wl12xx_sdio drivers no longer depend on each other. This creates an issue with systems that do not use udev or mdev (with a somewhat fiddly & slow script) to load MODALIAS drivers. The quick solution is to modprobe both, the order no longer matters. Just modprobing wl12xx_sdio will no longer automatically load wl12xx.
In -rc1 there is an issue with wl12xx_sdio building as a module, so the recommended way (as implememted in the .config) is to build wl12xx as a single module which includes wl12xx, wl12xx_sdio and wl12xx_core. This can then be modprobed on either PandaBoard (with patch) or PandaBoard ES.
The 3.5-rc1/4/5 .config enables Sound builtin and wl12xx as a single module. The builtin sound works, as does HDMI sound. Note that the HDMI monitor must be plugged in and enabled for the HDMI sound to work.
Then compile like so:
make ARCH=arm CROSS_COMPILE=Path_to_your/arm-2010q1/bin/arm-none-linux-gnueabi- uImage
CPU Frequency Control
The 3.5-rc5 .config also enables SmartReflex as well as OMAP frequency scaling. Default governor is set to performance so the CPU will come up at 1008MHz.
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Will change to the ondemand governor and reduce the cpu frequency to 300MHz when idle.
Display the current cpu frequency.
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 1008000
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: -- -- -- -- -- -- -- --
Run the following commands after the PandaBoard is booted:
modprobe wl12xx ** only if you built the wl12xx drivers a module as recommended 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 (18.104.22.168): 56 data bytes 64 bytes from 22.214.171.124: seq=0 ttl=43 time=62.683 ms 64 bytes from 126.96.36.199: seq=1 ttl=43 time=54.077 ms 64 bytes from 188.8.131.52: seq=2 ttl=43 time=51.484 ms 64 bytes from 184.108.40.206: seq=3 ttl=43 time=54.108 ms
Setting up a WEP key is fairly straightforward and is achieved by adding the command:
iwconfig wlan0 key C7EE546141233ECCF3FDF68897
after setting the essid
NOTE: the command:
iwconfig wlan0 key s:panda
would seem to set the key using the ascii passphrase "panda" However, the conversion is not implemented in iwlib (wireless-tools 30-pre9) and will result an a bogus key being set in the wlan.
http://www.powerdog.com/wepkey.cgi can generate hex keys from passphrases and was used to generate C7EE546141233ECCF3FDF68897 from panda.
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 run the same command on a desktop Linux system, with the same USB memory stick, the PandaBoard's speed should roughly be the same.