• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: Trying to install 2.6.30-rc2  (Read 11367 times)
jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« on: April 27, 2009, 07:18:44 AM »

I'm trying to install the 2.6.30-rc2 uImage (http://openplug.org/plugforum/index.php?topic=145.0) and need to resize my 2M uImage mtd partition to 4M.

I have been unsuccessful in resizing the partition. I have tried to resize and boot into my nfs server with the following u-boot settings:

#----- SheevaPlug U-Boot settings for NFS booting -----
# Boot the plug and interrupt auto-boot sequence
#Marvell>>
set ipaddr '192.168.1.103'
set serverip '192.168.1.91'
set rootpath '/home/rootfsv1.0'
set image_name 'uImage.sheeva.040309'
set bootargs_root 'root=/dev/nfs rw'
set bootargs_end ':::DB88FXX81:eth0:none'
set mtd0 '0x100000@0x000000(u-boot)ro'
set mtd1 '0x400000@0x100000(uImage)ro'
set mtd2 '0x1fb00000@0x500000(rootfs)rw'
set console 'console=ttyS0,115200 mtdparts=nand_flash:$(mtd0),$(mtd1),$(mtd2)'
set bootcmd 'tftpboot 0x2000000 $(image_name);setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000'
saveenv
reset


But after the reboot into my nfs server my uImage partition is still 2M

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


Any idea what I am doing wrong?
~Joe Donth


To save having to ask another question after I can solve this:
Are the following u-boot setting correct to boot back into flash when I'm done installing the 2.6.30 uImage?

setenv bootargs 'console=ttyS0,115200 mtdparts=nand_flash:0x400000@0x100000(uImage)ro,0x1fb00000@0x500000(rootfs)ro root=/dev/mtdblock2'
setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
saveenv
reset

Logged

...I've always depended on the kindness of strangers

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #1 on: April 27, 2009, 08:33:59 AM »

The partitioning is passed to the kernel via the bootargs.  I wrote the following explanation for another thread.

Quote
The problem you are having is the MTD1 partition is 2MB and your image is slightly larger than that.  You don't need to go all the way up to 5MB partition.  You should be able to just go up to 3MB.  I'm using 4MB since that is what almost all the documentation refers to.

In the mtdparts definition the first number is size and the second number is the starting location. So 0x00100000@0x00000000 is 1MB starting at 0.  The second partition should start at the end of the first one so 0x00300000@0x00100000 would give you 3MB or 0x00400000@0x00100000 would give you 4MB.  the third partition should start at the end of the second partition 0x00400000 if you have a 1Mb first partition plus a 3MB second partition or 0x00500000 of 1MB plus 4MB.  The size of the third partition should be 0x20000000 (512MB) minus the size of the first and second partition.  So 0x1fc00000 if the second partition is 3MB or 0x1fb00000 if the second partition is 4MB.

I use:

mtdparts=nand_mtd:0x00100000@0x00000000(uBoot)ro,0x00400000@0x00100000(uImage),0x1fb00000@0x00500000(rootfs)

Which gives me a 4 MB partition for the uImage.

Mark

When you boot with the new kernel you need to use orion_nand instead of nand_flash.

Make sure you boot up the kernel using the correct mtdparts before you write the new kernel and file system to the flash.  You really need to be running the files system from someplace other than the nand flash (nfs, sdcard, usb) before you write it to the new location that your new partitioning will specify.

Once you have decided on the partitioning you want you must always pass the same parameters to the kernel.  If you don't pass the partitioning via the bootargs, the kernel assumes a default value.  The nand flash doesn't really have a partition table.

You can display the partitions the kernel understands with:

cat /proc/mtd

Mark
« Last Edit: April 27, 2009, 08:37:19 AM by kilowatt » Logged

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« Reply #2 on: April 27, 2009, 08:39:55 AM »

"mtdparts=nand_mtd ..." is correct for a 2.6.22.x kernel.
"mtdparts=orion_nand ..." is correct for a 2.6.30 kernel.

So If you are booting the 2.6.30 kernel over tftp, you need to change that.  I noticed that if you boot with an incorrect mtdparts for the 2.6.30 kernel, the 2.6.30 kernel seems to figure out the "old" partitions.  Which sounds like what you're seeing.

You definately need to use "orion_nand" once you're ready to boot the 2.6.30 kernel from nand.
Logged

jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« Reply #3 on: April 27, 2009, 10:09:14 AM »

Sorry, I didn't make myself clear.

I'm booting from nfs with the original uImage (2.6.22) and wanted to flash the 2.6.30 image to the nand from there (and the jffs2 to mtd2 at the same time).

However, I can not get a 2.6.22 uImage partition to size to 4M so that I can do the flash_earaseall/nandwrite of the 2.6.30 image.

Am I trying to do this the wrong way?
Logged

...I've always depended on the kindness of strangers

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #4 on: April 27, 2009, 10:20:00 AM »

Did you set the bootargs to pass your desired partition info to uImage (2.6.22) when you booted from nfs?
Logged

jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« Reply #5 on: April 27, 2009, 10:28:35 AM »

Did you set the bootargs to pass your desired partition info to uImage (2.6.22) when you booted from nfs?

Here is my bootargs:

set ipaddr '192.168.1.103'
set serverip '192.168.1.91'
set rootpath '/home/rootfsv1.0'
set image_name 'uImage.sheeva.040309'
set bootargs_root 'root=/dev/nfs rw'
set bootargs_end ':::DB88FXX81:eth0:none'
set mtd0 '0x100000@0x000000(u-boot)ro'
set mtd1 '0x400000@0x100000(uImage)ro'
set mtd2 '0x1fb00000@0x500000(rootfs)rw'
set console 'console=ttyS0,115200 mtdparts=nand_flash:$(mtd0),$(mtd1),$(mtd2)'
set bootcmd 'tftpboot 0x2000000 $(image_name);setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000'
saveenv
reset


See anything wrong?
Logged

...I've always depended on the kindness of strangers

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #6 on: April 27, 2009, 10:32:35 AM »

nand_flash needs to be nand_mtd

Your setting the uImage partition to read only which will make it hard to write you kernel.
Logged

jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« Reply #7 on: April 27, 2009, 11:09:24 AM »

No good.

I changed the following settings:
Marvell>>
Marvell>> set mtd0 '0x100000@0x000000(u-boot)ro'
Marvell>> set mtd1 '0x400000@0x100000(uImage)'
Marvell>> set mtd2 '0x1fb00000@0x500000(rootfs)rw'
Marvell>> set console 'console=ttyS0,115200 mtdparts=nand_mtd:$(mtd0),$(mtd1),$(mtd2)'
Marvell>> set bootcmd 'tftpboot 0x2000000 $(image_name);setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath)
ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> reset


The environment after the reset
Code:

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Mar 16 2009 - 18:03:32) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE80

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
Marvell>> print
baudrate=115200
loads_echo=0
CASset=min
MALLOC_len=1
ethprime=egiga0
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end)
$(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethaddr=00:50:43:01:C1:FB
run_diag=no
ethact=egiga0
rootpath=/home/rootfsv1.0
image_name=uImage.sheeva.040309
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
mtd0=0x100000@0x000000(u-boot)ro
mtd2=0x1fb00000@0x500000(rootfs)rw
filesize=1f972c
fileaddr=1000000
netmask=255.255.255.0
ipaddr=192.168.1.103
serverip=192.168.1.91
bootargs=console=ttyS0,115200 mtdparts=nand_flash:0x400000@0x100000(uImage)ro,0x1fb00000@0x500000(rootfs)ro root=/dev/mtdblock2
mtd1=0x400000@0x100000(uImage)
console=console=ttyS0,115200 mtdparts=nand_mtd:$(mtd0),$(mtd1),$(mtd2)
bootcmd=tftpboot 0x2000000 $(image_name);setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(
serverip)$(bootargs_end); bootm 0x2000000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
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

Environment size: 1508/131068 bytes
Marvell>>

Finally, the reboot (and the same 2M uImage partition):
Code:
Marvell>> reset

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Mar 16 2009 - 18:03:32) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE80

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
Using egiga0 device
TFTP from server 192.168.1.91; our IP address is 192.168.1.103
Filename 'uImage.sheeva.040309'.
Load address: 0x2000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###############
done
Bytes transferred = 2070316 (1f972c hex)
## Booting image at 02000000 ...
   Image Name:   Linux-2.6.22.18
   Created:      2009-04-04   1:49:44 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2070252 Bytes =  2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...
................. done, booting the kernel.
Linux version 2.6.22.18 (root@localhost.localdomain) (gcc version 4.2.0 20070413 (prerelease)) #1 Fri Apr 3 18:49:38 PDT 2009
CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053177
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists.  Total pages: 130048
Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:$(mtd0),$(mtd1),$(mtd2) root=/dev/nfs rw nfsroot=192.168.1.91:/home/root
fsv1.0 ip=192.168.1.103:192.168.1.91:::DB88FXX81:eth0:none
PID hash table entries: 2048 (order: 11, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB 256MB 0MB 0MB = 512MB total
Memory: 515584KB available (3772K code, 258K data, 124K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 256MB
SDRAM_CS1 ....base 10000000, size 256MB
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e8000000, size 128MB
PEX0_IO ....base f2000000, size   1MB
INTER_REGS ....base f1000000, size   1MB
NFLASH_CS ....base fa000000, size   2MB
SPI_CS ....base f4000000, size  16MB
BOOT_ROM_CS ....no such
DEV_BOOTCS ....no such
CRYPT_ENG ....base f0000000, size   2MB

  Marvell Development Board (LSP Version KW_LSP_4.2.7_patch2)-- SHEEVA PLUG  Soc: 88F6281 A0 LE

 Detected Tclk 200000000 and SysClk 400000000
MV Buttons Device Load
Marvell USB EHCI Host controller #0: c08b0600
PEX0 interface detected no Link.
PCI: bus0: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: kw_clocksource clocksource has been installed.
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
RTC registered
Use the XOR engines (acceleration) for enhancing the following functions:
  o RAID 5 Xor calculation
  o kernel memcpy
  o kenrel memzero
Number of XOR engines to use: 4
cesadev_init(c00117e4)
mvCesaInit: sessions=640, queue=64, pSram=f0000000
Warning: TS unit is powered off.
MV Buttons Driver Load
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
RAMDISK driver initialized: 20 RAM disks of 4096K size 4096 blocksize
Loading Marvell Ethernet Driver:
  o Cached descriptors in DRAM
  o DRAM SW cache-coherency
  o Single RX Queue support - ETH_DEF_RXQ=0
  o Single TX Queue support - ETH_DEF_TXQ=0
  o TCP segmentation offload enabled
  o Receive checksum offload enabled
  o Transmit checksum offload enabled
  o Network Fast Processing (Routing) supported
  o Driver ERROR statistics enabled
  o Driver INFO statistics enabled
  o Proc tool API enabled
  o Rx descripors: q0=128
  o Tx descripors: q0=532
  o Loading network interface(s):
    o eth0, ifindex = 1, GbE port = 0
    o eth1, ifindex = 2, GbE port = 1

mvFpRuleDb (dfd20000): 16384 entries, 65536 bytes
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation

Warning Sata is Powered Off
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 771 at 0x06060000
Bad eraseblock 779 at 0x06160000
Bad eraseblock 787 at 0x06260000
Bad eraseblock 795 at 0x06360000
Bad eraseblock 803 at 0x06460000
Bad eraseblock 811 at 0x06560000
Bad eraseblock 815 at 0x065e0000
Bad eraseblock 819 at 0x06660000
Bad eraseblock 827 at 0x06760000
Bad eraseblock 2227 at 0x11660000
Bad eraseblock 2819 at 0x16060000
Bad eraseblock 2827 at 0x16160000
Bad eraseblock 2835 at 0x16260000
Bad eraseblock 2843 at 0x16360000
Bad eraseblock 2851 at 0x16460000
Bad eraseblock 2859 at 0x16560000
Bad eraseblock 2867 at 0x16660000
Bad eraseblock 2875 at 0x16760000
Bad eraseblock 2923 at 0x16d60000
mtd: partition size too small (0)
Using static partition definition
Creating 3 MTD partitions on "nand_mtd":
0x00000000-0x00100000 : "u-boot"
0x00100000-0x00300000 : "uImage"
0x00300000-0x20000000 : "root"
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux telephony interface: v1.00
Marvell Telephony Driver:
mvBoardVoiceAssembleModeGet: TDM not supported(boardId=0x9)
assembly=-1,irq=-1
mp_check_config: Error, invalid voice assembley mode
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
raid6: int32x1     97 MB/s
raid6: int32x2    123 MB/s
raid6: int32x4    126 MB/s
raid6: int32x8    111 MB/s
raid6: using algorithm int32x4 (126 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
raid5: measuring checksumming speed
   arm4regs  :  1084.000 MB/sec
   8regs     :   754.800 MB/sec
   32regs    :   900.000 MB/sec
raid5: using function: arm4regs (1084.000 MB/sec)
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mvsdmmc: irq =28 start f1090000
mvsdmmc: no IRQ detect
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC).
mvCLAudioCodecRegGet: Error while reading register!
mvCLAudioCodecInit: Error - Invalid Cirrus Logic chip/rev ID!
Error - Cannot initialize audio decoder.at address =0xff<6>ALSA device list:
  #0: Marvell mv88fx_snd ALSA driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368 uSD   7829504KiB
 mmcblk0: p1
eth0: link down
eth0: started
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
      device=eth0, addr=192.168.1.103, mask=255.255.255.0, gw=255.255.255.255,
     host=DB88FXX81, domain=, nis-domain=(none),
     bootserver=192.168.1.91, rootserver=192.168.1.91, rootpath=
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
Looking up port of RPC 100003/2 on 192.168.1.91
eth0: link up, full duplex, speed 100 Mbps
Looking up port of RPC 100005/1 on 192.168.1.91
VFS: Mounted root (nfs filesystem).
Freeing init memory: 124K
init started: BusyBox v1.7.0 (2008-02-26 19:25:17 IST)
starting pid 284, tty '': '/etc/init.d/rcS'
starting pid 286, tty '': '/bin/sh'
-sh-3.2# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00200000 00020000 "uImage"
mtd2: 1fd00000 00020000 "root"
-sh-3.2#

Logged

...I've always depended on the kindness of strangers

moshiach
Guest
« Reply #8 on: April 27, 2009, 11:23:49 AM »

Here is your problem:

Code:
Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:$(mtd0),$(mtd1),$(mtd2) root=/dev/nfs rw nfsroot=192.168.1.91:/home/root

Uboot is kind of tricky about expanding variables.    Your mtdparts isn't being expanded.   Reset your plug and set the console variable again. 
Logged

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #9 on: April 27, 2009, 11:32:17 AM »

for some reason the kernel is not getting the right bootargs.

Quote
Linux version 2.6.22.18 (root@localhost.localdomain) (gcc version 4.2.0 20070413 (prerelease)) #1 Fri Apr 3 18:49:38 PDT 2009
CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053177
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists.  Total pages: 130048
Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:$(mtd0),$(mtd1),$(mtd2) root=/dev/nfs rw nfsroot=192.168.1.91:/home/root

The last line here shows the kernel command line.  It is not getting the partition table.  Seems the uboot doesn't do the substitution you have in your console setting on each boot.  Perhaps it only evaluates the bootargs for substitution and doesn't evaluate console for substitution during the bootargs substitution.

try

set console 'console=ttyS0,115200'
set bootcmd ''tftpboot 0x2000000 $(image_name);setenv bootargs $(console) mtdparts=nand_mtd:$(mtd0),$(mtd1),$(mtd2) (bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000'

« Last Edit: April 27, 2009, 11:35:10 AM by kilowatt » Logged

rshitrit
Global Moderator
Newbie
*****

Karma: 0
Posts: 14


View Profile
« Reply #10 on: April 27, 2009, 11:54:11 AM »

last suggestion will work.
U-boot will only replace the env variable for the first setting i.e.
setenv y $(x)

if x==55
y will get 55
if x==$(z) and z==44
y will get $(z)
Logged

jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« Reply #11 on: April 27, 2009, 12:06:58 PM »

OK! Thanks for all the help so far.

I was able to boot into nfs with the resized (4M) uImage size.
I then Flashed the 2.6.30-rc2 uImage and reset the plug:

I used the following u-boot commands for the nand boot:

setenv bootargs 'console=ttyS0,115200 mtdparts=orion_flash:0x400000@0x100000(uImage)ro,0x1fb00000@0x500000(rootfs) root=/dev/mtdblock2'
setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
saveenv
reset


The plug "hung" booting the kernel:


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.30-rc2
   Created:      2009-04-24   7:07:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2151820 Bytes =  2.1 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...
............................... done, booting the kernel.


So close, any other suggestions?
Logged

...I've always depended on the kindness of strangers

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« Reply #12 on: April 27, 2009, 12:23:44 PM »

The first time I booted after reflashing the kernel I got hung just like that.  Then I did a hard reset and it worked fine.  Yeah, your getting close....almost there.
Logged

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #13 on: April 27, 2009, 12:30:27 PM »

2.6.30 needs two additional uboot parameters set.

setenv mainlineLinux yes
setenv arcNumber 2097

Also did you write your jff2 file system to flash mtd2 after changing the partitions?   

You will need to change mainlineLinux to "no" if you go back to booting  the Marvel kernel.
Logged

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #14 on: April 27, 2009, 12:35:32 PM »

Since your only telling the kernel about two of the partitions on your flash, the files system will be the second one /dev/mtdblock1.  You can either change your bootargs to root=/dev/mtdblock1 or change the bootargs to tell the kernel about all 3 partitions.
Logged

Pages: [1] 2
Print
Jump to: