Skip to contentSkip to conversation

x86: Fix rom version build with CONFIG_X86_RESET_VECTOR

PATCH Superseded Bin Meng 2 participants 3 messages Oct 16, 2014 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/2 x86: Fix rom version build with CONFIG_X86_RESET_VECTOR

When building U-Boot with CONFIG_X86_RESET_VECTOR, the linking process misses the resetvec.o and start16.o so it cannot generate the rom version of U-Boot. The top level Makefile is updated to pull them into the final linking process.

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index 8657417..b23a3a1 100644
@@ -598,6 +598,7 @@ c_flags := $(KBUILD_CFLAGS) $(cpp_flags)
 head-y := $(CPUDIR)/start.o
 head-$(CONFIG_4xx) += arch/powerpc/cpu/ppc4xx/resetvec.o
 head-$(CONFIG_MPC85xx) += arch/powerpc/cpu/mpc85xx/resetvec.o
+head-$(CONFIG_X86_RESET_VECTOR) += arch/x86/cpu/resetvec.o arch/x86/cpu/start16.o
 
 HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n)
 
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 1/2 x86: Fix rom version build with CONFIG_X86_RESET_VECTOR

Hi Bin,

Quoted 15 lines · Bin Meng

When building U-Boot with CONFIG_X86_RESET_VECTOR, the linking process misses the resetvec.o and start16.o so it cannot generate the rom version of U-Boot. The top level Makefile is updated to pull them into the final linking process.

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +0 -0
index 8657417..b23a3a1 100644

Makefile c_flags := $(KBUILD_CFLAGS) $(cpp_flags) · line 601

Quoted 4 lines
Makefile +1 -0
@@ -598,6 +598,7 @@ c_flags := $(KBUILD_CFLAGS) $(cpp_flags)
 head-y := $(CPUDIR)/start.o
 head-$(CONFIG_4xx) += arch/powerpc/cpu/ppc4xx/resetvec.o
 head-$(CONFIG_MPC85xx) += arch/powerpc/cpu/mpc85xx/resetvec.o
+head-$(CONFIG_X86_RESET_VECTOR) += arch/x86/cpu/resetvec.o arch/x86/cpu/start16.o

Can we please do this in rch/x86/cpu/Makefile instead? Something like:

extra-y = start.o obj-$(CONFIG_X86_RESET_VECTOR) += resetvec.o start16.o obj-y += interrupts.o cpu.o
obj-$(CONFIG_PCI) += pci.o

Regards,
Simon

author
#2 lore raw

PATCH 1/2 x86: Fix rom version build with CONFIG_X86_RESET_VECTOR

Hi Simon,

Quoted 9 lines · Simon Glass

Can we please do this in rch/x86/cpu/Makefile instead? Something like:

extra-y = start.o obj-$(CONFIG_X86_RESET_VECTOR) += resetvec.o start16.o obj-y += interrupts.o cpu.o
obj-$(CONFIG_PCI) += pci.o

Regards,
Simon

Yes, will send v2. Thanks.

Regards,
Bin