X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=scripts%2FMakefile.lib;h=9ce47b4d22713ff376436acc00ea75e1ad5241c4;hb=84e9dcc120c59942cc35a1e229e856ce556d7ca2;hp=60265f4d32da4dcffdaf1085840cd4bf24096ad7;hpb=6d427c6b1fa0ae97e7c484229d137c6a1f8a4118;p=u-boot diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 60265f4d32..9ce47b4d22 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -164,14 +164,12 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ ld_flags = $(LDFLAGS) $(ldflags-y) -dts_dir = $(srctree)/arch/$(ARCH)/dts - # Try these files in order to find the U-Boot-specific .dtsi include file -u_boot_dtsi_options = $(wildcard $(dts_dir)/$(basename $(notdir $<))-u-boot.dtsi) \ - $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \ - $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \ - $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \ - $(wildcard $(dts_dir)/u-boot.dtsi) +u_boot_dtsi_options = $(wildcard $(dir $<)$(basename $(notdir $<))-u-boot.dtsi) \ + $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \ + $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \ + $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \ + $(wildcard $(dir $<)u-boot.dtsi) # Uncomment for debugging # $(warning u_boot_dtsi_options: $(u_boot_dtsi_options)) @@ -308,10 +306,10 @@ $(obj)/%.dtb.S: $(obj)/%.dtb quiet_cmd_dtc = DTC $@ # Modified for U-Boot -# Bring in any U-Boot-specific include after the '/dts-v1/;' header +# Bring in any U-Boot-specific include at the end of the file cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ - cat $< $(if $(u-boot-dtsi),\ - | sed 's%^/ {$$%\#include \"$(u-boot-dtsi)\"\n&%') | \ + cat $< $(if $(u_boot_dtsi),\ + | sed "$$ a\#include \"$(u_boot_dtsi)\"") | \ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ $(DTC) -O dtb -o $@ -b 0 \ -i $(dir $<) $(DTC_FLAGS) \ @@ -363,26 +361,32 @@ cmd_S_efi= \ $(obj)/%_efi.S: $(obj)/%.efi $(call cmd,S_efi) -$(obj)/%.efi: $(obj)/%.so - $(OBJCOPY) -j .header -j .text -j .sdata -j .data -j .dynamic \ - -j .dynsym -j .rel* -j .rela* -j .reloc \ +quiet_cmd_efi_objcopy = OBJCOPY $@ +cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data -j \ + .dynamic -j .dynsym -j .rel* -j .rela* -j .reloc \ $(if $(EFI_TARGET),$(EFI_TARGET),-O binary) $^ $@ +$(obj)/%.efi: $(obj)/%.so + $(call cmd,efi_objcopy) + +quiet_cmd_efi_ld = LD $@ +cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \ + -Bsymbolic $^ -o $@ + EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS) $(obj)/helloworld.so: $(EFI_LDS_PATH) $(obj)/helloworld.so: $(obj)/helloworld.o arch/$(ARCH)/lib/$(EFI_CRT0) \ arch/$(ARCH)/lib/$(EFI_RELOC) - $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared -Bsymbolic \ - $^ -o $@ + $(call cmd,efi_ld) # ACPI # --------------------------------------------------------------------------- quiet_cmd_acpi_c_asl= ASL $< cmd_acpi_c_asl= \ $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -P $(UBOOTINCLUDE) -o $<.tmp $<; \ - iasl -p $< -tc $<.tmp $(if $(KBUILD_VERBOSE:1=), >/dev/null); \ + iasl -p $< -tc $<.tmp $(if $(KBUILD_VERBOSE:1=), >/dev/null) && \ mv $(patsubst %.asl,%.hex,$<) $@ $(obj)/dsdt.c: $(src)/dsdt.asl @@ -487,6 +491,7 @@ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ # # mkimage # --------------------------------------------------------------------------- +MKIMAGEOUTPUT ?= /dev/null quiet_cmd_mkimage = MKIMAGE $@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ - $(if $(KBUILD_VERBOSE:1=), >/dev/null) + $(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT))