[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] Problem with make petalinux kernel 2.6 driver codes
- To: microblaze-uclinux@xxxxxxxxxxxxxx
- Subject: [microblaze-uclinux] Problem with make petalinux kernel 2.6 driver codes
- From: Blue <sbluedk@xxxxxxxxx>
- Date: Sat, 20 Sep 2008 16:40:43 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=yWZ5hNEFa+c0FY3Esj1CJ7hH47W92EM9jh6E2dcgefA=; b=uKpKXM1TU582ar9QJiHwxMEw5nZGim1UjaK1ja7+CdTUJhQhtbxeFNOmXvGAfCE5So kqu4tj+WR9JTOmAXc6Ph1eLtuObMiJ2xLNJMAbyzSU/EKQmhEgZsKpWXoqQt0/zs8jVA ewR//j7i1EL/wEnfF+xc6fCp+WM74MQgEakMk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=UNWRwe2xeLCX91W/CySYomAfLhAqM8uaa3Yvb+JLT8imcUU244PVucIohqaOcIXoEC OVuo8xZyXEdPwZYLAIUxvsts+gA1iOq5vQjlp4r/GqTKCoD3bbQ9nJbiQ2u3k59wNIXc skAQZnX6XO4V3ZNdYTlK8zb0vM94fdWM/pLak=
- Reply-to: microblaze-uclinux@xxxxxxxxxxxxxx
- Sender: owner-microblaze-uclinux@xxxxxxxxxxxxxx
hello folks:
I am new to write a driver for petalinux kernel 2.6,and i had ported the petalinux kernel 2.6 to Xilinx ML403 broad.It can booted
successfully.
Now,i try to write a driver for a simple IP named "ipgcd"
when i "make" my driver codes ,i got some error message below:
make -C /home/bluedkdk/petalinux-v0.30-rc1/software/petalinux-dist/linux-2.6.x/ ARCH=microblaze M=/home/bluedkdk/petalinux-v0.30-rc1/software/user-apps/ipgcd modules
make[1]: Entering directory `/home/bluedkdk/petalinux-v0.30-rc1/software/linux-2.6.x-petalogix'
Building modules, stage 2.
MODPOST 1 modules
LD [M] /home/bluedkdk/petalinux-v0.30-rc1/software/user-apps/ipgcd/ipgcd.ko
/home/bluedkdk/petalinux-v0.30-rc1/tools/linux-i386/microblaze-uclinux-tools/bin/microblaze-uclinux-ld.real: unrecognised emulation mode: cpu=v5.00.c
Supported emulations: elf32microblaze
make[2]: *** [/home/bluedkdk/petalinux-v0.30-rc1/software/user-apps/ipgcd/ipgcd.ko] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/bluedkdk/petalinux-v0.30-rc1/software/linux-2.6.x-petalogix'
make: *** [modules] Error 2
i don't know how to fix it, could anyone help me to fix the problem?
My Makefile is below :
######################################################################################
# Comment/uncomment the following line to disable/enable debugging
#DEBUG = y
# Add your debugging flag (or not) to CFLAGS
#ifeq ($(DEBUG),y)
# DEBFLAGS = -O -g -DSCULL_DEBUG # "-O" is needed to expand inlines
#else
DEBFLAGS = -O2
#endif
CFLAGS += $(DEBFLAGS)
CFLAGS += -I$(LDDINC)
ifndef ROOTDIR
ROOTDIR=$(PETALINUX)/software/petalinux-dist
endif
UCLINUX_BUILD_USER = 1
-include $(ROOTDIR)/.config
-include $(ROOTDIR)/$(CONFIG_LINUXDIR)/.config
#LIBCDIR = $(CONFIG_LIBCDIR)
-include $(ROOTDIR)/config.arch
#ROMFSDIR=$(ROOTDIR)/romfs
#ROMFSINST=$(ROOTDIR)/tools/romfs-inst.sh
#ifneq ($(KERNELRELEASE),)
# call from kernel build system
#ipgcd-objs := ipgcd.o
obj-m := ipgcd.o
#else
#KERNELDIR ?= /lib/modules/$(shell uname -r)/build
KERNELDIR := /home/bluedkdk/petalinux-v0.30-rc1/software/petalinux-dist/linux-2.6.x/
PWD := $(shell pwd)
modules:
$(MAKE) -C $(KERNELDIR) ARCH=microblaze M=$(PWD) modules
#$(MAKE) -C $(KERNELDIR) ARCH=microblaze M=$(PWD) LDDINC=$(CONFIG_LIBCDIR) modules
#endif
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
depend .depend dep:
$(CC) $(CFLAGS) -M *.c > .depend
#ifeq (.depend,$(wildcard .depend))
#include .depend
#endif
######################################################################################
--
Best regards
Bruce Lan