Difference between revisions of "Kernel status"

From Pandora Wiki
Jump to: navigation, search
(Submitting patches: cat)
(formating)
Line 1: Line 1:
 
= Introduction =
 
= Introduction =
The first firmware release is based on a heavily patched linux-2.6.27-omap1 kernel. linux-omap used to be OMAP community kernel fork, nowadays its code was either merged to mainline or dropped. Further OMAP development continues on mainline kernels, linux-omap tree is mainly used to queue developed code to mainline. So most of the interesting features that 2.6.27 lack (like sleep modes) are available there, but development effort is needed to port all drivers first.
+
The first [[firmware]] release is based on a heavily patched linux-2.6.27-omap1 kernel. linux-omap used to be OMAP community kernel fork, nowadays its code was either merged to mainline or dropped. Further OMAP development continues on mainline kernels, linux-omap tree is mainly used to queue developed code to mainline. So most of the interesting features that 2.6.27 lack (like sleep modes) are available there, but development effort is needed to port all drivers first.
  
 
= Status =
 
= Status =
Line 7: Line 7:
 
== merged code (already in mainline as of 2.6.36) ==
 
== merged code (already in mainline as of 2.6.36) ==
 
* board support (enables UART, I2C, SPI, RTC, MMC{1,2,3}, NAND, OTG, EHCI, gpio-keys, leds-gpio, keypad, touchscreen, regulators)
 
* board support (enables UART, I2C, SPI, RTC, MMC{1,2,3}, NAND, OTG, EHCI, gpio-keys, leds-gpio, keypad, touchscreen, regulators)
* sound: ALSA ASoC machine driver
+
* sound: [[ALSA]] ASoC machine driver
* bq27500 fuel gauge
+
* [[bq27500]] fuel gauge
 
* LCD panel driver
 
* LCD panel driver
* wl1251 wifi driver glue (portions only in 2.6.37)
+
* wl1251 [[wifi driver]] glue (portions only in 2.6.37)
 
* charging (partial only, 2.6.37)
 
* charging (partial only, 2.6.37)
* wl1251 complete powerdown/suspend using runtime_pm (2.6.38).
+
* [[wl1251]] complete powerdown/suspend using runtime_pm (2.6.38).
  
 
this doesn't list various bugfix patches to get above working :)
 
this doesn't list various bugfix patches to get above working :)
  
== finished code, but not merged (now in openpandora.org GIT) ==
+
== finished code, but not merged==
(mainline merge status in brackets)
+
now in openpandora.org GIT (mainline merge status in brackets)
 
* nubs (aka vsense, needs rework for mainline)
 
* nubs (aka vsense, needs rework for mainline)
 
* backlight driver (needs rework)
 
* backlight driver (needs rework)
Line 25: Line 25:
 
== missing stuff ==
 
== missing stuff ==
 
* Charging missing bits.
 
* Charging missing bits.
* Bluetooth. 2.6.27 has rather old Nokia code (not mainlined), Nokia device/maemo kernels need to be checked and later versions integrated from there. There is alternative to this: expose UART port and try to use userspace bluez drivers, but this could result in less efficient power saving (if any).
+
* Bluetooth. 2.6.27 has rather old Nokia code (not mainlined), Nokia device/maemo kernels need to be checked and later versions integrated from there. There is alternative to this: expose UART port and try to use userspace [[bluez]] drivers, but this could result in less efficient power saving (if any).
* low power modes. This requires lots of testing, support in drivers and board files.
+
* low [[power modes]]. This requires lots of testing, support in drivers and board files.
 
* DSP mess: [http://elinux.org/BeagleBoard/DSP_Clarification gateway, bridge or link] ?
 
* DSP mess: [http://elinux.org/BeagleBoard/DSP_Clarification gateway, bridge or link] ?
 
* more things that I forgot
 
* more things that I forgot
  
 
= openpandora.org git structure =
 
= openpandora.org git structure =
 +
{{merge|Firmware governance}}
 
Support for various kernels is available in pandora-XX branches or tags, XX corresponds to last part of kernel version number. 2.6.27 is an exception, it's in pandora-27-omap1 branch.
 
Support for various kernels is available in pandora-XX branches or tags, XX corresponds to last part of kernel version number. 2.6.27 is an exception, it's in pandora-27-omap1 branch.
  
 
Branches based on pre-release -rc kernels will be often rebased. This means you can't do 'git pull' on them, use 'git fetch; git reset --hard origin/pandora-XX' instead. '''Warning''': this will destroy all your changes (even if they are commited), backup them first!
 
Branches based on pre-release -rc kernels will be often rebased. This means you can't do 'git pull' on them, use 'git fetch; git reset --hard origin/pandora-XX' instead. '''Warning''': this will destroy all your changes (even if they are commited), backup them first!
 +
 +
See also:
 +
* [[Firmware governance]]
  
 
= Configuring newer kernels =
 
= Configuring newer kernels =
 
When compiling mainline kernel, use
 
When compiling mainline kernel, use
make omap2plus_defconfig
+
<source lang="bash">make omap2plus_defconfig</source>
 
for openpandora.org kernels you can use omap3_pandora_defconfig
 
for openpandora.org kernels you can use omap3_pandora_defconfig
make omap3_pandora_defconfig
+
<source lang="bash">make omap3_pandora_defconfig</source>
 
after either of those are run, you can tune the configuration for your needs:
 
after either of those are run, you can tune the configuration for your needs:
make menuconfig
+
<source lang="bash">make menuconfig</source>
 
Now you should be able to build a working kernel. More info available at [[Kernel build instructions]].
 
Now you should be able to build a working kernel. More info available at [[Kernel build instructions]].
  
 
= Running =
 
= Running =
Easiest way is to place your new uImage to root of SD (FAT or ext2, ext2 may need a bootloader update) along with a file named 'autoboot.txt', which contains u-boot commands such as:
+
Easiest way is to place your new uImage to root of SD ([[FAT]] or [[ext2]], ext2 may need a bootloader update) along with a file named '[[autoboot.txt]]', which contains u-boot commands such as:
 
  fatload mmc 0 0x80300000 uImage; bootm 0x80300000
 
  fatload mmc 0 0x80300000 uImage; bootm 0x80300000
 
Kernel bootargs can be changed by adding 'setenv' line before fatload:
 
Kernel bootargs can be changed by adding 'setenv' line before fatload:
 
  setenv bootargs debug console=ttyO2,115200n8 ...
 
  setenv bootargs debug console=ttyO2,115200n8 ...
 +
 
== serial port ==
 
== serial port ==
 
In an unlikely event that you can get serial output from EXT port, be aware that serial device has changed several times (due to the driver and port configuration changes in the kernel):
 
In an unlikely event that you can get serial output from EXT port, be aware that serial device has changed several times (due to the driver and port configuration changes in the kernel):

Revision as of 12:47, 22 April 2011

Introduction

The first firmware release is based on a heavily patched linux-2.6.27-omap1 kernel. linux-omap used to be OMAP community kernel fork, nowadays its code was either merged to mainline or dropped. Further OMAP development continues on mainline kernels, linux-omap tree is mainly used to queue developed code to mainline. So most of the interesting features that 2.6.27 lack (like sleep modes) are available there, but development effort is needed to port all drivers first.

Status

This is mostly about pandora specific support for 2.6.35 or newer. Things that are already in mainline and come "for free" (like SD card support) are not mentioned.

merged code (already in mainline as of 2.6.36)

  • board support (enables UART, I2C, SPI, RTC, MMC{1,2,3}, NAND, OTG, EHCI, gpio-keys, leds-gpio, keypad, touchscreen, regulators)
  • sound: ALSA ASoC machine driver
  • bq27500 fuel gauge
  • LCD panel driver
  • wl1251 wifi driver glue (portions only in 2.6.37)
  • charging (partial only, 2.6.37)
  • wl1251 complete powerdown/suspend using runtime_pm (2.6.38).

this doesn't list various bugfix patches to get above working :)

finished code, but not merged

now in openpandora.org GIT (mainline merge status in brackets)

  • nubs (aka vsense, needs rework for mainline)
  • backlight driver (needs rework)
  • keypad fn handling (not allowed in mainline)
  • PWM LEDs (needs rework)

missing stuff

  • Charging missing bits.
  • Bluetooth. 2.6.27 has rather old Nokia code (not mainlined), Nokia device/maemo kernels need to be checked and later versions integrated from there. There is alternative to this: expose UART port and try to use userspace bluez drivers, but this could result in less efficient power saving (if any).
  • low power modes. This requires lots of testing, support in drivers and board files.
  • DSP mess: gateway, bridge or link ?
  • more things that I forgot

openpandora.org git structure

Support for various kernels is available in pandora-XX branches or tags, XX corresponds to last part of kernel version number. 2.6.27 is an exception, it's in pandora-27-omap1 branch.

Branches based on pre-release -rc kernels will be often rebased. This means you can't do 'git pull' on them, use 'git fetch; git reset --hard origin/pandora-XX' instead. Warning: this will destroy all your changes (even if they are commited), backup them first!

See also:

Configuring newer kernels

When compiling mainline kernel, use

make omap2plus_defconfig

for openpandora.org kernels you can use omap3_pandora_defconfig

make omap3_pandora_defconfig

after either of those are run, you can tune the configuration for your needs:

make menuconfig

Now you should be able to build a working kernel. More info available at Kernel build instructions.

Running

Easiest way is to place your new uImage to root of SD (FAT or ext2, ext2 may need a bootloader update) along with a file named 'autoboot.txt', which contains u-boot commands such as:

fatload mmc 0 0x80300000 uImage; bootm 0x80300000

Kernel bootargs can be changed by adding 'setenv' line before fatload:

setenv bootargs debug console=ttyO2,115200n8 ...

serial port

In an unlikely event that you can get serial output from EXT port, be aware that serial device has changed several times (due to the driver and port configuration changes in the kernel):

  • openpandora.org 2.6.27: ttyS0
  • mainline upto 2.6.36: ttyS2
  • mainline/openpandora.org 2.6.37 and up: ttyO2

This is relevant for console= bootarg.

Contributing

Help is always welcome, usually in form of testing or writing patches. In most cases it's best to file a bug report or feature request in the bug tracker so that things don't get lost.

Submitting patches

It's best to send formal GIT-generated patch so that you get proper credit for your work and to make applying the patch easier. You also should add 'Signed-off-by' line ('-s' on 'git commit' will do it for you), which has the same meaning as for mainline Linux.

So basic workflow would be:

<make changes>
git config --global user.name "My Name"
git config --global user.email "myname@domain.com"
git add <changed files>
git commit -s
git format-patch -o /somewhere/ -1

Then create a new feature request in bugtracker and attach the generated file(s).