Author: stepan Date: Fri Apr 15 05:34:05 2011 New Revision: 6504 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6504
Log: add FILO easy payload option
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Acked-by: Stefan Reinauer stefan.reinauer@coreboot.org
Added: trunk/payloads/external/FILO/ trunk/payloads/external/FILO/Makefile.inc Modified: trunk/src/Kconfig trunk/src/arch/x86/Makefile.inc
Added: trunk/payloads/external/FILO/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/payloads/external/FILO/Makefile.inc Fri Apr 15 05:34:05 2011 (r6504) @@ -0,0 +1,43 @@ +TAG-$(CONFIG_FILO_MASTER)= +NAME-$(CONFIG_FILO_MASTER)=HEAD +TAG-$(CONFIG_FILO_STABLE)=-r 139 +NAME-$(CONFIG_FILO_STABLE)=STABLE + +unexport KCONFIG_AUTOCONFIG + +all: filo + +checkout: + echo " SVN FILO $(NAME-y)" + test -d filo || \ + svn co svn://coreboot.org/filo/trunk/filo $(TAG-y) + cd filo; svn update $(TAG-y) + +config: libpayload + echo " CONFIG FILO $(NAME-y)" + $(MAKE) -C filo defconfig + echo "CONFIG_COREBOOT=y" >> filo/.config + echo "CONFIG_DEBUG_SERIAL=y" >> filo/.config + echo "CONFIG_COREBOOT_FLASH=y" >> filo/.config + echo "CONFIG_LZMA=y" >> filo/.config + echo "CONFIG_FLASH_FLOPPY=y" >> filo/.config + echo "CONFIG_VGAHOOKS=y" >> filo/.config + # This shows how to force a previously set .config option *off* + #echo "# CONFIG_SMBIOS is not set" >> filo/.config + +filo: config + echo " MAKE FILO $(NAME-y)" + $(MAKE) -C filo + +libpayload: checkout + cd ../../libpayload && $(MAKE) defconfig && \ + $(MAKE) && $(MAKE) DESTDIR=../external/FILO/filo/build install + +clean: + test -d filo && $(MAKE) -C filo clean || exit 0 + +distclean: + rm -rf filo + +.PHONY: checkout config filo clean distclean +
Modified: trunk/src/Kconfig ============================================================================== --- trunk/src/Kconfig Fri Apr 15 05:30:03 2011 (r6503) +++ trunk/src/Kconfig Fri Apr 15 05:34:05 2011 (r6504) @@ -358,6 +358,15 @@
See http://coreboot.org/Payloads for more information.
+config PAYLOAD_FILO + bool "FILO" + help + Select this option if you want to build a coreboot image + with a FILO payload. If you don't know what this is + about, just leave it enabled. + + See http://coreboot.org/Payloads for more information. + endchoice
choice @@ -375,6 +384,21 @@ Newest SeaBIOS version endchoice
+choice + prompt "FILO version" + default FILO_STABLE + depends on PAYLOAD_FILO + +config FILO_STABLE + bool "0.6.0" + help + Stable FILO version +config FILO_MASTER + bool "HEAD" + help + Newest FILO version +endchoice + config PAYLOAD_FILE string "Payload path and filename" depends on PAYLOAD_ELF @@ -386,11 +410,15 @@ depends on PAYLOAD_SEABIOS default "payloads/external/SeaBIOS/seabios/out/bios.bin.elf"
+config PAYLOAD_FILE + depends on PAYLOAD_FILO + default "payloads/external/FILO/filo/build/filo.elf" + # TODO: Defined if no payload? Breaks build? config COMPRESSED_PAYLOAD_LZMA bool "Use LZMA compression for payloads" default y - depends on PAYLOAD_ELF || PAYLOAD_SEABIOS + depends on PAYLOAD_ELF || PAYLOAD_SEABIOS || PAYLOAD_FILO help In order to reduce the size payloads take up in the ROM chip coreboot can compress them using the LZMA algorithm.
Modified: trunk/src/arch/x86/Makefile.inc ============================================================================== --- trunk/src/arch/x86/Makefile.inc Fri Apr 15 05:30:03 2011 (r6503) +++ trunk/src/arch/x86/Makefile.inc Fri Apr 15 05:34:05 2011 (r6504) @@ -43,6 +43,9 @@ ifeq ($(CONFIG_PAYLOAD_SEABIOS),y) COREBOOT_ROM_DEPENDENCIES+=seabios endif +ifeq ($(CONFIG_PAYLOAD_FILO),y) +COREBOOT_ROM_DEPENDENCIES+=filo +endif ifeq ($(CONFIG_AP_CODE_IN_CAR),y) COREBOOT_ROM_DEPENDENCIES+=$(obj)/coreboot_ap endif @@ -58,7 +61,7 @@ $(CBFSTOOL) $@ add $(call extract_nth,1,$(file)) $(call extract_nth,2,$(file)) $(call extract_nth,3,$(file)) $(call extract_nth,4,$(file)); ) prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
-$(obj)/coreboot.pre1: $(obj)/coreboot.bootblock $$(prebuilt-files) $(CBFSTOOL) +$(obj)/coreboot.pre1: $(obj)/coreboot.bootblock $(prebuilt-files) $(CBFSTOOL) rm -f $@ $(CBFSTOOL) $@ create $(CONFIG_COREBOOT_ROMSIZE_KB)K $(obj)/coreboot.bootblock $(prebuild-files) @@ -86,6 +89,10 @@ @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_PAYLOAD_FILO),y) + @printf " PAYLOAD FILO (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_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 @@ -283,4 +290,11 @@ OBJCOPY="$(OBJCOPY)" STRIP="$(STRIP)" \ CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \ CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) +filo: + $(MAKE) -C payloads/external/FILO -f Makefile.inc \ + HOSTCC="$(HOSTCC)" \ + CC="$(CC)" LD="$(LD)" OBJDUMP="$(OBJDUMP)" \ + OBJCOPY="$(OBJCOPY)" STRIP="$(STRIP)" \ + CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \ + CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE)