bzhou
Global Moderator
Newbie
   
Karma: 0
Posts: 43
|
 |
« on: April 16, 2009, 06:56:37 PM » |
|
Is now available at http://ipkg.nslu2-linux.org/feeds/optware/sheevaplug/cross/unstable/Setup optware/cs08q1armel feed to install module-init-tools http://www.nslu2-linux.org/wiki/Optware/HomePageThen added the above kernel feed to your /opt/etc/ipkg/kernel.conf To get the uImage, you can either extract it from data.tar.gz in the ipk (actually a tar.gz) http://ipkg.nslu2-linux.org/feeds/optware/sheevaplug/cross/unstable/kernel-image_2.6.30-rc2-1_arm.ipkor setup the feed, "ipkg update; ipkg install kernel-image". Make sure to "set mainlineLinux yes; set arcNumber 2097" in u-boot since this is mainline linux kernel. After you booted using this uImage, you can install and load kernel modules. When you "ipkg install kernel-module-xyz", remember to run "/opt/sbin/depmod -a" afterwards, then you should be able to "/opt/sbin/modprobe xyz". Cheers, -Brian bzhou at nslu2 dash linux dot org [Edit] now updated to 2.6.30
|
|
|
|
« Last Edit: June 11, 2009, 08:11:41 AM by bzhou »
|
Logged
|
|
|
|
|
lyzby
Newbie
Karma: 0
Posts: 48
|
 |
« Reply #1 on: April 16, 2009, 08:35:13 PM » |
|
Brian,
Very nice indeed to add all the optware packages and expecially the kernel modules to SheevaPlug.
>To get the uImage, you can either extract it from data.tar.gz in the ipk (actually a tar.gz)
How exactly do you get the uImage out? I downloaded the ipk to a linux box and tried “tar x” on it, but got nothing for a long time and hit ctrl+C to exit. Please pardon my newbieness.
>Make sure to "set mainlineLinux yes; set arcNumber 2097" in u-boot since this is mainline linux kernel.
Again pardon my ignorance. I'm looking at the “Writing jaunty Filesystem” pdf. It's a bit daunting. I have a Marvell>> prompt, and have done “printenv”. What do I do to tftp the image? Does it have to do with setting mtdparts, bootargs, and bootcmd in addition to the environment variables you mention?
Lance
|
|
|
|
|
Logged
|
|
|
|
|
bzhou
Global Moderator
Newbie
   
Karma: 0
Posts: 43
|
 |
« Reply #2 on: April 16, 2009, 08:47:23 PM » |
|
$ mkdir tmp $ cd tmp $ wget http://ipkg.nslu2-linux.org/feeds/optware/sheevaplug/cross/unstable/kernel-image_2.6.30-rc2-1_arm.ipk $ tar -xzvf kernel-image_2.6.30-rc2-1_arm.ipk ./debian-binary ./data.tar.gz ./control.tar.gz $ tar -xzvf data.tar.gz ./ ./boot/ ./boot/uImage-2.6.30-rc2-optware-build-1 $ file boot/uImage-2.6.30-rc2-optware-build-1 boot/uImage-2.6.30-rc2-optware-build-1: u-boot/PPCBoot image
There're various ways to boot a kernel, tftp/nfs, flash it into nand and boot from /dev/mtd1, or putting it on external USB partition. You'll need to adjust u-boot bootcmd accordingly. I suggest you read the docs and get familiar with that. In the most simple case, where you already boot from /dev/mtd1, you just need to flash, no need to change other u-boot env besides the mainlineLinux and arcNumber. You can use the existing ubuntu rootfs with newer kernel.
|
|
|
|
« Last Edit: April 16, 2009, 09:17:56 PM by bzhou »
|
Logged
|
|
|
|
|
kilowatt
Global Moderator
Full Member
   
Karma: 3
Posts: 106
|
 |
« Reply #3 on: April 16, 2009, 09:20:12 PM » |
|
Then added the above kernel feed to your /opt/etc/ipkg/kernel.conf I seem to be having trouble with this step. This file doesn't exist after the previous steps. I'm not sure the correct format.
|
|
|
|
|
Logged
|
|
|
|
|
bzhou
Global Moderator
Newbie
   
Karma: 0
Posts: 43
|
 |
« Reply #4 on: April 16, 2009, 10:02:41 PM » |
|
I seem to be having trouble with this step. This file doesn't exist after the previous steps. I'm not sure the correct format.
Create the file if it's not there. You can do echo "src kernel http://ipkg.nslu2-linux.org/feeds/optware/sheevaplug/cross/unstable" > /opt/etc/ipkg/kernel.conf
|
|
|
|
|
Logged
|
|
|
|
|
kilowatt
Global Moderator
Full Member
   
Karma: 3
Posts: 106
|
 |
« Reply #5 on: April 17, 2009, 07:11:43 AM » |
|
Brian, I got the kernel installed and booting. I'm trying to install modules. After following the instructions you gave I don't have a /ipkg/sbin/ directory to run depmod from. If I run /sbin/depmod -a I get : root@debian:~# /sbin/depmod -a WARNING: Couldn't open directory /lib/modules/2.6.30-rc2: No such file or directory FATAL: Could not open /lib/modules/2.6.30-rc2/modules.dep.temp for writing: No such file or directory
There is no /lib/modules/2.6.30-rc2 directory but there is a /opt/lib/modules/2.6.30-rc2/ directory. I must be missing a step but I have reviewed them a couple times now. Here is what I did: Setup optware/cs08q1armel feed to install module-init-tools http://www.nslu2-linux.org/wiki/Optware/HomePageThen added the above kernel feed to your /opt/etc/ipkg/kernel.conf echo "src kernel http://ipkg.nslu2-linux.org/feeds/optware/sheevaplug/cross/unstable" > /opt/etc/ipkg/kernel.conf ipkg update; ipkg install kernel-image Rebooted and setup uboot to use the new kernel ipkg install kernel-module-nfsd /opt/sbin/depmod -a -bash: /opt//sbin/depmod: No such file or directory /sbin/depmod -a WARNING: Couldn't open directory /lib/modules/2.6.30-rc2: No such file or directory FATAL: Could not open /lib/modules/2.6.30-rc2/modules.dep.temp for writing: No such file or directory My system is based on the ubuntu-9.0.5.Release.jffs2 file system and I was hoping it would work just to install your kernel and modules verses building my own.
|
|
|
|
« Last Edit: April 17, 2009, 07:13:54 AM by kilowatt »
|
Logged
|
|
|
|
|
bzhou
Global Moderator
Newbie
   
Karma: 0
Posts: 43
|
 |
« Reply #6 on: April 17, 2009, 07:36:13 AM » |
|
"ipkg install module-init-tools" so you get /opt/sbin/depmod and /opt/sbin/modprobe. If you want to use /sbin/depmod and /sbin/modprobe, there might be parameters to use /opt/lib/modules/.. as top modules directory. It may sounds strange why install everything under /opt, actually this is to avoid conflict with your existing main firmware/rootfs.
|
|
|
|
« Last Edit: April 17, 2009, 07:44:46 AM by bzhou »
|
Logged
|
|
|
|
|
kilowatt
Global Moderator
Full Member
   
Karma: 3
Posts: 106
|
 |
« Reply #7 on: April 17, 2009, 08:37:12 AM » |
|
Thanks Brian, I see what I missed in you instructions now  . I don't know how many times I read that and missed it. Sorry. One last question... When I shutdown I'm getting these messages... /proc/misc: No entry for device-mapper found Is device-mapper driver missing from kernel? Failure to communicate with kernel device-mapper driver. /proc/misc: No entry for device-mapper found Is device-mapper driver missing from kernel? Failure to communicate with kernel device-mapper driver. Incompatible libdevmapper 1.02.27 (2008-06-25)(compat) and kernel driver Command failed /proc/misc: No entry for device-mapper found Is device-mapper driver missing from kernel? Failure to communicate with kernel device-mapper driver. /proc/misc: No entry for device-mapper found Is device-mapper driver missing from kernel? Failure to communicate with kernel device-mapper driver. Incompatible libdevmapper 1.02.27 (2008-06-25)(compat) and kernel driver Command failed * Will now halt halt: Unable to System halted. iterate IDE devices: No such file or directory
It looks like my libdevmapper is the wrong version. Any idea what I need to do to fix this. root@debian:~# aptitude update root@debian:~# aptitude search libdevmapper v libdevmapper - p libdevmapper-dev - The Linux Kernel Device Mapper header file p libdevmapper-event1.02.1 - The Linux Kernel Device Mapper userspace l i libdevmapper1.02.1 - The Linux Kernel Device Mapper userspace l
|
|
|
|
|
Logged
|
|
|
|
|
bzhou
Global Moderator
Newbie
   
Karma: 0
Posts: 43
|
 |
« Reply #8 on: April 17, 2009, 10:19:44 AM » |
|
I missed dm-mod in the previous kernel .config, so device-mapper was missing from the kernel. Now just added those and bumped IPK_VERSION to 2. "/opt/bin/ipkg update" and you should have dm-mod available. You don't have to reflash uImage. Just try "/opt/bin/depmod -a; /opt/bin/modprobe dm-mod" and see if it helps (I'm not near a plug to test) On the other hand, device-mapper is needed for RAID, LVM and encrypted file system, so it's probably ok to ignore the errors if you're not using these features.
|
|
|
|
|
Logged
|
|
|
|
|
kilowatt
Global Moderator
Full Member
   
Karma: 3
Posts: 106
|
 |
« Reply #9 on: April 17, 2009, 12:52:22 PM » |
|
ok I tried that and had a new problem while booting. I went back and reinstalled everything and I'm still now getting: * Starting portmap daemon... [ OK ] * Starting NFS common utilities FATAL: Could not load /lib/modules/2.6.30-rc2/modules.dep: No such file or directory FATAL: Could not load /lib/modules/2.6.30-rc2/modules.dep: No such file or directory FATAL: Could not load /lib/modules/2.6.30-rc2/modules.dep: No such file or directory [ OK ]
Seems like it is not looking in the /opt/lib/modules directory.
|
|
|
|
|
Logged
|
|
|
|
|
bzhou
Global Moderator
Newbie
   
Karma: 0
Posts: 43
|
 |
« Reply #10 on: April 17, 2009, 01:47:04 PM » |
|
If you read /etc/init.d/nfs-*, these scripts are using /sbin/modprobe and expect modules to be at /lib/modules/`uname -r`. This of course does not match the one installed by optware. One hackish thing you can try before ubuntu supplies compatible kernel and kernel modules, is to backup /sbin/modprobe and /lib/modules, then "ln -s /opt/sbin/modprobe /sbin/modprobe; ln -s /opt/lib/modules /lib/modules".
|
|
|
|
|
Logged
|
|
|
|
|
kilowatt
Global Moderator
Full Member
   
Karma: 3
Posts: 106
|
 |
« Reply #11 on: April 17, 2009, 02:03:23 PM » |
|
Thanks, I ended up just doing : ln -s /opt/lib/modules/2.6.30-rc2 /lib/modules/2.6.30-rc2
Which seems to make it happy and might still allow me to try out non optware kernels with modules. Let me know if you think I'll run into problems. the only error I still get with your kernel that I didn't get before is: * Will now halt halt: Unable to System halted. iterate IDE devices: No such file or directory
When I do 'shutdown -h now'
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #12 on: April 19, 2009, 12:19:33 AM » |
|
I already had the system booting from the Ubuntu distro from nand, and attempted to reflash the uImage by setting up the optware feed, and ipkg installing the kernel. However, when I did this, the kernel-image_2.6.30-rc2-1_arm.ipk no longer existed, but was replaced with the newer kernel-image_2.6.30-rc2-2_arm.ipk I'm guessing that this was the cause for the problem that developed: After rebooting, and setting the two new parameters in uboot, my device no longer boots. I get: Starting kernel ... Uncompressing Linux ................................................................ .............................................................................. done, boot ing the kernel.
At this point, the device freezes and give no more output to the serial terminal. Any suggestion?
|
|
|
|
|
Logged
|
|
|
|
|
bzhou
Global Moderator
Newbie
   
Karma: 0
Posts: 43
|
 |
« Reply #13 on: April 19, 2009, 07:36:56 AM » |
|
I already had the system booting from the Ubuntu distro from nand, and attempted to reflash the uImage by setting up the optware feed, and ipkg installing the kernel. However, when I did this, the kernel-image_2.6.30-rc2-1_arm.ipk no longer existed, but was replaced with the newer kernel-image_2.6.30-rc2-2_arm.ipk I'm guessing that this was the cause for the problem that developed: After rebooting, and setting the two new parameters in uboot, my device no longer boots. I get: Starting kernel ... Uncompressing Linux ................................................................ .............................................................................. done, boot ing the kernel.
At this point, the device freezes and give no more output to the serial terminal. Any suggestion? Did you saveenv in u-boot? Interrupt the boot and see if these two env variables are set correctly.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #14 on: April 19, 2009, 09:54:12 AM » |
|
yep, both are set
|
|
|
|
|
Logged
|
|
|
|
|
|