]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Generalise CONSOLE_VESAFB to CONSOLE_FRAMEBUFFER
authorMichael Brown <mcb30@ipxe.org>
Fri, 16 Oct 2015 15:14:29 +0000 (16:14 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 16 Oct 2015 15:38:39 +0000 (16:38 +0100)
The name "vesafb" is intrinsically specific to a BIOS environment.
Generalise the build configuration option CONSOLE_VESAFB to
CONSOLE_FRAMEBUFFER, in preparation for adding EFI framebuffer
support.

Existing configurations using CONSOLE_VESAFB will continue to work.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/Makefile.housekeeping
src/arch/i386/interface/pcbios/vesafb.c
src/config/config.c
src/config/config_efi.c [new file with mode: 0644]
src/config/config_linux.c [new file with mode: 0644]
src/config/config_pcbios.c [new file with mode: 0644]
src/config/console.h

index 6bd736725a6a50852f0bb0ed9a435fe98452e440..1b6f092bbdcc1a884c06193b7029a61fb3ed1379 100644 (file)
@@ -1005,7 +1005,7 @@ TGT_LD_ENTRY      = _$(TGT_PREFIX)_start
 #                --defsym pci_vendor=0x1186 --defsym pci_device=0x1300")
 #
 TGT_LD_FLAGS   = $(foreach SYM,$(TGT_LD_ENTRY) $(TGT_LD_DRIVERS) \
-                   $(TGT_LD_DEVLIST) obj_config,\
+                   $(TGT_LD_DEVLIST) obj_config obj_config_$(PLATFORM),\
                    -u $(SYM) --defsym check_$(SYM)=$(SYM) ) \
                  $(patsubst %,--defsym %,$(TGT_LD_IDS)) \
                  -e $(TGT_LD_ENTRY)
index 6d2c1bcae405de64a4109e389761183e91101166..50e4858521382698d366af2fac2528cb0c415a80 100644 (file)
@@ -60,7 +60,13 @@ struct console_driver bios_console __attribute__ (( weak ));
 #define EIO_VBE( code )                                                        \
        EUNIQ ( EINFO_EIO, (code), EIO_FAILED, EIO_HARDWARE, EIO_MODE )
 
-/* Set default console usage if applicable */
+/* Set default console usage if applicable
+ *
+ * We accept either CONSOLE_FRAMEBUFFER or CONSOLE_VESAFB.
+ */
+#if ( defined ( CONSOLE_FRAMEBUFFER ) && ! defined ( CONSOLE_VESAFB ) )
+#define CONSOLE_VESAFB CONSOLE_FRAMEBUFFER
+#endif
 #if ! ( defined ( CONSOLE_VESAFB ) && CONSOLE_EXPLICIT ( CONSOLE_VESAFB ) )
 #undef CONSOLE_VESAFB
 #define CONSOLE_VESAFB ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG )
index 1dd912c1dd36135d38c0f9e8ba05f7880b9afb8c..6f9e66cd4e6baaafaf4084d1ca5501a9ebd659fd 100644 (file)
@@ -51,9 +51,6 @@ PROVIDE_REQUIRING_SYMBOL();
  *
  */
 
-#ifdef CONSOLE_PCBIOS
-REQUIRE_OBJECT ( bios_console );
-#endif
 #ifdef CONSOLE_SERIAL
 REQUIRE_OBJECT ( serial );
 #endif
@@ -81,12 +78,6 @@ REQUIRE_OBJECT ( vmconsole );
 #ifdef CONSOLE_DEBUGCON
 REQUIRE_OBJECT ( debugcon );
 #endif
-#ifdef CONSOLE_VESAFB
-REQUIRE_OBJECT ( vesafb );
-#endif
-#ifdef CONSOLE_INT13
-REQUIRE_OBJECT ( int13con );
-#endif
 
 /*
  * Drag in all requested network protocols
diff --git a/src/config/config_efi.c b/src/config/config_efi.c
new file mode 100644 (file)
index 0000000..ece6eaa
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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 Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * You can also choose to distribute this program under the terms of
+ * the Unmodified Binary Distribution Licence (as given in the file
+ * COPYING.UBDL), provided that you have satisfied its requirements.
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <config/console.h>
+
+/** @file
+ *
+ * EFI-specific configuration options
+ *
+ */
+
+PROVIDE_REQUIRING_SYMBOL();
+
+/*
+ * Drag in all requested console types
+ *
+ */
+
+#ifdef CONSOLE_EFI
+REQUIRE_OBJECT ( efi_console );
+#endif
diff --git a/src/config/config_linux.c b/src/config/config_linux.c
new file mode 100644 (file)
index 0000000..71eeff9
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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 Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * You can also choose to distribute this program under the terms of
+ * the Unmodified Binary Distribution Licence (as given in the file
+ * COPYING.UBDL), provided that you have satisfied its requirements.
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <config/console.h>
+
+/** @file
+ *
+ * Linux-specific configuration options
+ *
+ */
+
+PROVIDE_REQUIRING_SYMBOL();
+
+/*
+ * Drag in all requested console types
+ *
+ */
+
+#ifdef CONSOLE_LINUX
+REQUIRE_OBJECT ( linux_console );
+#endif
diff --git a/src/config/config_pcbios.c b/src/config/config_pcbios.c
new file mode 100644 (file)
index 0000000..698c68a
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * 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 Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * You can also choose to distribute this program under the terms of
+ * the Unmodified Binary Distribution Licence (as given in the file
+ * COPYING.UBDL), provided that you have satisfied its requirements.
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <config/console.h>
+
+/** @file
+ *
+ * BIOS-specific configuration options
+ *
+ */
+
+PROVIDE_REQUIRING_SYMBOL();
+
+/*
+ * Drag in all requested console types
+ *
+ */
+
+#ifdef CONSOLE_PCBIOS
+REQUIRE_OBJECT ( bios_console );
+#endif
+#ifdef CONSOLE_VESAFB
+REQUIRE_OBJECT ( vesafb );
+#endif
+#ifdef CONSOLE_FRAMEBUFFER
+REQUIRE_OBJECT ( vesafb );
+#endif
+#ifdef CONSOLE_INT13
+REQUIRE_OBJECT ( int13con );
+#endif
index d1d504527d90431add861762879515f2d4ce8315..9f770d0943a519ea79247aa6281b345432ae5d44 100644 (file)
@@ -35,7 +35,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  */
 
 //#define      CONSOLE_SERIAL          /* Serial port console */
-//#define      CONSOLE_VESAFB          /* VESA framebuffer console */
+//#define      CONSOLE_FRAMEBUFFER     /* Graphical framebuffer console */
 //#define      CONSOLE_SYSLOG          /* Syslog console */
 //#define      CONSOLE_SYSLOGS         /* Encrypted syslog console */
 //#define      CONSOLE_VMWARE          /* VMware logfile console */