mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 18:35:42 +01:00 
			
		
		
		
	Makefile : fix generation of cpu related asm-offsets.h
commit 0edf8b5b2f breaks
building on a different directory with the O= parameter.
The patch wil fix this issue, generating always asm-offsets.h before
the other targets.
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Matthias Weisser <weisserm@arcor.de>
CC: Wolfgang Denk <wd@denx.de>
			
			
This commit is contained in:
		
				
					committed by
					
						 Wolfgang Denk
						Wolfgang Denk
					
				
			
			
				
	
			
			
			
						parent
						
							99ffccbd3e
						
					
				
				
					commit
					a4814a69d3
				
			
							
								
								
									
										20
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								Makefile
									
									
									
									
									
								
							| @@ -464,7 +464,8 @@ updater: | |||||||
| # parallel sub-makes creating .depend files simultaneously. | # parallel sub-makes creating .depend files simultaneously. | ||||||
| depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) \ | depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) \ | ||||||
| 		$(obj)include/autoconf.mk \ | 		$(obj)include/autoconf.mk \ | ||||||
| 		$(obj)include/generated/generic-asm-offsets.h | 		$(obj)include/generated/generic-asm-offsets.h \ | ||||||
|  | 		$(obj)include/generated/asm-offsets.h | ||||||
| 		for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \ | 		for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \ | ||||||
| 			$(MAKE) -C $$dir _depend ; done | 			$(MAKE) -C $$dir _depend ; done | ||||||
|  |  | ||||||
| @@ -527,6 +528,21 @@ $(obj)lib/asm-offsets.s:	$(obj)include/autoconf.mk.dep \ | |||||||
| 		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ | 		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ | ||||||
| 		-o $@ $(src)lib/asm-offsets.c -c -S | 		-o $@ $(src)lib/asm-offsets.c -c -S | ||||||
|  |  | ||||||
|  | $(obj)include/generated/asm-offsets.h:	$(obj)include/autoconf.mk.dep \ | ||||||
|  | 	$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s | ||||||
|  | 	@echo Generating $@ | ||||||
|  | 	tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@ | ||||||
|  |  | ||||||
|  | $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s:	$(obj)include/autoconf.mk.dep | ||||||
|  | 	@mkdir -p $(obj)$(CPUDIR)/$(SOC) | ||||||
|  | 	if [ -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \ | ||||||
|  | 		$(CC) -DDO_DEPS_ONLY \ | ||||||
|  | 		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ | ||||||
|  | 			-o $@ $(src)$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \ | ||||||
|  | 	else \ | ||||||
|  | 		touch $@; \ | ||||||
|  | 	fi | ||||||
|  |  | ||||||
| ######################################################################### | ######################################################################### | ||||||
| else	# !config.mk | else	# !config.mk | ||||||
| all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ | all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ | ||||||
| @@ -939,6 +955,8 @@ clean: | |||||||
| 	       $(obj)arch/blackfin/cpu/init.{lds,elf} | 	       $(obj)arch/blackfin/cpu/init.{lds,elf} | ||||||
| 	@rm -f $(obj)include/bmp_logo.h | 	@rm -f $(obj)include/bmp_logo.h | ||||||
| 	@rm -f $(obj)lib/asm-offsets.s | 	@rm -f $(obj)lib/asm-offsets.s | ||||||
|  | 	@rm -f $(obj)include/generated/asm-offsets.h | ||||||
|  | 	@rm -f $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s | ||||||
| 	@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map} | 	@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map} | ||||||
| 	@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map} | 	@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map} | ||||||
| 	@rm -f $(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin} | 	@rm -f $(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin} | ||||||
|   | |||||||
| @@ -39,8 +39,6 @@ all:	$(obj).depend $(LIB) | |||||||
| $(LIB):	$(OBJS) | $(LIB):	$(OBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS)) | 	$(call cmd_link_o_target, $(OBJS)) | ||||||
|  |  | ||||||
| $(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ######################################################################### | ######################################################################### | ||||||
|  |  | ||||||
|   | |||||||
| @@ -37,8 +37,6 @@ all:	$(obj).depend $(LIB) | |||||||
| $(LIB):	$(OBJS) | $(LIB):	$(OBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS)) | 	$(call cmd_link_o_target, $(OBJS)) | ||||||
|  |  | ||||||
| $(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h |  | ||||||
|  |  | ||||||
| ######################################################################### | ######################################################################### | ||||||
|  |  | ||||||
| # defines $(obj).depend target | # defines $(obj).depend target | ||||||
|   | |||||||
| @@ -34,8 +34,6 @@ all:	$(obj).depend $(LIB) | |||||||
| $(LIB):	$(OBJS) | $(LIB):	$(OBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS)) | 	$(call cmd_link_o_target, $(OBJS)) | ||||||
|  |  | ||||||
| $(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h |  | ||||||
|  |  | ||||||
| ######################################################################### | ######################################################################### | ||||||
|  |  | ||||||
| # defines $(obj).depend target | # defines $(obj).depend target | ||||||
|   | |||||||
| @@ -34,8 +34,6 @@ all:	$(obj).depend $(LIB) | |||||||
| $(LIB):	$(OBJS) | $(LIB):	$(OBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS)) | 	$(call cmd_link_o_target, $(OBJS)) | ||||||
|  |  | ||||||
| $(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h |  | ||||||
|  |  | ||||||
| ######################################################################### | ######################################################################### | ||||||
|  |  | ||||||
| # defines $(obj).depend target | # defines $(obj).depend target | ||||||
|   | |||||||
| @@ -45,6 +45,4 @@ include $(SRCTREE)/rules.mk | |||||||
|  |  | ||||||
| sinclude $(obj).depend | sinclude $(obj).depend | ||||||
|  |  | ||||||
| lowlevel_init.o : $(TOPDIR)/include/asm/arch/asm-offsets.h |  | ||||||
|  |  | ||||||
| ######################################################################### | ######################################################################### | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ | |||||||
|  |  | ||||||
| #include <config.h> | #include <config.h> | ||||||
| #include <asm/arch/imx-regs.h> | #include <asm/arch/imx-regs.h> | ||||||
| #include <asm/arch/asm-offsets.h> | #include <generated/asm-offsets.h> | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * L2CC Cache setup/invalidation/disable |  * L2CC Cache setup/invalidation/disable | ||||||
|   | |||||||
| @@ -31,7 +31,7 @@ | |||||||
| #ifdef __ASSEMBLY__ | #ifdef __ASSEMBLY__ | ||||||
|  |  | ||||||
| #include <asm/arch/imx-regs.h> | #include <asm/arch/imx-regs.h> | ||||||
| #include <asm/arch/asm-offsets.h> | #include <generated/asm-offsets.h> | ||||||
|  |  | ||||||
| .macro init_aips | .macro init_aips | ||||||
| 	write32	IMX_AIPS1_BASE + AIPS_MPR_0_7, 0x77777777 | 	write32	IMX_AIPS1_BASE + AIPS_MPR_0_7, 0x77777777 | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ | |||||||
|  |  | ||||||
| #include <config.h> | #include <config.h> | ||||||
| #include <asm/arch/imx-regs.h> | #include <asm/arch/imx-regs.h> | ||||||
| #include <asm/arch/asm-offsets.h> | #include <generated/asm-offsets.h> | ||||||
| #include "mx35pdk.h" | #include "mx35pdk.h" | ||||||
|  |  | ||||||
| /* | /* | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ | |||||||
| #include <version.h> | #include <version.h> | ||||||
| #include <asm/macro.h> | #include <asm/macro.h> | ||||||
| #include <asm/arch/imx-regs.h> | #include <asm/arch/imx-regs.h> | ||||||
| #include <asm/arch/asm-offsets.h> | #include <generated/asm-offsets.h> | ||||||
|  |  | ||||||
| SOC_ESDCTL_BASE_W:	.word	IMX_ESD_BASE | SOC_ESDCTL_BASE_W:	.word	IMX_ESD_BASE | ||||||
| SOC_SI_ID_REG_W:	.word	IMX_SYSTEM_CTL_BASE | SOC_SI_ID_REG_W:	.word	IMX_SYSTEM_CTL_BASE | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ | |||||||
| #include <version.h> | #include <version.h> | ||||||
| #include <asm/macro.h> | #include <asm/macro.h> | ||||||
| #include <asm/arch/mb86r0x.h> | #include <asm/arch/mb86r0x.h> | ||||||
| #include <asm/arch/asm-offsets.h> | #include <generated/asm-offsets.h> | ||||||
|  |  | ||||||
| /* Set up the platform, once the cpu has been initialized */ | /* Set up the platform, once the cpu has been initialized */ | ||||||
| .globl lowlevel_init | .globl lowlevel_init | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| #include <asm/macro.h> | #include <asm/macro.h> | ||||||
| #include <asm/arch/macro.h> | #include <asm/arch/macro.h> | ||||||
| #include <asm/arch/imx-regs.h> | #include <asm/arch/imx-regs.h> | ||||||
| #include <asm/arch/asm-offsets.h> | #include <generated/asm-offsets.h> | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * clocks |  * clocks | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								rules.mk
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								rules.mk
									
									
									
									
									
								
							| @@ -42,14 +42,4 @@ $(HOSTOBJS): $(obj)%.o: %.c | |||||||
| $(NOPEDOBJS): $(obj)%.o: %.c | $(NOPEDOBJS): $(obj)%.o: %.c | ||||||
| 	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c | 	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c | ||||||
|  |  | ||||||
| $(TOPDIR)/include/asm/arch/asm-offsets.h:	$(TOPDIR)/include/autoconf.mk.dep \ |  | ||||||
| 	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s |  | ||||||
| 	@echo Generating $@ |  | ||||||
| 	$(TOPDIR)/tools/scripts/make-asm-offsets $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s $@ |  | ||||||
|  |  | ||||||
| $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s:	$(TOPDIR)/include/autoconf.mk.dep \ |  | ||||||
| 	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c |  | ||||||
| 	$(CC) -DDO_DEPS_ONLY \ |  | ||||||
| 		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ |  | ||||||
| 		-o $@ $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S |  | ||||||
| ######################################################################### | ######################################################################### | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user