Yocto Linux logo: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|Changing the Linux logo}} {{DocImage|category1=Linux|category2=Yocto}} __toc__ = Create your own logo file = Create your logo in a .png format (logo.png), and ru...")
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{PageHeader|Changing the Linux logo}} {{DocImage|category1=Linux|category2=Yocto}} __toc__
{{PageHeader|Replacing the Linux logo with your own}} {{DocImage|category1=Linux|category2=Yocto}} __toc__


= Create your own logo file =
= Create your own logo file =
Line 15: Line 15:
Configure your kernel and enable the default logo instead of the Variscite logo: Device Drivers -> Graphics support -> Bootup logo -> Standard 224-color Linux logo (Symbol: LOGO_LINUX_CLUT224)<br>
Configure your kernel and enable the default logo instead of the Variscite logo: Device Drivers -> Graphics support -> Bootup logo -> Standard 224-color Linux logo (Symbol: LOGO_LINUX_CLUT224)<br>


If you want to create a different configuration for your own logo rather than overwriting the default one, you can create a patch similar to [https://github.com/varigit/linux-2.6-imx/commit/1a3d71c1c38b058daa0d29140a9cff747e5a7f51 this commit] which adds the Variscite Linux logo to our kernel.
If you want to create a different configuration for your own logo rather than overwriting the default one, you can look at [https://github.com/varigit/linux-2.6-imx/commit/1a3d71c1c38b058daa0d29140a9cff747e5a7f51 this commit] which adds the Variscite Linux logo to our kernel, and make a similar patch of your own.


== Using Yocto ==
== Using Yocto ==
Add your logo_linux_clut224.ppm file to recipes-kernel/linux/files, create a bbappend file for the linux recipe (linux-variscite_4.1.15.bb), and put the following in it:
Add your logo_linux_clut224.ppm file to recipes-kernel/linux/files, create a bbappend file for the linux recipe (recipes-kernel/linux/linux-variscite_%.bbappend), and put the following in it:
<pre>
<pre>
SRC_URI_append = " file://logo_linux_clut224.ppm"
FILESEXTRAPATHS:prepend = "${THISDIR}/${PN}:"
SRC_URI:append = " file://logo_linux_clut224.ppm"


do_configure_prepend() {
TARGET_DEFCONFIG="${B}/.config"
 
do_configure:prepend() {
    # Add the kernel_defconf_variable function
    kernel_defconf_variable() {
      CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
      if test "$2" = "n"
      then
          echo "# CONFIG_$1 is not set" >>  ${TARGET_DEFCONFIG}
      else
          echo "CONFIG_$1=$2" >>  ${TARGET_DEFCONFIG}
      fi
    }
     # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used
     # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used
     if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
     if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
         install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm ${S}/drivers/video/logo/logo_linux_clut224.ppm
         install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm ${S}/drivers/video/logo/logo_linux_clut224.ppm
         kernel_conf_variable LOGO y
         kernel_defconf_variable LOGO y
         kernel_conf_variable LOGO_LINUX_CLUT224 y
         kernel_defconf_variable LOGO_LINUX_CLUT224 y
         kernel_conf_variable LOGO_VARISCITE_CLUT224 n
         kernel_defconf_variable LOGO_VARISCITE_CLUT224 n
     fi
     fi
}
}
</pre>
</pre>
{{Note|For Yocto Hardknott or older, change the overrides for 'SRC_URI:append' and 'do_configure:prepend' to SRC_URI_append and do_configure_prepend.}}

Latest revision as of 23:01, 21 November 2023

Replacing the Linux logo with your own

Create your own logo file

Create your logo in a .png format (logo.png), and run the following to convert it to a 224 colors PPM formatted image file named logo_linux_clut224.ppm:

$ sudo apt-get install netpbm
$ pngtopnm logo.png | ppmquant 224 | pnmnoraw > logo_linux_clut224.ppm

Replace the default logo file in the Linux source

Using the Linux source code directly

Follow the "Build Linux from source code" guide to get the Linux kernel source tree.
Copy your logo_linux_clut224.ppm file to drivers/video/logo/logo_linux_clut224.ppm overwriting the original logo.
Configure your kernel and enable the default logo instead of the Variscite logo: Device Drivers -> Graphics support -> Bootup logo -> Standard 224-color Linux logo (Symbol: LOGO_LINUX_CLUT224)

If you want to create a different configuration for your own logo rather than overwriting the default one, you can look at this commit which adds the Variscite Linux logo to our kernel, and make a similar patch of your own.

Using Yocto

Add your logo_linux_clut224.ppm file to recipes-kernel/linux/files, create a bbappend file for the linux recipe (recipes-kernel/linux/linux-variscite_%.bbappend), and put the following in it:

FILESEXTRAPATHS:prepend = "${THISDIR}/${PN}:"
SRC_URI:append = " file://logo_linux_clut224.ppm"

TARGET_DEFCONFIG="${B}/.config"

do_configure:prepend() {
    # Add the kernel_defconf_variable function
    kernel_defconf_variable() {
       CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
       if test "$2" = "n"
       then
           echo "# CONFIG_$1 is not set" >>  ${TARGET_DEFCONFIG}
       else
           echo "CONFIG_$1=$2" >>  ${TARGET_DEFCONFIG}
       fi
    }
    # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used
    if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
        install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm ${S}/drivers/video/logo/logo_linux_clut224.ppm
        kernel_defconf_variable LOGO y
        kernel_defconf_variable LOGO_LINUX_CLUT224 y
        kernel_defconf_variable LOGO_VARISCITE_CLUT224 n
    fi
}
For Yocto Hardknott or older, change the overrides for 'SRC_URI:append' and 'do_configure:prepend' to SRC_URI_append and do_configure_prepend.