Default CONFIG_COREBOOT_FLASH on; make depend on CONFIG_COREBOOT.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 20 Mar 2010 15:00:45 +0000 (11:00 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 20 Mar 2010 15:00:45 +0000 (11:00 -0400)
Coreboot users will almost certainly want CBFS support, and
non-coreboot users have no use for it.  So, make that the default
behaviour.

src/boot.c
src/config.h
src/coreboot.c
src/ramdisk.c

index 6e9000e9b1f3e72f575b1f4069b1f4badc82b2cc..19e16f3ae203d3ecfec029738e71f7abb148d9c1 100644 (file)
@@ -48,7 +48,7 @@ boot_setup(void)
         ie++;
     }
 
-    if (CONFIG_COREBOOT_FLASH) {
+    if (CONFIG_COREBOOT && CONFIG_COREBOOT_FLASH) {
         ie->type = IPL_TYPE_CBFS;
         ie->description = "CBFS";
         ie++;
@@ -414,7 +414,7 @@ boot_cdrom(struct ipl_entry_s *ie)
 static void
 boot_cbfs(struct ipl_entry_s *ie)
 {
-    if (! CONFIG_COREBOOT_FLASH)
+    if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH)
         return;
     int count = ie->subchoice;
     struct cbfs_file *file = NULL;
index 5316f22f1e9c3859d7b19627ec1c77ae39a8b7b5..e7624355d77637cfefc55df9c03dc03b307ff26f 100644 (file)
@@ -87,7 +87,7 @@
 #define CONFIG_PCI_ROOT1 0x00
 #define CONFIG_PCI_ROOT2 0x00
 // Support searching coreboot flash format.
-#define CONFIG_COREBOOT_FLASH 0
+#define CONFIG_COREBOOT_FLASH 1
 // Support floppy images in the coreboot flash.
 #define CONFIG_FLASH_FLOPPY 1
 // Support the lzma decompression algorighm.
index 988775267923fc0aa495787969240ec42406fde6..883834c26740b711b2b75a36f6337a84dbba3b69 100644 (file)
@@ -370,7 +370,7 @@ static struct cbfs_header *CBHDR;
 static void
 cbfs_setup(void)
 {
-    if (! CONFIG_COREBOOT_FLASH)
+    if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH)
         return;
 
     CBHDR = *(void **)CBFS_HEADPTR_ADDR;
@@ -442,7 +442,7 @@ cbfs_findfile(const char *fname)
 struct cbfs_file *
 cbfs_findprefix(const char *prefix, struct cbfs_file *last)
 {
-    if (! CONFIG_COREBOOT_FLASH)
+    if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH)
         return NULL;
 
     dprintf(3, "Searching CBFS for prefix %s\n", prefix);
@@ -503,7 +503,7 @@ cbfs_datasize(struct cbfs_file *file)
 int
 cbfs_copyfile(struct cbfs_file *file, void *dst, u32 maxlen)
 {
-    if (! CONFIG_COREBOOT_FLASH || !file)
+    if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH || !file)
         return -1;
 
     u32 size = ntohl(file->len);
@@ -535,7 +535,7 @@ cbfs_copyfile(struct cbfs_file *file, void *dst, u32 maxlen)
 int
 cbfs_copy_optionrom(void *dst, u32 maxlen, u32 vendev)
 {
-    if (! CONFIG_COREBOOT_FLASH)
+    if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH)
         return -1;
 
     char fname[17];
@@ -566,7 +566,7 @@ struct cbfs_payload {
 void
 cbfs_run_payload(struct cbfs_file *file)
 {
-    if (!CONFIG_COREBOOT_FLASH || !file)
+    if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH || !file)
         return;
     dprintf(1, "Run %s\n", file->filename);
     struct cbfs_payload *pay = (void*)file + ntohl(file->offset);
index 01648402b0e159e4f8cb7d0461e608092a49d5b4..be1de56c2152d9486e69c5d248d00bbed932ac1e 100644 (file)
@@ -13,7 +13,7 @@
 void
 ramdisk_setup(void)
 {
-    if (!CONFIG_COREBOOT_FLASH || !CONFIG_FLASH_FLOPPY)
+    if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH || !CONFIG_FLASH_FLOPPY)
         return;
 
     // Find image.
@@ -81,7 +81,7 @@ ramdisk_copy(struct disk_op_s *op, int iswrite)
 int
 process_ramdisk_op(struct disk_op_s *op)
 {
-    if (!CONFIG_COREBOOT_FLASH || !CONFIG_FLASH_FLOPPY)
+    if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH || !CONFIG_FLASH_FLOPPY)
         return 0;
 
     switch (op->command) {