kerneldev
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| kerneldev [2012/06/28 19:12] – marvin24 | kerneldev [2014/06/21 18:57] (current) – [Mainline Git Kernel] santox | ||
|---|---|---|---|
| Line 90: | Line 90: | ||
| ===== 3.0.x Kernel series ===== | ===== 3.0.x Kernel series ===== | ||
| TODO | TODO | ||
| + | === From marvin24s git === | ||
| + | To build the kernel native on the ac100, do the following: | ||
| < | < | ||
| git clone -b chromeos-ac100-3.0 git:// | git clone -b chromeos-ac100-3.0 git:// | ||
| Line 96: | Line 97: | ||
| make paz00_defconfig | make paz00_defconfig | ||
| make zImage modules | make zImage modules | ||
| + | make modules_install | ||
| </ | </ | ||
| + | You will find the kernel in arch/ | ||
| + | |||
| + | 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: | ||
| + | < | ||
| + | git clone -b chromeos-ac100-3.0 git:// | ||
| + | cd marvin24s-kernel | ||
| + | make paz00_defconfig ARCH=arm | ||
| + | make zImage modules INSTALL_MOD_PATH=/ | ||
| + | make modules_install INSTALL_MOD_PATH=/ | ||
| + | </ | ||
| + | |||
| + | The INSTALL_MOD_PATH and INSTALL_MOD_STRIP arguments are optional, but convenient. After this, you will find | ||
| + | the stripped modules under / | ||
| + | |||
| + | 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 " | ||
| + | Later kernels can reserve this memory by themself, thus adding " | ||
| + | |||
| + | 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, | ||
| + | < | ||
| + | cat arch/ | ||
| + | </ | ||
| + | should be sufficient. Make sure you used paz00_defconfig, | ||
| + | |||
| + | === Stock Ubuntu 12.04 Kernel === | ||
| + | |||
| + | Step by step: Recompiling the Ubuntu stock kernel natively (for example to patch it) coming from a stock Ubuntu 12.04 install. | ||
| + | As of writing the kernel-version is **3.0.27** and will have to be replaced when another kernel comes out/is used. The created files will be copied to a safe place (/ | ||
| + | |||
| + | Become root for all steps | ||
| + | < | ||
| + | Install dependencies for the kernel and build it: | ||
| + | < | ||
| + | apt-get build-dep linux-ac100 | ||
| + | apt-get install build-essential lzop | ||
| + | cd /usr/src/ | ||
| + | apt-get source linux-ac100 | ||
| + | cd linux-ac100-3.0.27/ | ||
| + | </ | ||
| + | Now if you want the original Ubuntu config do | ||
| + | < | ||
| + | If you want the standrad ac100 config instead do: | ||
| + | < | ||
| + | Apply patches if wanted. In this example I use gordans overclocking patches from [[http:// | ||
| + | < | ||
| + | patch -p1 < tegra_1200.patch</ | ||
| + | (Note that one patch didn't apply cleanly, but the errors were pretty obvious and easy to fix manually.) | ||
| + | |||
| + | < | ||
| + | make -j3 INSTALL_MOD_STRIP=1 zImage modules | ||
| + | make -j3 modules_install | ||
| + | cp arm/ | ||
| + | cp .config / | ||
| + | </ | ||
| + | |||
| + | Get the bootimg.cfg | ||
| + | < | ||
| + | Adjust the bootimg.cfg to your needs. Most importantly giving it a cool greeting text of course! | ||
| + | |||
| + | Create the initrd | ||
| + | < | ||
| + | cp .config / | ||
| + | update-initramfs -k 3.0.27 -c | ||
| + | cp / | ||
| + | </ | ||
| + | |||
| + | Create the final image | ||
| + | < | ||
| + | abootimg --create part6_1200-3.0.27.img -f bootimg.cfg -k zImage1200-3.0.27 -r initrd1200-3.0.27.img</ | ||
| + | In my case (10K, Android 2.2) the boot partition is partition 6 as seen by nvflash and / | ||
| + | |||
| + | Double-check and create a backup of the boot partition: | ||
| + | < | ||
| + | Size of the original is 8388608 aka 8.0M. This backup wont help you if it's //on// your ac100, so: | ||
| + | Be sure to copy this image somewhere else. | ||
| + | |||
| + | Be sure to copy this image somewhere else. Really. | ||
| + | |||
| + | Flash the image | ||
| + | < | ||
| + | |||
| + | Reboot. | ||
| + | |||
| + | ===== 3.10.x Kernel series ===== | ||
| + | 3.10 build process is close to 3.0 for-next. | ||
| + | Device-tree is mandatory, you need to build it and concatenate with a kernel: | ||
| + | < | ||
| + | make dtbs | ||
| + | cat arch/ | ||
| + | </ | ||
| + | But 3.10 don't use paz00_defconfig anymore. Instead is uses tegra_defconfig (main idea of device-tree is to have all-in-one kernel and choose drivers on boot time using device-tree): | ||
| + | < | ||
| + | |||
| + | ===== Mainline Git Kernel ===== | ||
| + | From 3.15, AC100 finally boots the official mainline kernel ! | ||
| + | To succesfully cross-compile it, i used linaro precompiled toolchain [[http:// | ||
| + | |||
| + | wget http:// | ||
| + | |||
| + | extract it somewhere, and export install path so the toolchain can be found: | ||
| + | tar xvf gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux.tar.xz | ||
| + | export PATH=$PATH: | ||
| + | |||
| + | Now you have to clone the kernel git repository: | ||
| + | git clone git:// | ||
| + | cd linux | ||
| + | | ||
| + | As already described above, configure && make && install and your kernel is ready! | ||
| + | make tegra_defconfig ARCH=arm | ||
| + | make zImage modules dtbs INSTALL_MOD_PATH=/ | ||
| + | make modules_install INSTALL_MOD_PATH=/ | ||
| + | Copy everything you need in a folder (to copy on SD or USB key and put into AC100) | ||
| + | mkdir ~/ | ||
| + | mv /tmp/lib/ ~/ | ||
| + | cp arch/ | ||
| + | cp arch/ | ||
| + | |||
| ==== Kernel Debugging ==== | ==== Kernel Debugging ==== | ||
kerneldev.1340903563.txt.gz · Last modified: by marvin24
