• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: Correct way to install new Kernel?  (Read 7992 times)
Doose
Newbie
*

Karma: 0
Posts: 5


View Profile
« on: December 03, 2009, 12:16:23 AM »

I have been trying to get a custom kernel going on the nand, with no success.

First I tried re-compiling sheeva-with-linux 2.6.31.6, but was unable to even get "make" going.

I put the orion v2.6.31.1 source on a usb drive (not enough space on nand), ran through make uImage, make modules, make modules_install
with-out any errors.
Copied uImage into /boot.
And on restart it just loaded into the previous installed 2.6.31.6.

Created modules.tar.gz with the correct structure, to use with installer-1.0,
It flashed ok, but did not boot.
Looked at creating rootfs.tar.gz, but i cant figure out which files are needed.

Is there a way that I can compile orion v2.6.31.1, from a usb drive, onto the nand?
Or am I going about this the wrong way?
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 440


View Profile WWW
« Reply #1 on: December 03, 2009, 03:15:29 PM »

Looked at creating rootfs.tar.gz, but i cant figure out which files are needed.
Changing the kernel doesn't require any change to rootfs - that's just the OS files.
And if you changed uImage without adding the related /lib/modules files it wouldn't have booted (or wouldn't have booted very well - assuming you are using some run-time modules).

Personally I run off an SD card, which has /boot, / and /local (rest of drive - for me) on it.
To update a kernel I unpack the modules tar file (from cbxbiker61's build), copy the sheeva*uImage file into boot (under its full name) and then hard-link that as uImage.  Then I reboot.  New kernel is up 20s later.
Logged

snake
Newbie
*

Karma: 3
Posts: 37



View Profile
« Reply #2 on: December 03, 2009, 05:55:51 PM »

Is there a way that I can compile orion v2.6.31.1, from a usb drive, onto the nand?
Or am I going about this the wrong way?

Hello Doose,

Why not try writing your compiled uImage directly into the NAND partition of the sheevaplug? If you already have your compiled uImage, put it in your USB thumbdrive then do a nandwrite.

See below:


root@ubuntu:/mnt# ls
uImage
root@ubuntu:/mnt# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00400000 00020000 "uImage"
mtd1: 1fb00000 00020000 "rootfs"
root@ubuntu:/mnt# flash_eraseall /dev/mtd0
Erasing 128 Kibyte @ 3e0000 -- 96 % complete.
root@ubuntu:/mnt# nandwrite -p /dev/mtd0 uImage
Writing data to block 0
Writing data to block 20000
Writing data to block 40000
Writing data to block 60000
Writing data to block 80000
Writing data to block a0000
Writing data to block c0000
Writing data to block e0000
Writing data to block 100000
Writing data to block 120000
Writing data to block 140000
Writing data to block 160000
Writing data to block 180000
Writing data to block 1a0000
Writing data to block 1c0000                                                   
Writing data to block 1e0000                                                   
Writing data to block 200000                                                   
Writing data to block 220000                                                   
Writing data to block 240000                                                   
Writing data to block 260000                                                   
Writing data to block 280000                                                   
root@ubuntu:/mnt#


Just ensure that you are modifying the nand partition for the kernel. After that perform a reboot.

Hope this helps.  Smiley

Logged

Doose
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #3 on: December 04, 2009, 02:20:06 AM »

Thank-you Snake!

I wrote the compiled uImage onto the NAND partition, restarted.
It worked straight away.  Smiley

Havn't had a single problem since.
After everything I had tried, didn't expect it to be as easy as that.

Thanks again.
Logged

hungarianhc
Jr. Member
**

Karma: 2
Posts: 85


View Profile
« Reply #4 on: December 14, 2009, 11:35:31 PM »

Snake, I'm very appreciative of that post. I had no idea how to upgrade my kernel, but it literally took me 20 seconds, and I was off! Thanks!
Logged

snake
Newbie
*

Karma: 3
Posts: 37



View Profile
« Reply #5 on: December 16, 2009, 03:10:05 AM »

Snake, I'm very appreciative of that post. I had no idea how to upgrade my kernel, but it literally took me 20 seconds, and I was off! Thanks!

Welcome!

Believe me, this forum (as a whole) really helped me a lot... It is beneficial that the other developers are actively participating in thread posts.

Moreover, you could also browse other stuff from this forum which portrays the current issues that surround the sheevaplug. Very helpful indeed.  Grin
Logged

tiptronic
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #6 on: December 20, 2009, 01:03:36 PM »

I am booting of a SD card (Ubuntu 9.0.4). Since I want to use ftdi device I had to upgrade my kernel. I followed your description (and the ones from crazyhawt) closely, but get a strange error. Here are the steps - maybe you have an idea?

root@debian:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00200000 00020000 "uImage"
mtd2: 1fd00000 00020000 "root"

root@debian:/# flash_eraseall /dev/mtd1
Erasing 128 Kibyte @ 1e0000 -- 93 % complete.
root@debian:/# nandwrite -p /dev/mtd1 uImage
Image 2861324 bytes, NAND page 2048 bytes, OOB area 2048 bytes, device size 2097152 bytes
Input file does not fit into device: Success
Data was only partially written due to error
: Success

I didn't try to reboot, since I don't want to brick the plug.
Any info/solution appreciated...

andy


Logged

tiptronic
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #7 on: December 20, 2009, 01:25:07 PM »

root@debian:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00200000 00020000 "uImage"
mtd2: 1fd00000 00020000 "root"

Update: it seems the new uImage is slightly bigger than the old... so my next question is: How can I resize the mtd1 (in the middle) without harming the others....

thx

andy
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #8 on: December 20, 2009, 01:26:53 PM »

mtd1 is too small to contain your kernel. You need to either compile a smaller kernel (leave out stuff you don't need) or you need to reconfigure mtds. Which will mos likely mean that you need to reinstall the complete plug as directly after your kernel flash area, starts the root partition.
Logged

tiptronic
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #9 on: December 20, 2009, 01:31:00 PM »

mtd1 is too small to contain your kernel. You need to either compile a smaller kernel (leave out stuff you don't need) or you need to reconfigure mtds. Which will mos likely mean that you need to reinstall the complete plug as directly after your kernel flash area, starts the root partition.

Thx for the (bad) info ;-)

Do you know which is the smallest kernel that supports ftdi? (Im currently on my home Mac and can't compile a new kernel).

a.
Logged

UnaClocker
Full Member
***

Karma: 0
Posts: 131



View Profile WWW
« Reply #10 on: January 02, 2010, 01:54:13 AM »

So if I've installed Debian Lenny to an SD card, I can't just put the new kernel on the SD card and boot from it? Am I stuck flashing the new kernel into the onboard NAND?
Logged

SheevaPlug - 8gb class 4 SDHC primary drive, 4tb 3.5" media drive, Debian Wheezy, nginx, Samba, Shorewall

tbm
Full Member
***

Karma: 7
Posts: 121



View Profile WWW
« Reply #11 on: January 02, 2010, 06:40:46 AM »

So if I've installed Debian Lenny to an SD card, I can't just put the new kernel on the SD card and boot from it? Am I stuck flashing the new kernel into the onboard NAND?

If you followed my instructions to install Debian the kernel is on the SD card.
Logged

UnaClocker
Full Member
***

Karma: 0
Posts: 131



View Profile WWW
« Reply #12 on: January 02, 2010, 11:25:07 AM »

http://www.openplug.org/plugwiki/index.php/Debian   I followed those instructions to a T (except replaced SDA1 with mmcblk0p1), not sure if those are your instructions or not, but they seemed to be the most straightforward.  /boot on my SD card is empty.. It looks like, from the bootargs at the end of that guide, that I'm referencing using something in NAND.. So I guess I am using the kernel in the NAND.. Is it straightforward to change that to using the SD card? Seems like I could test that pretty easily with no risk of bricking the thing..
Logged

SheevaPlug - 8gb class 4 SDHC primary drive, 4tb 3.5" media drive, Debian Wheezy, nginx, Samba, Shorewall

tbm
Full Member
***

Karma: 7
Posts: 121



View Profile WWW
« Reply #13 on: January 02, 2010, 01:40:52 PM »

Yeah, those instructions appear to use the original kernel stored in flash.
Logged

UnaClocker
Full Member
***

Karma: 0
Posts: 131



View Profile WWW
« Reply #14 on: January 02, 2010, 02:26:25 PM »

Drat.. You should edit the wiki.. Wink hehe.. Where are your instructions at? I'll compare them and see if I can figure out how to change this myself. Smiley
Logged

SheevaPlug - 8gb class 4 SDHC primary drive, 4tb 3.5" media drive, Debian Wheezy, nginx, Samba, Shorewall

Pages: [1] 2
Print
Jump to: