- AMD selected a couple of options that are incompatible with QEmu (and
authorPatrick Georgi <patrick.georgi@coresystems.de>
Thu, 13 Aug 2009 15:29:01 +0000 (15:29 +0000)
committerPatrick Georgi <patrick.georgi@coresystems.de>
Thu, 13 Aug 2009 15:29:01 +0000 (15:29 +0000)
probably others). Only select them for AMD

- Make the bootblock smaller (only one copy of it), and don't pad the
bootblock using dd(1), but top-align inside cbfstool, to reduce
dependencies on unix tools.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4542 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/arch/i386/Makefile.inc
src/cpu/amd/model_fxx/Kconfig
util/cbfstool/util.c

index ecfa7dc619f62d3ac5922958e433ccc82bc3a81d..cca89173472e36af472b023494f594ad1ca67390 100644 (file)
@@ -8,12 +8,14 @@ subdirs-y += smp
 obj-y += ../../option_table.o
 
 ifdef POST_EVALUATION
+BOOTBLOCK_SIZE=65536
+
 #######################################################################
 # Build the final rom image
 
 $(obj)/coreboot.rom: $(obj)/coreboot.bootblock $(obj)/coreboot_ram $(CBFSTOOL)
        $(Q)rm -f $@
-       $(Q)$(CBFSTOOL) $@ create $(shell expr 1024 \* $(CONFIG_COREBOOT_ROMSIZE_KB)) 131072 $(obj)/coreboot.bootblock
+       $(Q)$(CBFSTOOL) $@ create $(shell expr 1024 \* $(CONFIG_COREBOOT_ROMSIZE_KB)) $(BOOTBLOCK_SIZE) $(obj)/coreboot.bootblock
        $(Q)if [ -f fallback/coreboot_apc ]; \
        then \
                $(CBFSTOOL) $@ add-stage fallback/coreboot_apc fallback/coreboot_apc $(CBFS_COMPRESS_FLAG); \
@@ -31,14 +33,7 @@ endif
 #######################################################################
 # Build the bootblock
 
-BOOTBLOCK_SIZE=65536
-
-$(obj)/coreboot.bootblock: $(obj)/coreboot.strip
-       $(Q)printf "    CREATE     $(subst $(obj)/,,$(@))\n"
-       $(Q)dd if=$< of=$(obj)/coreboot.bootblock.one obs=$(BOOTBLOCK_SIZE) conv=sync
-       $(Q)cat $(obj)/coreboot.bootblock.one $(obj)/coreboot.bootblock.one > $(obj)/coreboot.bootblock
-
-$(obj)/coreboot.strip: $(obj)/coreboot
+$(obj)/coreboot.bootblock: $(obj)/coreboot
        $(Q)printf "    OBJCOPY    $(subst $(obj)/,,$(@))\n"
        $(Q)$(OBJCOPY) -O binary $< $@
 
index db9f5c5a2e1657ebc8c994cb706946c3742dd82a..bab2175feed4aaa29ba7b131bad718fb1c4c59e0 100644 (file)
@@ -1,13 +1,16 @@
 config HAVE_INIT_TIMER
        bool
        default y
+       depends on CPU_AMD_SOCKET_F
 
 config HAVE_MOVNTI
        bool
        default y
+       depends on CPU_AMD_SOCKET_F
 
 config CPU_ADDR_BITS
        int
        default 40
+       depends on CPU_AMD_SOCKET_F
 
 
index e1da4cb6fc4c1515e0cda1c206c3a9b96d162ab7..054436d8ca763472a130ac8319836d0f31209c64 100644 (file)
@@ -256,7 +256,7 @@ int add_bootblock(struct rom *rom, const char *filename)
        }
 
        /* Copy the bootblock into place at the end of the file */
-       ret = copy_from_fd(fd, ROM_PTR(rom, rom->size - ntohl(rom->header->bootblocksize)), size);
+       ret = copy_from_fd(fd, ROM_PTR(rom, rom->size - size), size);
 
        close(fd);