To: | |
---|---|
Subject: | [ts-7000] Re: cross compiler |
From: | "Sachu" <> |
Date: | Sat, 14 Jun 2008 01:32:40 -0000 |
--- In "Martin Guy" <> wrote: > > On 6/13/08, Lexi Q wrote: > > How do I reconfigure the ts cross compiler to have the option CONFIG_PREEMPT set? I don't know where to find a download that comes with a configure script. > > That's a linux kernel configuration option, not a compiler setting. > > It sounds like you are trying to compile a single module and inject it > into the kernel that is already running. It may be possible to use > corresponding kernel jeader files and configure the module > appropriately outside the kernel, but that's fairly tricky, and I > think you are going to have more success cross-compiling the whole > kernel from source with your extra module included - that will ensure > that the configuration and settings for your module exactly match > those of the kernel that you are trying to insert it into. > > You may find that someone else has solved this same problem in a more > elegant way, if you search google for the exact error message that you > are seeing. > > It would be easier to help you if you described just what you are > trying to achieve, what module you are talking about and where you got > the source code for it, what exact commands you use to achieve your > result and how this differs from what you expect. > > Good luck! > > M > Like the previous reply says, PREEMPT is not a compiler setting but a kernel configuration option. However, if you are building modules, you do not have to re-compile the kernel. Even if you manage to re-compile it, I do not see a easy way to load it onto the board. Below, I have documented my expereience when I had to build a custom usb-driver for the kernel running on TS7800. The first order of business is to build the dr i ver. ./driver: Makefile usb-driver.c Make appropriate changes to the driver make file to point to the correct kernel source tree. This approach should work equally fine with both host compilation and cross compilation. However, if you are cross compiling, make sure that you define the variable CROSS_COMPILE in the makefile of the top level directory of the kernel source and point to the correct compiler executables. Note: If you just obtained the source tree, run the following set of commands first on the kernel source using the top level make file. make mrproper make defconfig make prepare && make prepare scripts Also. if you are cross compiling, then probably the default configuration file will not work in its original form. e.g: When working on the TS7800 board, I first used the defconfig and only at a later point of time(After repeated failure to insert the module into the runni n g kernel and a lot lot of research) did I realize that the kernel was running in the PREEMPT mode and I was using a default config file that was not setting the kernel for preemption. Hence there was a difference in the module that was built against that kernel tree and the running kernel. In such case, use "make xmenuconfig" and make appropriate changed to the configuration of the kernel. I think you can load the default configuration into the graphical config tool and then make changes only to the required parts. This worked for me. Once the drivers are built, try inserting the driver into the running kernel using "insmod". If the command does not return any errors, then you can lookup the inserted module using "lsmod" command. Running "dmesg" will also show the printk messages from the driver that are logged. Also, make sure that the cross-compiler binaries are the correct ones for your kernel. In my case, I had problems running applications after I had m anaged to build them correctly. The tech support guy told me this. The Debian filesystem preinstalled doesn't support EABI, you'll want to use the OABI toolchain. ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7800-linux/cross-toolchains/ts7800-crosstool-linux-oldabi-0.28rc39.tar.bz2 I wish I could send you the make and config files but I do not see a method to attach them with this mail. The kernel configuration seems daunting but once you have done it you will realize that its pretty simple(at least for this case) good luck! -Sachin. - __._,_.___
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe __,_._,___ |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | Re: [ts-7000] Re: Auto..Run, Martin Guy |
---|---|
Next by Date: | [ts-7000] Re: Help to regain shell prompt, naturalwatt |
Previous by Thread: | Re: [ts-7000] cross compiler, Martin Guy |
Next by Thread: | [ts-7000] simple example module code is here, Craig Hollabaugh |
Indexes: | [Date] [Thread] [Top] [All Lists] |
Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU