[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] insmod: Not configured to support old kernels



Hi David,

Just another thing to check, would you please try to build the module
with the attached Makefile?
It's the PetaLinux Makefile template modified to build a kernel module.
I had no problem with it.

Best regards,
Giulio
ifndef PETALINUX
$(error You must source the petalinux/settings.sh script before working with PetaLinux)
endif

# Point to default PetaLinux root directory
ifndef ROOTDIR
ROOTDIR=$(PETALINUX)/software/petalinux-dist
endif

PATH:=$(PATH):$(ROOTDIR)/tools

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

APP = discovery-module

# Add any other object files to this list below
obj-m += $(APP).o

all:
	make -C $(ROOTDIR)/linux-2.6.x/ M=$(PWD) modules

clean:
	make -C $(ROOTDIR)/linux-2.6.x/ M=$(PWD) clean

romfs:
	$(ROMFSINST) $(APP).ko /lib/$(APP).ko

# Targets for the required .config files - if they don't exist, the tree isn't
# configured.  Tell the user this, how to fix it, and exit.
${ROOTDIR}/config.arch ${ROOTDIR}/.config:
	@echo "Error: You must configure the PetaLinux tree before compiling your application"
	@echo ""
	@echo "Change directory to ../../petalinux-dist and 'make menuconfig' or 'make xconfig'"
	@echo ""
	@echo "Once the tree is configured, return to this directory, and re-run make."
	@echo ""
	@exit -1