building a kernel from a mounted partition
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
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.
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.
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@vt.edu Cc: kernelnewbies@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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/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@vt.edu Cc: kernelnewbies@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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/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".
participants (3)
-
Anand Moon -
Andy Johnson -
Valdis.Kletnieks@vt.edu