Difference between revisions of "Panda How to kernel new"

From eLinux.org
Jump to: navigation, search
Line 1: Line 1:
----This page is not complete yet, and may take a few days to make sense--- km..2/2/2011
+
----This page is still a work in progress,--- km..2/10/2011
  
 +
There have been a few changes between -rc3 and -rc4 that may effect the pandaboard. More omap related changes are being pushed into mainline so this page will be updated every -rcx release to at least note any build or .config issues.
  
-Kernel building for kernel 2.6.38-rc3-
+
-Kernel building for kernel 2.6.38-rc3 and 2.6.38-rc4
  
 
Newer kernels require that you use a more recent MLO (x-loader) and u-boot than described in previous How-To's.
 
Newer kernels require that you use a more recent MLO (x-loader) and u-boot than described in previous How-To's.
Line 54: Line 55:
 
Now for the kernel:
 
Now for the kernel:
  
Either download http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.38-rc3.tar.bz2
+
Either download http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.38-rc3.tar.bz2 or http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.38-rc4.tar.bz2
  
 
or  
 
or  
  
 
  git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 
  git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 +
 +
-Warning- this will be a relly big download
  
 
cd to the appropriate root directory
 
cd to the appropriate root directory
Line 64: Line 67:
 
If you downloaded the .tar.bz2 file you can dkip this step.
 
If you downloaded the .tar.bz2 file you can dkip this step.
  
Using git or gitk make and check out a new branch at tag: v2.6.38-rc3.
+
Using git or gitk make and check out a new branch at tag: v2.6.38-rc3, or v2.6.38-rc4.
  
 
Next, select the panda config:
 
Next, select the panda config:
Line 86: Line 89:
  
 
Or, just use this config [[Media:config.2.6.38-rc3|config.2.6.38-rc3]] as it has only the changes needed for the pandaboard's usb networking and EHCI.
 
Or, just use this config [[Media:config.2.6.38-rc3|config.2.6.38-rc3]] as it has only the changes needed for the pandaboard's usb networking and EHCI.
 +
 +
-Note- this config works for 2.6.38-rc4 as well.
  
  

Revision as of 17:07, 10 February 2011


This page is still a work in progress,--- km..2/10/2011

There have been a few changes between -rc3 and -rc4 that may effect the pandaboard. More omap related changes are being pushed into mainline so this page will be updated every -rcx release to at least note any build or .config issues.

-Kernel building for kernel 2.6.38-rc3 and 2.6.38-rc4

Newer kernels require that you use a more recent MLO (x-loader) and u-boot than described in previous How-To's.

You can build these from source, or try to find binaries. One issue with the binary route is that you might want to alter the kernel command line embedded inside u-boot. Such as for experimenting with different partition formats, or different filesystem types (ext3 vs ext2), etc. Of course you could stop the autoboot and type it in yourself, but we will build from source.

For this How-to, we will use the Code Sourcery G++ version arm-2009q3. It should already be installed on your system. Kernels have also been successfully built with arm-2010q1.


First, let's get the x-loader source code and build it.

git clone git://gitorious.org/x-loader/x-loader.git

cd to the x-loader directory

Then using git or gitk make and check out a new branch at the commit "6f3a261 omap1: remove support for 1710 and 1510"

Next, select the panda config:

make CROSS_COMPILE=Path_to_your/arm-2009q3/bin/arm-none-linux-gnueabi- omap4430panda_config

Now compile MLO:

make CROSS_COMPILE=Path_to_your/arm-2009q3/bin/arm-none-linux-gnueabi- ift

This should produce the MLO file in the x-loader directory.


Now for U-boot:

git clone git://git.denx.de/u-boot.git

cd to the u-boot directory

Then using git or gitk make and check out a new branch at tag: v2010.12

Next, select the panda config:

make CROSS_COMPILE=Path_to_your/arm-2009q3/bin/arm-none-linux-gnueabi- omap4_panda_config

Change ttyS2 to ttyO2 in the u-boot kernel command line in: u-boot/include/configs/omap4_panda.h

Now compile U-boot:

make USE_PRIVATE_LIBGG=yes CROSS_COMPILE=Path_to_your/arm-2009q3/bin/arm-none-linux-gnueabi-

This should produce u-boot.bin in the u-boot directory


Now for the kernel:

Either download http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.38-rc3.tar.bz2 or http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.38-rc4.tar.bz2

or

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

-Warning- this will be a relly big download

cd to the appropriate root directory

If you downloaded the .tar.bz2 file you can dkip this step.

Using git or gitk make and check out a new branch at tag: v2.6.38-rc3, or v2.6.38-rc4.

Next, select the panda config:

make ARCH=arm omap2plus_defconfig

Now compile the kernel:

make -j10 V=99 ARCH=arm CROSS_COMPILE=Path_to_your/arm-2009q3/bin/arm-none-linux-gnueabi- uImage


In these newer kernels the ttyOx serial ports are given dynamic major minor node numbers, it is important to have your rootfs use udev or mdev to figure out which ones they are.

Put the MLO, uboot.bin and uImage on your vfat partion of your SD card, insert into your trusty pandaboard and power it up. Depending on your rootfs and whether your udev/mdev is setup and working, the kernel should boot. udev/mdev problems will occur when init tries to run inittab.

Once you have the kernel booting, go back and

 make ARCH=arm menuconfig

and turn on the usb networking, EHCI and whatever else you might want to play with, then rebuild the kernel.

Or, just use this config config.2.6.38-rc3 as it has only the changes needed for the pandaboard's usb networking and EHCI.

-Note- this config works for 2.6.38-rc4 as well.


USB and ethernet work, but hdmi video does not as of 2/2/2011.

Here is what should come out the serial port during bootup (followed up by my testing of the ethernet): http://paste.ubuntu.com/561130/

Of course that is my rootfs, which was built here: http://elinux.org/Panda_How_to_buildroot

With the sysinit part of inittab looking like this:

# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -o remount,rw /
::sysinit:/bin/mount -t tmpfs -o size=64k,mode=0755 tmpfs /dev
::sysinit:/bin/mkdir /dev/pts
::sysinit:/bin/mount -t devpts devpts /dev/pts
::sysinit:/bin/mknod -m 660 /dev/console c 5 1
::sysinit:/bin/mknod -m 660 /dev/null c 1 3
::sysinit:/bin/mount -t sysfs sysfs /sys
null::sysinit:/bin/echo /sbin/mdev > /proc/sys/kernel/hotplug
null::sysinit:/sbin/mdev -s
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS