Old Linux Kernel

Hi,

As per the instruction mentioned at http://elinux.org/BeagleBoard#Linux_kernel
to get the Linux kernel source code and to build uImgae
i.e.

git clone git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
linux-omap-2.6
cd linux-omap-2.6

ARCH=arm
PATH=~/oe/tmp/cross/armv7a/bin:~oe/tmp/staging/i686-linux/usr/bin:
$PATH # add cross tools to your path
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- distclean
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- omap3_beagle_defconfig
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig # only
needed if you want to change the default configuration
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

Following the above instructions results in the uImage with the latest
version no. i.e. 2.6.31-rc1-omap1-........ which hangs up while
starting kernel as shown below.

there was post not too long ago regarding this. I’m consolidating the info here again:

Got to: http://wiki.davincidsp.com/index.php/FAQ_for_DaVinci_Linux and follow the instruction to enable low level debugging. Install that uImage a boot. If you notice and panic and it’s in the usb code path, apply the patch I posted earlier:

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 3487520…b62435e 100644
— a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -271,7 +271,8 @@ int musb_platform_suspend(struct musb musb)
l |= ENABLEWAKEUP; /
enable wakeup */
omap_writel(l, OTG_SYSCONFIG);

  • otg_set_suspend(musb->xceiv, 1);
  • if (musb->xceiv)
  • otg_set_suspend(musb->xceiv, 1);

if (musb->set_clock)
musb->set_clock(musb->clock, 0);

recompile, install and enjoy!

–Krishna/.

Thanks for the advise,

I already tried the patch u posted in earlier post. But doing that
gives me some other
error message.

Just to confirm how to apply a patch as I am new with Linux.

I saved your patch as a txt file named "patch" and than used the
instruction

patch -p1 <.../path_to_patch_file/patch

Doing this gives me an error message as shown below

That seems alright. My change is single line change so why don’t you try to add it manually. (in case you are not familier, just remove the line with a leading ‘-’ in the patch and add the lines with the leading ‘+’ in the patch file.)

–Krishna/.

Thanks krishna for your suggestions.

I tried manually patching the omap2430.c as described in your reply
and compiled the new
kernel image.
Now booting beagleboard with this new image ..... it did went further
from the point where it used to hang but now it hangs somewhere in
between. The command line output is as shown below.
To check if this was the problem with kernel image, I replaced the
kernel image with the old pre-build image and it worked absolutely
fine.

The kernel is waiting for root to mount… check the wiki on how to setup mmc as the rootfs.

–Krishna/.

I think I got right set of boot commands... i am using following
command and it works fine with older prebuild uImages, but gives
problem with the one compiles by me.

OMAP3 beagleboard.org # setenv bootargs 'console=ttyS2,115200n8
console=tty0 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
omapfb.video_mode=1024x768MR-16@60'

OMAP3 beagleboard.org # setenv bootcmd 'mmcinit; fatload mmc 0
0x80300000 uImage; bootm 0x80300000'

OMAP3 beagleboard.org # saveenv

As per my knowledge these should be right commands, and there is some
other problem what do u think?

Thanks,
Amit

I’ve not had any luck getting either 2.6.30 or 2.6.31 to work - same issues as described below. I suppose now I’ll be waiting for 2.6.32 to see if its default beagle config actually boots :]

First think I would check is if you compiled ext3 in to your kernel.

I went with the ram disk for rootfs and don’t have any problems.

–Krishna/.

This happened on my beagle board with the latest version of omap3 tree.
It seems that mmc platform device is not created, and I am sure I have enabled
regulator, twl4030...

Any suggestions?

The only thing I can think of is that the mmc device driver isn’t enabled by default… I’ll do a diff between the .config in 2.6.29 and 2.6.30 to see what’s changed…

I can make sure mmc driver is enalbed, but the mmc platform device
does not exists.

there was post not too long ago regarding this. I'm consolidating the info
here again:

Got to: http://wiki.davincidsp.com/index.php/FAQ_for_DaVinci_Linux and
follow the instruction to enable low level debugging. Install that uImage a
boot. If you notice and panic and it's in the usb code path, apply the patch
I posted earlier:

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 3487520..b62435e 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -271,7 +271,8 @@ int musb_platform_suspend(struct musb *musb)
l |= ENABLEWAKEUP; /* enable wakeup */
omap_writel(l, OTG_SYSCONFIG);

- otg_set_suspend(musb->xceiv, 1);
+ if (musb->xceiv)
+ otg_set_suspend(musb->xceiv, 1);

It seems this patch just works when enabling "NOP USB Transceiver Driver" only.
Once I enable "TWL4030 USB Transceiver Driver", kernel will panic.

Is there a better solution?

Thanks.

can you paste the new panic here?

It is still same with before.

follow this wiki: http://wiki.davincidsp.com/index.php/FAQ_for_DaVinci_Linux the you’ll probably see a panic on the serial console.

–Krishna/.

I have enabled this:
          [*] Kernel low-level debugging functions
but still no more output.

Would you mind not giving a top reply?
Thanks.

If I pass uart as console, then output from console is:

OMAP3 beagleboard.org # setenv bootargs
'console=uart,io,0xd9020000,115200n8 root=/dev/mmcblk0p2 rw
rootdelay=5'

OMAP3 beagleboard.org # run bootcmd1
reading uImage_l

2050168 bytes read
## Booting kernel from Legacy Image at 80300000 ...
   Image Name: Linux-2.6.31-rc5
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 2050104 Bytes = 2 MB
   Load Address: 80008000
   Entry Point: 80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................................
.................................................... done, booting the kernel.
i
iii�

The two patches can fix the problem, and can make musb and mmc work correctly:

               http://marc.info/?l=linux-usb&m=124913041802639&w=2
               http://marc.info/?l=linux-embedded&m=124913099203244&w=2

Even with the above mentioned patches linux kernel 2.6.31-rc5 not
working

I got the latest linux kernel tree as per the instructions on
http://elinux.org/BeagleBoard#Linux_kernel

i.e. Download linux kernel tree

$$> git clone git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
linux-omap-2.6

Than I applied the above mentioned patches
i.e.
        http://marc.info/?l=linux-usb&m=124913041802639&w=2
        http://marc.info/?l=linux-embedded&m=124913099203244&w=2

Now kernel was compiled using following instrucitons

ARCH=arm
PATH=~/oe/tmp/cross/armv7a/bin:~/oe/tmp/staging/i686-linux/usr/bin:
$PATH
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- distclean
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- omap3_beagle_defconfig
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

This resulted in an uImage. Booting BB using this uImage doesnot work.
Output from the console is