|
From: | Peter Barada |
Subject: | Re: [Ltib] Working with Freescale 8323 |
Date: | Fri, 04 Feb 2011 12:11:32 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
On 02/04/2011 11:24 AM, Charles Krinke wrote:
Thank you Peter for your help.Yes, but the spoofing replaces the system tools with the cross tools (since some packages aren't bright enough to figure out that they are cross compiling. This means that you need the host compiler which the kernel looks for via HOSTCC. Blindly executing "make" in the kernel directory (even if inside an LTIB shell) will cause even more problems. What you should do is to move your kernel directory out of the way, then *outside* of LTIB's shell (one you get from "./ltib -m shell") in the top-level LTIB directory execute "./ltib -p kernel -m prep && ./ltib -p kernel -f -m scbuild 2>&1 | tee /tmp/build.log" This will prep the kernel source, then build the kernel and capture a logfile in /tmp/build.log. Look in /tmp/build.log for the make step that builds the kernel image. For my OMAP3 arm project (yours will be different but somewhat similar) I see: + make ARCH=arm 'HOSTCC=ccache /usr/bin/gcc -B/usr/bin//' uImage The "ARCH=arm" should be obvious for my ARM world The "'HOSTCC=ccache /usr/bin/gcc -B/usr/bin//'" is the host compiler command (used to build scripts/basic/fixdep and other host utilities needed by the kernel build process). The "uImage" is the kernel image I want ot build that is loadable by u-boot. If you try to build the kernel w/o HOSTCC, then it assumes that you are building the kernel natively (as in build it on your PPC board!) and will use the same compiler ("gcc" which is now spoofed by LTIB to be the PPC cross-compiler in your world) for both the kernel utilities and the kernel code. This as you can understand is quite bad when you really wanted to cross-compile the kernel. If you want to build your kernel directly you can create an LTIB shell, cd into the kernel source and then execute that same command (that you pulled out of your /tmp/build.log). And yes, it is a bit tricky to get everything right the first time you do this in LTIB. If you've used a newer LTIB and want to go back, I'd suggest moving /opt/freescale and /opt/ltib out of the way since some of the "newer" bits in there may confuse an older LTIB and cause all kinds of grief...
-- Peter Barada address@hidden |
[Prev in Thread] | Current Thread | [Next in Thread] |