Picon
Favicon

build service results for r5104

Dear coreboot readers!

This is the automatic build system of coreboot.

The developer "oxygene" checked in revision 5104 to
the coreboot repository. This caused the following 
changes:

Change Log:
Emergency fix: r5102 carried some local change that doesn't
belong in this patch, which makes tinybootblock builds fail.

Signed-off-by: Patrick Georgi <patrick.georgi <at> coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi <at> coresystems.de>

Build Log:
Compilation of amd:serengeti_cheetah_fam10 has been fixed
Compilation of asus:m2v-mx_se has been fixed
Compilation of emulation:qemu-x86 has been fixed
Compilation of kontron:986lcd-m has been fixed
Compilation of supermicro:h8dme has been broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5104&device=h8dme&vendor=supermicro&num=2
Compilation of supermicro:h8dmr_fam10 has been fixed
Compilation of supermicro:h8qme_fam10 has been fixed
Compilation of tyan:s2912_fam10 has been fixed

If something broke during this checkin please be a pain 
in oxygene's neck until the issue is fixed.

If this issue is not fixed within 24h the revision should 
be backed out.

   Best regards,
     coreboot automatic build system

--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Picon
Favicon

build service results for r5103

Dear coreboot readers!

This is the automatic build system of coreboot.

The developer "oxygene" checked in revision 5103 to
the coreboot repository. This caused the following 
changes:

Change 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 <patrick.georgi <at> coresystems.de>
Acked-by: Peter Stuge <peter <at> stuge.se>

Build Log:
Compilation of amd:serengeti_cheetah_fam10 is still broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5103&device=serengeti_cheetah_fam10&vendor=amd&num=2
Compilation of asus:m2v-mx_se is still broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5103&device=m2v-mx_se&vendor=asus&num=2
Compilation of emulation:qemu-x86 is still broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5103&device=qemu-x86&vendor=emulation&num=2
Compilation of kontron:986lcd-m is still broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5103&device=986lcd-m&vendor=kontron&num=2
Compilation of supermicro:h8dmr_fam10 is still broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5103&device=h8dmr_fam10&vendor=supermicro&num=2
Compilation of supermicro:h8qme_fam10 is still broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5103&device=h8qme_fam10&vendor=supermicro&num=2
Compilation of tyan:s2912_fam10 is still broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5103&device=s2912_fam10&vendor=tyan&num=2

If something broke during this checkin please be a pain 
in oxygene's neck until the issue is fixed.

If this issue is not fixed within 24h the revision should 
be backed out.

   Best regards,
     coreboot automatic build system

--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

repository service | 9 Feb 21:02
Favicon

[commit] r5104 - trunk/src/arch/i386

Author: oxygene
Date: Tue Feb  9 21:02:32 2010
New Revision: 5104
URL: http://tracker.coreboot.org/trac/coreboot/changeset/5104

Log:
Emergency fix: r5102 carried some local change that doesn't
belong in this patch, which makes tinybootblock builds fail.

Signed-off-by: Patrick Georgi <patrick.georgi <at> coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi <at> coresystems.de>

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

Modified: trunk/src/arch/i386/Makefile.tinybootblock.inc
==============================================================================
--- trunk/src/arch/i386/Makefile.tinybootblock.inc	Tue Feb  9 20:41:11 2010	(r5103)
+++ trunk/src/arch/i386/Makefile.tinybootblock.inc	Tue Feb  9 21:02:32 2010	(r5104)
@@ -63,7 +63,7 @@
 $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s: $(obj)/bootblock/bootblock.c
 	$(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 $@

-$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(src)/arch/i386/init/$(subst
",,$(CONFIG_TINY_BOOTBLOCK_SOURCE)) $(obj)/romcc
+$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(src)/arch/i386/init/bootblock.c $(obj)/romcc
 	$(obj)/romcc $(bootblock_romccflags) -O2 $(ROMCCFLAGS) $(INCLUDES) $< -o $@

 $(obj)/bootblock.elf: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o $(obj)/bootblock/ldscript.ld

--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Picon
Favicon

build service results for r5102

Dear coreboot readers!

This is the automatic build system of coreboot.

The developer "oxygene" checked in revision 5102 to
the coreboot repository. This caused the following 
changes:

Change Log:
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 <at> coresystems.de>
Acked-by: Peter Stuge <peter <at> stuge.se>

Build Log:
Compilation of amd:serengeti_cheetah_fam10 has been broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5102&device=serengeti_cheetah_fam10&vendor=amd&num=2
Compilation of asus:m2v-mx_se has been broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5102&device=m2v-mx_se&vendor=asus&num=2
Compilation of emulation:qemu-x86 has been broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5102&device=qemu-x86&vendor=emulation&num=2
Compilation of kontron:986lcd-m has been broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5102&device=986lcd-m&vendor=kontron&num=2
Compilation of supermicro:h8dmr_fam10 has been broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5102&device=h8dmr_fam10&vendor=supermicro&num=2
Compilation of supermicro:h8qme_fam10 has been broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5102&device=h8qme_fam10&vendor=supermicro&num=2
Compilation of tyan:s2912_fam10 has been broken
See the error log at http://qa.coreboot.org/log_buildbrd.php?revision=5102&device=s2912_fam10&vendor=tyan&num=2

If something broke during this checkin please be a pain 
in oxygene's neck until the issue is fixed.

If this issue is not fixed within 24h the revision should 
be backed out.

   Best regards,
     coreboot automatic build system

--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

repository service | 9 Feb 20:41
Favicon

[commit] r5103 - in trunk: . src/arch/i386

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 <patrick.georgi <at> coresystems.de>
Acked-by: Peter Stuge <peter <at> stuge.se>

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: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

repository service | 9 Feb 20:35
Favicon

[commit] r5102 - in trunk/src: . arch/i386 arch/i386/init boot cpu/amd/car cpu/amd/model_lx

Author: oxygene
Date: Tue Feb  9 20:35:16 2010
New Revision: 5102
URL: http://tracker.coreboot.org/trac/coreboot/changeset/5102

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 <patrick.georgi <at> coresystems.de>
Acked-by: Peter Stuge <peter <at> stuge.se>

Modified:
   trunk/src/Kconfig
   trunk/src/arch/i386/Makefile.inc
   trunk/src/arch/i386/Makefile.tinybootblock.inc
   trunk/src/arch/i386/init/crt0.S.lb
   trunk/src/boot/hardwaremain.c
   trunk/src/cpu/amd/car/copy_and_run.c
   trunk/src/cpu/amd/model_lx/cache_as_ram.inc

Modified: trunk/src/Kconfig
==============================================================================
--- trunk/src/Kconfig	Tue Feb  9 16:15:29 2010	(r5101)
+++ trunk/src/Kconfig	Tue Feb  9 20:35:16 2010	(r5102)
@@ -39,6 +39,13 @@
 	  the coreboot version number, so that you can easily distinguish
 	  boot logs of different boards from each other.

+config CBFS_PREFIX
+	string "CBFS prefix to use"
+	default "fallback"
+	help
+	  Select the prefix to all files put into the image. It's "fallback"
+	  by default, "normal" is a common alternative.
+
 endmenu

 source src/mainboard/Kconfig

Modified: trunk/src/arch/i386/Makefile.inc
==============================================================================
--- trunk/src/arch/i386/Makefile.inc	Tue Feb  9 16:15:29 2010	(r5101)
+++ trunk/src/arch/i386/Makefile.inc	Tue Feb  9 20:35:16 2010	(r5102)
@@ -15,14 +15,14 @@
 	cp $(obj)/coreboot.pre $@
 	if [ -f fallback/coreboot_apc ]; \
 	then \
-		$(CBFSTOOL) $@ add-stage fallback/coreboot_apc fallback/coreboot_apc $(CBFS_COMPRESS_FLAG); \
+		$(CBFSTOOL) $@ add-stage fallback/coreboot_apc $(CONFIG_CBFS_PREFIX)/coreboot_apc
$(CBFS_COMPRESS_FLAG); \
 	fi
-	$(CBFSTOOL) $@ add-stage $(obj)/coreboot_ram fallback/coreboot_ram $(CBFS_COMPRESS_FLAG)
+	$(CBFSTOOL) $@ add-stage $(obj)/coreboot_ram $(CONFIG_CBFS_PREFIX)/coreboot_ram $(CBFS_COMPRESS_FLAG)
 ifeq ($(CONFIG_PAYLOAD_NONE),y)
 	@printf "    PAYLOAD    none (as specified by user)\n"
 else
 	@printf "    PAYLOAD    $(CONFIG_FALLBACK_PAYLOAD_FILE) $(CBFS_PAYLOAD_COMPRESS_FLAG)\n"
-	$(CBFSTOOL) $(obj)/coreboot.rom add-payload $(CONFIG_FALLBACK_PAYLOAD_FILE) fallback/payload $(CBFS_PAYLOAD_COMPRESS_FLAG)
+	$(CBFSTOOL) $(obj)/coreboot.rom add-payload $(CONFIG_FALLBACK_PAYLOAD_FILE)
$(CONFIG_CBFS_PREFIX)/payload $(CBFS_PAYLOAD_COMPRESS_FLAG)
 endif
 ifeq ($(CONFIG_VGA_BIOS),y)
 	@printf "    VGABIOS    $(CONFIG_FALLBACK_VGA_BIOS_FILE) $(CONFIG_FALLBACK_VGA_BIOS_ID)\n"

Modified: trunk/src/arch/i386/Makefile.tinybootblock.inc
==============================================================================
--- trunk/src/arch/i386/Makefile.tinybootblock.inc	Tue Feb  9 16:15:29 2010	(r5101)
+++ trunk/src/arch/i386/Makefile.tinybootblock.inc	Tue Feb  9 20:35:16 2010	(r5102)
@@ -10,7 +10,7 @@
 $(obj)/coreboot.pre: $(obj)/coreboot.romstage $(obj)/coreboot.pre1 $(CBFSTOOL)
 	rm -f $@
 	cp $(obj)/coreboot.pre1 $@
-	$(CBFSTOOL) $@ add-stage $(obj)/romstage.elf fallback/romstage x 0x$(shell cat $(obj)/location.txt)
+	$(CBFSTOOL) $@ add-stage $(obj)/romstage.elf $(CONFIG_CBFS_PREFIX)/romstage x 0x$(shell cat $(obj)/location.txt)
 #FIXME: location.txt might require an offset of header size

 #######################################################################
@@ -58,8 +58,8 @@
 $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s: $(obj)/bootblock/bootblock.c
 	$(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 $@

-$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(obj)/romcc $(src)/arch/i386/init/bootblock.c
-	$(obj)/romcc $(bootblock_romccflags) -O2 $(ROMCCFLAGS) $(INCLUDES)
$(src)/arch/i386/init/bootblock.c -o $@
+$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(src)/arch/i386/init/$(subst
",,$(CONFIG_TINY_BOOTBLOCK_SOURCE)) $(obj)/romcc
+	$(obj)/romcc $(bootblock_romccflags) -O2 $(ROMCCFLAGS) $(INCLUDES) $< -o $@

 $(obj)/bootblock.elf: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o $(obj)/bootblock/ldscript.ld
 	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
@@ -74,7 +74,7 @@
 	$(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T
$(obj)/romstage/ldscript.ld $(initobjs)
 	$(OBJCOPY) -O binary $(obj)/romstage.elf $(obj)/romstage.bin
 	printf "CONFIG_ROMBASE = 0x" > $(obj)/location.ld
-	$(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin fallback/romstage
$(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt
+	$(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin $(CONFIG_CBFS_PREFIX)/romstage
$(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt
 	cat $(obj)/location.txt >> $(obj)/location.ld
 	printf ';\nAUTO_XIP_ROM_BASE = CONFIG_ROMBASE & ~(CONFIG_XIP_ROM_SIZE - 1);\n' >> $(obj)/location.ld
 	$(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T
$(obj)/romstage/ldscript.ld $(initobjs)

Modified: trunk/src/arch/i386/init/crt0.S.lb
==============================================================================
--- trunk/src/arch/i386/init/crt0.S.lb	Tue Feb  9 16:15:29 2010	(r5101)
+++ trunk/src/arch/i386/init/crt0.S.lb	Tue Feb  9 20:35:16 2010	(r5102)
@@ -137,10 +137,7 @@

 #endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */

-#if CONFIG_USE_FALLBACK_IMAGE == 1
-str_coreboot_ram_name:	.string "fallback/coreboot_ram"
-#else
-str_coreboot_ram_name:	.string "normal/coreboot_ram"
-#endif
+str_coreboot_ram_name:	.ascii CONFIG_CBFS_PREFIX
+			.string "/coreboot_ram"

 #endif /* CONFIG_USE_DCACHE_RAM */

Modified: trunk/src/boot/hardwaremain.c
==============================================================================
--- trunk/src/boot/hardwaremain.c	Tue Feb  9 16:15:29 2010	(r5101)
+++ trunk/src/boot/hardwaremain.c	Tue Feb  9 20:35:16 2010	(r5102)
@@ -103,11 +103,7 @@
 	 * write our configuration tables.
 	 */
 	lb_mem = write_tables();
-#if CONFIG_USE_FALLBACK_IMAGE == 1
-	cbfs_load_payload(lb_mem, "fallback/payload");
-#else
-	cbfs_load_payload(lb_mem, "normal/payload");
-#endif
+	cbfs_load_payload(lb_mem, CONFIG_CBFS_PREFIX "/payload");
 	printk(BIOS_ERR, "Boot failed.\n");
 }

Modified: trunk/src/cpu/amd/car/copy_and_run.c
==============================================================================
--- trunk/src/cpu/amd/car/copy_and_run.c	Tue Feb  9 16:15:29 2010	(r5101)
+++ trunk/src/cpu/amd/car/copy_and_run.c	Tue Feb  9 20:35:16 2010	(r5102)
@@ -7,21 +7,13 @@

 static void copy_and_run(void)
 {
-#if CONFIG_USE_FALLBACK_IMAGE == 1
-	cbfs_and_run_core("fallback/coreboot_ram", 0);
-#else
-      	cbfs_and_run_core("normal/coreboot_ram", 0);
-#endif
+	cbfs_and_run_core(CONFIG_CBFS_PREFIX "/coreboot_ram", 0);
 }

 #if CONFIG_AP_CODE_IN_CAR == 1

 static void copy_and_run_ap_code_in_car(unsigned ret_addr)
 {
-# if CONFIG_USE_FALLBACK_IMAGE == 1
-	cbfs_and_run_core("fallback/coreboot_apc", ret_addr);
-# else
-      	cbfs_and_run_core("normal/coreboot_apc", ret_addr);
-# endif
+	cbfs_and_run_core(CONFIG_CBFS_PREFIX "/coreboot_apc", ret_addr);
 }
 #endif

Modified: trunk/src/cpu/amd/model_lx/cache_as_ram.inc
==============================================================================
--- trunk/src/cpu/amd/model_lx/cache_as_ram.inc	Tue Feb  9 16:15:29 2010	(r5101)
+++ trunk/src/cpu/amd/model_lx/cache_as_ram.inc	Tue Feb  9 20:35:16 2010	(r5102)
@@ -278,8 +278,5 @@
 .previous

 #endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */
-#if CONFIG_USE_FALLBACK_IMAGE == 1
-str_coreboot_ram_name:	.string "fallback/coreboot_ram"
-#else
-str_coreboot_ram_name:	.string "normal/coreboot_ram"
-#endif
+str_coreboot_ram_name:	.ascii CONFIG_CBFS_PREFIX
+			.string "/coreboot_ram"

--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Patrick Georgi | 9 Feb 19:15
Picon

[PATCH]Add "update image" feature

Hi,

attached image adds 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 were changed to allow "make clean-for-update", which
removes everything but coreboot.rom

Signed-off-by: Patrick Georgi <patrick.georgi <at> coresystems.de>
Index: src/arch/i386/Kconfig
===================================================================
--- src/arch/i386/Kconfig	(revision 5100)
+++ src/arch/i386/Kconfig	(working copy)
@@ -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
Index: src/arch/i386/Makefile.tinybootblock.inc
===================================================================
--- src/arch/i386/Makefile.tinybootblock.inc	(revision 5100)
+++ src/arch/i386/Makefile.tinybootblock.inc	(working copy)
@@ -3,7 +3,12 @@
 #######################################################################
 # 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

Index: Makefile
===================================================================
--- Makefile	(revision 5100)
+++ Makefile	(working copy)
@@ -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*
--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot
Patrick Georgi | 9 Feb 19:01
Picon

[PATCH]Flexible filename prefix

Hi,

attached file is the first part of my quest for a fallback/normal switch
in the Kconfig regime.
It allows building images with different prefixes (ie. normal/romstage,
helloWorld/romstage, ...).
It defaults to fallback/, so there's no user visible change now.

It's intended to ultimately support switching between images in the
Tinybootblock build model, by running the build several times, adding to
the same image: First fallback, then normal, ...

Signed-off-by: Patrick Georgi <patrick.georgi <at> coresystems.de>
Index: src/Kconfig
===================================================================
--- src/Kconfig	(revision 5100)
+++ src/Kconfig	(working copy)
@@ -39,6 +39,13 @@
 	  the coreboot version number, so that you can easily distinguish
 	  boot logs of different boards from each other.

+config CBFS_PREFIX
+	string "CBFS prefix to use"
+	default "fallback"
+	help
+	  Select the prefix to all files put into the image. It's "fallback"
+	  by default, "normal" is a common alternative.
+
 endmenu

 source src/mainboard/Kconfig
Index: src/cpu/amd/model_lx/cache_as_ram.inc
===================================================================
--- src/cpu/amd/model_lx/cache_as_ram.inc	(revision 5100)
+++ src/cpu/amd/model_lx/cache_as_ram.inc	(working copy)
@@ -278,8 +278,5 @@
 .previous

 #endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */
-#if CONFIG_USE_FALLBACK_IMAGE == 1
-str_coreboot_ram_name:	.string "fallback/coreboot_ram"
-#else
-str_coreboot_ram_name:	.string "normal/coreboot_ram"
-#endif
+str_coreboot_ram_name:	.ascii CONFIG_CBFS_PREFIX
+			.string "/coreboot_ram"
Index: src/cpu/amd/car/copy_and_run.c
===================================================================
--- src/cpu/amd/car/copy_and_run.c	(revision 5100)
+++ src/cpu/amd/car/copy_and_run.c	(working copy)
@@ -7,21 +7,13 @@

 static void copy_and_run(void)
 {
-#if CONFIG_USE_FALLBACK_IMAGE == 1
-	cbfs_and_run_core("fallback/coreboot_ram", 0);
-#else
-      	cbfs_and_run_core("normal/coreboot_ram", 0);
-#endif
+	cbfs_and_run_core(CONFIG_CBFS_PREFIX "/coreboot_ram", 0);
 }

 #if CONFIG_AP_CODE_IN_CAR == 1

 static void copy_and_run_ap_code_in_car(unsigned ret_addr)
 {
-# if CONFIG_USE_FALLBACK_IMAGE == 1
-	cbfs_and_run_core("fallback/coreboot_apc", ret_addr);
-# else
-      	cbfs_and_run_core("normal/coreboot_apc", ret_addr);
-# endif
+	cbfs_and_run_core(CONFIG_CBFS_PREFIX "/coreboot_apc", ret_addr);
 }
 #endif
Index: src/boot/hardwaremain.c
===================================================================
--- src/boot/hardwaremain.c	(revision 5100)
+++ src/boot/hardwaremain.c	(working copy)
@@ -103,11 +103,7 @@
 	 * write our configuration tables.
 	 */
 	lb_mem = write_tables();
-#if CONFIG_USE_FALLBACK_IMAGE == 1
-	cbfs_load_payload(lb_mem, "fallback/payload");
-#else
-	cbfs_load_payload(lb_mem, "normal/payload");
-#endif
+	cbfs_load_payload(lb_mem, CONFIG_CBFS_PREFIX "/payload");
 	printk(BIOS_ERR, "Boot failed.\n");
 }

Index: src/arch/i386/init/crt0.S.lb
===================================================================
--- src/arch/i386/init/crt0.S.lb	(revision 5100)
+++ src/arch/i386/init/crt0.S.lb	(working copy)
@@ -137,10 +137,7 @@

 #endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */

-#if CONFIG_USE_FALLBACK_IMAGE == 1
-str_coreboot_ram_name:	.string "fallback/coreboot_ram"
-#else
-str_coreboot_ram_name:	.string "normal/coreboot_ram"
-#endif
+str_coreboot_ram_name:	.ascii CONFIG_CBFS_PREFIX
+			.string "/coreboot_ram"

 #endif /* CONFIG_USE_DCACHE_RAM */
Index: src/arch/i386/Makefile.inc
===================================================================
--- src/arch/i386/Makefile.inc	(revision 5100)
+++ src/arch/i386/Makefile.inc	(working copy)
@@ -15,14 +15,14 @@
 	cp $(obj)/coreboot.pre $@
 	if [ -f fallback/coreboot_apc ]; \
 	then \
-		$(CBFSTOOL) $@ add-stage fallback/coreboot_apc fallback/coreboot_apc $(CBFS_COMPRESS_FLAG); \
+		$(CBFSTOOL) $@ add-stage fallback/coreboot_apc $(CONFIG_CBFS_PREFIX)/coreboot_apc
$(CBFS_COMPRESS_FLAG); \
 	fi
-	$(CBFSTOOL) $@ add-stage $(obj)/coreboot_ram fallback/coreboot_ram $(CBFS_COMPRESS_FLAG)
+	$(CBFSTOOL) $@ add-stage $(obj)/coreboot_ram $(CONFIG_CBFS_PREFIX)/coreboot_ram $(CBFS_COMPRESS_FLAG)
 ifeq ($(CONFIG_PAYLOAD_NONE),y)
 	@printf "    PAYLOAD    none (as specified by user)\n"
 else
 	@printf "    PAYLOAD    $(CONFIG_FALLBACK_PAYLOAD_FILE) $(CBFS_PAYLOAD_COMPRESS_FLAG)\n"
-	$(CBFSTOOL) $(obj)/coreboot.rom add-payload $(CONFIG_FALLBACK_PAYLOAD_FILE) fallback/payload $(CBFS_PAYLOAD_COMPRESS_FLAG)
+	$(CBFSTOOL) $(obj)/coreboot.rom add-payload $(CONFIG_FALLBACK_PAYLOAD_FILE)
$(CONFIG_CBFS_PREFIX)/payload $(CBFS_PAYLOAD_COMPRESS_FLAG)
 endif
 ifeq ($(CONFIG_VGA_BIOS),y)
 	@printf "    VGABIOS    $(CONFIG_FALLBACK_VGA_BIOS_FILE) $(CONFIG_FALLBACK_VGA_BIOS_ID)\n"
Index: src/arch/i386/Makefile.tinybootblock.inc
===================================================================
--- src/arch/i386/Makefile.tinybootblock.inc	(revision 5100)
+++ src/arch/i386/Makefile.tinybootblock.inc	(working copy)
@@ -3,14 +3,14 @@
 #######################################################################
 # Build the final rom image

 $(obj)/coreboot.pre1: $(obj)/coreboot.bootblock $(CBFSTOOL)
 	rm -f $@
 	$(CBFSTOOL) $@ create $(CONFIG_COREBOOT_ROMSIZE_KB)K $(obj)/coreboot.bootblock

 $(obj)/coreboot.pre: $(obj)/coreboot.romstage $(obj)/coreboot.pre1 $(CBFSTOOL)
 	rm -f $@
 	cp $(obj)/coreboot.pre1 $@
-	$(CBFSTOOL) $@ add-stage $(obj)/romstage.elf fallback/romstage x 0x$(shell cat $(obj)/location.txt)
+	$(CBFSTOOL) $@ add-stage $(obj)/romstage.elf $(CONFIG_CBFS_PREFIX)/romstage x 0x$(shell cat $(obj)/location.txt)
 #FIXME: location.txt might require an offset of header size

 #######################################################################
@@ -58,8 +58,8 @@
 $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s: $(obj)/bootblock/bootblock.c
 	$(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 $@

-$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(obj)/romcc $(src)/arch/i386/init/bootblock.c
-	$(obj)/romcc $(bootblock_romccflags) -O2 $(ROMCCFLAGS) $(INCLUDES)
$(src)/arch/i386/init/bootblock.c -o $@
+$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(src)/arch/i386/init/$(subst
",,$(CONFIG_TINY_BOOTBLOCK_SOURCE)) $(obj)/romcc
+	$(obj)/romcc $(bootblock_romccflags) -O2 $(ROMCCFLAGS) $(INCLUDES) $< -o $@

 $(obj)/bootblock.elf: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o $(obj)/bootblock/ldscript.ld
 	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
@@ -74,7 +74,7 @@
 	$(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T
$(obj)/romstage/ldscript.ld $(initobjs)
 	$(OBJCOPY) -O binary $(obj)/romstage.elf $(obj)/romstage.bin
 	printf "CONFIG_ROMBASE = 0x" > $(obj)/location.ld
-	$(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin fallback/romstage
$(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt
+	$(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin $(CONFIG_CBFS_PREFIX)/romstage
$(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt
 	cat $(obj)/location.txt >> $(obj)/location.ld
 	printf ';\nAUTO_XIP_ROM_BASE = CONFIG_ROMBASE & ~(CONFIG_XIP_ROM_SIZE - 1);\n' >> $(obj)/location.ld
 	$(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T
$(obj)/romstage/ldscript.ld $(initobjs)
--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot
Ryan | 9 Feb 17:19
Picon
Favicon

Request

Good Day

I own the ecs elitegroup 945G-M3 (V1.0a) motherboard and was wondering
if there is support for this motherborad.I will be very greatful.Below
is the feartures of the board.Thank you

 
CPU

LGA775
socket for
Intel
Pentium 4 /
Pentium D
processor

FSB
1066/800/533
MHz

Support
Hyper-Threading Technology

 
CHIPSET

Intel® 945G
& ICH7

North
Bridge:
Intel® 945G

South
Bridge:
Intel® ICH7

 
GRAPHICS

Integrated
Intel® Graphics Media Accelerator 950 ( GMA950 )

 
MEMORY

Dual-channel
DDR2 memory
architecture

2 x 240-pin
DDR2 DIMM
socket
support up
to 2 GB

Support DDR2
667/533/400
DDR2 SDRAM

 
EXPANSION SLOT

1 x PCI
Express x1
slot

1 x PCI
Express x16
slot

2 x PCI
slots

 
STORAGE

Supported by
Intel®ICH7

2 x Ultra
DMA100/66
devices

4 x Serial
ATAII
3.0Gb/s
devices

 
AUDIO

Realtek
ALC880
8-channel
audio CODEC

 
IEEE 1394a

VIA® VT6307,
support 2x
IEEE1394a
ports

 
LAN

Realtek
RTL8110S
Gigabit LAN
Controller

 
REAR PANEL I/O

1 x PS/2
keyboard &
PS/2 mouse
connectors

4 x USB
ports

1 x Serial
port (COM1)

1 x VGA port

1 x Parallel
port (LPT1)

1 x 1394a
port

1 x RJ45 LAN
connector

1 x Audio
port
(Line-in,4x
Line-out,
Mic_in)

 
INTERNAL I/O CONNECTORS
& HEADERS

1 x 24-pin
ATX Power
Supply
connector

1 x 4-pin
ATX 12V
connector

1 x FDD
connector
supports two
360K~2.88MB
FDDs

1 x IDE
connector

4 x Serial
ATA
connectors

2 x USB 2.0
headers
support
additional 4
USB Ports

1 x Front
panel
switch/LED
header

1 x Front
panel audio
header

1 x IrDA for
SIR header

1 x 1394a
header

AUX-in
header

CPUFAN/SYSFAN connectors

 
SYSTEM BIOS

Award BIOS
with 4Mb
Flash ROM

Supports
Plug and
Play 1.0A,
APM 1.2,
Multi Boot,
DMI

Supports
ACPI
revision 1.0
specification

 
FORM FACTOR

Micro-ATX
Size,
244mm*244mm

--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot
repository service | 9 Feb 16:15
Favicon

[commit] r5101 - trunk/util/optionlist

Author: stepan
Date: Tue Feb  9 16:15:29 2010
New Revision: 5101
URL: http://tracker.coreboot.org/trac/coreboot/changeset/5101

Log:
I took Rob Landley's nice "menuconfig2html.py" script from
http://landley.net/hg/kdocs and modified it to produce MediaWiki output
for coreboot's Option List at http://coreboot.org/Coreboot_Options. The
attached patch exchanges our old ("newconfig") optionlist script with
the new one.

Signed-off-by: Stefan Reinauer <stepan <at> coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi <at> coresystems.de>

Added:
   trunk/util/optionlist/kconfig2wiki   (contents, props changed)
Deleted:
   trunk/util/optionlist/Options-wiki.xsl
   trunk/util/optionlist/Options.xsl
   trunk/util/optionlist/mkOptionList.py
Modified:
   trunk/util/optionlist/Makefile
   trunk/util/optionlist/README

Modified: trunk/util/optionlist/Makefile
==============================================================================
--- trunk/util/optionlist/Makefile	Tue Feb  9 13:32:55 2010	(r5100)
+++ trunk/util/optionlist/Makefile	Tue Feb  9 16:15:29 2010	(r5101)
@@ -1,10 +1,9 @@
 # 
-# Copyright (C) 2005 Stefan Reinauer <stepan <at> coresystems.de>
+# Copyright (C) 2010 coresystems GmbH
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
 # 
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,17 +15,12 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 # 

-all: html wiki

-html:
-	./mkOptionList.py
-	@#saxon  Options.xml Options.xsl > Options.html
-	xsltproc Options.xsl Options.xml > Options.html
-	
-wiki:
-	./mkOptionList.py
-	xsltproc Options-wiki.xsl Options.xml > Options.wiki
+SVNVERSION := $(shell LC_ALL=C svnversion -cn ../.. | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/" | grep
"[0-9]" || LC_ALL=C svn info . | grep ^Revision | sed "s/.*[[:blank:]]\+\([0-9]*\)[^0-9]*/\1/" | grep
"[0-9]" || echo unknown)
+
+all: 
+	cd ../..; util/optionlist/kconfig2wiki src/Kconfig $(SVNVERSION) > util/optionlist/Options.wiki

 clean:
-	rm -rf Options.xml Options.html Options.wiki
+	rm -rf Options.wiki

Modified: trunk/util/optionlist/README
==============================================================================
--- trunk/util/optionlist/README	Tue Feb  9 13:32:55 2010	(r5100)
+++ trunk/util/optionlist/README	Tue Feb  9 16:15:29 2010	(r5101)
@@ -1,46 +1 @@
-I would like to contribute the following to the coreboot wiki in case
-it's useable:
-
-1. I have written a rather small Python script to convert the Options.lb
-   into an XML file which is much more useable for the web in most cases.
-
-2. I have written a XSLT to convert the XML file to (X)HTML to be able
-   to present it as a table.
-
-Florob (Florian Zeitz <florian-zeitz <at> lycos.de>)
-
-
-ChangeLog
----------
-
-* 2005-03-19 stepan
-  - fix xml stylesheet to work with xsltproc and saxon
-  - add Makefile
-  - make script a bit more verbose
-
-* 2005-03-15 florob
-  - Initial version
-
-
-License
--------
-
-Copyright (C) 2005 Florian Zeitz <florian-zeitz <at> lycos.de>
-Copyright (C) 2005-2006 Stefan Reinauer <stepan <at> coresystems.de>
-Copyright (C) 2006 Uwe Hermann <uwe <at> hermann-uwe.de>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
-
+This script creates the page http://www.coreboot.org/Coreboot_Options

Added: trunk/util/optionlist/kconfig2wiki
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/util/optionlist/kconfig2wiki	Tue Feb  9 16:15:29 2010	(r5101)
@@ -0,0 +1,133 @@
+#!/usr/bin/python
+# 
+# kconfig2wiki - Kconfig to MediaWiki converter for
+# http://www.coreboot.org/Coreboot_Options
+# 
+# Copyright (C) 2010 coresystems GmbH
+# based on http://landley.net/kdocs/make/menuconfig2html.py
+# Copyright (C) by Rob Landley
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+# 
+
+helplen = 0
+extra_chapters = 0
+
+##
+## Remove quotes from Kconfig string options
+##
+def zapquotes(str):
+	if str[0]=='"': str = str[1:str.rfind('"')]
+	return str
+
+##
+## Escape HTML special characters
+##
+def htmlescape(str):
+	return str.strip().replace("&","&amp;").replace("<","&lt;").replace(">","&gt;")
+
+##
+## Process Kconfig file
+##
+def readfile(filename):
+	import sys
+	global helplen
+
+	source=filename.replace("src/","").replace("/Kconfig","").replace("Kconfig","toplevel")
+
+	try:
+		lines = open(filename).read().split("\n")
+	except IOError:
+		sys.stderr.write("File %s missing\n" % filename)
+		return
+	config = None
+	description = None
+	configtype = None
+	for i in lines:
+		if helplen:
+			i = i.expandtabs()
+			if not len(i) or i[:helplen].isspace():
+				sys.stdout.write("%s\n" % htmlescape(i))
+				continue
+			else:
+				helplen = 0
+				sys.stdout.write("||\n")
+
+		words = i.strip().split(None,1)
+		if not len(words): continue
+
+		if words[0] in ("config", "menuconfig"):
+			config = words[1]
+			description = ""
+		elif words[0] in ("bool", "boolean", "tristate", "string", "hex", "int"):
+			 configtype = htmlescape(zapquotes(words[0]))
+			 if len(words)>1: description = htmlescape(zapquotes(words[1]))
+		elif words[0]=="prompt":
+			description = htmlescape(zapquotes(words[1]))
+		elif words[0] in ("help", "---help---"):
+			sys.stdout.write("|- bgcolor=\"#eeeeee\"\n")
+			sys.stdout.write("| %s || %s || %s || %s || \n" % (config,source,configtype,description) )
+			helplen = len(i[:i.find(words[0])].expandtabs())
+		elif words[0] == "comment":
+			sys.stdout.write("|- bgcolor=\"#eeeeee\"\n")
+			sys.stdout.write("| || || (comment) || || %s ||\n" % htmlescape(zapquotes(words[1])))
+		elif words[0]=="menu":
+			if len(words)>1:
+				temp = htmlescape(zapquotes(words[1]))
+				if extra_chapters:
+					sys.stdout.write("== Menu: %s ==\n" % temp)
+					sys.stdout.write("{| border=\"0\" style=\"font-size: smaller\"\n");
+					sys.stdout.write("|- bgcolor=\"#6699dd\"\n")
+					sys.stdout.write("! align=\"left\" | Option\n")
+					sys.stdout.write("! align=\"left\" | Source\n")
+					sys.stdout.write("! align=\"left\" | Format\n")
+					sys.stdout.write("! align=\"left\" | Short&nbsp;Description\n")
+					sys.stdout.write("! align=\"left\" | Description\n")
+				else:
+					# Don't start an extra chapter for a
+					# new menu
+					sys.stdout.write("|- bgcolor=\"#6699dd\"\n")
+					sys.stdout.write("! align=\"left\" | Menu: %s || || || ||\n" % temp)
+		elif words[0] == "endmenu":
+			if extra_chapters:
+				sys.stdout.write("|}\n")
+			sys.stdout.write("\n")
+		elif words[0] == "source":
+			fn=zapquotes(words[1])
+			readfile(fn)
+		elif words[0] in ("default","depends", "select", "if", "endif", "#"): pass
+		#else: sys.stderr.write("unknown: %s\n" % i)
+	if helplen: sys.stdout.write("||\n")
+
+def main():
+	import sys, time
+
+	if len(sys.argv)!=3:
+		sys.stderr.write("Usage: kconfig2wiki kconfigfile version\n")
+		sys.exit(1)
+
+	sys.stdout.write("This is an automatically generated list of '''coreboot compile-time options'''.\n")
+	sys.stdout.write("\nLast update: %s. (r%s)\n" % (time.strftime('%Y/%m/%d %H:%M:%S'),sys.argv[2]))
+	sys.stdout.write("{| border=\"0\" style=\"font-size: smaller\"\n");
+	sys.stdout.write("|- bgcolor=\"#6699dd\"\n")
+	sys.stdout.write("! align=\"left\" | Option\n")
+	sys.stdout.write("! align=\"left\" | Source\n")
+	sys.stdout.write("! align=\"left\" | Format\n")
+	sys.stdout.write("! align=\"left\" | Short&nbsp;Description\n")
+	sys.stdout.write("! align=\"left\" | Description\n")
+	readfile(sys.argv[1])
+	sys.stdout.write("|}\n")
+
+if __name__ == "__main__":
+	main()

--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Stefan Reinauer | 9 Feb 16:07
Picon
Favicon

[PATCH] Option List Generator

Hi,

I took Rob Landley's nice "menuconfig2html.py" script from
http://landley.net/hg/kdocs and modified it to produce MediaWiki output
for coreboot's Option List at http://coreboot.org/Coreboot_Options. The
attached patch exchanges our old ("newconfig") optionlist script with
the new one.

Signed-off-by: Stefan Reinauer <stepan <at> coresystems.de>

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info <at> coresystems.de  • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

Index: util/optionlist/Options.xsl
===================================================================
--- util/optionlist/Options.xsl	(revision 5100)
+++ util/optionlist/Options.xsl	(working copy)
@@ -1,73 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright (C) 2005 Florian Zeitz <florian-zeitz <at> lycos.de>
-  Copyright (C) 2005 Stefan Reinauer <stepan <at> coresystems.de>
-  
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-  
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-  
-  You should have received a copy of the GNU General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
--->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<!--<xsl:choose>
-<xsl:when test="system-property('xsl:vendor')='Transformiix'">
--->
-<xsl:output method="xml"
-	    doctype-public="PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN"
-            doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
-            encoding="utf-8"
-	    indent="yes" />
-<!--
-</xsl:when>
-<xsl:otherwise>
-<xsl:output method="xhtml"
-	    doctype-public="PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN"
-            doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
-            encoding="utf-8"
-	    indent="yes" />
-</xsl:otherwise>
-</xsl:choose>
--->
-
-<xsl:template match="/">
-<html>
-<head>
-<title>Coreboot Options</title>
-</head>
-<body>
-<h2>Coreboot Options</h2>
-<p>This is an automatically generated list of coreboot compile time
-options. Created at <xsl:value-of select="//creationdate"/>.</p>
-<table border="1">
-<tr bgcolor="#0975a7">
-<th align="left">Option</th>
-<th align="left">Comment</th>
-<th align="left">Default</th>
-<th align="left">Export</th>
-<th align="left">Format</th>
-</tr>
-<xsl:for-each select="options/option">
-<tr>
-<td><xsl:value-of select="@name"/></td>
-<td><xsl:value-of select="comment"/></td>
-<td><xsl:value-of select="default"/></td>
-<td><xsl:value-of select="export"/></td>
-<td><xsl:value-of select="format"/></td>
-</tr>
-</xsl:for-each>
-</table>
-</body>
-</html>
-</xsl:template>
-</xsl:stylesheet>
Index: util/optionlist/Options-wiki.xsl
===================================================================
--- util/optionlist/Options-wiki.xsl	(revision 5100)
+++ util/optionlist/Options-wiki.xsl	(working copy)
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Copyright (C) 2006 Stefan Reinauer <stepan <at> coresystems.de>
- Copyright (C) 2006 Uwe Hermann <uwe <at> hermann-uwe.de>
- 
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- 
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
--->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:output method="text"
-            encoding="utf-8"
-            indent="yes" />
-
-<xsl:template match="/">
-This is an automatically generated list of '''coreboot v2 compile-time options'''.
-
-Last update: <xsl:value-of select="//creationdate"/>.
-
-{| border="0" style="font-size: smaller"
-|- bgcolor="#6699dd"
-! align="left" | Option
-! align="left" | Comment
-! align="left" | Default
-! align="left" | Export
-! align="left" | Format
-<xsl:for-each select="options/option">
-|- bgcolor="#eeeeee"
-| <xsl:value-of select="@name"/> || <xsl:value-of select="comment"/> || <xsl:value-of
select="default"/> || <xsl:value-of select="export"/> || <xsl:value-of select="format"/>
-</xsl:for-each>
-
-|}
-
-</xsl:template>
-</xsl:stylesheet>
Index: util/optionlist/mkOptionList.py
===================================================================
--- util/optionlist/mkOptionList.py	(revision 5100)
+++ util/optionlist/mkOptionList.py	(working copy)
@@ -1,141 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2005 Florian Zeitz <florian-zeitz <at> lycos.de>
-# Copyright (C) 2005 Stefan Reinauer <stepan <at> coresystems.de>
-# 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-# 
-
-def xmlString(string):
-	for i in range(len(string)-1):
-		if string[i] == "&":
-			string = string[:i] + "&amp;" + string[i+1:]
-		if string[i] == "<":
-			string = string[:i] + "&lt;" + string[i+1:]
-		if string[i] == ">":
-			string = string[:i] + "&gt;" + string[i+1:]
-	return string
-
-def openInfile(filename):
-	"getting the input from the inputfile (e.g. Options.lb)"
-	infile = open(filename, "r")
-	infile.seek(0)
-	input = infile.readlines()
-	infile.close()
-	return input
-
-def prepInput(input):
-	"preparing the input for parsing (not really neccessary, but makes things simpler and doesnt take too long)"
-	i = -1
-	while True:
-		i += 1
-		if i >= len(input): break
-		if input[i] == ("" or "\n"):
-			input.pop(i)
-		if input[i][0:1] == "\t":
-			input[i] = input[i][1:]
-			i = -1
-	return input
-
-def parseInput(input):
-	"parse the output"
-	output = ""
-	for line in input:
-		line = xmlString(line)
-		if line[:6] == "define":
-			output = output + '<option name="' + line[7:-1] + '">' + "\n"
-		elif line[:3] == "end":
-			output = output + '</option>' + "\n\n"
-		elif line[:7] == "default":
-			output = output + '<default>' + line[8:-1] + '</default>' + "\n"
-		elif line[:6] == "format":
-			output = output + '<format>' + line[7:-1] + '</format>' + "\n"
-		elif line[:6] == "export":
-			output = output + '<export>' + line[7:-1] + '</export>' + "\n"
-		elif line[:7] == "comment":
-			output = output + '<comment>' + line[8:-1] + '</comment>' + "\n"
-	
-	return output
-
-def parseArgv():
-	"parse the given arguments"
-	import sys
-
-	In = Out = False
-
-	if len(sys.argv) >= 2:
-		if sys.argv[1] == ("-h" or "--help"):
-			print "Syntax: mkOptionList.py [infile] [outfile]"
-		else:
-			In = True
-			inFilename = sys.argv[1]
-	if len(sys.argv) >= 3:
-		if sys.argv[2] == ("-h" or "--help"):
-			print "Syntax: mkOptionList.py [infile] [outfile]"
-		else:
-			Out = True
-			outFilename = sys.argv[2]
-
-	if In and not Out:
-		return inFilename
-	elif In and Out:
-		return inFilename, outFilename
-	
-
-def main():
-	import time
-	if not parseArgv():
-		inFilename = "../../src/config/Options.lb"
-		outFilename = "Options.xml"
-	else:
-		inFilename, outFilename = parseArgv()
-	
-	input = openInfile(inFilename)
-	input = prepInput(input)
-	output = parseInput(input)
-	
-	print "mkOptionList.py: coreboot option list generator"
-	print " input file : ", inFilename
-	print " output file: ", outFilename
-	
-	#opening the output file
-	outfile = open(outFilename, "w", 0)
-
-	#write the beginning of the XML to the output file
-	outfile.write('<?xml version="1.0"?>')
-	outfile.write("\n")
-	outfile.write('<?xml-stylesheet type="text/xsl" href="Options.xsl"?>')
-	outfile.write("\n")
-	outfile.write('<options>')
-	outfile.write("\n")
-	outfile.write('<creationdate>')
-	outfile.write(time.strftime('%Y/%m/%d %H:%M:%S'))
-	outfile.write('</creationdate>')
-	outfile.write("\n")
-
-	
-	#write the parsed file to the output file
-	outfile.write(output)
-	
-	#write closing tags to the output file and close it
-	outfile.write('</options>')
-	outfile.write("\n")
-	outfile.flush()
-	outfile.close()
-
-	print "Done!"
-
-if __name__ == "__main__":
-	main()
Index: util/optionlist/kconfig2wiki
===================================================================
--- util/optionlist/kconfig2wiki	(revision 0)
+++ util/optionlist/kconfig2wiki	(revision 0)
@@ -0,0 +1,133 @@
+#!/usr/bin/python
+# 
+# kconfig2wiki - Kconfig to MediaWiki converter for
+# http://www.coreboot.org/Coreboot_Options
+# 
+# Copyright (C) 2010 coresystems GmbH
+# based on http://landley.net/kdocs/make/menuconfig2html.py
+# Copyright (C) by Rob Landley
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+# 
+
+helplen = 0
+extra_chapters = 0
+
+##
+## Remove quotes from Kconfig string options
+##
+def zapquotes(str):
+	if str[0]=='"': str = str[1:str.rfind('"')]
+	return str
+
+##
+## Escape HTML special characters
+##
+def htmlescape(str):
+	return str.strip().replace("&","&amp;").replace("<","&lt;").replace(">","&gt;")
+
+##
+## Process Kconfig file
+##
+def readfile(filename):
+	import sys
+	global helplen
+
+	source=filename.replace("src/","").replace("/Kconfig","").replace("Kconfig","toplevel")
+
+	try:
+		lines = open(filename).read().split("\n")
+	except IOError:
+		sys.stderr.write("File %s missing\n" % filename)
+		return
+	config = None
+	description = None
+	configtype = None
+	for i in lines:
+		if helplen:
+			i = i.expandtabs()
+			if not len(i) or i[:helplen].isspace():
+				sys.stdout.write("%s\n" % htmlescape(i))
+				continue
+			else:
+				helplen = 0
+				sys.stdout.write("||\n")
+
+		words = i.strip().split(None,1)
+		if not len(words): continue
+
+		if words[0] in ("config", "menuconfig"):
+			config = words[1]
+			description = ""
+		elif words[0] in ("bool", "boolean", "tristate", "string", "hex", "int"):
+			 configtype = htmlescape(zapquotes(words[0]))
+			 if len(words)>1: description = htmlescape(zapquotes(words[1]))
+		elif words[0]=="prompt":
+			description = htmlescape(zapquotes(words[1]))
+		elif words[0] in ("help", "---help---"):
+			sys.stdout.write("|- bgcolor=\"#eeeeee\"\n")
+			sys.stdout.write("| %s || %s || %s || %s || \n" % (config,source,configtype,description) )
+			helplen = len(i[:i.find(words[0])].expandtabs())
+		elif words[0] == "comment":
+			sys.stdout.write("|- bgcolor=\"#eeeeee\"\n")
+			sys.stdout.write("| || || (comment) || || %s ||\n" % htmlescape(zapquotes(words[1])))
+		elif words[0]=="menu":
+			if len(words)>1:
+				temp = htmlescape(zapquotes(words[1]))
+				if extra_chapters:
+					sys.stdout.write("== Menu: %s ==\n" % temp)
+					sys.stdout.write("{| border=\"0\" style=\"font-size: smaller\"\n");
+					sys.stdout.write("|- bgcolor=\"#6699dd\"\n")
+					sys.stdout.write("! align=\"left\" | Option\n")
+					sys.stdout.write("! align=\"left\" | Source\n")
+					sys.stdout.write("! align=\"left\" | Format\n")
+					sys.stdout.write("! align=\"left\" | Short&nbsp;Description\n")
+					sys.stdout.write("! align=\"left\" | Description\n")
+				else:
+					# Don't start an extra chapter for a
+					# new menu
+					sys.stdout.write("|- bgcolor=\"#6699dd\"\n")
+					sys.stdout.write("! align=\"left\" | Menu: %s || || || ||\n" % temp)
+		elif words[0] == "endmenu":
+			if extra_chapters:
+				sys.stdout.write("|}\n")
+			sys.stdout.write("\n")
+		elif words[0] == "source":
+			fn=zapquotes(words[1])
+			readfile(fn)
+		elif words[0] in ("default","depends", "select", "if", "endif", "#"): pass
+		#else: sys.stderr.write("unknown: %s\n" % i)
+	if helplen: sys.stdout.write("||\n")
+
+def main():
+	import sys, time
+
+	if len(sys.argv)!=3:
+		sys.stderr.write("Usage: kconfig2wiki kconfigfile version\n")
+		sys.exit(1)
+
+	sys.stdout.write("This is an automatically generated list of '''coreboot compile-time options'''.\n")
+	sys.stdout.write("\nLast update: %s. (r%s)\n" % (time.strftime('%Y/%m/%d %H:%M:%S'),sys.argv[2]))
+	sys.stdout.write("{| border=\"0\" style=\"font-size: smaller\"\n");
+	sys.stdout.write("|- bgcolor=\"#6699dd\"\n")
+	sys.stdout.write("! align=\"left\" | Option\n")
+	sys.stdout.write("! align=\"left\" | Source\n")
+	sys.stdout.write("! align=\"left\" | Format\n")
+	sys.stdout.write("! align=\"left\" | Short&nbsp;Description\n")
+	sys.stdout.write("! align=\"left\" | Description\n")
+	readfile(sys.argv[1])
+	sys.stdout.write("|}\n")
+
+if __name__ == "__main__":
+	main()

Property changes on: util/optionlist/kconfig2wiki
___________________________________________________________________
Added: svn:executable
   + *

Index: util/optionlist/Makefile
===================================================================
--- util/optionlist/Makefile	(revision 5100)
+++ util/optionlist/Makefile	(working copy)
@@ -1,10 +1,9 @@
 # 
-# Copyright (C) 2005 Stefan Reinauer <stepan <at> coresystems.de>
+# Copyright (C) 2010 coresystems GmbH
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
 # 
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,17 +15,12 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 # 

-all: html wiki

-html:
-	./mkOptionList.py
-	@#saxon  Options.xml Options.xsl > Options.html
-	xsltproc Options.xsl Options.xml > Options.html
-	
-wiki:
-	./mkOptionList.py
-	xsltproc Options-wiki.xsl Options.xml > Options.wiki
+SVNVERSION := $(shell LC_ALL=C svnversion -cn ../.. | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/" | grep
"[0-9]" || LC_ALL=C svn info . | grep ^Revision | sed "s/.*[[:blank:]]\+\([0-9]*\)[^0-9]*/\1/" | grep
"[0-9]" || echo unknown)

+all: 
+	cd ../..; util/optionlist/kconfig2wiki src/Kconfig $(SVNVERSION) > util/optionlist/Options.wiki
+
 clean:
-	rm -rf Options.xml Options.html Options.wiki
+	rm -rf Options.wiki

Index: util/optionlist/README
===================================================================
--- util/optionlist/README	(revision 5100)
+++ util/optionlist/README	(working copy)
@@ -1,46 +1 @@
-I would like to contribute the following to the coreboot wiki in case
-it's useable:
-
-1. I have written a rather small Python script to convert the Options.lb
-   into an XML file which is much more useable for the web in most cases.
-
-2. I have written a XSLT to convert the XML file to (X)HTML to be able
-   to present it as a table.
-
-Florob (Florian Zeitz <florian-zeitz <at> lycos.de>)
-
-
-ChangeLog
----------
-
-* 2005-03-19 stepan
-  - fix xml stylesheet to work with xsltproc and saxon
-  - add Makefile
-  - make script a bit more verbose
-
-* 2005-03-15 florob
-  - Initial version
-
-
-License
--------
-
-Copyright (C) 2005 Florian Zeitz <florian-zeitz <at> lycos.de>
-Copyright (C) 2005-2006 Stefan Reinauer <stepan <at> coresystems.de>
-Copyright (C) 2006 Uwe Hermann <uwe <at> hermann-uwe.de>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
-
+This script creates the page http://www.coreboot.org/Coreboot_Options
--

-- 
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Gmane