After successfully cross compiling hello_world.c, I've moved on to writing my
first kernel
module (hello_world.o). I can get the module to compile, but when I try to run
it on the TS
board, I got an error telling me I need to compile the module for the kernel I
want to run
it on. To do that, I need to install and compile the TS-11 kernel on my host
machine.
When I follow the instructions in the "Linux for ARM on TS-7200" pg 27 I run
into trouble
(cc1: error: invalid option 'apcs-32'). Anyone with notes or thoughts on what
I'm doing
wrong, PLEASE share them with me. Thanks in advance. Here's how I got to my
problem....
I've downloaded the tskernel source from
ftp://ftp.embeddedarm.com/ts-arm-linux-cd/sources/tskernel-2.4.26-ts11-src.tar.gz
and the crosstool chain (crosstool-linux-gcc-4.0.1-glibc-2.3.5.tar.bz2)
I believe the crosstools are installed correctly because I can cross compile
hello_world.c,
transfer it to the TS board and it runs fine. Is there a more comprehensive
way to test this
is installed correctly?
I put the source tree into:
/usr/src/linux24_ts11
on a debian intel machine
I've installed the cross tools in:
/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/bin/
I edited the Makefile in the root directory of the kernel source tree to
reflect the location
of my crosstools:
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 26
EXTRAVERSION =-ts11
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
ARCH := arm
KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
TOPDIR := $(shell /bin/pwd)
HPATH = $(TOPDIR)/include
FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net
$(HPATH)/math-emu
HOSTCC = gcc
HOSTCFLAGS = -Wall -Wstrict-prototypes -Os -fomit-frame-pointer
CROSS_COMPILE = /opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-
gnu/bin/arm-unknown-linux-gnu-
#
# Include the make variables (CC, etc...)
#
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
MAKEFILES = $(TOPDIR)/.config
GENKSYMS = /sbin/genksyms
DEPMOD = /sbin/depmod
MODFLAGS = -DMODULE
CFLAGS_KERNEL =
PERL = perl
AWK = awk
RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
else echo rpm; fi)
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL
AWK
all: do-it-all
.
.
.
Following the instructions in the "Linux for ARM on TS-7200" pg. 27 I did the
following
before it dies with an invalid option:
byrd:/usr/src/linux24_ts11# make clean
byrd:/usr/src/linux24_ts11# make ts7260_config
*** Default configuration for ts7260 installed
*** Next, you may run 'make oldconfig'
byrd:/usr/src/linux24_ts11# make oldconfig
which scrolls by the config menu with all the TS7260 options. It appears to
succeed.
*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you must run 'make dep'.
byrd:/usr/src/linux24_ts11# make dep
rm -f include/asm
( cd include ; ln -sf asm-arm asm)
make[1]: Entering directory `/usr/src/linux24_ts11/arch/arm/tools'
/usr/src/linux24_ts11/scripts/mkdep -D__KERNEL__
-I/usr/src/linux24_ts11/include -
Wall -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common
-Uarm
-fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -
mtune=arm9tdmi -msoft-float -Uarm -- getconstants.c |\
sed s,getconstants.o,constants.h, > .depend
make all
make[2]: Entering directory `/usr/src/linux24_ts11/arch/arm/tools'
/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/bin/arm-unknown-
linux-gnu-gcc -D__KERNEL__ -I/usr/src/linux24_ts11/include -Wall
-Wstrict-prototypes
-Wno-trigraphs -Os -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -
mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -mtune=arm9tdmi -msoft-float -
Uarm -S -o constants.h.tmp.1 getconstants.c
cc1: error: invalid option 'apcs-32'
make[2]: *** [constants.h] Error 1
make[2]: Leaving directory `/usr/src/linux24_ts11/arch/arm/tools'
make[1]: *** [dep] Error 2
make[1]: Leaving directory `/usr/src/linux24_ts11/arch/arm/tools'
make: *** [archdep] Error 2
byrd:/usr/src/linux24_ts11#
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|