AnsweredAssumed Answered

BF537 and Asterisk

Question asked by nickabrham on Sep 11, 2012
Latest reply on Sep 13, 2012 by Aaronwu

Hi Everyone,

I am able to create the final image by following the document http://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:asterisk and using the BF-537 Stamp Board along with the PBX hardware - 2FXS+2FXO daughter card. This created image easily loads onto the BF-537 Stamp Board through TFTP, and gives following output when I run the bootm command.

 

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bf537> tftp 0x1000000 uImage.ext2

Using BF537 ETHERNET device

TFTP from server 192.168.0.2; our IP address is 192.168.0.15

Filename 'uImage.ext2'.

Load address: 0x1000000

Loading: T #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

done

Bytes transferred = 14583520 (de86e0 hex)

bf537> bootm

## Booting image at 01000000 ...

   Image Name:   uClinux Kernel and ext2

   Created:      2012-08-09   8:09:01 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    14583456 Bytes = 13.9 MB

   Load Address: 00001000

   Entry Point:  00001000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 1000

Linux version 2.6.19.3-ADI-2007R1-svn (root@localhost.localdomain) (gcc version2Warning: limiting memory to 38MB due to hardware anomaly 05000263

Blackfin support (C) 2004-2006 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev. 0.2

Warning: Compiled for Rev 2, but running on Rev 3

Blackfin uClinux support by http://blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 100 Mhz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x00121d18

  init      = 0x00122000-0x001318bc

  data      = 0x001339e0-0x0016af08

  stack     = 0x00134000-0x00136000

  bss       = 0x0016af10-0x0019686c

  available = 0x0019686c-0x02600000

  rootfs    = 0x02600000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

Instruction Cache Enabled

Data Cache Enabled (write-through)

Hardware Trace Enabled

Built 1 zonelists.  Total pages: 9652

Kernel command line: root=/dev/mtdblock0 rw

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

bfin-rtc: invalid date; resetting

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Physical pages: 2600

Memory available: 36688k/64305k RAM, (62k init code, 1155k kernel code, 174k da)Blackfin Scratchpad data SRAM: 4 KB

Blackfin DATA_A SRAM: 16 KB

Blackfin DATA_B SRAM: 16 KB

Blackfin Instruction SRAM: 48 KB

Security Framework v1.0.0 initialized

Capability LSM initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

.IP route cache hash table entries: 512 (order: -1, 2048 bytes)

TCP established hash table entries: 2048 (order: 1, 8192 bytes)

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

TCP: Hash tables configured (established 2048 bind 1024)

TCP reno registered

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

Dynamic Power Management Controller Driver v0.1: major=10, minor = 254

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

Blackfin mac net device registered

uclinux[mtd]: RAM probe address=0x2600000 size=0x1900000

Creating 1 MTD partitions on "RAM":

0x00000000-0x01900000 : "ROMfs"

uclinux[mtd]: set ROMfs:EXT2  to be root filesystem

rtc-bfin rtc-bfin: rtc intf: sysfs

rtc-bfin rtc-bfin: rtc intf: proc

rtc-bfin rtc-bfin: rtc intf: dev (254:0)

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

Zapata Telephony Interface Registered on major 196

chip_0 is successfully set to daisy chain!

chip_1 is failed set to daisy chain!

iRxBuffer1 = 0xff800000

iTxBuffer1 = 0xff800080

FXS detect..... card=0

Testing for ProSLIC

ProSLIC module 0, product 0, version 5

ProSLIC on module 0 seems sane.

reg 0: 0x85

reg 14: 0x0

reg 74: 0x32

reg 80: 0x0

reg 81: 0x0

reg 92: 0xff

reg 82: 0xc6

reg 83: 0xc6

ProSLIC on module 0 powered up to -72 volts (c2) in 36 ms

Loop current set to 20mA!

Post-leakage voltage: 31 volts

reg 0: 0x85

reg 14: 0x0

reg 74: 0x32

reg 80: 0x0

reg 81: 0x0

reg 92: 0xff

reg 82: 0xc6

reg 83: 0xc7

ProSLIC on module 0 powered up to -72 volts (c0) in 32 ms

Loop current set to 20mA!

Start manual calibration

Init Indirect Registers completed successfully.

Proslic module 0 loop current is 20mA

Module 0: Installed -- AUTO FXS/DPO

FXS detect..... card=1

Testing for ProSLIC

  ProSLIC not loaded...

FXO detect..... card=2

Testing for DAA...

  DAA not found! (blah = 0xff)

Module 2: Not installed

FXO detect..... card=3

Testing for DAA...

  DAA not found! (blah = 0xff)

Module 3: Not installed

Found: Blackfin STAMP (4 modules)

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 00:00:03 (3)

VFS: Mounted root (ext2 filesystem).

Freeing unused kernel memory: 60k freed (0x122000 - 0x130000)

dma_alloc_init: dma_page @ 0x0012c000 - 256 pages at 0x03f00000

 

Welcome to:

       ____ _  _

      /  __| ||_|             _  _

_   _| |  | | _ ____  _   _ \ \/ /

| | | | |  | || |  _ \| | | | \  /

| |_| | |__| || | | | | |_| | /  \

|  ___\____|_||_|_| |_|\____|/_/\_\

|_|

 

For further information see:

http://www.uclinux.org/

http://blackfin.uclinux.org/

 

BusyBox v1.4.1 (2012-08-09 13:01:23 PKT) Built-in shell (msh)

Enter 'help' for a list of built-in commands.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

But when I try to run Asterisk by running following command on the root prompt

 

root:~> ztcfg

Registered tone zone 0 (United States / North America)

root:~> cp -a /usr/var/* /var/

root:~> rm -rf /usr/var

root:~> asterisk -vvvc

 

I get following output instead of Asterisk CLI Prompt.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Jump to address 0 - 0x0fff

 

CURRENT PROCESS:

 

COMM=asterisk PID=109

TEXT = 0x01800040-0x01982500  DATA = 0x01982504-0x01a3ef64

BSS = 0x01a3ef64-0x01b73214   USER-STACK = 0x01bfff70

 

return address: 0x00000420; contents of [PC-16...PC+8]:

 

 

RETE:  00000000  RETN: 02178000  RETX: 00000420  RETS: 0195c15e

IPEND: 0030  SYSCFG: 0036

SEQSTAT: 0000002d    SP: 02177f24

R0: 01a3ee40    R1: 00000000    R2: 00000001    R3: 00000001

R4: 024003b4    R5: 0183ad34    R6: 00000000    R7: 01a3e504

P0: 01a3ee40    P1: 00000000    P2: 00000420    P3: 01bffdd0

P4: 01a3e504    P5: 01a3ee40    FP: 01bffd44

A0.w: 00000000    A0.x: 00000000    A1.w: 00000000    A1.x: 00000000

LB0: 01978ad1  LT0: 01978ad0  LC0: 00000000

LB1: 003bee81  LT1: 003bee80  LC1: 00000000

B0: 00000000  L0: 00000000  M0: 00000000  I0: 00000000

B1: 00000000  L1: 00000000  M1: 00000000  I1: 0026c240

B2: 00000000  L2: 00000000  M2: 00000000  I2: 00000000

B3: 00000000  L3: 00000000  M3: 00000000  I3: 00000000

 

USP: 01bffd38   ASTAT: 02000020

DCPLB_FAULT_ADDR=01a3ee40

ICPLB_FAULT_ADDR=00000420

 

 

Hardware Trace:

0 Target : <0x00004580> { _trap_c + 0x0 }

   Source : <0xffa00b50> { _exception_to_level5 + 0xb4 }

1 Target : <0xffa00a9c> { _exception_to_level5 + 0x0 }

   Source : <0xffa00a9a> { _ex_trap_c + 0x4e }

2 Target : <0xffa00a4c> { _ex_trap_c + 0x0 }

   Source : <0xffa00bf0> { _trap + 0x28 }

3 Target : <0xffa00bc8> { _trap + 0x0 }

   Source : <0x0195c15c> [ asterisk + 0x15c15c ]

4 Target : <0x0195c140> [ asterisk + 0x15c140 ]

   Source : <0x0195b036> [ asterisk + 0x15b036 ]

5 Target : <0x0195b030> [ asterisk + 0x15b030 ]

   Source : <0x0195b026> [ asterisk + 0x15b026 ]

6 Target : <0x0195b020> [ asterisk + 0x15b020 ]

   Source : <0x0195ae28> [ asterisk + 0x15ae28 ]

7 Target : <0x0195ae24> [ asterisk + 0x15ae24 ]

   Source : <0x0195adf0> [ asterisk + 0x15adf0 ]

8 Target : <0x0195adc0> [ asterisk + 0x15adc0 ]

   Source : <0x0195b01c> [ asterisk + 0x15b01c ]

9 Target : <0x0195b01c> [ asterisk + 0x15b01c ]

   Source : <0x0195aff8> [ asterisk + 0x15aff8 ]

10 Target : <0x0195afec> [ asterisk + 0x15afec ]

   Source : <0x019813be> [ asterisk + 0x1813be ]

11 Target : <0x019813b6> [ asterisk + 0x1813b6 ]

   Source : <0x01959c06> [ asterisk + 0x159c06 ]

12 Target : <0x01959bf8> [ asterisk + 0x159bf8 ]

   Source : <0x01959bee> [ asterisk + 0x159bee ]

13 Target : <0x01959bdc> [ asterisk + 0x159bdc ]

   Source : <0x01959b88> [ asterisk + 0x159b88 ]

14 Target : <0x01959b84> [ asterisk + 0x159b84 ]

   Source : <0x01959b50> [ asterisk + 0x159b50 ]

15 Target : <0x01959b20> [ asterisk + 0x159b20 ]

   Source : <0x01959bd8> [ asterisk + 0x159bd8 ]

Stack from 02177f04:

        0183ad34 ffa00b54 00138714 00138714 00138710 00000008 024003b4 01970bc8

        00000420 00000030 0000002d 00000000 02178000 00000420 00000420 0195c15e

        01a3ee40 02000020 003bee81 01978ad1 003bee80 01978ad0 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 0026c240 00000000 01bffd38 01bffd44 01a3ee40 01a3e504

Call Trace:

 

SIGSEGV

root:~>

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Can anyone please let me know why am I not able to get the Asterisk CLI prompt.

What I believe is that the Asterisk failed to RUN.

The image is created using 2007 uClinux distribution along with 2007 release toolchain, and then enable Asterisk according to the document http://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:asterisk.

 

Regards,

Nick.

Outcomes