Changeset 5102


Ignore:
Timestamp:
Feb 9, 2010, 8:35:16 PM (5 years ago)
Author:
oxygene
Message:

Allow building images with different prefixes (ie. normal/romstage,
helloWorld/romstage, ...).
It defaults to fallback/, so there's no user visible change now.

Signed-off-by: Patrick Georgi <patrick.georgi@…>
Acked-by: Peter Stuge <peter@…>

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Kconfig

    r5044 r5102  
    3939          the coreboot version number, so that you can easily distinguish
    4040          boot logs of different boards from each other.
     41
     42config CBFS_PREFIX
     43        string "CBFS prefix to use"
     44        default "fallback"
     45        help
     46          Select the prefix to all files put into the image. It's "fallback"
     47          by default, "normal" is a common alternative.
    4148
    4249endmenu
  • trunk/src/arch/i386/Makefile.inc

    r5099 r5102  
    1616        if [ -f fallback/coreboot_apc ]; \
    1717        then \
    18                 $(CBFSTOOL) $@ add-stage fallback/coreboot_apc fallback/coreboot_apc $(CBFS_COMPRESS_FLAG); \
     18                $(CBFSTOOL) $@ add-stage fallback/coreboot_apc $(CONFIG_CBFS_PREFIX)/coreboot_apc $(CBFS_COMPRESS_FLAG); \
    1919        fi
    20         $(CBFSTOOL) $@ add-stage $(obj)/coreboot_ram fallback/coreboot_ram $(CBFS_COMPRESS_FLAG)
     20        $(CBFSTOOL) $@ add-stage $(obj)/coreboot_ram $(CONFIG_CBFS_PREFIX)/coreboot_ram $(CBFS_COMPRESS_FLAG)
    2121ifeq ($(CONFIG_PAYLOAD_NONE),y)
    2222        @printf "    PAYLOAD    none (as specified by user)\n"
    2323else
    2424        @printf "    PAYLOAD    $(CONFIG_FALLBACK_PAYLOAD_FILE) $(CBFS_PAYLOAD_COMPRESS_FLAG)\n"
    25         $(CBFSTOOL) $(obj)/coreboot.rom add-payload $(CONFIG_FALLBACK_PAYLOAD_FILE) fallback/payload $(CBFS_PAYLOAD_COMPRESS_FLAG)
     25        $(CBFSTOOL) $(obj)/coreboot.rom add-payload $(CONFIG_FALLBACK_PAYLOAD_FILE) $(CONFIG_CBFS_PREFIX)/payload $(CBFS_PAYLOAD_COMPRESS_FLAG)
    2626endif
    2727ifeq ($(CONFIG_VGA_BIOS),y)
  • trunk/src/arch/i386/Makefile.tinybootblock.inc

    r5065 r5102  
    1111        rm -f $@
    1212        cp $(obj)/coreboot.pre1 $@
    13         $(CBFSTOOL) $@ add-stage $(obj)/romstage.elf fallback/romstage x 0x$(shell cat $(obj)/location.txt)
     13        $(CBFSTOOL) $@ add-stage $(obj)/romstage.elf $(CONFIG_CBFS_PREFIX)/romstage x 0x$(shell cat $(obj)/location.txt)
    1414#FIXME: location.txt might require an offset of header size
    1515
     
    5959        $(CC) -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -I$(obj)/bootblock -include $(obj)/config.h -I. -I$(src) $< > $@.new && mv $@.new $@
    6060
    61 $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(obj)/romcc $(src)/arch/i386/init/bootblock.c
    62         $(obj)/romcc $(bootblock_romccflags) -O2 $(ROMCCFLAGS) $(INCLUDES) $(src)/arch/i386/init/bootblock.c -o $@
     61$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(src)/arch/i386/init/$(subst ",,$(CONFIG_TINY_BOOTBLOCK_SOURCE)) $(obj)/romcc
     62        $(obj)/romcc $(bootblock_romccflags) -O2 $(ROMCCFLAGS) $(INCLUDES) $< -o $@
    6363
    6464$(obj)/bootblock.elf: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o $(obj)/bootblock/ldscript.ld
     
    7575        $(OBJCOPY) -O binary $(obj)/romstage.elf $(obj)/romstage.bin
    7676        printf "CONFIG_ROMBASE = 0x" > $(obj)/location.ld
    77         $(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin fallback/romstage $(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt
     77        $(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin $(CONFIG_CBFS_PREFIX)/romstage $(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt
    7878        cat $(obj)/location.txt >> $(obj)/location.ld
    7979        printf ';\nAUTO_XIP_ROM_BASE = CONFIG_ROMBASE & ~(CONFIG_XIP_ROM_SIZE - 1);\n' >> $(obj)/location.ld
  • trunk/src/arch/i386/init/crt0.S.lb

    r4712 r5102  
    138138#endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */
    139139
    140 #if CONFIG_USE_FALLBACK_IMAGE == 1
    141 str_coreboot_ram_name:  .string "fallback/coreboot_ram"
    142 #else
    143 str_coreboot_ram_name:  .string "normal/coreboot_ram"
    144 #endif
     140str_coreboot_ram_name:  .ascii CONFIG_CBFS_PREFIX
     141                        .string "/coreboot_ram"
    145142
    146143#endif /* CONFIG_USE_DCACHE_RAM */
  • trunk/src/boot/hardwaremain.c

    r4871 r5102  
    104104         */
    105105        lb_mem = write_tables();
    106 #if CONFIG_USE_FALLBACK_IMAGE == 1
    107         cbfs_load_payload(lb_mem, "fallback/payload");
    108 #else
    109         cbfs_load_payload(lb_mem, "normal/payload");
    110 #endif
     106        cbfs_load_payload(lb_mem, CONFIG_CBFS_PREFIX "/payload");
    111107        printk(BIOS_ERR, "Boot failed.\n");
    112108}
  • trunk/src/cpu/amd/car/copy_and_run.c

    r4712 r5102  
    88static void copy_and_run(void)
    99{
    10 #if CONFIG_USE_FALLBACK_IMAGE == 1
    11         cbfs_and_run_core("fallback/coreboot_ram", 0);
    12 #else
    13         cbfs_and_run_core("normal/coreboot_ram", 0);
    14 #endif
     10        cbfs_and_run_core(CONFIG_CBFS_PREFIX "/coreboot_ram", 0);
    1511}
    1612
     
    1915static void copy_and_run_ap_code_in_car(unsigned ret_addr)
    2016{
    21 # if CONFIG_USE_FALLBACK_IMAGE == 1
    22         cbfs_and_run_core("fallback/coreboot_apc", ret_addr);
    23 # else
    24         cbfs_and_run_core("normal/coreboot_apc", ret_addr);
    25 # endif
     17        cbfs_and_run_core(CONFIG_CBFS_PREFIX "/coreboot_apc", ret_addr);
    2618}
    2719#endif
  • trunk/src/cpu/amd/model_lx/cache_as_ram.inc

    r5055 r5102  
    279279
    280280#endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */
    281 #if CONFIG_USE_FALLBACK_IMAGE == 1
    282 str_coreboot_ram_name:  .string "fallback/coreboot_ram"
    283 #else
    284 str_coreboot_ram_name:  .string "normal/coreboot_ram"
    285 #endif
     281str_coreboot_ram_name:  .ascii CONFIG_CBFS_PREFIX
     282                        .string "/coreboot_ram"
Note: See TracChangeset for help on using the changeset viewer.