2009-11-01 02:11:27     Board won't auto-boot

Document created by Aaronwu Employee on Sep 24, 2013
Version 1Show Document
  • View in full screen mode

2009-11-01 02:11:27     Board won't auto-boot

Jay Ku (UNITED STATES)

Message: 81960   

 

I'm running U-boot 2009.03 on a custom BF532 board.  I think I'm setting things up correctly, but it won't auto-boot.  When I boot up, if I do a printenv I get:

 

myboard> printenv

baudrate=57600

ethaddr=02:80:ad:20:31:b8

ipaddr=192.168.1.111

gatewayip=192.168.1.1

netmask=255.255.255.0

hostname=carui

loadaddr=0x1000000

serverip=192.168.1.4

ltftp=icache on;dcache on;tftp 1000000 uImage;bootm 1000000

lnand=icache on;dcache on;nand read.jffs2 0x1000000 0 0x4b0000;bootm 0x1000000

bootdelay=5

bootcmd=run ltftp

stdin=serial

stdout=serial

stderr=serial

 

Environment size: 371/65532 bytes

myboard>

 

I don't get a countdown when the board starts up.  Do I have to do anything beside setting bootdelay and bootcmd?  Might I have something set wrong in my u-boot config file that would prevent auto-boot from running?

 

 

 

Thanks, Jay

QuoteReplyEditDelete

 

 

2009-11-01 08:11:43     Re: Board won't auto-boot

Mike Frysinger (UNITED STATES)

Message: 81968   

 

did you disable CONFIG_BOOTDELAY in your board config ?

QuoteReplyEditDelete

 

 

2009-11-01 11:57:03     Re: Board won't auto-boot

Jay Ku (UNITED STATES)

Message: 81970   

 

Here's my config.h:

 

 

 

#ifndef __CONFIG_CARUI_H__

#define __CONFIG_CARUI_H__

 

#include <asm/config-pre.h>

 

/*  Processor Settings  */

#define CONFIG_BFIN_CPU             bf532-0.5

#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER

 

#define CONFIG_DEBUG_DUMP

#define CONFIG_DEBUG_DUMP_SYMS

#define CONFIG_DEBUG_EARLY_SERIAL

 

#define CONFIG_DCACHE_OFF

#define CONFIG_ICACHE_OFF

 

/*

* Clock Settings

*      CCLK = (CLKIN * VCO_MULT) / CCLK_DIV

*      SCLK = (CLKIN * VCO_MULT) / SCLK_DIV

*/

/* CONFIG_CLKIN_HZ is any value in Hz                                   */

#define CONFIG_CLKIN_HZ                 25000000

/* CLKIN_HALF controls the DF bit in PLL_CTL      0 = CLKIN             */

/*                                                1 = CLKIN / 2         */

#define CONFIG_CLKIN_HALF               0

/* PLL_BYPASS controls the BYPASS bit in PLL_CTL  0 = do not bypass     */

/*                                                1 = bypass PLL        */

#define CONFIG_PLL_BYPASS               0

/* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL              */

/* Values can range from 0-63 (where 0 means 64)                        */

#define CONFIG_VCO_MULT                 16    // VCO = 400MHz

/* CCLK_DIV controls the core clock divider                             */

/* Values can be 1, 2, 4, or 8 ONLY                                     */

#define CONFIG_CCLK_DIV                 1     // core clk = 400MHz

/* SCLK_DIV controls the system clock divider                           */

/* Values can range from 1-15                                           */

#define CONFIG_SCLK_DIV                 4     // sys/mem clk = 100MHz

 

/*

* Memory Settings (16Mx16 SDRAM)

*/

// #define CONFIG_MEM_ADD_WDTH  9

#define CONFIG_MEM_SIZE         32   // size in MB (??)

// #define CFG_MAX_RAM_SIZE (CONFIG_MEM_SIZE * 1024 * 1024)

 

#define CONFIG_EBIU_SDRRC_VAL   0x306

#define CONFIG_EBIU_SDGCTL_VAL  0x80911149

#define CONFIG_EBIU_SDBCTL_VAL  0x13

 

#define CONFIG_EBIU_AMGCTL_VAL  0xe

// #define CONFIG_EBIU_AMBCTL0_VAL      0xbbf83358

#define CONFIG_EBIU_AMBCTL0_VAL 0xfff83358

#define CONFIG_EBIU_AMBCTL1_VAL 0x33583358

 

#define CONFIG_SYS_MONITOR_LEN          (256 * 1024)    /* Reserve 256 kB for monitor */

#define CONFIG_SYS_MALLOC_LEN           (384 * 1024)    /* Reserve 384 kB for malloc() (video/spi are big) */

// #define CFG_GBL_DATA_SIZE    0x4000          /* Reserve 16k for Global Data */

 

/*

* Network Settings

*/

#define ADI_CMDS_NETWORK        1

#define CONFIG_DRIVER_SMC911X  1

#define CONFIG_DRIVER_SMC911X_BASE      0x20100000

#define CONFIG_DRIVER_SMC911X_16_BIT

#define CONFIG_HOSTNAME         carui

#define CONFIG_ETHADDR  02:80:ad:20:31:b8

#define CONFIG_IPADDR 192.168.1.111

#define CONFIG_GATEWAYIP 192.168.1.1

#define CONFIG_NETMASK 255.255.255.0

 

/* No parallel NOR Flash */

#define CONFIG_SYS_NO_FLASH

 

/* SPI Settings */

#define CONFIG_BFIN_SPI

#define CONFIG_ENV_SPI_MAX_HZ 20000000

#define CONFIG_SF_DEFAULT_HZ 20000000

#define CONFIG_SPI_FLASH

#define CONFIG_SPI_FLASH_STMICRO

#define CONFIG_ENV_SPI_BUS 0

#define CONFIG_ENV_SPI_CS 2

#define CONFIG_ENV_SPI_MODE 3

 

/* Env storage settings */

#define CONFIG_ENV_IS_IN_SPI_FLASH

#define CONFIG_ENV_OFFSET 0x30000

#define CONFIG_ENV_SECT_SIZE 0x10000

// #define ENV_IS_EMBEDDED_CUSTOM

#define CONFIG_ENV_SIZE 0x10000

 

/*  NAND configuration  */

#define CONFIG_NAND_PLAT

#define CONFIG_SYS_NAND_BASE  0x20000000

#define CONFIG_SYS_MAX_NAND_DEVICE 1

 

#define BFIN_NAND_CLE(chip) ((unsigned long)(chip)->IO_ADDR_W | (1 << 2))

#define BFIN_NAND_ALE(chip) ((unsigned long)(chip)->IO_ADDR_W | (1 << 1))

#define BFIN_NAND_READY_PORT (*(volatile unsigned short *)(0x20200004))

#define BFIN_NAND_READY_BIT_MASK 0x100

 

#define NAND_PLAT_WRITE_CMD(cmd, chip) bfin_write8(BFIN_NAND_CLE(chip), cmd)

#define NAND_PLAT_WRITE_ADR(cmd, chip) bfin_write8(BFIN_NAND_ALE(chip), cmd)

#define NAND_PLAT_DEV_READY(chip)      ((BFIN_NAND_READY_PORT & BFIN_NAND_READY_BIT_MASK) ? 1 : 0)

#define NAND_PLAT_INIT()  ;

 

/* Misc settings */

#define CONGIF_SYS_LONGHELP 1

#define CONFIG_CMDLINE_EDITING 1

#define CONFIG_UART_CONSOLE 0

#define CONFIG_BAUDRATE 57600

#define CONFIG_RTC_BFIN 1

 

#include <config_cmd_default.h>

 

#define CONFIG_CMD_BOOTLDR

#define CONFIG_CMD_CACHE

#define CONFIG_CMD_DATE

#define CONFIG_CMD_ELF

#define CONFIG_CMD_NAND

#undef CONFIG_CMD_I2C

#undef CONFIG_CMD_FLASH

#undef CONFIG_CMD_IMLS

#define CONFIG_CMD_SF

#define CONFIG_CMD_MEMORY

#define CONFIG_CMD_NET

#define CONFIG_CMD_DIAG

#define CONFIG_CMD_PING

#define CONFIG_CMD_TFTP

#define CONFIG_MISC_INIT_R

 

// #define ADI_CMD_DIAG 1

 

#define CONFIG_SYS_PROMPT "myboard> "

 

#endif

QuoteReplyEditDelete

 

 

2009-11-01 13:15:24     Re: Board won't auto-boot

Mike Frysinger (UNITED STATES)

Message: 81971   

 

sounds like you found the answer

QuoteReplyEditDelete

 

 

2009-11-01 14:28:42     Re: Board won't auto-boot

Jay Ku (UNITED STATES)

Message: 81975   

 

Sorry Mike, guess I'm a little slow this morning.  Care to elaborate?

QuoteReplyEditDelete

 

 

2009-11-01 14:43:41     Re: Board won't auto-boot

Mike Frysinger (UNITED STATES)

Message: 81976   

 

CONFIG_BOOTDELAY is something you have to opt in for, and your board config doesnt opt in for it

QuoteReplyEditDelete

 

 

2009-11-01 15:10:11     Re: Board won't auto-boot

Jay Ku (UNITED STATES)

Message: 81977   

 

Awesome... I thought having the environment var set was enough.  Works great now.  Thanks.

QuoteReplyEditDelete

Attachments

    Outcomes