• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Custom kernel with Debian install  (Read 3185 times)
Zortrium
Newbie
*

Karma: 0
Posts: 31


View Profile
« on: January 06, 2010, 08:11:28 AM »

I (roughly) followed the instructions at http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html to get Debian lenny running on my new plug completely off a USB hard drive without touching the NAND (I first upgraded uboot to .19).  Everything went pretty smoothly there and my plug could boot the included kernel off USB without any issues.  The next step was compiling my own kernel with a few extra things I wanted, which is where things got a lot more troublesome.  I set up my cross compiler and had no problem compiling an appropriate image of the mainline 2.6.32.2, resulting in the uImage and the appropriate modules.  I couldn't find any documentation that was clear on what to do from here, however, since I didn't have a uInitrd file to go with the new uImage as per the original Debian download.

Unsurprisingly, simply replacing the old uImage with my new one and leaving the old uInitrd and uboot args caused boot to fail -- it didn't panic and uboot didn't throw any errors, but the process just froze in the midst of trying to load the kernel.  I haven't found any clear documentation describing how to create the uInitrd, but I thought that uInitrd wasn't needed if everything needed to boot is compiled into the kernel, which was also stated in another thread on this forum.  I next tried modifying the uboot args to get rid of the uInitrd calls (starting from the values in the original docs):

setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x0800000 /uInitrd; ext2load usb 0:1 0x400000 /uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_usb; bootm 0x400000 0x0800000'

changed to

setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x800000 /uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_usb; bootm 0x0800000'

This successfully started to load the new 2.6.32.2 kernel, but resulted in a panic when trying to mount the root partition:

Waiting 10sec before mounting root device...
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "sda2" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0 (driver?)
1f01            4096 mtdblock1 (driver?)
1f02          519168 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs

So now I'm pretty much stuck, since I'm not sure how to make a matching uInitrd or deal with the kernel panic.  My boot partition is formatted as ext2 and my root partition is formatted as ext3.  Any pointers would be appreciated -- it seemed pretty weird to me that there don't seem to be any comprehensive docs on installing a custom kernel on top of the Debian system.
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #1 on: January 06, 2010, 08:26:30 AM »

Please post your u-boot environment as
Code:
Marvell>> printenv
The kernel error message indicate the root=/dev/sdXY was not there so it boot failed.
Logged

Good Luck Smiley

Zortrium
Newbie
*

Karma: 0
Posts: 31


View Profile
« Reply #2 on: January 06, 2010, 03:51:22 PM »

Please post your u-boot environment as
Code:
Marvell>> printenv
The kernel error message indicate the root=/dev/sdXY was not there so it boot failed.

Marvell>> version

U-Boot 1.1.4 (Jul 19 2009 - 16:03:28) Marvell version: 3.4.19
Marvell>> printenv
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.0.0
console=a0000
e=ttyS0,115200
CASset=min
MALLOC_len=1
ethprime=egiga0
ethmtu=1500
usb0Mode=host
nandEcc=1bit
ethact=egiga0
serverip=10.10.0.2
ipaddr=10.10.0.1
cesvcid=ULULULULULULPPULULULULULDA
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); boot;
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
run_diag=no
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=10.4.50.4:10.4.50.5:10.e
ethaddr=00:50:43:01:40:AA
arcNumber=2097
bootargs_nand=console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=10.4.50.4:10.4.50.e
bootcmd_nand=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootargs_console=console=ttyS0,115200
bootargs_root=root=/dev/sda2 rootdelay=10
bootcmd_usb=usb start; ext2load usb 0:1 0x0800000 /uImage
bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_usb; bootm 0x0800000; reset
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=a0000
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

Environment size: 1758/131068 bytes
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #3 on: January 06, 2010, 05:01:35 PM »

@Zortrium,

Looks like you did everything right. Now the other possiblilty cause your boot failure is in linux kernel. You must make sure you have
  • sd_mod
  • usb_storage
  • scsi_mod
  • ehci_hcd
  • usbcore
compiled in your kernel, not as modules since you do not use initrd/initramfs. If you believe you have all the modules build in then you can try to change your bootargs_root=/dev/sda2 rootwait this will make kernel wait indefinitely for the usb device to ready.

Good luck Smiley
Logged

Good Luck Smiley

Zortrium
Newbie
*

Karma: 0
Posts: 31


View Profile
« Reply #4 on: January 07, 2010, 04:52:32 AM »

@Zortrium,

Looks like you did everything right. Now the other possiblilty cause your boot failure is in linux kernel. You must make sure you have
  • sd_mod
  • usb_storage
  • scsi_mod
  • ehci_hcd
  • usbcore
compiled in your kernel, not as modules since you do not use initrd/initramfs. If you believe you have all the modules build in then you can try to change your bootargs_root=/dev/sda2 rootwait this will make kernel wait indefinitely for the usb device to ready.

Good luck Smiley
I rebuilt my kernel and made sure all modules were compiled directly in, then changed my rootdelay=10 to rootwait.  Not sure exactly what the previous issue was, but it worked on the first try and booted my new kernel just fine.  Thanks again pingtoo.
Logged

Pages: [1]
Print
Jump to: