2010-01-08 02:35:39     entry point

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

2010-01-08 02:35:39     entry point

Filip Vanalme (BELGIUM)

Message: 84293   

 

Hi,

 

When compiling of the Kernel (2009R1) finishes, I get the following output at the end :

 

Image Name:   Linux Kernel and ext2

Created:      Thu Jan  7 17:01:51 2010

Image Type:   Blackfin Linux Kernel Image (gzip compressed)

Data Size:    1911028 Bytes = 1866.24 kB = 1.82 MB

Load Address: 00100000

Entry Point:  0024222c

 

I would expect that the entry point would be the same as the load address. When I look at my former version (2006R1), I see that entry point and load address were indeed the same.

I think that both should be the same, but how can I fix this ?

The load address is something I found in the Kernel's configuration, but what about the entry point ?

 

Thanks for helping.

 

Filip

TranslateQuoteReplyEditDelete

 

 

2010-01-08 02:46:18     Re: entry point

Mike Frysinger (UNITED STATES)

Message: 84295   

 

there is no requirement that they need to be the same.  the output you show looks sane to me.

QuoteReplyEditDelete

 

 

2010-01-08 03:10:36     Re: entry point

Filip Vanalme (BELGIUM)

Message: 84296   

 

OK.

 

Is there a situation where they should always be the same ? It looks no coincidence to me that in my old 2OO6R1 version, they both always have address 00100000...

TranslateQuoteReplyEditDelete

 

 

2010-01-08 03:38:30     Re: entry point

Mike Frysinger (UNITED STATES)

Message: 84319   

 

we moved code around in newer releases

QuoteReplyEditDelete

 

 

2010-01-08 04:04:14     Re: entry point

Filip Vanalme (BELGIUM)

Message: 84320   

 

when loading the kernel on to our board, I get the following on the console port :

 

## Booting image at 20200000 ...

   Image Name:   Linux Kernel and ext2

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    1911037 Bytes =  1.8 MB

   Load Address: 00100000

   Entry Point:  0024222c

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 24222c

 

Then no output anymore. It looks like the Kernel does not start up at all. I have no idea what's holding it from starting...

 

(I assume that the console output should be OK ; I don't remember having configured the console uart in this version. in my old version I had an item "console uart setup")

TranslateQuoteReplyEditDelete

 

 

2010-01-08 04:16:27     Re: entry point

Mike Frysinger (UNITED STATES)

Message: 84321   

 

not related to the entry point ...

 

you probably need to change your bootargs.  the default bootargs in u-boot have been updated in each release to match the kernel.  if you didnt update your u-boot to the same release, you'll have to track the changes yourself.

QuoteReplyEditDelete

 

 

2010-01-08 07:32:48     Re: entry point

Filip Vanalme (BELGIUM)

Message: 84322   

 

OK, I downloaded the latest U-boot version, made the modifications for my own project and tried to compile. The compilation stops with this error :

 

gcc -g -Wall -pedantic -idirafter /home/FVA/XT100G2/build/u-boot/include -idirafter /home/FVA/XT100G2/build/u-boot/include2 -idirafter /home/FVA/XT100G2/build/u-boot/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o envcrc.o envcrc.c

envcrc.c:107: error: 'CONFIG_ENV_SIZE' undeclared here (not in a function)

make[1]: *** [envcrc.o] Error 1

make[1]: Leaving directory `/home/FVA/XT100G2/build/u-boot/tools'

make: *** [tools] Error 2

 

Am I missing some environment variable ?

TranslateQuoteReplyEditDelete

 

 

2010-01-08 07:51:27     Re: entry point

Mike Frysinger (UNITED STATES)

Message: 84323   

 

looks like a logic error on my part.  try the patch:

 

+#if defined(ENV_IS_EMBEDDED) || defined(ENV_IS_EMBEDDED_CUSTOM)

unsigned char environment[CONFIG_ENV_SIZE];

+#else

+unsigned char environment[1024]; /* dummy */

+#endif

QuoteReplyEditDelete

 

 

2010-01-12 09:40:29     Re: entry point

Filip Vanalme (BELGIUM)

Message: 84468   

 

With the new u-boot, I have exactly the same behaviour. When starting the board I get :

 

U-Boot 2008.10 (ADI-2009R1-rc3) (Jan 12 2010 - 15:23:49)

 

CPU:   ADSP bf561-0.5 (Detected Rev: 0.5) (bypass boot)

Board: TELVIC XT100G2 board

       Support:   blackfin.uclinux.org/

Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz

RAM:   128 MB

Flash: 16 MB

In:    serial

Out:   serial

Err:   serial

Net:   Hit any key to stop autoboot:  0

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

   Image Name:   Linux Kernel and ext2

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    1911037 Bytes =  1.8 MB

   Load Address: 00100000

   Entry Point:  0024222c

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 0024222c

 

Then no output anymore ; the board seems to hang.

TranslateQuoteReplyEditDelete

 

 

2010-01-12 10:45:03     Re: entry point

Filip Vanalme (BELGIUM)

Message: 84473   

 

Ok, found a problem. Stupid problem : forgot to enable the serial port driver in the configuration and assign console to internal port.

 

Now I see output is displayed but no correct characters. The speed is not correct. U-boot is in 115200bps, kernel changes to 57600bps. Now I have to figure out where to set that speed... (CONFIG_BAUDRATE is 115200 in my boards config file, so that's not the one that is not correct...)

TranslateQuoteReplyEditDelete

 

 

2010-01-12 13:35:35     Re: entry point

Mike Frysinger (UNITED STATES)

Message: 84479   

 

again, those are parameters controlled by the default u-boot bootargs.  look at the console= settings.  you should change your default u-boot env to match.

QuoteReplyEditDelete

 

 

2010-01-13 04:52:10     Re: entry point

Filip Vanalme (BELGIUM)

Message: 84530   

 

Output is OK now.

 

When Kernel starts up, I get the following :

 

U-Boot 2008.10 (ADI-2009R1-rc3) (Jan 13 2010 - 08:57:28)

 

CPU:   ADSP bf561-0.5 (Detected Rev: 0.5) (bypass boot)

Board: TELEVIC XT100G2 board

       Support:   blackfin.uclinux.org/

Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz

RAM:   128 MB

Flash: 16 MB

In:    serial

Out:   serial

Err:   serial

Net:   Hit any key to stop autoboot:  5  4  3  2  1  0

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

   Image Name:   Linux Kernel and ext2

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    1978943 Bytes =  1.9 MB

   Load Address: 00100000

   Entry Point:  002664ec

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 002664ec

Linux version 2.6.28.10-ADI-2009R1blackfin (FVA@tlv-thc-lx-01) (gcc version 4.1.2 (ADI svn)) #34 PREEMPT Tue Jan 12 16:07:45 CET 2010

Board Memory: 128MB

Kernel Managed Memory: 128MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00100000-0x001fa540

  rodata    = 0x001fa540-0x00231d48

  bss       = 0x00232000-0x00254cd8

  data      = 0x00254cd8-0x00262000

    stack   = 0x00260000-0x00262000

  init      = 0x00262000-0x00276000

  available = 0x00276000-0x07000000

  rootfs    = 0x07000000-0x07f00000

  DMA Zone  = 0x07f00000-0x08000000

Hardware Trace Active and Enabled

Boot Mode: 0

Recovering from Watchdog event

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

Compiled for ADSP-BF561 Rev 0.5

Blackfin Linux support by   blackfin.uclinux.org/

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

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-through)

Data Cache (L2 SRAM) Enabled (write-through)

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

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 console=ttyBF0,115200

Configuring Blackfin Priority Driven Interrupts

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

console [ttyBF0] enabled

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

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

Memory available: 111040k/131072k RAM, (80k init code, 1001k kernel code, 415k data, 1024k dma, 2152k reserved)

Calibrating delay loop... 985.08 BogoMIPS (lpj=492544)

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: 16 KB (5 KB free)

Blackfin L2 SRAM: 128 KB (128 KB free)

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

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

NET: Registered protocol family 1

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

msgmni has been set to 216

io scheduler noop registered

io scheduler anticipatory registered

io scheduler cfq registered (default)

simple-gpio: now handling 48 GPIOs: 0 - 47

Serial: 8250/16550 driver4 ports, IRQ sharing disabled

Serial: Blackfin serial driver

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

brd: module loaded

uclinux[mtd]: RAM probe address=0x7000000 size=0xf00000

Creating 1 MTD partitions on "RAM":

0x00000000-0x00f00000 : "ROMfs"

i2c /dev entries driver

TCP cubic registered

NET: Registered protocol family 17

VFS: Mounted root (ext2 filesystem).

Freeing unused kernel memory: 80k freed

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

init: exec rc failed

init: Booting to single user mode

init: exec of single user shell failed

init: -/bin/sh exec failed

init: Booting to single user mode

init: exec of single user shell failed

init: -/bin/sh exec failed

init: -/bin/sh exec failedfailed

Booting to single user mode

init: exec of single user shell failed

init: -/bin/sh exec failed

init: -/bin/sh exec failedfailed

Booting to single user mode

init: exec of single user shell failed

init: -/bin/sh exec failed

init: -/bin/sh exec failedfailed

Booting to single user mode

init: exec of single user shell failed

init: -/bin/sh exec failed

 

 

Is this a problem related to the filesystem. I.e. the kernel does not find the rc file because the file system is not correct ?

TranslateQuoteReplyEditDelete

 

 

2010-01-13 09:39:13     Re: entry point

Mike Frysinger (UNITED STATES)

Message: 84541   

 

if your init is FLAT and the rest is FDPIC but you dont have FDPIC ELF libs installed in the romfs/lib/, then you'd see this behavior

 

or if you're trying to use an old userspace with a newer kernel, you might see this

QuoteReplyEditDelete

 

 

2010-01-26 02:46:14     Re: entry point

Mike Frysinger (UNITED STATES)

Message: 85117   

 

also make sure you've updated your busybox config to select the hush shell and not msh (since msh is dead in trunk)

Attachments

    Outcomes