]> git.saurik.com Git - apple/xnu.git/blame - osfmk/console/panic_ui/README
xnu-1456.1.26.tar.gz
[apple/xnu.git] / osfmk / console / panic_ui / README
CommitLineData
91447636
A
1Creating a Panic UI image (either the default or loadable)
2
b0d623f7
A
3The key steps are: create an indexed image using the MacOS X system
48 clut, saved in QuickTime uncompressed 256 color format. Run it
5through the genimage tool to create a C structure or a kernel
6loadable file. This code all has byte dependencies in it, therefore
7this all must be done on a PowerPC machine.
91447636
A
8
9
10===== Create the image
11
12Using an application like Photoshop, create an image to be used as the image
13displayed at panic time. Your selection of colors is limited to those found in
14the MacOS X system 8 clut; in the application you're using, make sure you are
15in "indexed mode" and that the supplied CLUT (appleClut8.act) has been selected.
16
17* The appleClut8.act is the default Mac OS X CLUT.
18
19Keep in mind the following.
20
21* There must be at least 20 lines at the bottom of the image reserved. This is
22used by the system for displaying extra panic information. There can be more than
2320 lines, but you'll have to provide this information when generating the image for
24the kernel.
25
26* You must determine the colors used by the font for displaying the panic information.
27There are forground and background colors. The default foreground is "100% White".
28It is represented by a 24-bit value of 0xFFFFFF. The default background is
29"13% White, or Dark Gray". It is represented by a 24-bit value of 0x222222. To change
30the defaults, you'll have to provide this information when generating the image for
31the kernel.
32
33Save the completed image as a TIFF (still indexed off the CLUT).
34
35
36===== Convert the TIFF indexed image to QuickTime RAW
37
b0d623f7
A
38Using the Preview application from 10.3.x, open the TIFF image. Use
39File:Export to save the TIFF image in QuickTime image format with
40options of "None" for compression and "256 Colors" for the depth.
41Quality should be "Best". The saved results should be a .qtif
91447636
A
42formatted RAW image.
43
44
45===== Generate an image for the kernel.
46
47To generate the default kernel panic image file "panic_image.c", in your working
b0d623f7
A
48directory, build the program genimage:
49cc -o genimage genimage.c
50
51execute:
91447636
A
52
53genimage -i <your .qtif image> -n <lines> -fg <24-bit color> -bg <24-bit color>
54** options other than -i are optional.
55
b0d623f7
A
56To genertate a kernel loadable panic image file, build the qtif2kraw binary:
57cc -o qtif2kraw qtif2kraw.c
58
59execute:
91447636
A
60
61qtif2kraw -i <your .qtif image> -o <your .kraw file> -n <lines> -fg <24-bit color> -bg <24-bit color>
62** options other than -i and -o are optional.
63
64
65
66===== Other Info
67
68The reason an 8-bit image was choosen, was because it is easy to convert to 24 or 16 bit colors.
69The system does not typically run in 8-bit mode. If the system is in 8-bit mode. Then we have
70to check to see if the active CLUT is the same as the one that the image was created with. If the
71CLUTs are different. The image is converted to grayscale and the nearest matching gray in the active
72CLUT is used.
73
74