3 uses CONFIG_PRECOMPRESSED_PAYLOAD
5 uses CONFIG_HAVE_FAILOVER_BOOT
6 uses CONFIG_USE_FAILOVER_IMAGE
7 uses CONFIG_USE_FALLBACK_IMAGE
13 if CONFIG_USE_FAILOVER_IMAGE
15 initobject /src/lib/cbfs.o
16 initobject /src/lib/lzma.o
20 if CONFIG_HAVE_FAILOVER_BOOT
21 if CONFIG_USE_FAILOVER_IMAGE
22 ldscript init/ldscript_failover.lb
25 ldscript init/ldscript_cbfs.lb
27 ldscript init/ldscript.lb
32 if CONFIG_USE_FALLBACK_IMAGE
33 ldscript init/ldscript_fallback_cbfs.lb
35 ldscript init/ldscript_cbfs.lb
38 if CONFIG_USE_FALLBACK_IMAGE
39 ldscript init/ldscript_fallback.lb
41 ldscript init/ldscript.lb
47 depends "coreboot.rom"
52 action "mcopy -o coreboot.rom a:"
56 depends "$(TOP)/util/nrv2b/nrv2b.c"
57 action "$(HOSTCC) -O2 -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG -DBITSIZE=32 -DENDIAN=0 $< -o $@"
65 makerule payload.nrv2b
66 depends "$(PAYLOAD) nrv2b"
67 action "./nrv2b e $(PAYLOAD) $@"
70 # unlike nrv2b, lzma is a huge build mess. If they want lzma, they have to have built it
73 action "lzma -zc $(PAYLOAD) > $@ || lzma e $(PAYLOAD) $@"
77 # this one example shows the mess that has occurred. People are now mixing
78 # conditional if in the make style with if in the config language style.
79 # The -1 is linux standard.
80 # I don't much like it but it is the mode nowadays. So coreboot will change
82 # catch the case where there is no compression
83 makedefine PAYLOAD-1:=payload
87 # match the case where a compression type is specified.
88 makedefine PAYLOAD-$(CONFIG_COMPRESSED_PAYLOAD_NRV2B):=payload.nrv2b
89 makedefine PAYLOAD-$(CONFIG_COMPRESSED_PAYLOAD_LZMA):=payload.lzma
92 # catch the case where there is precompression. Yes, this bites.
93 if CONFIG_PRECOMPRESSED_PAYLOAD
94 makedefine PAYLOAD-1:=payload
97 if CONFIG_USE_FAILOVER_IMAGE
98 makedefine COREBOOT_APC:=
99 makedefine COREBOOT_RAM_ROM:=
101 makerule coreboot.rom
102 depends "coreboot.strip"
106 makerule coreboot.rom
107 depends "coreboot.strip buildrom $(PAYLOAD-1)"
108 action "PAYLOAD=$(PAYLOAD-1); if [ $(CONFIG_CBFS) -eq 1 ]; then PAYLOAD=/dev/null; touch cbfs-support; fi; ./buildrom $< $@ $$PAYLOAD $(CONFIG_ROM_IMAGE_SIZE) $(CONFIG_ROM_SECTION_SIZE)"
109 action "if [ $(CONFIG_COMPRESSED_PAYLOAD_LZMA) -eq 1 -a $(CONFIG_CBFS) -eq 1 ]; then echo l > cbfs-support; fi"
114 depends "$(CONFIG_CRT0)"
118 addaction clean "rm -f romimage payload.*"
122 depends "$(INIT-OBJECTS)"
123 action "$(LD) -melf_i386 -r -o init.pre.o $(INIT-OBJECTS)"
124 action "$(CONFIG_OBJCOPY) --rename-section .text=.init.text --rename-section .data=.init.data --rename-section .rodata=.init.rodata --rename-section .rodata.str1.1=.init.rodata.str1.1 init.pre.o init.o"
128 depends "crt0.o init.o $(COREBOOT_APC) $(COREBOOT_RAM_ROM) ldscript.ld"
129 action "$(CC) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o init.o"
130 action "$(CONFIG_CROSS_COMPILE)nm -n coreboot | sort > coreboot.map"