Difference between revisions of "Linux Boot Logo"
From ArmadeusWiki
m (→Create an image to suitable format (C include file)) |
(→Create an image to suitable format (C include file)) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
===Create an image to suitable format (C include file)=== | ===Create an image to suitable format (C include file)=== | ||
− | # create a new image fitting the size of your LCD (320x240 | + | # create a new image fitting the size of your LCD (320x240, 480x272 or 800x480), with [http://www.gimp.org/ The Gimp] (for example). |
# save it in '''PPM RAW''' file format, let's say ''my_boot_logo.ppm'' | # save it in '''PPM RAW''' file format, let's say ''my_boot_logo.ppm'' | ||
# install Netpbm package: <pre>$ sudo apt-get install netpbm </pre> | # install Netpbm package: <pre>$ sudo apt-get install netpbm </pre> | ||
# reduce the number of colors in your image to 224: <pre class="host">$ ppmquant 224 my_boot_logo.ppm > my_boot_logo_224.ppm</pre> | # reduce the number of colors in your image to 224: <pre class="host">$ ppmquant 224 my_boot_logo.ppm > my_boot_logo_224.ppm</pre> | ||
− | # convert it to PPM ASCII format: <pre class="host">$ pnmnoraw my_boot_logo_224.ppm > my_boot_logo_ascii_224.ppm</pre> | + | # convert it to PPM ASCII format (if ''pnmnoraw'' is not available on your distribution (ex: LUbuntu 17.10), try with ''pnmtoplainpnm''): <pre class="host">$ pnmnoraw my_boot_logo_224.ppm > my_boot_logo_ascii_224.ppm</pre> |
# get the armadeus envt variables: <pre class="host">$ make shell_env && source armadeus_env.sh</pre> | # get the armadeus envt variables: <pre class="host">$ make shell_env && source armadeus_env.sh</pre> | ||
# copy the PPM to ''$ARMADEUS_LINUX_DIR/drivers/video/logo/'' directory '''with a name ending with _clut224.ppm''': <pre>$ cp my_boot_logo_ascii_224.ppm $ARMADEUS_LINUX_DIR/drivers/video/logo/logo_custom_clut224.ppm</pre> | # copy the PPM to ''$ARMADEUS_LINUX_DIR/drivers/video/logo/'' directory '''with a name ending with _clut224.ppm''': <pre>$ cp my_boot_logo_ascii_224.ppm $ARMADEUS_LINUX_DIR/drivers/video/logo/logo_custom_clut224.ppm</pre> | ||
Line 15: | Line 15: | ||
===Add your file to Linux build system=== | ===Add your file to Linux build system=== | ||
− | # If you have overwritten ''$ARMADEUS_LINUX_DIR/drivers/video/logo/logo_armadeus_clut224.ppm'' with your own logo at the previous stage, then you can jump to [[#Recompile_.26_install_kernel|the | + | # If you have overwritten ''$ARMADEUS_LINUX_DIR/drivers/video/logo/logo_armadeus_clut224.ppm'' with your own logo at the previous stage, then you can jump to [[#Recompile_.26_install_kernel|the next step]]; otherwise: |
# Edit ''$ARMADEUS_LINUX_DIR/drivers/video/logo/Makefile'' | # Edit ''$ARMADEUS_LINUX_DIR/drivers/video/logo/Makefile'' | ||
− | # | + | # Put it your logo file name at line 18 (replace current one): <pre> obj-$(CONFIG_LOGO_ARMADEUS_CLUT224) += logo_custom_clut224.o</pre> |
# Edit ''$ARMADEUS_LINUX_DIR/drivers/video/logo/logo.c'' | # Edit ''$ARMADEUS_LINUX_DIR/drivers/video/logo/logo.c'' | ||
− | # Add it your logo C struct name at line | + | # Add it your logo C struct name at line 39: <source lang="C">extern const struct linux_logo logo_custom_clut224;</source> |
− | # | + | # Put it your logo C struct name at line 122 (replace current one): |
− | <source lang="C">#ifdef CONFIG_LOGO_ARMADEUS_CLUT224 | + | <source lang="C"> |
+ | #ifdef CONFIG_LOGO_ARMADEUS_CLUT224 | ||
/* Armadeus Linux logo */ | /* Armadeus Linux logo */ | ||
logo = &logo_custom_clut224; | logo = &logo_custom_clut224; | ||
#endif | #endif | ||
− | + | </source> | |
===Recompile & install kernel=== | ===Recompile & install kernel=== | ||
*Make sure that the "Armadeus Logo" option is selected in: | *Make sure that the "Armadeus Logo" option is selected in: | ||
<pre class="host"> | <pre class="host"> | ||
− | $ make | + | $ make linux-menuconfig |
</pre> | </pre> | ||
<pre class="config"> | <pre class="config"> | ||
Line 40: | Line 41: | ||
*Then recompile your kernel: | *Then recompile your kernel: | ||
<pre class="host"> | <pre class="host"> | ||
− | $ make | + | $ make linux |
</pre> | </pre> | ||
and install it on your board. | and install it on your board. | ||
Line 53: | Line 54: | ||
===Deactivate remaining cursor=== | ===Deactivate remaining cursor=== | ||
− | It may be a remaining cursor at the left upper corner of the screen. Indeed virtual console cursor is activated by default in Linux. To deactivate it at boot stage, you will have to | + | It may be a remaining cursor at the left upper corner of the screen. Indeed virtual console cursor is activated by default in Linux. To deactivate it at boot stage, you will have to: |
+ | * on recent kernels (3.8+), follow tips [[FrameBuffer#Tips|here]] | ||
+ | * otherwise: | ||
# Edit source file $ARMADEUS_LINUX_KERNEL/drivers/char/vt.c | # Edit source file $ARMADEUS_LINUX_KERNEL/drivers/char/vt.c | ||
− | # Near line | + | # Near line 1620, in function ''reset_terminal()'', change <source lang="c">vc->vc_deccm = 1;</source> with <source lang="c">vc->vc_deccm = 0;</source> |
# recompile and reflash your kernel | # recompile and reflash your kernel | ||
After this modification, at any moment, you can get your blinking cursor back with: | After this modification, at any moment, you can get your blinking cursor back with: | ||
Line 67: | Line 70: | ||
* http://netpbm.sourceforge.net/doc/pnmquant.html | * http://netpbm.sourceforge.net/doc/pnmquant.html | ||
* [http://www-curri.u-strasbg.fr/documentation/calcul/doc/ProPack/3SP1/docs/man_html/man4/console_codes.4.html Linux console ESC sequences] | * [http://www-curri.u-strasbg.fr/documentation/calcul/doc/ProPack/3SP1/docs/man_html/man4/console_codes.4.html Linux console ESC sequences] | ||
+ | * [[U-Boot_Splash_Screen| U-Boot Splashscreen]] | ||
+ | |||
+ | [[Category: Boot Logo]] |
Latest revision as of 10:28, 21 June 2018
On this page we will explain you how to change the Boot Logo/Screen of Linux.
By default the following screen is displayed on your LCD:
Contents
Create an image to suitable format (C include file)
- create a new image fitting the size of your LCD (320x240, 480x272 or 800x480), with The Gimp (for example).
- save it in PPM RAW file format, let's say my_boot_logo.ppm
- install Netpbm package:
$ sudo apt-get install netpbm
- reduce the number of colors in your image to 224:
$ ppmquant 224 my_boot_logo.ppm > my_boot_logo_224.ppm
- convert it to PPM ASCII format (if pnmnoraw is not available on your distribution (ex: LUbuntu 17.10), try with pnmtoplainpnm):
$ pnmnoraw my_boot_logo_224.ppm > my_boot_logo_ascii_224.ppm
- get the armadeus envt variables:
$ make shell_env && source armadeus_env.sh
- copy the PPM to $ARMADEUS_LINUX_DIR/drivers/video/logo/ directory with a name ending with _clut224.ppm:
$ cp my_boot_logo_ascii_224.ppm $ARMADEUS_LINUX_DIR/drivers/video/logo/logo_custom_clut224.ppm
- Linux will automatically convert your .ppm to a .c file, after you have added it to the build system, using the $ARMADEUS_LINUX_DIR/scripts/pnmtologo script. This is the purpose of the next step.
Add your file to Linux build system
- If you have overwritten $ARMADEUS_LINUX_DIR/drivers/video/logo/logo_armadeus_clut224.ppm with your own logo at the previous stage, then you can jump to the next step; otherwise:
- Edit $ARMADEUS_LINUX_DIR/drivers/video/logo/Makefile
- Put it your logo file name at line 18 (replace current one):
obj-$(CONFIG_LOGO_ARMADEUS_CLUT224) += logo_custom_clut224.o
- Edit $ARMADEUS_LINUX_DIR/drivers/video/logo/logo.c
- Add it your logo C struct name at line 39:
extern const struct linux_logo logo_custom_clut224;
- Put it your logo C struct name at line 122 (replace current one):
#ifdef CONFIG_LOGO_ARMADEUS_CLUT224
/* Armadeus Linux logo */
logo = &logo_custom_clut224;
#endif
Recompile & install kernel
- Make sure that the "Armadeus Logo" option is selected in:
$ make linux-menuconfig
Device Drivers ---> Graphics support ---> [*] Bootup logo ---> [*] 224-color Armadeus Linux logo
- Then recompile your kernel:
$ make linux
and install it on your board.
- Restart your board and you should see your image:
Remove Login from framebuffer terminal
- On your target, edit /etc/inittab
- Comment line 28:
#tty1::respawn:/sbin/getty 38400 tty1
- save it and restart your system
Deactivate remaining cursor
It may be a remaining cursor at the left upper corner of the screen. Indeed virtual console cursor is activated by default in Linux. To deactivate it at boot stage, you will have to:
- on recent kernels (3.8+), follow tips here
- otherwise:
- Edit source file $ARMADEUS_LINUX_KERNEL/drivers/char/vt.c
- Near line 1620, in function reset_terminal(), change with
vc->vc_deccm = 1;
vc->vc_deccm = 0;
- recompile and reflash your kernel
After this modification, at any moment, you can get your blinking cursor back with:
# echo -e '\033[?25h' > /dev/tty1 # echo 1 > /sys/class/graphics/fbcon/cursor_blink