• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: Need original bootcmd  (Read 9542 times)
bfmorgan
Guest
« on: April 21, 2009, 03:50:57 PM »

First, I'm new at this Uboot stuff. I have tried getting the plug to boot from nfs. This didn't work, so, I'm trying to boot again from NAND. My bootcmd currently is:

bootcmd=tftpboot 0x2000000 $(image_name);setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000

Can someone supply the correct (original) bootcmd to boot from NAND.

Thanks,

Logged

KaiBo
Newbie
*

Karma: 0
Posts: 35



View Profile
« Reply #1 on: April 21, 2009, 04:18:51 PM »

This should be the original one:
Code:
bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
Logged

bfmorgan
Guest
« Reply #2 on: April 21, 2009, 05:55:34 PM »

Thanks for the original bootcmd line.

Now I have a new problem.

Its the bad magic number. I have read the other posts about this but, I can't seem to fix it. I've changed the line several time using the suggested hex numbers. No luck.

Marvell>> setenv bootcmd 'nand read.e 0x8000000 0x1000000 0x5000000; bootm 0x8000000'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> boot

NAND read: device 0 offset 0x1000000, size 0x5000000

Reading data from 0x5fff800 -- 100% complete.
 83886080 bytes read: OK
## Booting image at 08000000 ...
Bad Magic Number


Help, thanks,

Logged

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #3 on: April 21, 2009, 06:37:42 PM »

looks like you got an extra zero in all those numbers in you bootcmd
Logged

bfmorgan
Guest
« Reply #4 on: April 21, 2009, 07:48:39 PM »

Thanks for the 'extra zero' spotting. I still get the Bad Magic Number error. Looks like I'll have to use the USB recovery method that was just placed up at Marvell.
Logged

plugcomp
Newbie
*

Karma: 0
Posts: 18


View Profile
« Reply #5 on: April 22, 2009, 09:34:32 AM »

If you have not written any images to the NAND and have not touched the mtd partitions, then try to use these commands:

Marvell>> set bootargs

Marvell>> saveenv

Marvell>> setenv bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fc00000@0x400000(rootfs)rw root=/dev/mtdblock2'

Marvell>> setenv bootcmd 'nand read.e 0x800000 0x100000 0x300000; bootm 0x800000'

Marvell>> saveenv

If it still does not work can you provide the log after giving the following command in u-boot:

Marvell>> print


Thanks.
Logged

bfmorgan
Guest
« Reply #6 on: April 22, 2009, 04:58:11 PM »

I had flashes the NAND. I did follow the new updated USB flash recovery docs @ Marvell (place there today). I still not getting a successful boot.

After successfully through step 6 (flashing NAND) I follow step seven:

a. Marvell>> setenv bootcmd 'nand read.e 0x800000 0x100000 0x300000; bootm
0x800000
b. Marvell>> setenv bootargs 'console=ttyS0,115200
mtdparts=nand_mtd:0x100000@0x00000(uboot),
0x300000@0x100000(uImage)ro,0x1fc00000@0x400000(rootfs)rw
root=/dev/mtdblock2'
c. Marvell>> saveenv
d. Marvell>> reset

The boot gets all the way through until a kernel panic:

TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 124K
scsi 0:0:0:0: Direct-Access              TS128GSSD18M-M    Dev PQ: 0 ANSI: 0 CCS
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.


Here is my printenv:

baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
CASset=min
MALLOC_len=1
ethprime=egiga0
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); bootm 0x2000000;
ethaddr=00:50:43:20:04:08
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
autoload=no
ethact=egiga0
bootfile=u-boot.bin
gatewayip=192.168.1.1
netmask=255.255.255.0
ipaddr=192.168.1.113
serverip=192.168.1.140
loadaddr=0x2000000
mtd1Size=0x300000
filesize=0x44ad000
bootcmd=nand read.e 0x800000 0x100000 0x300000; bootm 0x800000
bootargs_root=root=/dev/mtdblock2
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fc00000@0x400000(rootfs)rw root=/dev/mtdblock2
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0(uboot)ro,0x300000@0x100000(uImage),0x1fc00000@0x400000(rootfs)rw
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

Thanks in advance for the help; you guys are great,
Logged

plugcomp
Newbie
*

Karma: 0
Posts: 18


View Profile
« Reply #7 on: April 22, 2009, 06:31:52 PM »

Looks like the console cannot be initiated. Can you try rewriting the console command in uboot? If this does not work, please send in the logs this time.

Logged

bfmorgan
Guest
« Reply #8 on: April 22, 2009, 07:28:33 PM »

Ok, here is my log

Marvell>> set init '/bin/bash'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> reset

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

U-Boot 1.1.4 (Apr  9 2009 - 12:23:12) Marvell version: 3.4.16

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

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

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

Reading data from 0x3ff800 -- 100% complete.
 3145728 bytes read: OK
## Booting image at 00800000 ...
   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:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fc00000@0x400000(rootfs)rw root=/dev/mtdblock2
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 2362 at 0x12740000
Bad eraseblock 2872 at 0x16700000
Bad eraseblock 2991 at 0x175e0000
Bad eraseblock 3230 at 0x193c0000
Bad eraseblock 3253 at 0x196a0000
Bad eraseblock 3308 at 0x19d80000
Bad eraseblock 3352 at 0x1a300000
Bad eraseblock 3555 at 0x1bc60000
Bad eraseblock 3596 at 0x1c180000
Bad eraseblock 3673 at 0x1cb20000
Bad eraseblock 3682 at 0x1cc40000
Bad eraseblock 3683 at 0x1cc60000
Bad eraseblock 3685 at 0x1cca0000
Bad eraseblock 3773 at 0x1d7a0000
Bad eraseblock 3787 at 0x1d960000
Bad eraseblock 3833 at 0x1df20000
mtd: bad character after partition (r)
3 cmdlinepart partitions found on MTD device nand_mtd
Using command line partition definition
Creating 3 MTD partitions on "nand_mtd":
0x00000000-0x00100000 : "u-boot"
0x00100000-0x00400000 : "uImage"
0x00400000-0x20000000 : "rootfs"
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
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 124K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.


Logged

plugcomp
Newbie
*

Karma: 0
Posts: 18


View Profile
« Reply #9 on: April 23, 2009, 12:16:51 AM »

I see your uImage is of different size than the one I am using. I also noticed that the uImage you are using has squashfs and RAMDISK support. Did you create a new uImage? Are you using uImage.sheeva.040309?

Try flashing the NAND with the uImage.sheeva.040309.
Logged

Ral Porcel
Global Moderator
Jr. Member
*****

Karma: 0
Posts: 68


View Profile
« Reply #10 on: April 23, 2009, 02:29:47 AM »

Ok, here is my log

Marvell>> set init '/bin/bash'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> reset

Eh? That's wrong. You need to set bootargs accordingly with init.

setenv bootargs console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fc00000@0x400000(rootfs)rw root=/dev/mtdblock2 init=/bin/bash
Logged

bfmorgan
Guest
« Reply #11 on: April 23, 2009, 07:22:14 AM »

I tried adding the 'init=/bin/bash' to the bootargs string, got:

VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 124K
Warning: unable to open an initial console.
Failed to execute /bin/bash.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

Also, I am using uboot version uImage.sheeva.040309.

I'm going to try to increase the size uImage.

Has anybody else successfully reflashed their plug using the new USB recovery method (the latest)? If so, did you have to deviate any from the instructions provided by Marvell?

Thanks,
Logged

plugcomp
Newbie
*

Karma: 0
Posts: 18


View Profile
« Reply #12 on: April 23, 2009, 09:08:58 AM »

I think you might have the corrupt jffs2 image. Would you have the old jffs2 image that came with the CD? Try to use that image and see if it works?
Logged

Pandemonium
Newbie
*

Karma: 0
Posts: 37


View Profile
« Reply #13 on: April 23, 2009, 10:57:11 AM »

Yep, that's the answer.  The jffs2 image posted on the website is corrupt.  My plug now works fine with the image from the disk.

See here:
http://openplug.org/plugforum/index.php?topic=139.msg820#msg820

*shakes fist at Marvell*
Logged

bfmorgan
Guest
« Reply #14 on: April 23, 2009, 11:07:52 AM »

Yes!!!!!! Mine works now too.

What a frustrating 3 days. I shake both fists at Marvell's QC.

Test before you release!

Thanks Pandemonium, you da man.
Logged

Pages: [1] 2
Print
Jump to: