]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - scripts/Makefile.lib
powerpc: P2020: Remove macro CONFIG_P2020
[people/ms/u-boot.git] / scripts / Makefile.lib
index 1644f8c48d4b9d13ccfb9ed4b57320df0bcaebea..956a8a9b04471fceabdc8ca659a577da6360af78 100644 (file)
@@ -275,11 +275,11 @@ cmd_dt_S_dtb=                                             \
 (                                                      \
        echo '.section .dtb.init.rodata,"a"';           \
        echo '.balign 16';                              \
-       echo '.global __dtb_$(*F)_begin';               \
-       echo '__dtb_$(*F)_begin:';                      \
+       echo '.global __dtb_$(subst -,_,$(*F))_begin';  \
+       echo '__dtb_$(subst -,_,$(*F))_begin:';         \
        echo '.incbin "$<" ';                           \
-       echo '__dtb_$(*F)_end:';                        \
-       echo '.global __dtb_$(*F)_end';                 \
+       echo '__dtb_$(subst -,_,$(*F))_end:';           \
+       echo '.global __dtb_$(subst -,_,$(*F))_end';    \
        echo '.balign 16';                              \
 ) > $@
 
@@ -300,15 +300,69 @@ $(obj)/%.dtb: $(src)/%.dts FORCE
 
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
 
+# Fonts
+# ---------------------------------------------------------------------------
+
+# Generate an assembly file to wrap the font data
+quiet_cmd_S_ttf= TTF     $@
+# Modified for U-Boot
+cmd_S_ttf=                                             \
+(                                                      \
+       echo '.section .rodata.ttf.init,"a"';           \
+       echo '.balign 16';                              \
+       echo '.global __ttf_$(*F)_begin';               \
+       echo '__ttf_$(*F)_begin:';                      \
+       echo '.incbin "$<" ';                           \
+       echo '__ttf_$(*F)_end:';                        \
+       echo '.global __ttf_$(*F)_end';                 \
+       echo '.balign 16';                              \
+) > $@
+
+$(obj)/%.S: $(src)/%.ttf
+       $(call cmd,S_ttf)
+
+# EFI Hello World application
+# ---------------------------------------------------------------------------
+
+# Generate an assembly file to wrap the EFI app
+cmd_S_efi=                                             \
+(                                                      \
+       echo '.section .rodata.efi.init,"a"';           \
+       echo '.balign 16';                              \
+       echo '.global __efi_hello_world_begin';         \
+       echo '__efi_hello_world_begin:';                \
+       echo '.incbin "$<" ';                           \
+       echo '__efi_hello_world_end:';                  \
+       echo '.global __efi_hello_world_end';           \
+       echo '.balign 16';                              \
+) > $@
+
+$(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 \
+               $(if $(EFI_TARGET),$(EFI_TARGET),-O binary) $^ $@
+
+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 $@
+
 # ACPI
 # ---------------------------------------------------------------------------
-quiet_cmd_acpi_c_asl= ASL     $@
+quiet_cmd_acpi_c_asl= ASL     $<
 cmd_acpi_c_asl=         \
-       $(CPP) -x assembler-with-cpp -P -o $<.tmp $<; \
-       iasl -p $< -tc -va $<.tmp; \
+       $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -P $(UBOOTINCLUDE) -o $<.tmp $<; \
+       iasl -p $< -tc $<.tmp $(if $(KBUILD_VERBOSE:1=), >/dev/null); \
        mv $(patsubst %.asl,%.hex,$<) $@
 
-$(obj)/%.c:    $(src)/%.asl
+$(obj)/dsdt.c:    $(src)/dsdt.asl
        $(call cmd,acpi_c_asl)
 
 # Bzip2