Hi,
I tried booting linux-linaro-2.6.37 kernel on my beagle board C4. I executed
following:
1. Installed linaro on a 4 GB SD card using linaro-image-tools 0.4.1 with
hwpack daily snapshot hwpack_linaro-omap3_20110125-0_armel_supported.tar.gz
and linaro-natty-headless-tar-20101202-1.tar.gz. It was booting properly on
my BB.
2. Cloned linux-linaro-2.6.37. Changed to source directory
3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- omap2plus_defconfig
4. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig (enabled
EARLY_PRINTK)
5. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
6. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules
7. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install
INSTALL_MOD_PATH=/media/rootfs
8. cp arch/arm/boot/uImage /media/boot; sync
Everything went on smoothly. Then I put the SD card on BB and powered it on.
I got a kernel panic: http://paste.ubuntu.com/560562
Please help me figuring out the problem. Is it because I didn't create
uInitrd? If so, then how to create it for ARM?
Regards,
Avik
Hi,
I have an interesting observation that I thought might be interesting
to the tool-chain team.
I was trying to build u-boot in Thumb2 for OMAP4. Everything was fine
until I added some patches recently. One of these patches introduced an
API (let's say foo()) that has a weakly linked alias(let's say
__foo()) and a strongly linked implementation(the real foo()) in an
assembly file.
Although I give -mthumb and -mthumb-interwork for all the files,
apparently GCC generates ARM code for assembly files. In the final
image foobar() calls foo() using a BL. Since foobar() is in Thumb and
foo() in ARM, it ends up crashing. Looks like foobar() assumed foo()
to be Thumb because __foo() is Thumb.
Also I see that 'objdump -S' aborts when it tries to parse foo().
I could workaround this problem by having foo() also in a C file that
in turn calls into the assembly file.
I tried Linaro GCC 4.5.2 and Codesourcery Lite GCC 4.4.1. Both seem to
have the issue.
Isn't this an issue with GCC or am I missing something?
-Aneesh
I'm having trouble building the Thumb2 kernel on, I actually believe
this same code worked some time ago before a toolchain update. There
are actually two problems described below. I get past the first with
a config change but don't know how to fix the second one.
Start with mx51_defconfig, it builds uImage fine:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- mx51_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
Save the working .config to config1
$ cp .config config1
Edit .config and remove this line then run make oldconfig.
$ CONFIG_THUMB2_KERNEL is not set
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- oldconfig
Answer y to THUMB2_KERNEL and THUMB2_AVOID_R_ARM_THM_JUMP11
Save new Thumb2 enabled config to config2
Here is the diff:
$ diff -u config1 config2
--- config1 2011-08-21 14:50:23.014654705 -0600
+++ config2 2011-08-21 14:51:13.164654727 -0600
@@ -339,9 +339,10 @@
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_HZ=100
-# CONFIG_THUMB2_KERNEL is not set
+CONFIG_THUMB2_KERNEL=y
+CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11=y
+CONFIG_ARM_ASM_UNIFIED=y
CONFIG_AEABI=y
-# CONFIG_OABI_COMPAT is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
CONFIG_HAVE_ARCH_PFN_VALID=y
@@ -1417,7 +1418,6 @@
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
-CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1429,7 +1429,6 @@
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_C_RECORDMCOUNT=y
Attempt to build this:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
...
LD init/built-in.o
LD .tmp_vmlinux1
arch/arm/kernel/built-in.o: In function `get_wchan':
early_printk.c:(.text+0x1400): undefined reference to `unwind_frame'
arch/arm/kernel/built-in.o: In function `walk_stackframe':
early_printk.c:(.text+0x2832): undefined reference to `unwind_frame'
make: *** [.tmp_vmlinux1] Error 1
Poke around a bit and it looks like setting ARM_UNWIND could make
difference so try that. Edit .config the remove
# CONFIG_ARM_UNWIND is not set
then run make old config again.
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- oldconfig
Call the result config3
$ cp .config config3
So here is the cumulative diff
$ diff -u config1 config3
--- config1 2011-08-21 14:50:23.014654705 -0600
+++ config3 2011-08-21 14:54:29.584654811 -0600
@@ -339,9 +339,10 @@
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_HZ=100
-# CONFIG_THUMB2_KERNEL is not set
+CONFIG_THUMB2_KERNEL=y
+CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11=y
+CONFIG_ARM_ASM_UNIFIED=y
CONFIG_AEABI=y
-# CONFIG_OABI_COMPAT is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
CONFIG_HAVE_ARCH_PFN_VALID=y
@@ -1417,7 +1418,6 @@
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
-CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1429,7 +1429,6 @@
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_C_RECORDMCOUNT=y
@@ -1443,7 +1442,7 @@
# CONFIG_KGDB is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_STRICT_DEVMEM is not set
-# CONFIG_ARM_UNWIND is not set
+CONFIG_ARM_UNWIND=y
# CONFIG_DEBUG_USER is not set
CONFIG_DEBUG_LL=y
CONFIG_EARLY_PRINTK=y
Try building again.
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
...
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:127: Error: selected processor does
not support requested special purpose register -- `mrs r2,cpsr'
arch/arm/boot/compressed/head.S:134: Error: selected processor does
not support requested special purpose register -- `mrs r2,cpsr'
arch/arm/boot/compressed/head.S:136: Error: selected processor does
not support requested special purpose register -- `msr cpsr_c,r2'
make[2]: *** [arch/arm/boot/compressed/head.o] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [uImage] Error 2
Here is my gcc version:
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.1-5ubuntu2~ppa1) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And as version:
GNU assembler (GNU Binutils for Ubuntu) 2.21.52.20110707
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `arm-linux-gnueabi'.
Three configs attached:
config1 -- original config from make mx51_defconfig
config2 -- config after turning on thumb2
config3 -- config after setting ARM_UNWIND
Any help would be appreciated.
Thanks
John
The patch d795e2c "Adding omap_gpu drm display driver" introduces
following compilation warning when the kernel is compiled for x86
architecture (i386_defconfig). Also the kernel compilation is
unsuccessful because of calls to omap specific platform header files.
warning: (VIDEO_OMAP2_VOUT && DRM_OMAP) selects OMAP2_DSS which
has unmet direct dependencies (HAS_IOMEM && ARCH_OMAP2PLUS)
The problem is fixed by making DRM_OMAP depend on ARCH_OMAP2.
Signed-off-by: Tushar Behera <tushar.behera(a)linaro.org>
---
drivers/gpu/drm/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index fdef87b..0949995 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -169,7 +169,7 @@ config DRM_SAVAGE
config DRM_OMAP
tristate "OMAP GPU (EXPERIMENTAL)"
- depends on DRM && !CONFIG_FB_OMAP2
+ depends on DRM && ARCH_OMAP2 && !CONFIG_FB_OMAP2
select DRM_KMS_HELPER
select OMAP2_VRAM
select OMAP2_DSS
--
1.7.1