Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
kerneldev [2012/02/21 22:57] – [Git-Fu] armelf | kerneldev [2012/06/28 19:31] – marvin24 |
---|
[[http://en.wikipedia.org/wiki/Nvidia_Tegra#Tegra_2_series|NVidia's Tegra2]]((http://www.nvidia.com/object/tegra-2.html)), which is dual-core [[http://arm.com|ARM]] [[http://en.wikipedia.org/wiki/Cortex-A9|Cortex-A9]], supports only [[http://en.wikipedia.org/wiki/ARM_architecture#VFP|VFPv3]] ((http://www.arm.com/products/processors/technologies/vector-floating-point.php)) and **not** [[http://en.wikipedia.org/wiki/ARM_architecture#Advanced_SIMD_.28NEON.29|NEON]] ((http://www.arm.com/products/processors/technologies/neon.php)) extensions which are more powerful. | [[http://en.wikipedia.org/wiki/Nvidia_Tegra#Tegra_2_series|NVidia's Tegra2]]((http://www.nvidia.com/object/tegra-2.html)), which is dual-core [[http://arm.com|ARM]] [[http://en.wikipedia.org/wiki/Cortex-A9|Cortex-A9]], supports only [[http://en.wikipedia.org/wiki/ARM_architecture#VFP|VFPv3]] ((http://www.arm.com/products/processors/technologies/vector-floating-point.php)) and **not** [[http://en.wikipedia.org/wiki/ARM_architecture#Advanced_SIMD_.28NEON.29|NEON]] ((http://www.arm.com/products/processors/technologies/neon.php)) extensions which are more powerful. |
| |
As of 2012/02/18, the most stable kernel is 3.0.19, and [[http://gitorious.org/~marvin24/ac100/marvin24s-kernel/|Marc Dietrich]], the ac100 kernel maintainer, started to work on [[http://gitorious.org/~marvin24/ac100/marvin24s-kernel/commits/chromeos-ac100-3.2-exp|kernel 3.2.x series]] for AC100. | As of 2012/06/28, the most stable kernel is [[http://gitorious.org/~marvin24/ac100/marvin24s-kernel/commits/chromeos-ac100-3.0|3.0.19]]. This kernel is based on the original work made by [[http://git.chromium.org/gitweb/?p=chromiumos/third_party/kernel.git;a=summary|Google]]. Work has been started on a [[http://gitorious.org/ac100/marvin24s-kernel/trees/linux-tegra-nv-ac100-3.1-exp|3.1.10]] kernel for AC100, which is based on the work of [[http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=summary|NVIDIA]]. The next Ubuntu version 12.10 will be based upon this kernel. There also exists a very experimental version of a mainline kernel [[http://gitorious.org/~marvin24/ac100/marvin24s-kernel/commits/for-next|(for-next)]] with a minimal amount of patches. |
| |
The most hotspot in kernel development is NVEC driver (incomplete implementation and marginal stability issue), sound driver (noise annoyance, automatic switch between Speaker/Headphone (not implemented at all in ASoC but can be easily done with a userspace daemon)) and ''rt2800usb'' Wifi driver (some stability issues and high stress on specific memory pool (reduced by **echo 32000 > /proc/sys/vm/min_free_kbytes**)). | The most hotspot in kernel development is NVEC driver (incomplete implementation and marginal stability issue), sound driver (noise annoyance, automatic switch between Speaker/Headphone (not implemented at all in ASoC but can be easily done with a userspace daemon)) and ''rt2800usb'' Wifi driver (some stability issues and high stress on specific memory pool (reduced by **echo 32000 > /proc/sys/vm/min_free_kbytes**)). |
TODO | TODO |
| |
| To build the kernel native on the ac100, do the following: |
<code> | <code> |
git clone -b chromeos-ac100-3.0 git://gitorious.org/~marvin24/ac100/marvin24s-kernel.git | git clone -b chromeos-ac100-3.0 git://gitorious.org/~marvin24/ac100/marvin24s-kernel.git |
cd marvin24s-kernel | cd marvin24s-kernel |
| make paz00_defconfig |
| make zImage modules |
| make modules_install |
</code> | </code> |
| You will find the kernel in arch/arm/boot/zImage, which you can flash with abootimg (see above). |
| |
| Cross-Compiling: |
| If you don't have the time to wait for a build on the AC100 (~ 30 minutes), you can try with a cross-compiler on your favorit desktop machine. How to setup such an environment is out of scope of this article, but google is your friend. |
| |
| The procedure is similar to the native one: |
| <code> |
| git clone -b chromeos-ac100-3.0 git://gitorious.org/~marvin24/ac100/marvin24s-kernel.git |
| cd marvin24s-kernel |
| make paz00_defconfig ARCH=arm |
| make zImage modules INSTALL_MOD_PATH=/tmp INSTALL_MOD_STRIP=1 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- |
| make modules_install INSTALL_MOD_PATH=/tmp INSTALL_MOD_STRIP=1 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- |
| </code> |
| |
| The INSTALL_MOD_PATH and INSTALL_MOD_STRIP arguments are optional, but convenient. After this, you will find |
| the stripped modules under /tmp/lib/modules/<kernel-version>. |
| |
| Similar procedures can be used for the 3.1 and for-next kernels. |
| |
| Some note on the needed kernel command lines: |
| The 3.0 series uses a reserved video memory which is created by adding "mem=448M@0" to the kernel command line. |
| Later kernels can reserve this memory by themself, thus adding "mem=512M@0" is required here. |
| |
| The for-next series is very special (you may have guessed that already). First, everything is setup by device-tree info (if you don't know what a device-tree is, yes, google is your friend again). This means that beside the kernel and the modules, you also have to compile the device-tree, which is done by the "dtbs" make target. After that, the compiled device-tree (in arch/arm/boot/tegra20-paz00.dtb) must be concatenated to the kernel image. So something like |
| <code> |
| cat arch/arm/boot/tegra20-paz00.dtb >> arch/arm/boot/zImage |
| </code> |
| should be sufficient. Make sure you used paz00_defconfig, because this kernel seems to ignore the parameters submitted by the bootloader. |
| |
| |
| |
==== Kernel Debugging ==== | ==== Kernel Debugging ==== |
| |
TODO | TODO |
| |
| [[http://kernelnewbies.org/KernelHacking|Kernel Hacking]] |
| |
=== GDB and KGDB === | === GDB and KGDB === |
| |
[[http://sourceware.org/systemtap/wiki/SystemtapDtraceComparison|SystemTap vs. DTrace]] | [[http://sourceware.org/systemtap/wiki/SystemtapDtraceComparison|SystemTap vs. DTrace]] |
| |
| === ftrace === |
| |
| TODO |
| |
| [[http://lwn.net/Articles/365835/|Debugging the kernel using Ftrace - part 1]] |
| |
| [[http://lwn.net/Articles/366796/|Debugging the kernel using Ftrace - part 2]] |
| |
| http://elinux.org/Ftrace |
| |
| [[https://events.linuxfoundation.org/slides/2010/linuxcon_japan/linuxcon_jp2010_rostedt.pdf|Ftrace Linux Kernel Tracing]] by Steve Rostedt |
| |
| [[http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary|Home of trace-cmd and kernelshark]] |
===== Git-Fu ===== | ===== Git-Fu ===== |
TODO | TODO |