New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Updating the kernel

Got problems with Bubba? Then this forum is for you.
Locked
unavowed
Posts: 4
Joined: 13 Oct 2007, 13:05

Updating the kernel

Post by unavowed »

I am a proud owner of a new Bubba server and in general I am satisfied with it apart from one thing: it's not clear how to upgrade the kernel. I noticed that on download.excito.net there are 3 kernels available, 2 of them newer than the 2.6.16.16 shipped by default, so there must be a way to do it. I want to be able to do it because some kernel features cannot be compiled as modules and I want to use them.

I did a little investigation:

Code: Select all

# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00010800 00000210 "bootloader"
mtd1: 0018c000 00000210 "kernel"
mtd2: 00073800 00000210 "filesystem"
mtd0 is the boot loader, which can bee seen by using cat /dev/mtd0 | strings
mtd2 seems to contain a gzipped ext2 initrd filesystem
mtd1, according to the description, is the kernel.

So, after compiling a new kernel with patches from download.excito.net, it would make sense if the kernel could be updated by writing the Image file to mtd1.

My questions, therefore, are:
1. Am I right that it can be done this way?
2. What happens if something bad is written to mtd1; can the system be recovered?

Thanks.
unavowed
Posts: 4
Joined: 13 Oct 2007, 13:05

Post by unavowed »

On further examination, it seems that to me the contents of mtd1 is actually the zImage file produced after compiling linux. The beginning of both looks very similar and the size is quite close too.
pa
Posts: 308
Joined: 06 Dec 2006, 04:38
Location: Sweden
Contact:

Post by pa »

Hi unavowed,

You are right about that the mtd1 partition contains the zImage, and it is possible to "just" write that file to mtd1.

However, you are correct about worringing about writing something bad to this partition. If the kernel is corrupt in any way it will be very hard for you to get it up and running again.
The processor supports boot from the debug serial port if there is nothing valid in the boot flash. The problem here is that there is, the bootloader. So in order to be able to restore the image you would have to open the Bubba, and somehow disable the bootflash. You would then have to do some soldering work to get the debug serial port up and running, see this thread: http://excito.org/forum/viewtopic.php?t=206
If there is not a valid image in the flash, the processor will boot using the built in Atmel bootloader, and can accept code using x-modem protocol. Please refer to Atmel homepage for documentation of this.

But in short, if you mess up the boot flash, you have a tough job restoring the system.

/PA
unavowed
Posts: 4
Joined: 13 Oct 2007, 13:05

Post by unavowed »

Thank you for the detailed reply :-)
Locked