Skip to contentSkip to conversation

slight annoyance with new x86 arch

PATCH Applied Boaz Harrosh 3 participants 6 messages Oct 17, 2007 – Oct 18, 2007 x86

lore
Share & tools
lore
#0 lore raw

Make system is a bit broken in the sense that it recompiles and links right after a build even if nothing changed.

I have
# CONFIG_LOCALVERSION_AUTO is not set

make output after a fully built tree:
{ // these are expected off course
GEN /usr0/export/dev/bharrosh/git/pub/linux-2.6-block/.build_i386/Makefile CHK include/linux/version.h
CHK include/linux/utsrelease.h
Using /usr0/export/dev/bharrosh/git/pub/linux-2.6-block as source for kernel CALL /usr0/export/dev/bharrosh/git/pub/linux-2.6-block/scripts/checksyscalls.sh CHK include/linux/compile.h
}
{ // these cause a recompilation and relink
AS arch/x86/kernel/vsyscall-int80_32.o
AS arch/x86/kernel/vsyscall-sysenter_32.o
SYSCALL arch/x86/kernel/vsyscall-syms.o
SYSCALL arch/x86/kernel/vsyscall-int80_32.so
SYSCALL arch/x86/kernel/vsyscall-sysenter_32.so
AS arch/x86/kernel/vsyscall_32.o
}

LD arch/x86/kernel/built-in.o
GEN .version
...
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD .tmp_vmlinux3
KSYM .tmp_kallsyms3.S
AS .tmp_kallsyms3.o
LD vmlinux.o
MODPOST vmlinux.o
....

I'm cross compiling on an x86_64 fedora7 machine. with make ARCH=i386 KBUILD_OUTPUT=.build_i386 allmodconfig and
make ARCH=i386 KBUILD_OUTPUT=.build_i386

Other wise after an mrproper all is well and booting and the dir structure looks much better

Thanks
Boaz

#1 lore raw

PATCH 1/1 x86: fix kernel rebuild due to vsyscall fallout

Fix rebuild of kernel when there is no changes. This happened for i386.
Using make V=2 hinted that the output files were not assigned to targets - fixed by this patch.

Reported by: Boaz Harrosh <[email protected]>

---

arch/x86/kernel/Makefile_32 +1 -1
index 7ff0206..a3fa11f 100644
@@ -51,7 +51,7 @@ obj-$(CONFIG_SCx200)		+= scx200_32.o
 # We must build both images before we can assemble it.
 # Note: kbuild does not track this dependency due to usage of .incbin
 $(obj)/vsyscall_32.o: $(obj)/vsyscall-int80_32.so $(obj)/vsyscall-sysenter_32.so
-targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
+targets += $(foreach F,int80 sysenter,vsyscall-$F_32.o vsyscall-$F_32.so)
 targets += vsyscall-note_32.o vsyscall_32.lds
 
 # The DSO images are built using a special linker script.
#2 lore raw

Re: [PATCH] x86: fix kernel rebuild due to vsyscall fallout

Quoted 14 lines · Sam Ravnborg

Fix rebuild of kernel when there is no changes. This happened for i386.
Using make V=2 hinted that the output files were not assigned to targets - fixed by this patch.

Reported by: Boaz Harrosh <[email protected]>

---

arch/x86/kernel/Makefile_32 +0 -0
index 7ff0206..a3fa11f 100644

arch/x86/kernel/Makefile_32 obj-$(CONFIG_SCx200) += scx200_32.o · line 57

Quoted 8 lines
arch/x86/kernel/Makefile_32 +1 -1
@@ -51,7 +51,7 @@ obj-$(CONFIG_SCx200)		+= scx200_32.o
 # We must build both images before we can assemble it.
 # Note: kbuild does not track this dependency due to usage of .incbin
 $(obj)/vsyscall_32.o: $(obj)/vsyscall-int80_32.so $(obj)/vsyscall-sysenter_32.so
-targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
+targets += $(foreach F,int80 sysenter,vsyscall-$F_32.o vsyscall-$F_32.so)
 targets += vsyscall-note_32.o vsyscall_32.lds
 
 # The DSO images are built using a special linker script.

Thanks, applied

tglx

#3 lore raw

PATCH 1/1 Use relative symbolic links for bzImge in x86 ARCHs

In reply to Sam Ravnborg

OK One more problem with a patch this time

---
From: Benny Halevy <[email protected]>

use relative paths in the symlink to bzImage
to make it NFS export safe.

arch/i386/Makefile +1 -1
index f036d2d..396146e 100644
@@ -132,7 +132,7 @@ zImage zlilo zdisk: KBUILD_IMAGE := arch/x86/boot/zImage
 
 zImage bzImage: vmlinux
 	$(Q)mkdir -p $(objtree)/arch/i386/boot
-	$(Q)ln -fsn $(objtree)/arch/x86/boot/bzImage $(objtree)/arch/i386/boot/bzImage
+	$(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/i386/boot/bzImage
 	$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
 
 compressed: zImage
arch/x86_64/Makefile +1 -1
index 9daa32d..8048f4f 100644
@@ -98,7 +98,7 @@ KBUILD_IMAGE                  := $(BOOTIMAGE)
 
 bzImage: vmlinux
 	$(Q)mkdir -p $(objtree)/arch/x86_64/boot
-	$(Q)ln -fsn $(objtree)/arch/x86/boot/bzImage $(objtree)/arch/x86_64/boot/bzImage
+	$(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/x86_64/boot/bzImage
 	$(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
 
 bzlilo: vmlinux
#4 lore raw

Re: [PATCH] Use relative symbolic links for bzImge in x86 ARCHs

Hi Benny.

Quoted 4 lines

use relative paths in the symlink to bzImage
to make it NFS export safe.

Your patch looks perfect - but you are a few hours too late.

See:
http://git.kernel.org/?p=linux/kernel/git/tglx/linux-2.6-x86.git;a=commit;h=a0075a509bd955ff6fc6e071efabb926e14bf19c

This is in the mm branch awaiting some more testing before Thomas push it to Linus.

Sam

author Tested-by
#5 lore raw

Re: [PATCH] Use relative symbolic links for bzImge in x86 ARCHs

Quoted 9 lines · Sam Ravnborg

Hi Benny.

Quoted 4 lines

use relative paths in the symlink to bzImage
to make it NFS export safe.

Your patch looks perfect - but you are a few hours too late.

Quoted 7 lines

See:
http://git.kernel.org/?p=linux/kernel/git/tglx/linux-2.6-x86.git;a=commit;h=a0075a509bd955ff6fc6e071efabb926e14bf19c

This is in the mm branch awaiting some more testing before Thomas push it to Linus.

Sam

NP,
as long as it's fixed I'm happy

Thanks