OVP Forums - A community of assistance, help, questions, and answers.
  FAQFAQ    SearchSearch      RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in
Compiling linux Kernel for Versatile platform

 
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> First time - readme
View previous topic :: View next topic  
Author Message
KasraMoazzemi



Joined: 20 Jan 2013
Posts: 7

PostPosted: Fri Nov 15, 2013 12:27 pm    Post subject: Compiling linux Kernel for Versatile platform Reply with quote

Hi,
I've been trying to compile the kernel image used for ArmVersatile platform with different configurations but it never worked. I came across this information in README of latest version of demo:

###############################################################################
# 4. Build Linux Kernel image
###############################################################################

# Cross Compiler Toolchain
# CodeSourcery 2011.03-41 version of Sourcery_G++_Lite arm-none-linux-gnueabi
_CROSS_COMPILE=Sourcery_G++_Lite/arm-none-linux-gnueabi/2011.03-41/bin/arm-none-linux-gnueabi-

# ARM Cortex-A Kernel Versatile Express v3.7.1 with device tree support
DEFCONFIG=vexpress_defconfig
KERNEL=3.7.1
REPVER=v3.0
EXTRA_CFLAGS=-mno-unaligned-access

# Create OVP-$DEFCONFIG in arch/arm/configs from vexpress_defconfig with the following added to support appended Device Trees
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y


make ARCH=arm CROSS_COMPILE=$_CROSS_COMPILE CONFIG_DEBUG_INFO=1 OVP-$DEFCONFIG

make ARCH=arm EXTRA_CFLAGS=$EXTRA_CFLAGS CROSS_COMPILE=$_CROSS_COMPILE CONFIG_DEBUG_INFO=1 zImage

I've tried this but still doesn't work and gives me following result in uart output. Can any body help me with this? I need to be able to change the kernel thats why I'm trying to recompile the kernel:



Booting Linux on physical CPU 0
Initializing cgroup subsys cpuset
Linux version 3.7.1 (zchen22@zchen-office) (gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-24) ) #1 SMP Fri Nov 15 14:44:10 EST 2013
CPU: ARMv7 Processor [411fc090] revision 0 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: ARM-Versatile Express
Memory policy: ECC disabled, Data cache writealloc
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
PERCPU: Embedded 7 pages/cpu @81630000 s6592 r8192 d13888 u32768
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
Kernel command line: mem=1024M raid=noautodetect console=ttyAMA0,38400n8 vmalloc=256MB devtmpfs.mount=0
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1024MB = 1024MB total
Memory: 1025036k/1025036k available, 23540k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xc0800000 - 0xff000000 (1000 MB)
lowmem : 0x80000000 - 0xc0000000 (1024 MB)
modules : 0x7f000000 - 0x80000000 ( 16 MB)
.text : 0x80008000 - 0x804680a4 (4481 kB)
.init : 0x80469000 - 0x804989c0 ( 191 kB)
.data : 0x8049a000 - 0x804c1720 ( 158 kB)
.bss : 0x804c1744 - 0x804e05e0 ( 124 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:16 nr_irqs:16 16
Console: colour dummy device 80x30
Calibrating delay loop... 447.28 BogoMIPS (lpj=2236416)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
smp_twd: clock not found: -2
Calibrating local timer... 223.99MHz.
Setting up static identity map for 0x603557d0 - 0x60355828
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU2: Booted secondary processor
CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
CPU3: Booted secondary processor
CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
Brought up 4 CPUs
SMP: Total of 4 processors activated (1789.13 BogoMIPS).
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
L310 cache controller enabled
l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02020000, Cache size: 131072 B
hw-breakpoint: debug architecture 0x0 unsupported.
Serial: AMBA PL011 UART driver
mb:uart0: ttyAMA0 at MMIO 0x10009000 (irq = 37) is a PL011 rev1
console [ttyAMA0] enabled
mb:uart1: ttyAMA1 at MMIO 0x1000a000 (irq = 38) is a PL011 rev1
mb:uart2: ttyAMA2 at MMIO 0x1000b000 (irq = 39) is a PL011 rev1
mb:uart3: ttyAMA3 at MMIO 0x1000c000 (irq = 40) is a PL011 rev1
bio: create slab <bio> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Initialized.
Switching to clocksource v2m-timer1
Bad mode in data abort handler detected
Internal error: Oops - bad mode: 0 [#1] SMP ARM
Modules linked in:
CPU: 0 Not tainted (3.7.1 #1)
PC is at _einittext+0x7fb68ad4/0xfffe0b68
LR is at con_insert_unipair+0xb8/0x104
pc : [<ffff0010>] lr : [<801c7db4>] psr: a0000197
sp : bf83fe38 ip : 804a2c58 fp : 00000000
r10: 804b077c r9 : 00000003 r8 : 000000d0
r7 : bf929238 r6 : 0000047a r5 : ffffffff r4 : bf802200
r3 : 00000000 r2 : bf83e000 r1 : 804a2c58 r0 : 8049aa00
Flags: NzCv IRQs off FIQs on Mode ABT_32 ISA ARM Segment kernel
Control: 10c53c7d Table: 6000406a DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0xbf83e238)
Stack: (0xbf83fe38 to 0xbf840000)
fe20: 8049aa00 804a2c58
fe40: bf83e000 00000000 bf802200 ffffffff 0000047a bf929238 000000d0 00000003
fe60: 804b077c 00000000 804a2c58 bf83fe38 801c7db4 ffff0010 a0000197 ffffffff
fe80: 0000047a 801c7db4 00000033 000023bd bf8ac480 0000005f bf929238 0000005f
fea0: 00000003 804b077c 00000000 801c7db4 804b08e0 00000002 804b0780 bf8ac480
fec0: 0000005f 801c8694 00000014 804b08e0 804d83f8 bf804400 00000000 00000001
fee0: 00000000 804d861c 8048e33c 804c1780 8047eac8 00000088 00000000 8047e2d0
ff00: 00000000 00000001 bf83e000 8047e808 8040615c 00000000 bf83e000 804d8028
ff20: 00000000 8047dc3c 803eae1c 8048e33c 80495f18 80495f18 00000006 80008708
ff40: 80448b10 00000005 00000005 80039ae4 804a9538 80495ef4 80495f18 00000006
ff60: 804c1780 8046927c bf83e000 00000088 8048e35c 80348810 00000005 00000005
ff80: 8046927c 00000000 00000000 00000000 80348644 00000000 00000000 00000000
ffa0: 00000000 00000000 00000000 8000e1d8 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<801c7db4>] (con_insert_unipair+0xb8/0x104) from [<ffffffff>] (0xffffffff)
Code: ef9f0000 ea0000dd e59ff410 ea0000bb (ea00009a)
---[ end trace 11d2db8bfc441213 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU3: stopping
[<8001497c>] (unwind_backtrace+0x0/0xf8) from [<80013194>] (handle_IPI+0x140/0x16c)
[<80013194>] (handle_IPI+0x140/0x16c) from [<80008554>] (gic_handle_irq+0x58/0x5c)
[<80008554>] (gic_handle_irq+0x58/0x5c) from [<8000dd80>] (__irq_svc+0x40/0x50)
Exception stack(0xbf873f88 to 0xbf873fd0)
3f80: 00000022 804a29b8 00000003 00000000 bf872000 804c1848
3fa0: bf872000 804a5c90 bf872000 411fc090 80357ca4 00000000 00000000 bf873fd0
3fc0: 8000f310 8000f314 60000113 ffffffff
[<8000dd80>] (__irq_svc+0x40/0x50) from [<8000f314>] (default_idle+0x2c/0x30)
[<8000f314>] (default_idle+0x2c/0x30) from [<8000f48c>] (cpu_idle+0xa0/0xdc)
[<8000f48c>] (cpu_idle+0xa0/0xdc) from [<6034c528>] (0x6034c528)
CPU2: stopping
[<8001497c>] (unwind_backtrace+0x0/0xf8) from [<80013194>] (handle_IPI+0x140/0x16c)
[<80013194>] (handle_IPI+0x140/0x16c) from [<80008554>] (gic_handle_irq+0x58/0x5c)
[<80008554>] (gic_handle_irq+0x58/0x5c) from [<8000dd80>] (__irq_svc+0x40/0x50)
Exception stack(0xbf871f88 to 0xbf871fd0)
1f80: 00000021 804a29b8 00000002 00000000 bf870000 804c1848
1fa0: bf870000 804a5c90 bf870000 411fc090 80357ca4 00000000 00000000 bf871fd0
1fc0: 8000f310 8000f314 60000113 ffffffff
[<8000dd80>] (__irq_svc+0x40/0x50) from [<8000f314>] (default_idle+0x2c/0x30)
[<8000f314>] (default_idle+0x2c/0x30) from [<8000f48c>] (cpu_idle+0xa0/0xdc)
[<8000f48c>] (cpu_idle+0xa0/0xdc) from [<6034c528>] (0x6034c528)
CPU1: stopping
[<8001497c>] (unwind_backtrace+0x0/0xf8) from [<80013194>] (handle_IPI+0x140/0x16c)
[<80013194>] (handle_IPI+0x140/0x16c) from [<80008554>] (gic_handle_irq+0x58/0x5c)
[<80008554>] (gic_handle_irq+0x58/0x5c) from [<8000dd80>] (__irq_svc+0x40/0x50)
Exception stack(0xbf86ff88 to 0xbf86ffd0)
ff80: 00000020 804a29b8 00000001 00000000 bf86e000 804c1848
ffa0: bf86e000 804a5c90 bf86e000 411fc090 80357ca4 00000000 00000000 bf86ffd0
ffc0: 8000f310 8000f314 60000113 ffffffff
[<8000dd80>] (__irq_svc+0x40/0x50) from [<8000f314>] (default_idle+0x2c/0x30)
[<8000f314>] (default_idle+0x2c/0x30) from [<8000f48c>] (cpu_idle+0xa0/0xdc)
[<8000f48c>] (cpu_idle+0xa0/0xdc) from [<6034c528>] (0x6034c528)

Thanks,

Kasra
Back to top
View user's profile Send private message
LeeMoore
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 633

PostPosted: Mon Nov 18, 2013 2:05 am    Post subject: Reply with quote

Hi Kasra,

Question: Does the kernel provided with the demo boot correctly in your installation ?

In order to reproduce your findings, please provide all of the steps you took in compiling the kernel.
Please remember to describe which versions you have used (kernel source, compiler etc)
And the environment in whcih you are compiling the kernel.

Also please describe the exact command line you are using to try to boot the kernel
in the simulator.

Firstly we need to reproduce your results, before we can advise

Thx
Lee
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> First time - readme All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Information regarding OVP © 2008-2020 Imperas Software