AnsweredAssumed Answered

uClinux自动执行应用程序的问题

Question asked by beforewind on Nov 5, 2012
Latest reply on Feb 27, 2014 by Aaronwu

hi,

  我下BF609下开发好应用程序,现在想在uClinux启动后自动运行该应用程序。

  操作如下:

  1、修改buildroot\output\target\etc\rc文件,在最后增加一行

       /bin/hello

  2、拷贝生成的hello可执行程序到buildroot\output\target\bin

     chmod 777 hello

  3、在build下make,产生uImage,拷贝到tftpboot目录,由u-boot自动加载启动uClinux

  4、log如下,并没有出现“hello World!”的字样

5、在uClinux的etc目录下查看rc文件,确实包含了我在步骤1增加的行/bin/hello

 

请问问题出在哪里?是否需要做其他配置?谢谢!

 

 

U-Boot 2011.09 (ADI-2012R1) (Oct 17 2012 - 12:43:27)

 

 

CPU:   ADSP bf609-0.0 (Detected Rev: 0.0) (spi flash boot)

Board: ADI BF609 EZ-Kit board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 25 MHz, Core: 500 MHz, System0: 125 MHz, System1: 125 MHz, Dclk: 250

MHz

RAM:   128 MiB

Flash: 16 MiB

SF: Detected W25Q32 with page size 4 KiB, total 4 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

other init

lcd welcome!

Net:   mii0, mii1

Hit any key to stop autoboot:  0

Using mii0 device

TFTP from server 192.168.61.103; our IP address is 192.168.61.105

Filename 'uImage'.

Load address: 0x1000000

Loading: #################################################################

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

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

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

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

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

done

Bytes transferred = 5363526 (51d746 hex)

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

   Image Name:   bf609-any-3.3.0-ADI-2012R1-pre-0

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    5363462 Bytes = 5.1 MiB

   Load Address: 00001000

   Entry Point:  002efae0

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 002efae0

Linux version 3.3.0-ADI-2012R1-pre-00781-gd9f6813-dirty (ubuntu10@ubuntu) (gcc v

ersion 4.3.5 (ADI-2012R1-RC2) ) #13 Sun Nov 4 08:57:00 PST 2012

register early platform devices

bootconsole [early_shadow0] enabled

ERROR: Not running on ADSP-BF609: unknown CPUID 0x0000 Rev 0.0

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 128MB

Kernel Managed Memory: 128MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x001feee0

  rodata    = 0x001fef04-0x002abbbc

  bss       = 0x002ac000-0x002c5110

  data      = 0x002c5110-0x002ec000

    stack   = 0x002ea000-0x002ec000

  init      = 0x002ec000-0x00693000

  available = 0x00693000-0x07f00000

  DMA Zone  = 0x07f00000-0x08000000

Hardware Trace active and enabled

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

Compiled for ADSP-BF609 Rev any, running on 0.0

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

Processor Speed: 500 MHz core clock, 125 MHz SCLk, 125 MHz SCLK0, 125 MHz SCLK1

and 250 MHz DCLK

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

  L2 SRAM        : uncacheable in instruction cache

Data Cache Enabled for CPU0

  External memory: cacheable (write-through) in data cache

  L2 SRAM        : uncacheable in data cache

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 32258

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=(25000000) earlyprintk=seri

al,uart0,57600 console=ttyBF0,57600 ip=192.168.61.105:192.168.61.103:192.168.61.

1:255.255.255.0:bf609-ezkit:eth0:off

PID hash table entries: 512 (order: -1, 2048 bytes)

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

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

Memory available: 122148k/131072k RAM, (3740k init code, 2039k kernel code, 949k

data, 1024k dma, 1172k reserved)

NR_IRQS:299

Configuring Blackfin Priority Driven Interrupts

console [ttyBF0] enabled, bootconsole disabled

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 989.18 BogoMIPS (lpj=1978368)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (9 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 64 KB (51 KB free)

Blackfin L2 SRAM: 256 KB (256 KB free)

NET: Registered protocol family 16

gpiochip_add: registered GPIOs 0 to 111 on device: BFIN-GPIO

Blackfin DMA Controller

plm60x_init(): registering device resources

plm60x_init(): request emac0 pins failed

plm60x_init(): request emac1 pins failed

bio: create slab <bio-0> at 0

SCSI subsystem initialized

bfin-spi bfin-spi.0: bfin-spi probe success

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

i2c-bfin-twi i2c-bfin-twi.0: Blackfin on-chip I2C TWI Contoller, regs_base@ffc01

e00

i2c-bfin-twi i2c-bfin-twi.1: Blackfin on-chip I2C TWI Contoller, regs_base@ffc01

f00

Switching to clocksource bfin_cs_cycles

musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)

musb-hdrc musb-hdrc: USB OTG mode controller at ffcc1000 using DMA, IRQ 137

NET: Registered protocol family 2

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

TCP established hash table entries: 4096 (order: 3, 32768 bytes)

TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 4096 bind 4096)

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

RPC: Registered named UNIX socket transport module.

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

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

msgmni has been set to 238

io scheduler noop registered (default)

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc02000 (irq = 96) is a BFIN-UART

bfin-uart.1: ttyBF1 at MMIO 0xffc02400 (irq = 99) is a BFIN-UART

bfin-lcd_init

register_chr_dev return 0

bfin-lcd register success

bfin-lcd: register major 0

pREG_SMC0_B1CTL=3000001

pREG_SMC0_B1CTL=3000001

pREG_SMC0_B1TIM=10771077

pREG_SMC0_B1TIM=10771077

pREG_SMC0_B1ETIM=97733

pREG_SMC0_B1ETIM=97733

usbcore: registered new interface driver ub

physmap platform flash device: 01000000 at b0000000

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x00

0089 Chip ID 0x00881e

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Using buffer write method

Using auto-unlock on power-up/resume

cfi_cmdset_0001: Erase suspend on write enabled

Creating 3 MTD partitions on "physmap-flash.0":

0x000000000000-0x000000100000 : "bootloader(nor)"

0x000000100000-0x000000900000 : "linux kernel(nor)"

0x000000900000-0x000001000000 : "file system(nor)"

m25p80 spi0.1: w25q32 (4096 Kbytes)

Creating 3 MTD partitions on "m25p80":

0x000000000000-0x000000080000 : "bootloader(spi)"

0x000000080000-0x000000200000 : "linux kernel(spi)"

0x000000200000-0x000000400000 : "file system(spi)"

CAN device driver interface

bfin_can bfin_can.0: bfin_can device registered(&reg_base=ffc00a00, rx_irq=55, t

x_irq=56, err_irq=57, sclk=125000000)

        DWMAC100

No HW DMA feature register supported

Enhanced/Alternate descriptors

        DWMAC100

No HW DMA feature register supported

Enhanced/Alternate descriptors

usbcore: registered new interface driver usbtmc

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

usbcore: registered new interface driver usbtest

gadget: Gadget Zero, version: Cinco de Mayo 2008

gadget: zero ready

musb-hdrc musb-hdrc: MUSB HDRC host driver

musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 1

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: MUSB HDRC host driver

usb usb1: Manufacturer: Linux 3.3.0-ADI-2012R1-pre-00781-gd9f6813-dirty musb-hcd

 

 

usb usb1: SerialNumber: musb-hdrc

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

input: adp5588-keys as /devices/platform/i2c-bfin-twi.0/i2c-0/0-0034/input/input

0

adp5588_keys 0-0034: Rev.2 keypad, irq 217

rtc-pcf8563 0-0051: chip found, driver version 0.4.3

rtc-pcf8563 0-0051: low voltage detected, date/time is not reliable.

rtc-pcf8563 0-0051: retrieved date/time is not valid.

rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0

i2c /dev entries driver

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Blackfin hardware CRC crypto driver

dma_alloc_init: dma_page @ 0x04b21000 - 256 pages at 0x07f00000

bfin-hmac-crc bfin-hmac-crc.0: initialized

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

icc icc.0: initialized

TCP cubic registered

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

can: raw protocol (rev 20090105)

can: broadcast manager protocol (rev 20090105 t)

rtc-pcf8563 0-0051: low voltage detected, date/time is not reliable.

rtc-pcf8563 0-0051: retrieved date/time is not valid.

rtc-pcf8563 0-0051: hctosys: invalid date/time

eth0: device MAC address 02:80:ad:20:31:e8

stmmac: probed

eth0: PHY ID 20005ce1 at 1 IRQ 0 (stmmac-0:01) active

No MAC Management Counters available

IP-Config: Complete:

     device=eth0, addr=192.168.61.105, mask=255.255.255.0, gw=192.168.61.1,

     host=bf609-ezkit, domain=, nis-domain=(none),

     bootserver=192.168.61.103, rootserver=192.168.61.103, rootpath=

Freeing unused kernel memory: 3740k freed

 

 

 

 

BusyBox v1.17.4 (2012-11-04 00:11:00 PDT) hush - the humble shell

 

 

root:/> PHY: stmmac-0:01 - Link is Up - 100/Full

Outcomes