Site Tools


kerneldev

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
kerneldev [2012/06/28 19:31] marvin24kerneldev [2014/06/21 18:39] – 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: To build the kernel native on the ac100, do the following:
 <code> <code>
Line 128: Line 128:
 should be sufficient. Make sure you used paz00_defconfig, because this kernel seems to ignore the parameters submitted by the bootloader. should be sufficient. Make sure you used paz00_defconfig, because this kernel seems to ignore the parameters submitted by the bootloader.
  
 +=== 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 (/home/turbo/Downloads/ in my case)
 +
 +Become root for all steps
 +<code>sudo su</code>
 +Install dependencies for the kernel and build it:
 +<code>
 +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/
 +</code>
 +Now if you want the original Ubuntu config do 
 +<code>cp /boot/config-$(uname -r) .config</code>
 +If you want the standrad ac100 config instead do:
 +<code>make paz00_defconfig</code>
 +Apply patches if wanted. In this example I use gordans overclocking patches from [[http://www.altechnative.net/2011/12/31/overclocking-the-toshiba-ac100/|his site]].
 +<code>patch -p1 < tegra_common.patch
 +patch -p1 < tegra_1200.patch</code>
 +(Note that one patch didn't apply cleanly, but the errors were pretty obvious and easy to fix manually.)
 +
 +<code>
 +make -j3 INSTALL_MOD_STRIP=1 zImage modules
 +make -j3 modules_install
 +cp arm/boot/zImage /home/turbo/Downloads/zImage1200-3.0.27
 +cp .config /boot/config-3.0.27
 +</code>
 +
 +Get the bootimg.cfg
 +<code>cd /boot/bootimg.cfg /home/turbo/Downloads/</code>
 +Adjust the bootimg.cfg to your needs. Most importantly giving it a cool greeting text of course!
 +
 +Create the initrd
 +<code>
 +cp .config /boot/config-3.0.27
 +update-initramfs -k 3.0.27 -c
 +cp /boot/initrd.img-3.0.27 /home/turbo/Downloads/initrd1200-3.0.27.img
 +</code>
 +
 +Create the final image
 +<code>cd /home/turbo/Downloads/
 +abootimg --create part6_1200-3.0.27.img -f bootimg.cfg -k zImage1200-3.0.27 -r initrd1200-3.0.27.img</code>
 +In my case (10K, Android 2.2) the boot partition is partition 6 as seen by nvflash and /dev/mmcblk0p4 as seen from Ubuntu. Make sure you flash to the right partition, this means: `cat /proc/partitions` has to show the partition as 8.0 MiB and `sudo abootimg -i /dev/mmcblk0p4` has to show "Android boot Image" in the first line.
 +
 +Double-check and create a backup of the boot partition:
 +<code>dd if=/dev/mmcblk0p4 of=/home/turbo/Downloads/part6-$(uname -r).img</code>
 +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
 +<code>dd if=/home/turbo/Downloads/part6_1200-3.0.27.img of=/dev/mmcblk0p4</code>
 +
 +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:
 +<code>
 +make dtbs
 +cat arch/arm/boot/tegra20-paz00.dtb >> arch/arm/boot/zImage
 +</code>
 +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):
 +<code>make tegra_defconfig</code>
  
 +===== Mainline Git Kernel =====
 +From 3.15, AC100 finally boots the official mainline kernel ! 
 ==== Kernel Debugging ==== ==== Kernel Debugging ====
  
kerneldev.txt · Last modified: 2014/06/21 18:57 by santox