Patchwork Use cbfs-files-y for normal file additions

login
register
about
Submitter Patrick Georgi
Date 2011-01-28 14:57:36
Message ID <1296226656.4045.96.camel@linux-0a8x.site>
Download mbox | patch
Permalink /patch/2576/
State Accepted
Headers show

Comments

Patrick Georgi - 2011-01-28 14:57:36
Hi,

we currently have special cases for VGABIOS, Intel MBI and
splashscreens. Use cbfs-files-y instead, which provides a canonical way
for adding raw files to CBFS.

Question is, if we should drop these Kconfig options entirely and let
the user handle these entries in the board's Makefile.inc?

Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Peter Stuge - 2011-01-29 10:22:50
Georgi, Patrick wrote:
> Question is, if we should drop these Kconfig options entirely and let
> the user handle these entries in the board's Makefile.inc?

Sometimes the files come from chipset though.


> Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>

With the fix below:

Acked-by: Peter Stuge <peter@stuge.se>


> +++ b/src/arch/x86/Makefile.inc
> @@ -117,6 +96,18 @@ endif
>  	@printf "    CBFSPRINT  $(subst $(obj)/,,$(@))\n\n"
>  	$(CBFSTOOL) $@ print
>  
> +cbfs-files-$(CONFIG_VGA_BIOS) += pci$(call strip_quotes,$(CONFIG_VGA_BIOS_ID)).rom
> +pci$(CONFIG_VGA_BIOS_ID)-file := $(call strip_quotes,$(CONFIG_VGA_BIOS_FILE))
> +pci$(CONFIG_VGA_BIOS_ID)-type := optionrom

These last two need .rom as well, right?


//Peter
Patrick Georgi - 2011-01-30 16:38:40
Am 29.01.2011 11:22, schrieb Peter Stuge:
>> +cbfs-files-$(CONFIG_VGA_BIOS) += pci$(call strip_quotes,$(CONFIG_VGA_BIOS_ID)).rom
>> +pci$(CONFIG_VGA_BIOS_ID)-file := $(call strip_quotes,$(CONFIG_VGA_BIOS_FILE))
>> +pci$(CONFIG_VGA_BIOS_ID)-type := optionrom
> 
> These last two need .rom as well, right?
You're right. I also replicated the strip_quotes call to the two later
lines.

Committed as r6320


Patrick

Patch

diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc

index fc97580..40b13b9 100644

--- a/src/arch/x86/Makefile.inc

+++ b/src/arch/x86/Makefile.inc

@@ -43,15 +43,6 @@  endif

 ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
 COREBOOT_ROM_DEPENDENCIES+=seabios
 endif
-ifeq ($(CONFIG_VGA_BIOS),y)

-COREBOOT_ROM_DEPENDENCIES+=$(CONFIG_VGA_BIOS_FILE)

-endif

-ifeq ($(CONFIG_INTEL_MBI),y)

-COREBOOT_ROM_DEPENDENCIES+=$(CONFIG_MBI_FILE)

-endif

-ifeq ($(CONFIG_BOOTSPLASH),y)

-COREBOOT_ROM_DEPENDENCIES+=$(CONFIG_BOOTSPLASH_FILE)

-endif

 ifeq ($(CONFIG_AP_CODE_IN_CAR),y)
 COREBOOT_ROM_DEPENDENCIES+=$(obj)/coreboot_ap
 endif
@@ -95,18 +86,6 @@  ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)

 	@printf "    PAYLOAD    SeaBIOS (internal, compression: $(CBFS_PAYLOAD_COMPRESS_NAME))\n"
 	$(CBFSTOOL) $@.tmp add-payload $(CONFIG_PAYLOAD_FILE) $(CONFIG_CBFS_PREFIX)/payload $(CBFS_PAYLOAD_COMPRESS_FLAG)
 endif
-ifeq ($(CONFIG_VGA_BIOS),y)

-	@printf "    VGABIOS    $(CONFIG_VGA_BIOS_FILE) $(CONFIG_VGA_BIOS_ID)\n"

-	$(CBFSTOOL) $@.tmp add $(CONFIG_VGA_BIOS_FILE) "pci$(CONFIG_VGA_BIOS_ID).rom" optionrom

-endif

-ifeq ($(CONFIG_INTEL_MBI),y)

-	@printf "    MBI        $(CONFIG_MBI_FILE)\n"

-	$(CBFSTOOL) $@.tmp add $(CONFIG_MBI_FILE) mbi.bin mbi

-endif

-ifeq ($(CONFIG_BOOTSPLASH),y)

-	@printf "    BOOTSPLASH $(CONFIG_BOOTSPLASH_FILE)\n"

-	$(CBFSTOOL) $@.tmp add $(CONFIG_BOOTSPLASH_FILE) bootsplash.jpg bootsplash

-endif

 ifeq ($(CONFIG_GEODE_VSA_FILE),y)
 	@printf "    VSA        $(CONFIG_VSA_FILENAME)\n"
 	$(OBJCOPY) --set-start 0x20 --adjust-vma 0x60000 -I binary -O elf32-i386 -B i386 $(CONFIG_VSA_FILENAME) $(obj)/vsa.o
@@ -117,6 +96,18 @@  endif

 	@printf "    CBFSPRINT  $(subst $(obj)/,,$(@))\n\n"
 	$(CBFSTOOL) $@ print
 
+cbfs-files-$(CONFIG_VGA_BIOS) += pci$(call strip_quotes,$(CONFIG_VGA_BIOS_ID)).rom

+pci$(CONFIG_VGA_BIOS_ID)-file := $(call strip_quotes,$(CONFIG_VGA_BIOS_FILE))

+pci$(CONFIG_VGA_BIOS_ID)-type := optionrom

+

+cbfs-files-$(CONFIG_INTEL_MBI) += mbi.bin

+mbi.bin-file := $(call strip_quotes,$(CONFIG_MBI_FILE))

+mbi.bin-type := mbi

+

+cbfs-files-$(CONFIG_BOOTSPLASH) += bootsplash.jpg

+bootsplash.jpg-file := $(call strip_quotes,$(CONFIG_BOOTSPLASH_FILE))

+bootsplash.jpg-type := bootsplash

+

 #######################################################################
 # i386 specific tools