[ELDK] Ubuntu 804 ELDK 4.0 kernel rebuild issues

bwr bwr64x at calcentral.com
Fri Jul 4 04:06:19 CEST 2008


Detlev,
Problem solved

Rebuilt /opt/eldk as user bwr  (v4.0 with rpm fixes from other thread)
Rebuilding kernel in /opt/linux-2.6.18 as user bwr (as opposed to root)

/opt is owned by root
/opt/linux-2.6.18 is owned by bwr

The problem seemed to be running make as root, not the ownership of the 
directory. I build it in /opt and ~/ and both worked.

It's always seems so simple once you know the answer.

Thanks for the help,
bwr
------------------------------------------------
Bruce Reiss wrote:
> Bruce W Reiss, pronounced "hey dude" since I'm in California  :)
> bwr is my email/code comment tag
> 
> I've been running everything in /opt, the ELDK installation, the kernel 
> image, and my driver development directories. I keep all "work" stuff 
> seperate from my home directory to simplify backups and such. Does this 
> cause issues since root owns /opt? I'm fairly new at Linux/kernel 
> make/driver development, so basic "better to do it this way" comments 
> are appropriate.
> 
> Building the kernel in user mode resulted:
> 
> bwr at main:/opt/ddc-linux-2.6.18$ make
> rm: cannot remove `include/config/kernel.release': Permission denied
> make: *** [include/config/kernel.release] Error 1
> bwr at main:/opt/ddc-linux-2.6.18$
> 
> 
> This is when I ran "$ sudo make" instead and got further, but with the 
> later issues I noted.
> 
> I'll try building the kernel elsewhere, after I correct my ELDKv4.0 
> install issue from the other thread.
> 
> Thanks for the suggestions,
> bwr
> 
> ------------------------------------------------------------
> 
> Detlev Zundel wrote:
>> Hi bwr (how does one pronounce that?),
>>
>>> I've run into a couple of obscure issues using the ELDK under Ubuntu 
>>> 8.04. They probably aren't really ELDK issues, but they appear to be, 
>>> and I spent a lot of time looking for ELDK issues until I resolved 
>>> it. Suggestions on where else to post this information would be useful.
>>>
>>> The task is cross compiling a Linux kernel
>>>
>>> Ubuntu 8.04 host system
>>> ELDK v4.0
>>> ppc_8540 based target board
>>> Linux kernel 2.6.18
>>> U-Boot 1.2.0 modified
>>>
>>> By default, Ubuntu does not have:
>>> /usr/include/sys/types.h   (you need to install package libc6-dev)
>>
>> Yes, without doing this, you will have a hard time compiling anything ;)
>>
>>> /usr/include/curses.h      (install libncurses5-dev)
>>
>> Needed only for make menuconfig.
>>
>>> Once these were there, attempting to "$ make" returns a permission 
>>> violation. 
>>
>> Ooops, you will need to expand on that.  This is not a problem if you do
>> everything correctly.
>>
>>> Trying "$ sudo make" (the recommended Ubuntu way) will run for 
>>> awhile, then result in an error message saying
>>> *** 2.6 kernels no longer build correctly with old versions of binutils.
>>> *** Please upgrade your binutils to 2.12.1 or newer
>>> This is from ..Linux/arch/ppc/Makefile
>>
>> There is really no need at all to run the kernel make as root.
>>
>>> Which seems to indicate the ELDK has an old version of binutils. This 
>>> is not the case. What has happened is that the make process has lost 
>>> the value of CROSS_COMPILE (although it still has ARCH, unless it get 
>>> reset somewhere). Without CROSS_COMPILE, the makefile uses the native 
>>> gcc assembler instead of the ELDK version, gets confused and returns 
>>> the above error message.
>>>
>>> If instead of "$ sudo make" you run "$ sudo -s" to switch to root, 
>>> then "$ make" it works fine, CROSS_COMPILE is not lost, and the 
>>> kernel rebuilds.
>>
>> No, no, you have different problems.  We never build kernels as
>> superuser.
>>
>> Is it possible that you try to build a kernel below /usr/src or any
>> other central place having restrictive permissions?  Don't do that.
>> Clone our linux-2.6-denx repo somewhere below your home directory and
>> work there.
>>
>> Cheers
>>   Detlev



More information about the eldk mailing list