Welcome! Log In Create A New Profile

Advanced

No effect of CONFIG_BOOTCOMMAND

Posted by nevtag 
No effect of CONFIG_BOOTCOMMAND
September 20, 2010 08:03PM
Hi,
I have a problem with CONFIG_BOOTCOMMAND


//#define CONFIG_BOOTCOMMAND "run bootcmd_usb; usb stop; run bootcmd_pogo; reset"
#define CONFIG_BOOTCOMMAND "mmc init"

I'm booting ...

U-Boot 2010.06-00695-gbd23130-dirty (Aug 30 2010 - 23:04:56)
Marvell-Dockstar/Pogoplug by Jeff Doozan

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0

Jeff's u-boot is comming up and I load my new u-boot in memory.

Marvell>> setenv ipaddr 10.255.0.160
Marvell>> setenv serverip 10.255.0.5
Marvell>> tftp 0x800000 uboot.mtd3.bin
Using egiga0 device
TFTP from server 10.255.0.5; our IP address is 10.255.0.160
Filename 'uboot.mtd3.bin'.
Load address: 0x800000
Loading: ####################################
done
Bytes transferred = 524288 (80000 hex)
Marvell>> go 0x800000
## Starting application at 0x00800000 ...

Ok and here is the new one.

U-Boot 2010.09-rc1-00015-g29ccd7c-dirty (Sep 21 2010 - 02:38:57)
Marvell-Sheevaplug - SD/MMC

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0

At this point u-boot should do "mmc init" but the normal steps from flash are running.

(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
2023316 bytes read

u-boot ignored my CONFIG_BOOTCOMMAND.
So what can it be, I have no idea.
Have you a suggestion?

Thanks a lot, joc
Re: No effect of CONFIG_BOOTCOMMAND
September 20, 2010 08:14PM
CONFIG_BOOTCMD only sets the default bootcmd value. If 'bootcmd' is already defined in your environment, then uBoot will use that instead.

-- Jeff
Re: No effect of CONFIG_BOOTCOMMAND
September 21, 2010 05:02AM
jeff, thank you for your response.

I searched the directory for all files with bootcmd.
All entries that I found reference to CONFIG_BOOTCOMMAND and that is defined in include/configs/sheevaplug.h
I have also adapted CONFIG_BOOTDELAY 10
but the counter starts at 3 on boot.
The change in CONFIG_IDENT_STRING is used.
Very strange the whole thing, but surely a simple explanation.

___
joc
Re: No effect of CONFIG_BOOTCOMMAND
September 21, 2010 05:53AM
I have a unflashed DockStar and make it work.

U-Boot 1.1.4 (Jul 16 2009 - 21:02:16) Cloud Engines (3.4.16)

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 00690D60

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 128MB
DRAM Total size 128MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB

CPU : Marvell Feroceon (Rev 1)
CLOUD ENGINES BOARD: REDSTONE:1.0

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

CE>> setenv ipaddr 10.255.0.160
CE>> setenv serverip 10.255.0.5
CE>> tftp 0x800000 uboot.mtd3.bin
Using egiga0 device
TFTP from server 10.255.0.5; our IP address is 10.255.0.160
Filename 'uboot.mtd3.bin'.
Load address: 0x800000
Loading: #################################################################
         ######################################
done
Bytes transferred = 524288 (80000 hex)
CE>> go 0x800000
## Starting application at 0x00800000 ...

U-Boot 2010.09-rc1-00015-g29ccd7c-dirty (Sep 21 2010 - 10:27:56)
Marvell-Sheevaplug - SD/MMC

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
NAND:  256 MiB
*** Warning - bad CRC or NAND, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
No MMC card found

I think the DockStar with your uboot in flash loads bootcmd from flash, for whatever reason.
The only question is why.
A possible clue
*** Warning - bad CRC or NAND, using default environment

The boot process is looking in NAND for environment settings and
on the flashed DockStar it finds the environment settings and use them and not my default settings.
Is there a key to disable that?

__
joc



Edited 1 time(s). Last edit at 09/21/2010 05:55AM by nevtag.
Re: No effect of CONFIG_BOOTCOMMAND
September 21, 2010 06:20AM
Yes! I have found it.
As i wrote a simple explanation.

If defined
#define CONFIG_CMD_NAND

/*
 *  Environment variables configurations
 */
#ifdef CONFIG_CMD_NAND
#define CONFIG_ENV_IS_IN_NAND           1
#define CONFIG_ENV_SECT_SIZE            0x20000 /* 128K */
#else
#define CONFIG_ENV_IS_NOWHERE           1       /* if env in SDRAM */
#endif

uboot looks and use allways the environment in NAND.

If it disabled the default environment will be used.

U-Boot 2010.09-rc1-00015-g29ccd7c-dirty (Sep 21 2010 - 13:12:21)
Marvell-Sheevaplug - SD/MMC

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
No MMC card found


For developing and testing an unsuccessful setting.

__
Joc
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: