All of lore.kernel.org
 help / color / mirror / Atom feed
* building a kernel from a mounted partition
@ 2013-05-24  8:05 Andy Johnson
  2013-05-24 14:03 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Johnson @ 2013-05-24  8:05 UTC (permalink / raw)
  To: kernelnewbies

Hello,
I have a dual boot machine, Ubuntu/Fedora.
I have a kernel tree on the fedora partition.
Now, I had build a kernel on the Fedora partition successfully.

 I did **not** change anything in the tree, and then

When I boot into Ubuntu and mount the fedora partition, and
go there and run "make" , it builds ** all **  the tree again ! any I
idea why ?

And after the build on Ubuntu is over successfully, if I boot into
Fedora again and run make, it **again** builds all the tree.

Is there a way to avoid this ?

rgs
Andy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* building a kernel from a mounted partition
  2013-05-24  8:05 building a kernel from a mounted partition Andy Johnson
@ 2013-05-24 14:03 ` Valdis.Kletnieks at vt.edu
  2013-05-24 15:37   ` Andy Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-05-24 14:03 UTC (permalink / raw)
  To: kernelnewbies

On Fri, 24 May 2013 11:05:57 +0300, Andy Johnson said:
> Hello,
> I have a dual boot machine, Ubuntu/Fedora.
> I have a kernel tree on the fedora partition.
> Now, I had build a kernel on the Fedora partition successfully.
>
>  I did **not** change anything in the tree, and then
>
> When I boot into Ubuntu and mount the fedora partition, and
> go there and run "make" , it builds ** all **  the tree again ! any I
> idea why ?
>
> And after the build on Ubuntu is over successfully, if I boot into
> Fedora again and run make, it **again** builds all the tree.
>
> Is there a way to avoid this ?

Check that your timezone is set correctly in both installs - having the
time ping-ponged back and forth at each reboot can cause such issues.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130524/aafe6883/attachment.bin 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* building a kernel from a mounted partition
  2013-05-24 14:03 ` Valdis.Kletnieks at vt.edu
@ 2013-05-24 15:37   ` Andy Johnson
  2013-05-25 13:50     ` Anand Moon
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Johnson @ 2013-05-24 15:37 UTC (permalink / raw)
  To: kernelnewbies

Thanks
Sorry for my ignorance - by checking timezone do you mean some
environment variable ? I don't know much about admin tasks as you can figure...
Andy

On Fri, May 24, 2013 at 5:03 PM,  <Valdis.Kletnieks@vt.edu> wrote:
> On Fri, 24 May 2013 11:05:57 +0300, Andy Johnson said:
>> Hello,
>> I have a dual boot machine, Ubuntu/Fedora.
>> I have a kernel tree on the fedora partition.
>> Now, I had build a kernel on the Fedora partition successfully.
>>
>>  I did **not** change anything in the tree, and then
>>
>> When I boot into Ubuntu and mount the fedora partition, and
>> go there and run "make" , it builds ** all **  the tree again ! any I
>> idea why ?
>>
>> And after the build on Ubuntu is over successfully, if I boot into
>> Fedora again and run make, it **again** builds all the tree.
>>
>> Is there a way to avoid this ?
>
> Check that your timezone is set correctly in both installs - having the
> time ping-ponged back and forth at each reboot can cause such issues.
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* building a kernel from a mounted partition
  2013-05-24 15:37   ` Andy Johnson
@ 2013-05-25 13:50     ` Anand Moon
  2013-05-25 19:54       ` Andy Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Anand Moon @ 2013-05-25 13:50 UTC (permalink / raw)
  To: kernelnewbies

Hi All,
?
Both Ubuntu and Fedora have different GCC version. So different Kernel images will be created on both the OS.
?
-Anand Moon
 

________________________________
 From: Andy Johnson <johnsonzjo@gmail.com>
To: Valdis.Kletnieks at vt.edu 
Cc: kernelnewbies at kernelnewbies.org 
Sent: Friday, May 24, 2013 9:07 PM
Subject: Re: building a kernel from a mounted partition
  

Thanks
Sorry for my ignorance - by checking timezone do you mean some
environment variable ? I don't know much about admin tasks as you can figure...
Andy

On Fri, May 24, 2013 at 5:03 PM,? <Valdis.Kletnieks@vt.edu> wrote:
> On Fri, 24 May 2013 11:05:57 +0300, Andy Johnson said:
>> Hello,
>> I have a dual boot machine, Ubuntu/Fedora.
>> I have a kernel tree on the fedora partition.
>> Now, I had build a kernel on the Fedora partition successfully.
>>
>>? I did **not** change anything in the tree, and then
>>
>> When I boot into Ubuntu and mount the fedora partition, and
>> go there and run "make" , it builds ** all **? the tree again ! any I
>> idea why ?
>>
>> And after the build on Ubuntu is over successfully, if I boot into
>> Fedora again and run make, it **again** builds all the tree.
>>
>> Is there a way to avoid this ?
>
> Check that your timezone is set correctly in both installs - having the
> time ping-ponged back and forth at each reboot can cause such issues.
>

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130525/a8a539ca/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* building a kernel from a mounted partition
  2013-05-25 13:50     ` Anand Moon
@ 2013-05-25 19:54       ` Andy Johnson
  2013-05-25 20:42         ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Johnson @ 2013-05-25 19:54 UTC (permalink / raw)
  To: kernelnewbies

Hi,
It seems to me that you are right. It seems that there is no problem
with the timezone.
I checked and indeed the gcc is slightly different in version
is there a work around here ?
I mean, I have gcc of ubuntu, and gcc of fedora in /mnt/sda3.

Can I somehow tell Ubuntu to use the Fedora gcc instead of its own gcc?


Regards,
Andy










On Sat, May 25, 2013 at 4:50 PM, Anand Moon <moon.linux@yahoo.com> wrote:
> Hi All,
>
> Both Ubuntu and Fedora have different GCC version. So different Kernel
> images will be created on both the OS.
>
> -Anand Moon
> From: Andy Johnson <johnsonzjo@gmail.com>
> To: Valdis.Kletnieks at vt.edu
> Cc: kernelnewbies at kernelnewbies.org
> Sent: Friday, May 24, 2013 9:07 PM
> Subject: Re: building a kernel from a mounted partition
>
> Thanks
> Sorry for my ignorance - by checking timezone do you mean some
> environment variable ? I don't know much about admin tasks as you can
> figure...
> Andy
>
> On Fri, May 24, 2013 at 5:03 PM,  <Valdis.Kletnieks@vt.edu> wrote:
>> On Fri, 24 May 2013 11:05:57 +0300, Andy Johnson said:
>>> Hello,
>>> I have a dual boot machine, Ubuntu/Fedora.
>>> I have a kernel tree on the fedora partition.
>>> Now, I had build a kernel on the Fedora partition successfully.
>>>
>>>  I did **not** change anything in the tree, and then
>>>
>>> When I boot into Ubuntu and mount the fedora partition, and
>>> go there and run "make" , it builds ** all **  the tree again ! any I
>>> idea why ?
>>>
>>> And after the build on Ubuntu is over successfully, if I boot into
>>> Fedora again and run make, it **again** builds all the tree.
>>>
>>> Is there a way to avoid this ?
>>
>> Check that your timezone is set correctly in both installs - having the
>> time ping-ponged back and forth at each reboot can cause such issues.
>>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* building a kernel from a mounted partition
  2013-05-25 19:54       ` Andy Johnson
@ 2013-05-25 20:42         ` Valdis.Kletnieks at vt.edu
  0 siblings, 0 replies; 6+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-05-25 20:42 UTC (permalink / raw)
  To: kernelnewbies

On Sat, 25 May 2013 22:54:56 +0300, Andy Johnson said:
> Hi,
> It seems to me that you are right. It seems that there is no problem
> with the timezone.
> I checked and indeed the gcc is slightly different in version
> is there a work around here ?
> I mean, I have gcc of ubuntu, and gcc of fedora in /mnt/sda3.

Aha. Found it.

THe problem is that the file arch/x86/kernel/asm-offsets.s contains in it
the data for 'struct utsname' - which includes the GCC version used
to compile it (as seen in 'cat /proc/version'.  However, due to what *else*
is in that file, changing it (as happens when you change the compiler) will
basically force a rebuild of the entire tree.  This is somewhat by design -
there have in the past been gcc compiler versions that had a sufficiently
different ABI to cause problems (for instance, around 2.95 or so, some versions
would pass a structure less than 8 bytes long in registers, while other
versions passed a pointer just like all other structs).  Hilarity results
if you have a mix of .o's compiled with the two versions.

Here's the command line I used to do kernel compiles while working around
a few gcc 4.7 and .8 optimizer bugs (4.6.3 worked):

make CC=/opt/gcc-4.6.3/bin/gcc-46 HOSTCC=/opt/gcc-4.6.3/bin/gcc-46

but of course, this assumes that gcc-46 was built with an installdir of /opt/
gcc-4.6.3.  You'll probably need to do something to add a '-B /opt/whatever'
flag to the gcc call so the main gcc program finds cpp, cc1, and the rest from
"the other system's directory", rather than your running /usr/bin.

At some point, maybe it's easier to just decide "I'll do all my builds under
Fedora, even for kernels I'll use for Ubuntu".

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130525/0937bd33/attachment.bin 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-05-25 20:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-24  8:05 building a kernel from a mounted partition Andy Johnson
2013-05-24 14:03 ` Valdis.Kletnieks at vt.edu
2013-05-24 15:37   ` Andy Johnson
2013-05-25 13:50     ` Anand Moon
2013-05-25 19:54       ` Andy Johnson
2013-05-25 20:42         ` Valdis.Kletnieks at vt.edu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.