2010-10-20 05:05:05     Problem with new board file

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

2010-10-20 05:05:05     Problem with new board file

Andreas Schallenberg (GERMANY)

Message: 94773   

 

Hello,

 

I am trying to add support for the SSV DNP/5370 DIL-Net board.

The vendor ships an U-Boot + uClinux CD with versions from 2006

with it. Now the goal is to switch to a more recent version of the

U-Boot and uClinux since we need som newer Linux kernel features.

 

 

Adding support for U-Boot 2008.10-svn1216 (ADI-2009R1-rc2)  was

successful and I can boot the original 2006 uClinux kernels.

 

However, booting into the newer uClinux (2009R1.1-RC4) fails.

The message is simply this:

 

bfin> bootm 0x1000000

## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   uClinux Kernel and ext2

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    2153385 Bytes =  2.1 MB

   Load Address: 00001000

   Entry Point:  00001000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 00001000

 

 

Ack! Something bad happened to the Blackfin!

 

 

U-Boot 2008.10-svn1216 (ADI-2009R1-rc2) (Oct 19 2010 - 16:58:49)

 

CPU:   ADSP bf537-0.3 (Detected Rev: 0.3) (bypass boot)

Board: DilNet DNP5370 BF537 board

Clock: VCO: 600 MHz, Core: 600 MHz, System: 120 MHz

RAM:   32 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   02:08:AD:21:36:31

bfin>

 

I looked into the U-Boot source code and found the message to

be printed inbfin_panic() in traps.c. If I set CONFIG_DEBUG_DUMP

in U-Boot's board header file, the system simply hangs. If I omit that

setting, the system reboots (as shown above).

 

Obviously, the message comes from U-Boot code but does not

show up when using the old uImage (2006) is used. It simply boots

in that case. So, I guess it is triggered by the new image but not

related to the new kernel code.

 

The new image is even smaller than the old image so I guess this

should not be something exceeding an memory area.

 

Has anyone an idea what could cause this?

 

Regards,

Andreas

TranslateQuoteReplyEditDelete

 

 

2010-10-20 05:07:46     Re: Problem with new board file

Mike Frysinger (UNITED STATES)

Message: 94774   

 

your uimage output indicates you didnt update your uclinux-dist build system.  might want to review vendors/AnalogDevices/vendor.mak.

QuoteReplyEditDelete

 

 

2010-10-20 06:59:44     Re: Problem with new board file

Andreas Schallenberg (GERMANY)

Message: 94777   

 

Thank you for your quick reply.

 

I now re-used the Makefile from the BF537-STAMP board,

and copied the "common" directory to the SSV vendor directory.

 

The boot message is now:

 

## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   Linux Kernel and ext2

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    2319393 Bytes =  2.2 MB

   Load Address: 00001000

   Entry Point:  0018a7e8

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 0018a7e8

 

And then the system hangs. I tried to "ping" or "ssh" it just

to be sure that it is not just an console interfacing problem.

TranslateQuoteReplyEditDelete

 

 

2010-10-20 07:08:53     Re: Problem with new board file

Mike Frysinger (UNITED STATES)

Message: 94778   

 

make sure your console= settings matches your hardware

 

and try this:

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:debug:post_mortem

QuoteReplyEditDelete

 

 

2010-10-20 07:42:28     Re: Problem with new board file

Andreas Schallenberg (GERMANY)

Message: 94779   

 

Thank you, that got me back on track. There is *is* some

problem with console, since I find the following strings at

the __log_buf address in memory:

 

U-Boot 2008.10-svn1216 (ADI-2009R1-rc2) (Oct 20 2010 - 13:24:20)

 

CPU:   ADSP bf537-0.3 (Detected Rev: 0.3) (bypass boot)

Board: DilNet DNP5370 BF537 board

Clock: VCO: 600 MHz, Core: 600 MHz, System: 120 MHz

RAM:   32 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   02:08:AD:21:36:31

bfin> strings 0016ae10 16384

<5>Linux version 2.6.28.10-ADI-2009R1.1SSV-svn1213 (aschallenberg@GWS026Linux) (gcc version 4.1.2 (ADI svn)) #8 Wed Oct 20 13:25:02 CEST 2010

<6>Board Memory: 32MB

<6>Kernel Managed Memory: 32MB

<6>Memory map:

<6>  fixedcode = 0x00000400-0x00000490

<6>  text      = 0x00001000-0x00113d20

<6>  rodata    = 0x00113d20-0x001643cc

<6>  bss       = 0x00165000-0x0017756c

<6>  data      = 0x0017756c-0x00186000

<6>    stack   = 0x00184000-0x00186000

<6>  init      = 0x00186000-0x0019c000

<6>  available = 0x0019c000-0x01700000

<6>  rootfs    = 0x01700000-0x01f00000

<6>  DMA Zone  = 0x01f00000-0x02000000

<6>Hardware Trace Active and Enabled

<6>Boot Mode: 0

<6>Blackfin support (C) 2004-2009 Analog Devices, Inc.

<6>Compiled for ADSP-BF537 Rev 0.3

<6>Blackfin Linux support by http://blackfin.uclinux.org/

<6>Processor Speed: 600 MHz core clock and 120 MHz System Clock

<7> boot memmap: 000000000019c000 - 0000000001700000 (usable)

<7>On node 0 totalpages: 5888

<7>free_area_init_node: node 0, pgdat 00182cfc, node_mem_map 0019e000

<7>  DMA zone: 46 pages used for memmap

<7>  DMA zone: 0 pages reserved

<7>  DMA zone: 5842 pages, LIFO batch:0

<7>  Normal zone: 0 pages used for memmap

<7>  Movable zone: 0 pages used for memmap

<4>Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 5842

<5>Kernel command line:

<6>Configuring Blackfin Priority Driven Interrupts

<4>PID hash table entries: 128 (order: 7, 512 bytes)

<6>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

<6>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

<7>Kernel managed physical pages: 5888

<6>Memory available: 21616k/32768k RAM, (88k init code, 1099k kernel code, 457k data, 1024k dma, 292k reserved)

<6>Calibrating delay loop... 1163.26 BogoMIPS (lpj=2326528)

<4>Mount-cache hash table entries: 512

<6>Blackfin Scratchpad data SRAM: 4 KB

<6>Blackfin L1 Data A SRAM: 32 KB (31 KB free)

<6>Blackfin L1 Data B SRAM: 32 KB (32 KB free)

<6>Blackfin L1 Instruction SRAM: 48 KB (36 KB free)

<6>net_namespace: 288 bytes

<6>NET: Registered protocol family 16

<6>Blackfin DMA Controller

<6>stamp_init(): registering device resources

<6>NET: Registered protocol family 2

<6>IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

<6>TCP established hash table entries: 1024 (order: 1, 8192 bytes)

<6>TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

<6>TCP: Hash tables configured (established 1024 bind 1024)

<6>TCP reno registered

<6>NET: Registered protocol family 1

<6>JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

<6>msgmni has been set to 42

<6>io scheduler noop registered

<6>io scheduler deadline registered (default)

<6>bfin-dma: initialized

<6>simple-gpio: now handling 48 GPIOs: 0 - 47

<6>brd: module loaded

<6>bfin_mii_bus: probed

<6>bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:1f, irq=-1, mdc_clk=2500000Hz(mdc_div=23)@sclk=120MHz)

<6>bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

<4>uclinux[mtd]: RAM probe address=0x1700000 size=0x800000

<5>Creating 1 MTD partitions on "RAM":

<5>0x00000000-0x00800000 : "ROMfs"

<6>bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

<6>i2c /dev entries driver

<6>i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400

<6>lm75 0-0048: hwmon0: sensor 'lm75'

<4>mmc_spi spi0.4: ASSUMING 3.2-3.4 V slot power

<6>mmc_spi spi0.4: SD/MMC host mmc0, no DMA, no WP, no poweroff

<6>TCP cubic registered

<6>NET: Registered protocol family 17

<4>VFS: Cannot open root device "<NULL>" or unknown-block(0,0)

<4>Please append a correct "root=" boot option; here are the available partitions:

<4>1f00            8192 mtdblock0 (driver?)

<0>Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

TranslateQuoteReplyEditDelete

 

 

2010-10-20 08:44:17     Re: Problem with new board file

Andreas Schallenberg (GERMANY)

Message: 94780   

 

I managed to solve the console problem. Now I face the following situation:

 

mmc_spi spi0.4: ASSUMING 3.2-3.4 V slot power

mmc_spi spi0.4: SD/MMC host mmc0, no DMA, no WP, no poweroff

TCP cubic registered

NET: Registered protocol family 17

mmc_spi spi0.4: requested mode not fully supported

mmc_spi spi0.4: can't change chip-select polarity

VFS: Mounted root (romfs filesystem) readonly.

Freeing unused kernel memory: 88k freed

dma_alloc_init: dma_page @ 0x001a1000 - 256 pages at 0x01f00000

attempt to access beyond end of device

mtdblock0: rw=0, want=6680, limit=6679

init: exec rc failed

attempt to access beyond end of device

mtdblock0: rw=0, want=6680, limit=6679

attempt to access beyond end of device

mtdblock0: rw=0, want=6680, limit=6679

init: Booting to single user mode

init: exec of single user shell failed

attempt to access beyond end of device

mtdblock0: rw=0, want=6680, limit=6679

...

 

The DNP/5370 board has a 4 MB NOR flash onboard that is CFI compatible.

However, only 3 MB of it are accessible since the chip select 3 is not connected

to it (last async. memory area).

 

I tried to limit the flash size in U-Boot's board file:

 

...

#define CONFIG_FLASH_BASE     0x20000000

#define CFG_FLASH_BASE        0x20000000

#define CFG_FLASH_SIZE        3

// also tried this:

//#define CFG_FLASH_SIZE        0x00300000

 

#define CFG_FLASH_CFI           /* The flash is CFI compatible */

#define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */

#define CFG_FLASH_PROTECTION

#define CFG_MAX_FLASH_BANKS     1

#define CFG_MAX_FLASH_SECT      71

...

 

but it is ignored:

 

U-Boot 2008.10-svn1216 (ADI-2009R1-rc2) (Oct 20 2010 - 14:34:42)

 

CPU:   ADSP bf537-0.3 (Detected Rev: 0.3) (bypass boot)

Board: DilNet DNP5370 BF537 board

Clock: VCO: 600 MHz, Core: 600 MHz, System: 120 MHz

RAM:   32 MB

Flash:  4 MB

...

 

U-Boot does not seem to have a problem with this. But could this be the source

for the error ("attempt to access beyond end of device") with Linux?

TranslateQuoteReplyEditDelete

 

 

2010-10-20 14:29:05     Re: Problem with new board file

Mike Frysinger (UNITED STATES)

Message: 94783   

 

u-boot flash settings have no bearing whatsoever on kernel flash behavior

Attachments

    Outcomes