Author: oxygene
Date: Tue Feb  9 20:41:11 2010
New Revision: 5103
URL: http://tracker.coreboot.org/trac/coreboot/changeset/5103

Log:
Add image updating support. When selecting it, it
expects a coreboot.rom to be available, and adds the files to it.

It has no idea how to replace files, it merely adds them. It only works
with Tinybootblock and the bootblock is immutable.

The "clean" rules allow "make clean-for-update", which
removes everything but coreboot.rom

Signed-off-by: Patrick Georgi <[email protected]>
Acked-by: Peter Stuge <[email protected]>

Modified:
   trunk/Makefile
   trunk/src/arch/i386/Kconfig
   trunk/src/arch/i386/Makefile.tinybootblock.inc

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile      Tue Feb  9 20:35:16 2010        (r5102)
+++ trunk/Makefile      Tue Feb  9 20:41:11 2010        (r5103)
@@ -284,15 +284,19 @@
 doxygen-clean:
        rm -rf $(DOXYGEN_OUTPUT_DIR)
 
-clean: doxygen-clean
-       rm -f $(allobjs) $(obj)/coreboot* .xcompile
+clean-for-update: doxygen-clean
+       rm -f $(objs) $(initobjs) $(drivers) $(smmobjs) .xcompile
+       rm -f $(obj)/coreboot_ram* $(obj)/coreboot.romstage 
$(obj)/coreboot.pre* $(obj)/coreboot.bootblock $(obj)/coreboot.a
        rm -rf $(obj)/bootblock* $(obj)/romstage* $(obj)/location.*
-       rm -f $(obj)/option_table.* $(obj)/crt0_includes.h $(obj)/ldscript
+       rm -f $(obj)/option_table.* $(obj)/crt0_includes.h $(obj)/ldscript 
$(obj)/config.h
        rm -f $(obj)/mainboard/$(MAINBOARDDIR)/static.c 
$(obj)/mainboard/$(MAINBOARDDIR)/config.py 
$(obj)/mainboard/$(MAINBOARDDIR)/static.dot
        rm -f $(obj)/mainboard/$(MAINBOARDDIR)/auto.inc 
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s 
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.disasm
        rmdir -p $(alldirs) 2>/dev/null >/dev/null || true
        $(MAKE) -C util/sconfig clean
 
+clean: clean-for-update
+       rm -f $(obj)/coreboot*
+
 distclean: clean
        rm -rf $(obj)
        rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig*

Modified: trunk/src/arch/i386/Kconfig
==============================================================================
--- trunk/src/arch/i386/Kconfig Tue Feb  9 20:35:16 2010        (r5102)
+++ trunk/src/arch/i386/Kconfig Tue Feb  9 20:41:11 2010        (r5103)
@@ -49,6 +49,16 @@
        default n if TINY_BOOTBLOCK
        default y
 
+config UPDATE_IMAGE
+       bool "Update existing coreboot.rom image"
+       default n
+       depends on TINY_BOOTBLOCK
+       help
+               If this option is activate, no new coreboot.rom file
+               is created. Instead it is expected that there already
+               is a suitable file for further processing.
+               The bootblock will not be modified.
+
 config ROMCC
        bool
        default n

Modified: trunk/src/arch/i386/Makefile.tinybootblock.inc
==============================================================================
--- trunk/src/arch/i386/Makefile.tinybootblock.inc      Tue Feb  9 20:35:16 
2010        (r5102)
+++ trunk/src/arch/i386/Makefile.tinybootblock.inc      Tue Feb  9 20:41:11 
2010        (r5103)
@@ -3,9 +3,14 @@
 #######################################################################
 # Build the final rom image
 
+ifneq ($(CONFIG_UPDATE_IMAGE),y)
 $(obj)/coreboot.pre1: $(obj)/coreboot.bootblock $(CBFSTOOL)
        rm -f $@
        $(CBFSTOOL) $@ create $(CONFIG_COREBOOT_ROMSIZE_KB)K 
$(obj)/coreboot.bootblock
+else
+$(obj)/coreboot.pre1: $(CBFSTOOL)
+       mv $(obj)/coreboot.rom $@
+endif
 
 $(obj)/coreboot.pre: $(obj)/coreboot.romstage $(obj)/coreboot.pre1 $(CBFSTOOL)
        rm -f $@

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to