aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-06-09 05:46:43 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2013-06-28 04:28:22 -0400
commitee89bd6bc73d1d14555418a2642172448052f1dd (patch)
tree854442fcd43a77286056a1eafecacd8878f067f4
parentd1e183c8dd38bfdd07e38a79577fe78124e63ab1 (diff)
lib: Move fonts from drivers/video/console/ to lib/fonts/
Several drivers need font support independent of CONFIG_VT, cfr. commit 9cbce8d7e1dae0744ca4f68d62aa7de18196b6f4, "console/font: Refactor font support code selection logic"). Hence move the fonts and their support logic from drivers/video/console/ to its own library directory lib/fonts/. This also allows to limit processing of drivers/video/console/Makefile to CONFIG_VT=y again. [Kevin Hilman <khilman@linaro.org>: Update arch/arm/boot/compressed/Makefile] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r--Documentation/DocBook/device-drivers.tmpl4
-rw-r--r--arch/arm/boot/compressed/Makefile2
-rw-r--r--arch/m68k/kernel/asm-offsets.c2
-rw-r--r--arch/unicore32/boot/compressed/Makefile2
-rw-r--r--drivers/video/Makefile2
-rw-r--r--drivers/video/console/Kconfig114
-rw-r--r--drivers/video/console/Makefile18
-rw-r--r--lib/Kconfig2
-rw-r--r--lib/Makefile2
-rw-r--r--lib/fonts/Kconfig117
-rw-r--r--lib/fonts/Makefile18
-rw-r--r--lib/fonts/font_10x18.c (renamed from drivers/video/console/font_10x18.c)0
-rw-r--r--lib/fonts/font_6x11.c (renamed from drivers/video/console/font_6x11.c)0
-rw-r--r--lib/fonts/font_7x14.c (renamed from drivers/video/console/font_7x14.c)0
-rw-r--r--lib/fonts/font_8x16.c (renamed from drivers/video/console/font_8x16.c)0
-rw-r--r--lib/fonts/font_8x8.c (renamed from drivers/video/console/font_8x8.c)0
-rw-r--r--lib/fonts/font_acorn_8x8.c (renamed from drivers/video/console/font_acorn_8x8.c)0
-rw-r--r--lib/fonts/font_mini_4x6.c (renamed from drivers/video/console/font_mini_4x6.c)0
-rw-r--r--lib/fonts/font_pearl_8x8.c (renamed from drivers/video/console/font_pearl_8x8.c)0
-rw-r--r--lib/fonts/font_sun12x22.c (renamed from drivers/video/console/font_sun12x22.c)0
-rw-r--r--lib/fonts/font_sun8x16.c (renamed from drivers/video/console/font_sun8x16.c)0
-rw-r--r--lib/fonts/fonts.c (renamed from drivers/video/console/fonts.c)2
22 files changed, 146 insertions, 139 deletions
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index c36892c072da..fca34192cf80 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -297,10 +297,10 @@ KAO -->
297 </sect1> 297 </sect1>
298 <sect1><title>Frame Buffer Fonts</title> 298 <sect1><title>Frame Buffer Fonts</title>
299 <para> 299 <para>
300 Refer to the file drivers/video/console/fonts.c for more information. 300 Refer to the file lib/fonts/fonts.c for more information.
301 </para> 301 </para>
302<!-- FIXME: Removed for now since no structured comments in source 302<!-- FIXME: Removed for now since no structured comments in source
303X!Idrivers/video/console/fonts.c 303X!Ilib/fonts/fonts.c
304--> 304-->
305 </sect1> 305 </sect1>
306 </chapter> 306 </chapter>
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 3580d57ea218..6d7b013a89c2 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -27,7 +27,7 @@ OBJS += misc.o decompress.o
27ifeq ($(CONFIG_DEBUG_UNCOMPRESS),y) 27ifeq ($(CONFIG_DEBUG_UNCOMPRESS),y)
28OBJS += debug.o 28OBJS += debug.o
29endif 29endif
30FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c 30FONTC = $(srctree)/lib/fonts/font_acorn_8x8.c
31 31
32# string library code (-Os is enforced to keep it much smaller) 32# string library code (-Os is enforced to keep it much smaller)
33OBJS += string.o 33OBJS += string.o
diff --git a/arch/m68k/kernel/asm-offsets.c b/arch/m68k/kernel/asm-offsets.c
index a972b00cd77d..8b7b22846366 100644
--- a/arch/m68k/kernel/asm-offsets.c
+++ b/arch/m68k/kernel/asm-offsets.c
@@ -77,7 +77,7 @@ int main(void)
77 DEFINE(BIR_SIZE, offsetof(struct bi_record, size)); 77 DEFINE(BIR_SIZE, offsetof(struct bi_record, size));
78 DEFINE(BIR_DATA, offsetof(struct bi_record, data)); 78 DEFINE(BIR_DATA, offsetof(struct bi_record, data));
79 79
80 /* offsets into font_desc (drivers/video/console/font.h) */ 80 /* offsets into the font_desc struct */
81 DEFINE(FONT_DESC_IDX, offsetof(struct font_desc, idx)); 81 DEFINE(FONT_DESC_IDX, offsetof(struct font_desc, idx));
82 DEFINE(FONT_DESC_NAME, offsetof(struct font_desc, name)); 82 DEFINE(FONT_DESC_NAME, offsetof(struct font_desc, name));
83 DEFINE(FONT_DESC_WIDTH, offsetof(struct font_desc, width)); 83 DEFINE(FONT_DESC_WIDTH, offsetof(struct font_desc, width));
diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile
index 950a9afa38f8..96494fb646f7 100644
--- a/arch/unicore32/boot/compressed/Makefile
+++ b/arch/unicore32/boot/compressed/Makefile
@@ -17,7 +17,7 @@ OBJS := misc.o
17 17
18# font.c and font.o 18# font.c and font.o
19CFLAGS_font.o := -Dstatic= 19CFLAGS_font.o := -Dstatic=
20$(obj)/font.c: $(srctree)/drivers/video/console/font_8x8.c 20$(obj)/font.c: $(srctree)/lib/fonts/font_8x8.c
21 $(call cmd,shipped) 21 $(call cmd,shipped)
22 22
23# piggy.S and piggy.o 23# piggy.S and piggy.o
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 8c8be7e15f9c..e8bae8dd4804 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -12,7 +12,7 @@ fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
12 modedb.o fbcvt.o 12 modedb.o fbcvt.o
13fb-objs := $(fb-y) 13fb-objs := $(fb-y)
14 14
15obj-y += console/ 15obj-$(CONFIG_VT) += console/
16obj-$(CONFIG_LOGO) += logo/ 16obj-$(CONFIG_LOGO) += logo/
17obj-y += backlight/ 17obj-y += backlight/
18 18
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 8af6ad3f1323..8c30603e0a86 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -134,119 +134,5 @@ config STI_CONSOLE
134 machines. Say Y here to build support for it into your kernel. 134 machines. Say Y here to build support for it into your kernel.
135 The alternative is to use your primary serial port as a console. 135 The alternative is to use your primary serial port as a console.
136 136
137config FONT_SUPPORT
138 tristate
139
140if FONT_SUPPORT
141
142config FONTS
143 bool "Select compiled-in fonts"
144 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
145 help
146 Say Y here if you would like to use fonts other than the default
147 your frame buffer console usually use.
148
149 Note that the answer to this question won't directly affect the
150 kernel: saying N will just cause the configurator to skip all
151 the questions about foreign fonts.
152
153 If unsure, say N (the default choices are safe).
154
155config FONT_8x8
156 bool "VGA 8x8 font" if FONTS
157 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
158 default y if !SPARC && !FONTS
159 help
160 This is the "high resolution" font for the VGA frame buffer (the one
161 provided by the text console 80x50 (and higher) modes).
162
163 Note that this is a poor quality font. The VGA 8x16 font is quite a
164 lot more readable.
165
166 Given the resolution provided by the frame buffer device, answer N
167 here is safe.
168
169config FONT_8x16
170 bool "VGA 8x16 font" if FONTS
171 default y if !SPARC && !FONTS
172 help
173 This is the "high resolution" font for the VGA frame buffer (the one
174 provided by the VGA text console 80x25 mode.
175
176 If unsure, say Y.
177
178config FONT_6x11
179 bool "Mac console 6x11 font (not supported by all drivers)" if FONTS
180 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
181 default y if !SPARC && !FONTS && MAC
182 help
183 Small console font with Macintosh-style high-half glyphs. Some Mac
184 framebuffer drivers don't support this one at all.
185
186config FONT_7x14
187 bool "console 7x14 font (not supported by all drivers)" if FONTS
188 depends on FRAMEBUFFER_CONSOLE
189 help
190 Console font with characters just a bit smaller than the default.
191 If the standard 8x16 font is a little too big for you, say Y.
192 Otherwise, say N.
193
194config FONT_PEARL_8x8
195 bool "Pearl (old m68k) console 8x8 font" if FONTS
196 depends on FRAMEBUFFER_CONSOLE
197 default y if !SPARC && !FONTS && AMIGA
198 help
199 Small console font with PC-style control-character and high-half
200 glyphs.
201
202config FONT_ACORN_8x8
203 bool "Acorn console 8x8 font" if FONTS
204 depends on FRAMEBUFFER_CONSOLE
205 default y if !SPARC && !FONTS && ARM && ARCH_ACORN
206 help
207 Small console font with PC-style control characters and high-half
208 glyphs.
209
210config FONT_MINI_4x6
211 bool "Mini 4x6 font"
212 depends on !SPARC && FONTS
213
214config FONT_SUN8x16
215 bool "Sparc console 8x16 font"
216 depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)
217 help
218 This is the high resolution console font for Sun machines. Say Y.
219
220config FONT_SUN12x22
221 bool "Sparc console 12x22 font (not supported by all drivers)"
222 depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)
223 help
224 This is the high resolution console font for Sun machines with very
225 big letters (like the letters used in the SPARC PROM). If the
226 standard font is unreadable for you, say Y, otherwise say N.
227
228config FONT_10x18
229 bool "console 10x18 font (not supported by all drivers)" if FONTS
230 depends on FRAMEBUFFER_CONSOLE
231 help
232 This is a high resolution console font for machines with very
233 big letters. It fits between the sun 12x22 and the normal 8x16 font.
234 If other fonts are too big or too small for you, say Y, otherwise say N.
235
236config FONT_AUTOSELECT
237 def_bool y
238 depends on !FONT_8x8
239 depends on !FONT_6x11
240 depends on !FONT_7x14
241 depends on !FONT_PEARL_8x8
242 depends on !FONT_ACORN_8x8
243 depends on !FONT_MINI_4x6
244 depends on !FONT_SUN8x16
245 depends on !FONT_SUN12x22
246 depends on !FONT_10x18
247 select FONT_8x16
248
249endif # FONT_SUPPORT
250
251endmenu 137endmenu
252 138
diff --git a/drivers/video/console/Makefile b/drivers/video/console/Makefile
index 3a11b635b4da..43bfa485db96 100644
--- a/drivers/video/console/Makefile
+++ b/drivers/video/console/Makefile
@@ -2,24 +2,6 @@
2# 5 Aug 1999, James Simmons, <mailto:jsimmons@users.sf.net> 2# 5 Aug 1999, James Simmons, <mailto:jsimmons@users.sf.net>
3# Rewritten to use lists instead of if-statements. 3# Rewritten to use lists instead of if-statements.
4 4
5# Font handling
6font-objs := fonts.o
7
8font-objs-$(CONFIG_FONT_SUN8x16) += font_sun8x16.o
9font-objs-$(CONFIG_FONT_SUN12x22) += font_sun12x22.o
10font-objs-$(CONFIG_FONT_8x8) += font_8x8.o
11font-objs-$(CONFIG_FONT_8x16) += font_8x16.o
12font-objs-$(CONFIG_FONT_6x11) += font_6x11.o
13font-objs-$(CONFIG_FONT_7x14) += font_7x14.o
14font-objs-$(CONFIG_FONT_10x18) += font_10x18.o
15font-objs-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
16font-objs-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
17font-objs-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o
18
19font-objs += $(font-objs-y)
20
21obj-$(CONFIG_FONT_SUPPORT) += font.o
22
23obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o 5obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o
24obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o 6obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o
25obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o 7obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o
diff --git a/lib/Kconfig b/lib/Kconfig
index fe01d418b09a..0fe08ea3443d 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -407,4 +407,6 @@ config OID_REGISTRY
407config UCS2_STRING 407config UCS2_STRING
408 tristate 408 tristate
409 409
410source "lib/fonts/Kconfig"
411
410endmenu 412endmenu
diff --git a/lib/Makefile b/lib/Makefile
index c55a037a354e..9a51526aa36a 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -151,6 +151,8 @@ interval_tree_test-objs := interval_tree_test_main.o interval_tree.o
151 151
152obj-$(CONFIG_ASN1) += asn1_decoder.o 152obj-$(CONFIG_ASN1) += asn1_decoder.o
153 153
154obj-$(CONFIG_FONT_SUPPORT) += fonts/
155
154hostprogs-y := gen_crc32table 156hostprogs-y := gen_crc32table
155clean-files := crc32table.h 157clean-files := crc32table.h
156 158
diff --git a/lib/fonts/Kconfig b/lib/fonts/Kconfig
new file mode 100644
index 000000000000..34fd931b54b5
--- /dev/null
+++ b/lib/fonts/Kconfig
@@ -0,0 +1,117 @@
1#
2# Font configuration
3#
4
5config FONT_SUPPORT
6 tristate
7
8if FONT_SUPPORT
9
10config FONTS
11 bool "Select compiled-in fonts"
12 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
13 help
14 Say Y here if you would like to use fonts other than the default
15 your frame buffer console usually use.
16
17 Note that the answer to this question won't directly affect the
18 kernel: saying N will just cause the configurator to skip all
19 the questions about foreign fonts.
20
21 If unsure, say N (the default choices are safe).
22
23config FONT_8x8
24 bool "VGA 8x8 font" if FONTS
25 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
26 default y if !SPARC && !FONTS
27 help
28 This is the "high resolution" font for the VGA frame buffer (the one
29 provided by the text console 80x50 (and higher) modes).
30
31 Note that this is a poor quality font. The VGA 8x16 font is quite a
32 lot more readable.
33
34 Given the resolution provided by the frame buffer device, answer N
35 here is safe.
36
37config FONT_8x16
38 bool "VGA 8x16 font" if FONTS
39 default y if !SPARC && !FONTS
40 help
41 This is the "high resolution" font for the VGA frame buffer (the one
42 provided by the VGA text console 80x25 mode.
43
44 If unsure, say Y.
45
46config FONT_6x11
47 bool "Mac console 6x11 font (not supported by all drivers)" if FONTS
48 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
49 default y if !SPARC && !FONTS && MAC
50 help
51 Small console font with Macintosh-style high-half glyphs. Some Mac
52 framebuffer drivers don't support this one at all.
53
54config FONT_7x14
55 bool "console 7x14 font (not supported by all drivers)" if FONTS
56 depends on FRAMEBUFFER_CONSOLE
57 help
58 Console font with characters just a bit smaller than the default.
59 If the standard 8x16 font is a little too big for you, say Y.
60 Otherwise, say N.
61
62config FONT_PEARL_8x8
63 bool "Pearl (old m68k) console 8x8 font" if FONTS
64 depends on FRAMEBUFFER_CONSOLE
65 default y if !SPARC && !FONTS && AMIGA
66 help
67 Small console font with PC-style control-character and high-half
68 glyphs.
69
70config FONT_ACORN_8x8
71 bool "Acorn console 8x8 font" if FONTS
72 depends on FRAMEBUFFER_CONSOLE
73 default y if !SPARC && !FONTS && ARM && ARCH_ACORN
74 help
75 Small console font with PC-style control characters and high-half
76 glyphs.
77
78config FONT_MINI_4x6
79 bool "Mini 4x6 font"
80 depends on !SPARC && FONTS
81
82config FONT_SUN8x16
83 bool "Sparc console 8x16 font"
84 depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)
85 help
86 This is the high resolution console font for Sun machines. Say Y.
87
88config FONT_SUN12x22
89 bool "Sparc console 12x22 font (not supported by all drivers)"
90 depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)
91 help
92 This is the high resolution console font for Sun machines with very
93 big letters (like the letters used in the SPARC PROM). If the
94 standard font is unreadable for you, say Y, otherwise say N.
95
96config FONT_10x18
97 bool "console 10x18 font (not supported by all drivers)" if FONTS
98 depends on FRAMEBUFFER_CONSOLE
99 help
100 This is a high resolution console font for machines with very
101 big letters. It fits between the sun 12x22 and the normal 8x16 font.
102 If other fonts are too big or too small for you, say Y, otherwise say N.
103
104config FONT_AUTOSELECT
105 def_bool y
106 depends on !FONT_8x8
107 depends on !FONT_6x11
108 depends on !FONT_7x14
109 depends on !FONT_PEARL_8x8
110 depends on !FONT_ACORN_8x8
111 depends on !FONT_MINI_4x6
112 depends on !FONT_SUN8x16
113 depends on !FONT_SUN12x22
114 depends on !FONT_10x18
115 select FONT_8x16
116
117endif # FONT_SUPPORT
diff --git a/lib/fonts/Makefile b/lib/fonts/Makefile
new file mode 100644
index 000000000000..2761560f3f15
--- /dev/null
+++ b/lib/fonts/Makefile
@@ -0,0 +1,18 @@
1# Font handling
2
3font-objs := fonts.o
4
5font-objs-$(CONFIG_FONT_SUN8x16) += font_sun8x16.o
6font-objs-$(CONFIG_FONT_SUN12x22) += font_sun12x22.o
7font-objs-$(CONFIG_FONT_8x8) += font_8x8.o
8font-objs-$(CONFIG_FONT_8x16) += font_8x16.o
9font-objs-$(CONFIG_FONT_6x11) += font_6x11.o
10font-objs-$(CONFIG_FONT_7x14) += font_7x14.o
11font-objs-$(CONFIG_FONT_10x18) += font_10x18.o
12font-objs-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
13font-objs-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
14font-objs-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o
15
16font-objs += $(font-objs-y)
17
18obj-$(CONFIG_FONT_SUPPORT) += font.o
diff --git a/drivers/video/console/font_10x18.c b/lib/fonts/font_10x18.c
index 6be72bb218ee..6be72bb218ee 100644
--- a/drivers/video/console/font_10x18.c
+++ b/lib/fonts/font_10x18.c
diff --git a/drivers/video/console/font_6x11.c b/lib/fonts/font_6x11.c
index 46e86e67aa6a..46e86e67aa6a 100644
--- a/drivers/video/console/font_6x11.c
+++ b/lib/fonts/font_6x11.c
diff --git a/drivers/video/console/font_7x14.c b/lib/fonts/font_7x14.c
index 3b7dbf9c060b..3b7dbf9c060b 100644
--- a/drivers/video/console/font_7x14.c
+++ b/lib/fonts/font_7x14.c
diff --git a/drivers/video/console/font_8x16.c b/lib/fonts/font_8x16.c
index 00a0c67a5c7d..00a0c67a5c7d 100644
--- a/drivers/video/console/font_8x16.c
+++ b/lib/fonts/font_8x16.c
diff --git a/drivers/video/console/font_8x8.c b/lib/fonts/font_8x8.c
index 9f56efe2cee7..9f56efe2cee7 100644
--- a/drivers/video/console/font_8x8.c
+++ b/lib/fonts/font_8x8.c
diff --git a/drivers/video/console/font_acorn_8x8.c b/lib/fonts/font_acorn_8x8.c
index 639e31ae1100..639e31ae1100 100644
--- a/drivers/video/console/font_acorn_8x8.c
+++ b/lib/fonts/font_acorn_8x8.c
diff --git a/drivers/video/console/font_mini_4x6.c b/lib/fonts/font_mini_4x6.c
index 838caa1cfef7..838caa1cfef7 100644
--- a/drivers/video/console/font_mini_4x6.c
+++ b/lib/fonts/font_mini_4x6.c
diff --git a/drivers/video/console/font_pearl_8x8.c b/lib/fonts/font_pearl_8x8.c
index dc6ad539ca4e..dc6ad539ca4e 100644
--- a/drivers/video/console/font_pearl_8x8.c
+++ b/lib/fonts/font_pearl_8x8.c
diff --git a/drivers/video/console/font_sun12x22.c b/lib/fonts/font_sun12x22.c
index d3643853c33a..d3643853c33a 100644
--- a/drivers/video/console/font_sun12x22.c
+++ b/lib/fonts/font_sun12x22.c
diff --git a/drivers/video/console/font_sun8x16.c b/lib/fonts/font_sun8x16.c
index 268151325b83..268151325b83 100644
--- a/drivers/video/console/font_sun8x16.c
+++ b/lib/fonts/font_sun8x16.c
diff --git a/drivers/video/console/fonts.c b/lib/fonts/fonts.c
index d0c03fd70871..f947189efe6d 100644
--- a/drivers/video/console/fonts.c
+++ b/lib/fonts/fonts.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/video/fonts.c -- `Soft' font definitions 2 * `Soft' font definitions
3 * 3 *
4 * Created 1995 by Geert Uytterhoeven 4 * Created 1995 by Geert Uytterhoeven
5 * Rewritten 1998 by Martin Mares <mj@ucw.cz> 5 * Rewritten 1998 by Martin Mares <mj@ucw.cz>