Permalink
Browse files

Merge remote-tracking branch 'github/3.7/zen-logo' into 3.7/master

  • Loading branch information...
2 parents 8ca0653 + c74c660 commit 4f85c6127bd4371b7a5e65821d7686fd725c9c8d @heftig heftig committed Dec 22, 2012
View
@@ -15,71 +15,138 @@ config FB_LOGO_EXTRA
depends on FB=y
default y if SPU_BASE
+config LOGO_RANDOM
+ bool "Select random available logo"
+ default y
+ help
+ Enable this option to use any available logo randomly at bootup.
+
+comment "Available logos"
+
+config LOGO_ZEN_CLUT224
+ bool "224-color Zen Kernel/Meditating Tux logo"
+ default y
+
config LOGO_LINUX_MONO
bool "Standard black and white Linux logo"
- default y
+ default n
config LOGO_LINUX_VGA16
bool "Standard 16-color Linux logo"
- default y
+ default n
config LOGO_LINUX_CLUT224
bool "Standard 224-color Linux logo"
- default y
+ default n
config LOGO_BLACKFIN_VGA16
bool "16-colour Blackfin Processor Linux logo"
depends on BLACKFIN
- default y
+ default n
config LOGO_BLACKFIN_CLUT224
bool "224-colour Blackfin Processor Linux logo"
depends on BLACKFIN
- default y
+ default n
+
+config LOGO_OLDZEN_CLUT224
+ bool "224-color Old Zen Kernel logo"
+ depends on LOGO
+ default n
+
+config LOGO_ARCH_CLUT224
+ bool "224-color Arch Linux logo"
+ depends on LOGO
+ default n
+
+config LOGO_GENTOO_CLUT224
+ bool "224-color Gentoo Linux logo"
+ depends on LOGO
+ default n
+
+config LOGO_EXHERBO_CLUT224
+ bool "224-color Exherbo Linux logo"
+ depends on LOGO
+ default n
+
+config LOGO_SLACKWARE_CLUT224
+ bool "224-color Slackware Linux logo"
+ depends on LOGO
+ default n
+
+config LOGO_DEBIAN_CLUT224
+ bool "224-color Debian Linux logo"
+ depends on LOGO
+ default n
+
+config LOGO_FEDORASIMPLE_CLUT224
+ bool "224-color Fedora Simple Linux logo"
+ depends on LOGO
+ default n
+
+config LOGO_FEDORAGLOSSY_CLUT224
+ bool "224-color Fedora Glossy Linux logo"
+ depends on LOGO
+ default n
+
+config LOGO_TITS_CLUT224
+ bool "224-color Tits logo"
+ depends on LOGO
+ default n
+
+config LOGO_BSD_CLUT224
+ bool "224-color BSD Devil logo"
+ depends on LOGO
+ default n
+
+config LOGO_FBSD_CLUT224
+ bool "224-color FreeBSD logo"
+ depends on LOGO
+ default n
config LOGO_DEC_CLUT224
bool "224-color Digital Equipment Corporation Linux logo"
depends on MACH_DECSTATION || ALPHA
- default y
+ default n
config LOGO_MAC_CLUT224
bool "224-color Macintosh Linux logo"
depends on MAC
- default y
+ default n
config LOGO_PARISC_CLUT224
bool "224-color PA-RISC Linux logo"
depends on PARISC
- default y
+ default n
config LOGO_SGI_CLUT224
bool "224-color SGI Linux logo"
depends on SGI_IP22 || SGI_IP27 || SGI_IP32 || X86_VISWS
- default y
+ default n
config LOGO_SUN_CLUT224
bool "224-color Sun Linux logo"
depends on SPARC
- default y
+ default n
config LOGO_SUPERH_MONO
bool "Black and white SuperH Linux logo"
depends on SUPERH
- default y
+ default n
config LOGO_SUPERH_VGA16
bool "16-color SuperH Linux logo"
depends on SUPERH
- default y
+ default n
config LOGO_SUPERH_CLUT224
bool "224-color SuperH Linux logo"
depends on SUPERH
- default y
+ default n
config LOGO_M32R_CLUT224
bool "224-color M32R Linux logo"
depends on M32R
- default y
+ default n
endif # LOGO
@@ -6,6 +6,18 @@ obj-$(CONFIG_LOGO_LINUX_VGA16) += logo_linux_vga16.o
obj-$(CONFIG_LOGO_LINUX_CLUT224) += logo_linux_clut224.o
obj-$(CONFIG_LOGO_BLACKFIN_CLUT224) += logo_blackfin_clut224.o
obj-$(CONFIG_LOGO_BLACKFIN_VGA16) += logo_blackfin_vga16.o
+obj-$(CONFIG_LOGO_ZEN_CLUT224) += logo_zen_clut224.o
+obj-$(CONFIG_LOGO_OLDZEN_CLUT224) += logo_oldzen_clut224.o
+obj-$(CONFIG_LOGO_ARCH_CLUT224) += logo_arch_clut224.o
+obj-$(CONFIG_LOGO_GENTOO_CLUT224) += logo_gentoo_clut224.o
+obj-$(CONFIG_LOGO_EXHERBO_CLUT224) += logo_exherbo_clut224.o
+obj-$(CONFIG_LOGO_SLACKWARE_CLUT224) += logo_slackware_clut224.o
+obj-$(CONFIG_LOGO_DEBIAN_CLUT224) += logo_debian_clut224.o
+obj-$(CONFIG_LOGO_FEDORASIMPLE_CLUT224) += logo_fedorasimple_clut224.o
+obj-$(CONFIG_LOGO_FEDORAGLOSSY_CLUT224) += logo_fedoraglossy_clut224.o
+obj-$(CONFIG_LOGO_TITS_CLUT224) += logo_tits_clut224.o
+obj-$(CONFIG_LOGO_BSD_CLUT224) += logo_bsd_clut224.o
+obj-$(CONFIG_LOGO_FBSD_CLUT224) += logo_fbsd_clut224.o
obj-$(CONFIG_LOGO_DEC_CLUT224) += logo_dec_clut224.o
obj-$(CONFIG_LOGO_MAC_CLUT224) += logo_mac_clut224.o
obj-$(CONFIG_LOGO_PARISC_CLUT224) += logo_parisc_clut224.o
View
@@ -13,6 +13,10 @@
#include <linux/stddef.h>
#include <linux/module.h>
+#ifdef CONFIG_LOGO_RANDOM
+#include <linux/random.h>
+#endif
+
#ifdef CONFIG_M68K
#include <asm/setup.h>
#endif
@@ -25,82 +29,133 @@ static bool nologo;
module_param(nologo, bool, 0);
MODULE_PARM_DESC(nologo, "Disables startup logo");
-/* logo's are marked __initdata. Use __init_refok to tell
- * modpost that it is intended that this function uses data
- * marked __initdata.
- */
-const struct linux_logo * __init_refok fb_find_logo(int depth)
-{
- const struct linux_logo *logo = NULL;
-
- if (nologo)
- return NULL;
-
- if (depth >= 1) {
+/* Monochromatic logos */
+static const struct linux_logo *logo_mono[] = {
#ifdef CONFIG_LOGO_LINUX_MONO
- /* Generic Linux logo */
- logo = &logo_linux_mono;
+ &logo_linux_mono, /* Generic Linux logo */
#endif
#ifdef CONFIG_LOGO_SUPERH_MONO
- /* SuperH Linux logo */
- logo = &logo_superh_mono;
+ &logo_superh_mono, /* SuperH Linux logo */
#endif
- }
-
- if (depth >= 4) {
+};
+
+/* 16-colour logos */
+static const struct linux_logo *logo_vga16[] = {
#ifdef CONFIG_LOGO_LINUX_VGA16
- /* Generic Linux logo */
- logo = &logo_linux_vga16;
+ &logo_linux_vga16, /* Generic Linux logo */
#endif
#ifdef CONFIG_LOGO_BLACKFIN_VGA16
- /* Blackfin processor logo */
- logo = &logo_blackfin_vga16;
+ &logo_blackfin_vga16, /* Blackfin processor logo */
#endif
#ifdef CONFIG_LOGO_SUPERH_VGA16
- /* SuperH Linux logo */
- logo = &logo_superh_vga16;
+ &logo_superh_vga16, /* SuperH Linux logo */
#endif
- }
-
- if (depth >= 8) {
+};
+
+/* 224-colour logos */
+static const struct linux_logo *logo_clut224[] = {
#ifdef CONFIG_LOGO_LINUX_CLUT224
- /* Generic Linux logo */
- logo = &logo_linux_clut224;
+ &logo_linux_clut224, /* Generic Linux logo */
#endif
#ifdef CONFIG_LOGO_BLACKFIN_CLUT224
- /* Blackfin Linux logo */
- logo = &logo_blackfin_clut224;
+ &logo_blackfin_clut224, /* Blackfin Linux logo */
#endif
#ifdef CONFIG_LOGO_DEC_CLUT224
- /* DEC Linux logo on MIPS/MIPS64 or ALPHA */
- logo = &logo_dec_clut224;
+ &logo_dec_clut224, /* DEC Linux logo on MIPS/MIPS64 or ALPHA */
#endif
#ifdef CONFIG_LOGO_MAC_CLUT224
- /* Macintosh Linux logo on m68k */
- if (MACH_IS_MAC)
- logo = &logo_mac_clut224;
+ &logo_mac_clut224, /* Macintosh Linux logo on m68k */
#endif
#ifdef CONFIG_LOGO_PARISC_CLUT224
- /* PA-RISC Linux logo */
- logo = &logo_parisc_clut224;
+ &logo_parisc_clut224, /* PA-RISC Linux logo */
#endif
#ifdef CONFIG_LOGO_SGI_CLUT224
- /* SGI Linux logo on MIPS/MIPS64 and VISWS */
- logo = &logo_sgi_clut224;
+ &logo_sgi_clut224, /* SGI Linux logo on MIPS/MIPS64 and VISWS */
#endif
#ifdef CONFIG_LOGO_SUN_CLUT224
- /* Sun Linux logo */
- logo = &logo_sun_clut224;
+ &logo_sun_clut224, /* Sun Linux logo */
#endif
#ifdef CONFIG_LOGO_SUPERH_CLUT224
- /* SuperH Linux logo */
- logo = &logo_superh_clut224;
+ &logo_superh_clut224, /* SuperH Linux logo */
#endif
#ifdef CONFIG_LOGO_M32R_CLUT224
- /* M32R Linux logo */
- logo = &logo_m32r_clut224;
+ &logo_m32r_clut224, /* M32R Linux logo */
+#endif
+#ifdef CONFIG_LOGO_ZEN_CLUT224
+ &logo_zen_clut224, /* Zen-Kernel logo */
+#endif
+#ifdef CONFIG_LOGO_OLDZEN_CLUT224
+ &logo_oldzen_clut224, /* Old Zen-Kernel logo */
+#endif
+#ifdef CONFIG_LOGO_ARCH_CLUT224
+ &logo_arch_clut224, /* Arch Linux logo */
+#endif
+#ifdef CONFIG_LOGO_GENTOO_CLUT224
+ &logo_gentoo_clut224, /* Gentoo Linux logo */
+#endif
+#ifdef CONFIG_LOGO_EXHERBO_CLUT224
+ &logo_exherbo_clut224, /* Exherbo Linux logo */
+#endif
+#ifdef CONFIG_LOGO_SLACKWARE_CLUT224
+ &logo_slackware_clut224, /* Slackware Linux logo */
+#endif
+#ifdef CONFIG_LOGO_DEBIAN_CLUT224
+ &logo_debian_clut224, /* Debian Linux logo */
#endif
+#ifdef CONFIG_LOGO_FEDORASIMPLE_CLUT224
+ &logo_fedorasimple_clut224, /* Fedora Simple logo */
+#endif
+#ifdef CONFIG_LOGO_FEDORAGLOSSY_CLUT224
+ &logo_fedoraglossy_clut224, /* Fedora Glossy logo */
+#endif
+#ifdef CONFIG_LOGO_TITS_CLUT224
+ &logo_tits_clut224, /* Tits logo */
+#endif
+#ifdef CONFIG_LOGO_BSD_CLUT224
+ &logo_bsd_clut224, /* BSD logo */
+#endif
+#ifdef CONFIG_LOGO_FBSD_CLUT224
+ &logo_fbsd_clut224, /* Free BSD logo */
+#endif
+};
+
+#ifdef CONFIG_LOGO_RANDOM
+#define LOGO_INDEX(s) (get_random_int() % s)
+#else
+#define LOGO_INDEX(s) (s - 1)
+#endif
+
+/* logo's are marked __initdata. Use __init_refok to tell
+ * modpost that it is intended that this function uses data
+ * marked __initdata.
+ */
+const struct linux_logo * __init_refok fb_find_logo(int depth)
+{
+ const struct linux_logo *logo = NULL;
+ const struct linux_logo **array = NULL;
+ unsigned int size;
+
+ if (nologo)
+ return NULL;
+
+ /* Select logo array */
+ if (depth >= 1) {
+ array = logo_mono;
+ size = ARRAY_SIZE(logo_mono);
}
+ if (depth >= 4) {
+ array = logo_vga16;
+ size = ARRAY_SIZE(logo_vga16);
+ }
+ if (depth >= 8) {
+ array = logo_clut224;
+ size = ARRAY_SIZE(logo_clut224);
+ }
+
+ /* We've got some logos to display */
+ if (array && size)
+ logo = array[LOGO_INDEX(size)];
+
return logo;
}
EXPORT_SYMBOL_GPL(fb_find_logo);
Oops, something went wrong.

0 comments on commit 4f85c61

Please sign in to comment.