All of lore.kernel.org
 help / color / mirror / Atom feed
* Puzzled over Angstrom generated kernel on a new board
@ 2011-05-10 17:44 Daniel P. Smith
  2011-05-10 18:04 ` Koen Kooi
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Smith @ 2011-05-10 17:44 UTC (permalink / raw)
  To: openembedded-devel

Hey all,

I am working on getting OE running on the Gateworks' Laguna platform which uses the Cavium Networks Econa CNS3xxx (ARM11 MPcore) processor. The Gateworks' BSP for the Laguna is provided as a patch set to OpenWRT. I have created a kernel recipe that includes all the provided patches. The resulting kernel uImage from bitbake faults(interrupt raised or just freezes) right after decompression starts. What is puzzling is that I able to build a working kernel by manually running the build using the internal OE toolchain (note that local make and mkimage was used though). I am curious if anyone may have a hint why the bitbake generated uImage faults.

Below is the serial output from a session that just froze.

U-Boot 2008.10-mpcore-svn119 (Aug  3 2010 - 13:23:17)

CPU: Cavium Networks CNS3000
ID Code: 410fb024 (Part number: 0xB02, Revision number: 4)
CPU ID: 900
I2C:   ready
DRAM:  128 MB
Flash: 16 MB
Gateworks Corporation Copyright 2010
Model Number: GW2388-SP212-A
Manufacturer Date: 01-21-2002
Serial #: 259328
Net:   eth0, eth1, eth2
Hit any key to stop autoboot:  0
Laguna > printenv
bootargs=console=ttyS0,115200 root=/dev/mtdblock3 rootfstype=squashfs,jffs2 noinitrd init=/etc/preinit
bootcmd=bootm 0x10060000
baudrate=115200
netmask=255.255.0.0
tftp_bsize=512
udp_frag_size=512
ethaddr=00:D0:12:4B:ED:24
eth1addr=00:D0:12:4B:ED:25
eth2addr=00:D0:12:4B:ED:26
ethact=eth0
bootdelay=5
ipaddr=172.16.20.1
serverip=172.16.20.101
stdin=serial
stdout=serial
stderr=serial

Environment size: 384/131068 bytes 
Laguna > tftpboot 0x800000 /laguna/uImage-laguna.bin
Using eth0 device
TFTP from server 172.16.20.101; our IP address is 172.16.20.1
Filename '/laguna/uImage-laguna.bin'.
Load address: 0x800000
Loading: T T #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################################################
done
Bytes transferred = 1589252 (184004 hex)
Laguna > bootm 0x800000
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Angstrom/2.6.31.14/laguna
   Created:      2011-05-05  15:32:55 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1589188 Bytes =  1.5 MB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Liu


Here is how I ran the manual kernel build, this was ran in the kernel work directory of my OE build.

  $ export TOOLCHAIN=/home/viscous/project/oe/build-laguna/tmp/sysroots/i686-linux/usr/armv6
  $ export PATH=$TOOLCHAIN/bin:$PATH
  $ export CCFLAGS="-march=armv6k -mtune=mpcore -mfpu=vfp -mfloat-abi=softfp -funit-at-a-time"
  $ make clean
  $ make CROSS_COMPILE="arm-angstrom-linux-gnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no CONFIG_SHELL="/bin/bash" CC="arm-angstrom-linux-gnueabi-gcc" "uImage"

Here is the machine configuration,

include/tune-cns3xxx.inc
========================
TARGET_CC_ARCH = "-march=armv6k -mtune=mpcore -mfpu=vfp -mfloat-abi=softfp -funit-at-a-time"
TARGET_CC_KERNEL_ARCH = "-march=armv6k -mtune=mpcore -mfpu=vfp -mfloat-abi=softfp -funit-at-a-time"
FEED_ARCH = "armv6"
BASE_PACKAGE_ARCH = "armv6"
PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6"

laguna.conf
========================
#@TYPE: Machine
#@NAME: Laguna
#@DESCRIPTION: The Gateworks Laguna GW2388 Router Board.
TARGET_ARCH = "arm"

PREFERRED_PROVIDER_virtual/kernel = "linux-cns3xxx"
PREFERRED_VERSION_linux-cns3xxx ?= "2.6.31.14"

MACHINE_FEATURES = "kernel26 uboot pci ext2 wifi usbhost usbgadget"
SERIAL_CONSOLE = "-L 115200 ttyS0"

CPU_FEATURES += "vfp"

require conf/machine/include/tune-cns3xxx.inc

KERNEL_IMAGETYPE = "uImage"


V/r,
Daniel P. Smith




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Puzzled over Angstrom generated kernel on a new board
  2011-05-10 17:44 Puzzled over Angstrom generated kernel on a new board Daniel P. Smith
@ 2011-05-10 18:04 ` Koen Kooi
  2011-05-11 11:49   ` Daniel P. Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Koen Kooi @ 2011-05-10 18:04 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10-05-11 19:44, Daniel P. Smith wrote:
> Hey all,
> 
> I am working on getting OE running on the Gateworks' Laguna platform which uses the Cavium Networks Econa CNS3xxx (ARM11 MPcore) processor. The Gateworks' BSP for the Laguna is provided as a patch set to OpenWRT. I have created a kernel recipe that includes all the provided patches. The resulting kernel uImage from bitbake faults(interrupt raised or just freezes) right after decompression starts. What is puzzling is that I able to build a working kernel by manually running the build using the internal OE toolchain (note that local make and mkimage was used though). I am curious if anyone may have a hint why the bitbake generated uImage faults.
> 
> Below is the serial output from a session that just froze.
> 
> U-Boot 2008.10-mpcore-svn119 (Aug  3 2010 - 13:23:17)
> 
> CPU: Cavium Networks CNS3000
> ID Code: 410fb024 (Part number: 0xB02, Revision number: 4)
> CPU ID: 900
> I2C:   ready
> DRAM:  128 MB
> Flash: 16 MB
> Gateworks Corporation Copyright 2010
> Model Number: GW2388-SP212-A
> Manufacturer Date: 01-21-2002
> Serial #: 259328
> Net:   eth0, eth1, eth2
> Hit any key to stop autoboot:  0
> Laguna > printenv
> bootargs=console=ttyS0,115200 root=/dev/mtdblock3 rootfstype=squashfs,jffs2 noinitrd init=/etc/preinit
> bootcmd=bootm 0x10060000
> baudrate=115200
> netmask=255.255.0.0
> tftp_bsize=512
> udp_frag_size=512
> ethaddr=00:D0:12:4B:ED:24
> eth1addr=00:D0:12:4B:ED:25
> eth2addr=00:D0:12:4B:ED:26
> ethact=eth0
> bootdelay=5
> ipaddr=172.16.20.1
> serverip=172.16.20.101
> stdin=serial
> stdout=serial
> stderr=serial
> 
> Environment size: 384/131068 bytes 
> Laguna > tftpboot 0x800000 /laguna/uImage-laguna.bin
> Using eth0 device
> TFTP from server 172.16.20.101; our IP address is 172.16.20.1
> Filename '/laguna/uImage-laguna.bin'.
> Load address: 0x800000
> Loading: T T #################################################################
>          #################################################################
>          #################################################################
>          #################################################################
>          ###################################################
> done
> Bytes transferred = 1589252 (184004 hex)
> Laguna > bootm 0x800000
> ## Booting kernel from Legacy Image at 00800000 ...
>    Image Name:   Angstrom/2.6.31.14/laguna
>    Created:      2011-05-05  15:32:55 UTC
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    1589188 Bytes =  1.5 MB
>    Load Address: 20008000
>    Entry Point:  20008000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK
> OK
> 
> Starting kernel ...
> 
> Uncompressing Liu
> 
> 
> Here is how I ran the manual kernel build, this was ran in the kernel work directory of my OE build.
> 
>   $ export TOOLCHAIN=/home/viscous/project/oe/build-laguna/tmp/sysroots/i686-linux/usr/armv6
>   $ export PATH=$TOOLCHAIN/bin:$PATH
>   $ export CCFLAGS="-march=armv6k -mtune=mpcore -mfpu=vfp -mfloat-abi=softfp -funit-at-a-time"
>   $ make clean
>   $ make CROSS_COMPILE="arm-angstrom-linux-gnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no CONFIG_SHELL="/bin/bash" CC="arm-angstrom-linux-gnueabi-gcc" "uImage"
> 
> Here is the machine configuration,
> 
> include/tune-cns3xxx.inc
> ========================
> TARGET_CC_ARCH = "-march=armv6k -mtune=mpcore -mfpu=vfp -mfloat-abi=softfp -funit-at-a-time"
> TARGET_CC_KERNEL_ARCH = "-march=armv6k -mtune=mpcore -mfpu=vfp -mfloat-abi=softfp -funit-at-a-time"
> FEED_ARCH = "armv6"
> BASE_PACKAGE_ARCH = "armv6"
> PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6"
> 
> laguna.conf
> ========================
> #@TYPE: Machine
> #@NAME: Laguna
> #@DESCRIPTION: The Gateworks Laguna GW2388 Router Board.
> TARGET_ARCH = "arm"
> 
> PREFERRED_PROVIDER_virtual/kernel = "linux-cns3xxx"
> PREFERRED_VERSION_linux-cns3xxx ?= "2.6.31.14"
> 
> MACHINE_FEATURES = "kernel26 uboot pci ext2 wifi usbhost usbgadget"
> SERIAL_CONSOLE = "-L 115200 ttyS0"
> 
> CPU_FEATURES += "vfp"
> 
> require conf/machine/include/tune-cns3xxx.inc
> 
> KERNEL_IMAGETYPE = "uImage"

Try defining

UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"

You probably need to change the values to match your hw, though
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFNyX4vMkyGM64RGpERArZFAKCEpMvnOuYBFkW49K4Y4ojj1MgMrQCgrH27
C8Xz3mKlNlPTFgDhFQhgFiA=
=hBMV
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Puzzled over Angstrom generated kernel on a new board
  2011-05-10 18:04 ` Koen Kooi
@ 2011-05-11 11:49   ` Daniel P. Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel P. Smith @ 2011-05-11 11:49 UTC (permalink / raw)
  To: openembedded-devel

> -----Original Message-----
> From: openembedded-devel-bounces@lists.openembedded.org
> [mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of
> Koen Kooi
> Sent: Tuesday, May 10, 2011 2:05 PM
> To: openembedded-devel@lists.openembedded.org
> Subject: Re: [oe] Puzzled over Angstrom generated kernel on a new board
> 
> 
> Try defining
> 
> UBOOT_ENTRYPOINT = "0x80008000"
> UBOOT_LOADADDRESS = "0x80008000"
> 
> You probably need to change the values to match your hw, though

Haha, my apologies and thanks as I was looking through the bitbake logs for the kernel and found that the recipe recreates the uImage file setting the entry and load addr's to 0x20008000, where as the CNS3xxx is expecting 0x00008000. But this brings up the question for me is why does the kernel recipes recreate the uImage? The make uImage command will/should pull the zreladdr from the sub-arch's Makefile.boot. I would assume it is so OE can provide the flexibility, but I don't like to make assumptions.


On a side note, has anyone considered cataloging the variety of variables that can be set by a recipe author? I would have never known about the two Koen pointed out had I not asked here or spent hours poring over the internals to find out where 0x20008000 was coming from.


V/r,
Daniel P. Smith




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-11 11:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-10 17:44 Puzzled over Angstrom generated kernel on a new board Daniel P. Smith
2011-05-10 18:04 ` Koen Kooi
2011-05-11 11:49   ` Daniel P. Smith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.