Index: src/arch/i386/Config.lb
===================================================================
--- src/arch/i386/Config.lb	(revision 4557)
+++ src/arch/i386/Config.lb	(working copy)
@@ -13,7 +13,6 @@
 	if CONFIG_USE_FAILOVER_IMAGE
 	else
 		initobject /src/lib/cbfs.o
-		initobject /src/console/vsprintf.o
 		initobject /src/lib/lzma.o
 	end
 end
Index: src/lib/cbfs.c
===================================================================
--- src/lib/cbfs.c	(revision 4557)
+++ src/lib/cbfs.c	(working copy)
@@ -124,13 +124,27 @@
 	return (void *) CBFS_SUBHEADER(file);
 }
 
+static int tohex8(int c)
+{
+	return (c<=9)?(c+'0'):(c-10+'a');
+}
+
+static void tohex32(int val, char* dest)
+{
+	dest[0]=tohex8(val>>24);
+	dest[1]=tohex8((val>>16) & 0xff);
+	dest[2]=tohex8((val>>8) & 0xff);
+	dest[3]=tohex8((val) & 0xff);
+}
+
 void *cbfs_load_optionrom(u16 vendor, u16 device, void * dest)
 {
-	char name[17];
+	char name[17]="pciXXXX,XXXX.rom";
 	struct cbfs_optionrom *orom;
 	u8 *src;
 
-	sprintf(name,"pci%04x,%04x.rom", vendor, device);
+	tohex32(vendor, name+3);
+	tohex32(device, name+8);
 
 	orom = (struct cbfs_optionrom *)
 		cbfs_find_file(name, CBFS_TYPE_OPTIONROM);
