Home Forum Developers IP0x Default compile won't boot on IP02

JRPassphrase Registration Control

In order to register on this site, you must first submit the passphrase below.

TODO list for each hardware target can be found as sticky topic in the corresponding forum


arad85
useravatar
User Info

Default compile won't boot on IP02

Hi,

I've just got an IP02 and am having troubles getting it to do what I want, so thought I'd take a look at switchfin. I've installed a Fedora 17 VM and pulled the source files. I've configured it and made a binary (which compiled fine) using the reames. I've uploaded it to a tftp server and pulled it down onto the box, but I cannot get it to boot. I'm using the standard bootloader that comes with an Atcom IP02 and this is the output:

Code:


U-Boot 2010.06 (ADI-2010R1-pre) (Jan 08 2011 - 14:09:20)

CPU:   ADSP bf532-0.5 (Detected Rev: 0.6) (spi flash boot)
Board: IPPBX IP0x
Clock: VCO: 400 MHz, Core: 400 MHz, System: 133.333 MHz
RAM:   64 MiB
NAND:  256 MiB
SF: Detected W25X40 with page size 256, total 512 KiB
In:    serial
Out:   serial
Err:   serial
Net:   dm9000
starting from spi flash
Hit any key to stop autoboot:  0
ip0x> tftp uImage
dm9000 i/o: 0x20100000, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:09:45:5a:1c:cc
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.200
Filename 'uImage'.
Load address: 0x1000000
Loading: T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ####
done
Bytes transferred = 7340032 (700000 hex)
Automatic boot of image at addr 0x01000000 ...
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux Kernel and ext2
   Image Type:   Blackfin Linux Kernel Image (gzip compressed)
   Data Size:    7323764 Bytes = 7 MiB
   Load Address: 00001000
   Entry Point:  0022fddc
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
Starting Kernel at = 0022fddc

It just hangs........

Here is my .config file:

Code:


[andy@afin switchfin]$ cat !$
cat .config
#
# Automatically generated make config: don't edit
#
SF_HAVE_DOT_CONFIG=y
SF_TARGET_TOOLCHAIN_COMPILER_4=y
# SF_PR1_APPLIANCE is not set
# SF_BR4_APPLIANCE is not set
# SF_BR4_APPLIANCE_PLUS is not set
SF_IP04=y
# SF_IP01 is not set
# SF_FX08 is not set
SF_TARGET_DEFAULTS=y
# SF_TARGET_CUSTOM is not set

#
# Package Selection for the target
#

#
# The default minimal system
#
SF_PACKAGE_UCLINUX_DIST=y
SF_PACKAGE_UCLINUX_CONFIG="package/uClinux-dist/uClinux-dist.config"
# SF_BF532 is not set
SF_BF533=y
SF_BF53X_REV_0_6=y
# SF_BF53X_REV_0_5 is not set
SF_PACKAGE_UBOOT=y

#
# Hardware settings
#
# SF_PACKAGE_HOME_AUTO is not set

#
# DAHDI
#
SF_PACKAGE_DAHDI_EXTRATOOLS=y
# SF_PACKAGE_DAHDI_GSM1 is not set
# SF_PACKAGE_IKSEMEL is not set

#
# Asterisk
#
SF_PACKAGE_ASTERISK=y
SF_ASTERISK_1_4=y
# SF_ASTERISK_1_6 is not set
# SF_ASTERISK_1_8 is not set
# SF_PACKAGE_ASTERISK_VERBOSE is not set
# SF_SPANDSP_FAX is not set
# SF_SPANDSP_CALLERID is not set
# SF_PACKAGE_ASTERISK-H323 is not set
# SF_PACKAGE_ASTERISK_G729 is not set
# SF_PACKAGE_NVFAX is not set
# SF_PACKAGE_DEVSTATE is not set
# SF_PACKAGE_ATTRAFAX is not set

#
# Yate
#
# SF_PACKAGE_YATE is not set

#
# GUI
#
SF_PACKAGE_ASTERISKGUI=y
# SF_PACKAGE_NOGUI is not set
# SF_ASTERISK_GUI_3_0 is not set
SF_ASTERISK_GUI_4_0=y

#
# Flite
#
# SF_PACKAGE_FLITE is not set

#
# Applications
#
SF_PACKAGE_TFTPD=y
# SF_PACKAGE_PERL is not set
# SF_PACKAGE_LIGHTTPD is not set
# SF_PACKAGE_SQLITE3 is not set
# SF_PACKAGE_SSMTP is not set
# SF_PACKAGE_N2N is not set
# SF_PACKAGE_RSYNC is not set
# SF_PACKAGE_CGIC is not set
# SF_PACKAGE_VIM is not set
# SF_PACKAGE_BONJOUR is not set
# SF_PACKAGE_INADYN is not set
# SF_PACKAGE_CURL is not set
# SF_PACKAGE_PROCWATCH is not set
# SF_PACKAGE_TIFF2PDF is not set
# SF_PACKAGE_GHOSTSCRIPT is not set
# SF_PACKAGE_LUA is not set
# SF_PACKAGE_UW-IMAP is not set
# SF_PACKAGE_IPTABLES is not set
# SF_PACKAGE_NFS is not set
# SF_PACKAGE_VTUN is not set
# SF_PACKAGE_PPP is not set
# SF_PACKAGE_PPPOE is not set
SF_PACKAGE_ANACRON=y

#
# Build options
#
SF_WGET="wget --passive-ftp -nd"
SF_SVN="svn co"
SF_TAR_OPTIONS=""
SF_DL_DIR="$(BASE_DIR)/dl"
SF_SOURCEFORGE_MIRROR="easynews"
SF_TOPDIR_PREFIX=""
SF_TOPDIR_SUFFIX=""
SF_GNU_BUILD_SUFFIX="bfin-uclinux"
SF_JLEVEL=1
SF_INSTALL_ELF_TRIM_LIBS=y

Any ideas anyone?


Administrator has disabled public posting
arad85
useravatar
User Info

Re: Default compile won't boot on IP02

Well.. it turned oiut that the problem is with the driver... The file: linux-2.6.x/drivers/tty/serial/bfin_uart.c has a probe which checks a couple of interrupts - the third of which is the h/w CTS/RTS one. Unfortunately, there doesn't seem to be an option to set this correctly in the config so the register of the interrupt gets forgotten about, only for the driver init to fail when it is asked for this interrupt. The workaround (bug fix) is to #ifdef accordingly so:

Code:


                uart->port.irq = uart->rx_irq;

                uart->status_irq = platform_get_irq(pdev, 2);
                if (uart->status_irq < 0) {
                        dev_err(&pdev->dev, "No uart status IRQ specified\n");
                        ret = -ENOENT;
                        goto out_error_unmap;
                }

#ifdef CONFIG_SERIAL_BFIN_DMA
                spin_lock_init(&uart->rx_lock);

becomes:

Code:


                uart->port.irq = uart->rx_irq;


#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
                uart->status_irq = platform_get_irq(pdev, 2);
                if (uart->status_irq < 0) {
                        dev_err(&pdev->dev, "No uart status IRQ specified\n");
                        ret = -ENOENT;
                        goto out_error_unmap;
                }
#endif


#ifdef CONFIG_SERIAL_BFIN_DMA
                spin_lock_init(&uart->rx_lock);

and the system boots..........


Administrator has disabled public posting
rinaldo
useravatar
User Info

Re: Default compile won't boot on IP02

after the patch file bfin_uart.c. the system starts to boot, but gives no error in UBI creating partitions on flash.

ma_alloc_init: dma_page @ 0x010a9000 - 256 pages at 0x03f00000
VFS: Mounted root (ext2 filesystem) on device 31:0.
Freeing unused kernel memory: 108k freed
ubiattach: error!: can not attach mtd5
            19 error (No such device)
ubidetach: error!: can not detach mtd5
            19 error (No such device)
ubiformat: error!: can not get information about "/ dev/mtd5"
            19 error (No such device)
ubiattach: error!: can not attach mtd5
            19 error (No such device)
libubi: error! "/ dev/ubi0" has major: minor 253:0, but this does not correspondence to any existing UBI device or volume
ubimkvol: error! "/ dev/ubi0" is not an UBI device node
mount: mounting on ubi0 / persistent failed: No such device
Checking for upload image to program
Can not find persistent configuration files
We are going to unpack default configuration!!


Administrator has disabled public posting
arad85
useravatar
User Info

Re: Default compile won't boot on IP02

Yes. IP0x is broken in SVN at the moment.

I now have this working - booting correctly, creating partitions correctly etc. Give me a day or so and I'll upload a patch set somewhere to apply to the default checkout to get it all working.

I want to do some work on the boot scripts too, but I'll get this working first and post something here.


Administrator has disabled public posting
arad85
useravatar
User Info

Re: Default compile won't boot on IP02

So...

Notwithstanding that the download site blackfin.uclinux.org is down at the moment, so you can't download the Linux packages:

Code:


svn co https://switchfin.svn.sourceforge.net/svnroot/switchfin/switchfin/trunk@714 orig-switchfin/
wget http://www.arad85.co.uk/downloads/Rowetel.tar.gz
tar xvzf Rowetel.tar.gz
make
make image

Note: I'm checking out version 714 which backs out the changes I guess you made and I also have set  Build options->Cull unused ELF shared libraries in make menuconfig

gives:

Code:


## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux Kernel and ext2
   Image Type:   Blackfin Linux Kernel Image (gzip compressed)
   Data Size:    7829260 Bytes = 7.5 MiB
   Load Address: 00001000
   Entry Point:  0022fddc
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
Starting Kernel at = 0022fddc
Linux version 3.0.8-ADI-2011R1switchfin (andy@afin.home) (gcc version 4.3.5 (ADI-2011R1-RC4) ) #1 Sat Nov 3 18:42:57 GMT 2012
register early platform devices
Found mtd parition at 0x00248000, (len=0x1400000), moving to 0x02b00000
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
  fixedcode = 0x00000400-0x00000490
  text      = 0x00001000-0x0018d420
  rodata    = 0x0018d420-0x002042f4
  bss       = 0x00205000-0x002151b4
  data      = 0x002151b4-0x0022c000
    stack   = 0x0022a000-0x0022c000
  init      = 0x0022c000-0x00248000
  available = 0x00248000-0x02b00000
  rootfs    = 0x02b00000-0x03f00000
  DMA Zone  = 0x03f00000-0x04000000
Hardware Trace active and enabled
Boot Mode: 6
Reset caused by Software reset
Blackfin support (C) 2004-2010 Analog Devices, Inc.
Compiled for ADSP-BF533 Rev 0.3
Warning: Compiled for Rev 3, but running on Rev 6
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 400 MHz core clock and 133 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
  External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
  External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 10922
Kernel command line: ethaddr=00:09:45:5A:1C:CC ethaddr1=00:09:45:5A:1C:CD console=ttyBF0,115200 earlyprintk=serial,uart0,115200 root=/dev/mtdblock0 rw
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 41088k/65536k RAM, (112k init code, 1585k kernel code, 635k data, 1024k dma, 21092k reserved)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:81
Configuring Blackfin Priority Driven Interrupts
console [ttyBF0] enabled
Calibrating delay loop... 792.57 BogoMIPS (lpj=1585152)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 64 KB (51 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
ip0x_init(): chip_id=627A50CB,dspid=E5040006
ip0x_init(): registering nand resources
ip0x_init(): registering platform devices
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource bfin_cs_cycles
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
msgmni has been set to 80
io scheduler noop registered
io scheduler cfq registered (default)
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 13) is a BFIN-UART
bfin_sport: registered sport0
bfin_sport: registered sport1
brd: module loaded
uclinux[mtd]: RAM probe address=0x2b00000 size=0x1400000
Creating 1 MTD partitions on "RAM":
0x000000000000-0x000001400000 : "ROMfs"
Generic platform RAM MTD, (c) 2004 Simtec Electronics
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1353 at 0x00000a920000
Creating 3 MTD partitions on "gen_nand":
0x000000000000-0x000000a00000 : "linux kernel(nand)"
0x000000a00000-0x000001400000 : "linux kernel backup(nand)"
0x000001400000-0x000010000000 : "persistent file system(nand)"
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
dm9000 Ethernet Driver, V1.31
eth0: dm9000b at 20100000,20100002 IRQ 48 MAC: 00:09:45:5a:1c:cc (chip)
ethaddr parsed from commandline: 00:09:45:5A:1C:CD▒▒
eth1: dm9000b at 20200000,20200002 IRQ 47 MAC: 00:09:45:5a:1c:cd (command line)
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8
dma_alloc_init: dma_page @ 0x010be000 - 256 pages at 0x03f00000
VFS: Mounted root (ext2 filesystem) on device 31:0.
Freeing unused kernel memory: 112k freed
UBI: attaching mtd3 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: max. sequence number:       724
UBI: attached mtd3 to ubi0
UBI: MTD device name:            "persistent file system(nand)"
UBI: MTD device size:            236 MiB
UBI: number of good PEBs:        1887
UBI: number of bad PEBs:         1
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 1887
UBI: number of PEBs reserved for bad PEB handling: 18
UBI: max/mean erase counter: 2/1
UBI: image sequence number:  1627066661
UBI: background thread "ubi_bgt0d" started, PID 263
UBI device number 0, total 1887 LEBs (243468288 bytes, 232.2 MiB), available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "persistent"
UBIFS: file system size:   239210496 bytes (233604 KiB, 228 MiB, 1854 LEBs)
UBIFS: journal size:       11999232 bytes (11718 KiB, 11 MiB, 93 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  4952683 bytes (4836 KiB)
Checking for upload image to program
We already have unpacked default configuration...
Checking if the reset button is pressed
mount: mounting /dev/mmcblk0p1 on /mnt/sd failed: No such device or address
no sd/mmc card found
dm9000 dm9000.0: eth0: link down
VLAN not configured!
dahdi: Telephony Interface Registered on major 196
dahdi: Version: 2.5.0.2
bfsi_sport_init res: 1
After DASIY
port: 1 port_type: S
port: 2 port_type: O
port: 3 port_type: -
port: 4 port_type: -
port: 5 port_type: -
port: 6 port_type: -
port: 7 port_type: -
port: 8 port_type: -
ProSLIC module is Si3215
Start manual calibration
Module 0: Installed -- AUTO FXS
dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
Module 1: Installed -- AUTO FXO (UK mode)
Found: Blackfin IP0x (8 modules)
wcfxs_init_ok = 1
dahdi_echocan_oslec: Registered echo canceler 'OSLEC'
modprobe: module wltc not found in modules.dep
                          __________________________________________________
                         /                                                  \
                        /         Welcome to the uClinux distribution        \
        a8888b.        /       ______         _         _     ______     (TM) \
       d888888b.      /       / ____/ _    _ (_)_  ___ / /   / ___(_)____     |
       8P"YP"Y88     /       / /__  / /   / / / /_/ __/ /_  / /_ / / __  \    |
       8|o||o|88     \      (____ )/ /_/\/ / / __/ / / _  \/  __/ / /  / /    |
       8'    .88      \    _____/ /       / / /_/ /_/ / / / /  / / /  / /     |
       8`._.' Y8.      \  /______/_/\_/\_/_/\__/\__/_/ /_/_/  /_/_/  /_/      |
      d/      `8b.____/ \                                                     |
     dP   .    Y8b.      \          For embedded telephony based on           |
    d8:'  "  `::88b       \           the Analog Devices Blackfin             /
   d8"         'Y88b       \_________________________________________________/
  :8P    '      :888
   8a.   :     _a88P                 For further information, check out:
._/"Yaa_:   .| 88P|                   - http://www.switchfin.org
\    YP"    `| 8P  `.                 - http://blog.astfin.org
/     \.___.d|    .'                  - http://blackfin.uclinux.org
`--..__)8888P`._.'                    - http://www.asterisk.org

`::88b       \           the Analog Devices Blackfin             /
   d8"         'Y88b       \_________________________________________________/
  :8P    '      :888
   8a.   :     _a88P                 For further information, check out:
._/"Yaa_:   .| 88P|                   - http://www.switchfin.org
\    YP"    `| 8P  `.                 - http://blog.astfin.org
/     \.___.d|    .'                  - http://blackfin.uclinux.org
`--..__)8888P`._.'                    - http://www.asterisk.org


IP02/IP04/IP08 powered by Switchfin
IP04 login:

Note: this hard configures 3 partitions in the flash. 2 x 0xA00000 partitions so you can have two linux kernels present and the third which takes the rest of the flash for storage.

I have disabled downloading of the audio files for the moment so you will need to log on using telnet root@192.168.1.100 (default IP address) and root/uClinux and execute create_sounds to have those present.


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 2587  Total Topics: 299  Total Polls: 1  Total Posts: 1727  Dormant
User Info:   Newest User :  user2553   Members Online: 0   Guests Online: 241
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked